diff --git a/accessapproval/v1/accessapproval-api.json b/accessapproval/v1/accessapproval-api.json index aed30cff359..5d947ae25cb 100644 --- a/accessapproval/v1/accessapproval-api.json +++ b/accessapproval/v1/accessapproval-api.json @@ -754,7 +754,7 @@ } } }, - "revision": "20211130", + "revision": "20220212", "rootUrl": "https://accessapproval.googleapis.com/", "schemas": { "AccessApprovalSettings": { @@ -918,7 +918,7 @@ "type": "string" }, "implicit": { - "description": "This field will be true if the ApprovalRequest was implcitly dismissed due to inaction by the access approval approvers (the request is not acted on by the approvers before the exiration time).", + "description": "This field will be true if the ApprovalRequest was implicitly dismissed due to inaction by the access approval approvers (the request is not acted on by the approvers before the exiration time).", "type": "boolean" } }, diff --git a/accessapproval/v1/accessapproval-gen.go b/accessapproval/v1/accessapproval-gen.go index b3dcfddb88d..54c36e37992 100644 --- a/accessapproval/v1/accessapproval-gen.go +++ b/accessapproval/v1/accessapproval-gen.go @@ -503,7 +503,7 @@ type DismissDecision struct { DismissTime string `json:"dismissTime,omitempty"` // Implicit: This field will be true if the ApprovalRequest was - // implcitly dismissed due to inaction by the access approval approvers + // implicitly dismissed due to inaction by the access approval approvers // (the request is not acted on by the approvers before the exiration // time). Implicit bool `json:"implicit,omitempty"` diff --git a/api-list.json b/api-list.json index 0a303bc0d9f..3bd249fd579 100644 --- a/api-list.json +++ b/api-list.json @@ -1111,6 +1111,36 @@ "documentationLink": "https://cloud.google.com/error-reporting/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "cloudfunctions:v2alpha", + "name": "cloudfunctions", + "version": "v2alpha", + "title": "Cloud Functions API", + "description": "Manages lightweight user-provided functions executed in response to events.", + "discoveryRestUrl": "https://cloudfunctions.googleapis.com/$discovery/rest?version=v2alpha", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/functions", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "cloudfunctions:v2beta", + "name": "cloudfunctions", + "version": "v2beta", + "title": "Cloud Functions API", + "description": "Manages lightweight user-provided functions executed in response to events.", + "discoveryRestUrl": "https://cloudfunctions.googleapis.com/$discovery/rest?version=v2beta", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/functions", + "preferred": false + }, { "kind": "discovery#directoryItem", "id": "cloudfunctions:v1", @@ -1804,6 +1834,21 @@ "documentationLink": "https://cloud.google.com/dataflow/docs/guides/data-pipelines", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "dataplex:v1", + "name": "dataplex", + "version": "v1", + "title": "Cloud Dataplex API", + "description": "Dataplex API is used to manage the lifecycle of data lakes.", + "discoveryRestUrl": "https://dataplex.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/dataplex/docs", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "dataproc:v1", @@ -3486,6 +3531,21 @@ "documentationLink": "https://developers.google.com/my-business/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "mybusinessbusinesscalls:v1", + "name": "mybusinessbusinesscalls", + "version": "v1", + "title": "My Business Business Calls API", + "description": "The My Business Business Calls API manages business calls information of a location on Google.", + "discoveryRestUrl": "https://mybusinessbusinesscalls.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://developers.google.com/my-business/", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "mybusinessbusinessinformation:v1", diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index 7637eb1a098..a7ea88bd39d 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -2486,7 +2486,7 @@ ], "parameters": { "action": { - "description": "Approve or revoke the consumer key by setting this value to `approve` or `revoke`, respectively.", + "description": "Approve or revoke the consumer key by setting this value to `approve` or `revoke`, respectively. The `Content-Type` header must be set to `application/octet-stream`.", "location": "query", "type": "string" }, @@ -7563,7 +7563,7 @@ } } }, - "revision": "20220205", + "revision": "20220210", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -7941,6 +7941,21 @@ "description": "Metadata describing the API proxy", "id": "GoogleCloudApigeeV1ApiProxy", "properties": { + "apiProxyType": { + "description": "Output only. The type of the API proxy.", + "enum": [ + "API_PROXY_TYPE_UNSPECIFIED", + "PROGRAMMABLE", + "CONFIGURABLE" + ], + "enumDescriptions": [ + "API proxy type not specified.", + "Programmable API Proxies enable you to develop APIs with highly flexible behavior using bundled policy configuration and one or more programming languages to describe complex sequential and/or conditional flows of logic.", + "Configurable API Proxies enable you to develop efficient APIs using simple configuration while complex execution control flow logic is handled by Apigee. This type only works with the ARCHIVE deployment type and cannot be combined with the PROXY deployment type." + ], + "readOnly": true, + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" @@ -7963,6 +7978,11 @@ "readOnly": true, "type": "string" }, + "readOnly": { + "description": "Output only. Whether this proxy is read-only. A read-only proxy cannot have new revisions created through calls to CreateApiProxyRevision. A proxy is read-only if it was generated by an archive.", + "readOnly": true, + "type": "boolean" + }, "revision": { "description": "Output only. List of revisons defined for the API proxy.", "items": { @@ -7978,6 +7998,11 @@ "description": "API proxy revision.", "id": "GoogleCloudApigeeV1ApiProxyRevision", "properties": { + "archive": { + "description": "Output only. The archive that generated this proxy revision. This field is only present on proxy revisions that were generated by an archive. Proxies generated by archives cannot be updated, deleted, or deployed to other environments. Format: `organizations/*/environments/*/archiveDeployments/*`", + "readOnly": true, + "type": "string" + }, "basepaths": { "description": "Base URL of the API proxy.", "items": { diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index 797e2b87f3c..271ca621cb9 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -1712,6 +1712,21 @@ func (s *GoogleCloudApigeeV1ApiProductRef) MarshalJSON() ([]byte, error) { // GoogleCloudApigeeV1ApiProxy: Metadata describing the API proxy type GoogleCloudApigeeV1ApiProxy struct { + // ApiProxyType: Output only. The type of the API proxy. + // + // Possible values: + // "API_PROXY_TYPE_UNSPECIFIED" - API proxy type not specified. + // "PROGRAMMABLE" - Programmable API Proxies enable you to develop + // APIs with highly flexible behavior using bundled policy configuration + // and one or more programming languages to describe complex sequential + // and/or conditional flows of logic. + // "CONFIGURABLE" - Configurable API Proxies enable you to develop + // efficient APIs using simple configuration while complex execution + // control flow logic is handled by Apigee. This type only works with + // the ARCHIVE deployment type and cannot be combined with the PROXY + // deployment type. + ApiProxyType string `json:"apiProxyType,omitempty"` + // Labels: User labels applied to this API Proxy. Labels map[string]string `json:"labels,omitempty"` @@ -1725,6 +1740,12 @@ type GoogleCloudApigeeV1ApiProxy struct { // Name: Output only. Name of the API proxy. Name string `json:"name,omitempty"` + // ReadOnly: Output only. Whether this proxy is read-only. A read-only + // proxy cannot have new revisions created through calls to + // CreateApiProxyRevision. A proxy is read-only if it was generated by + // an archive. + ReadOnly bool `json:"readOnly,omitempty"` + // Revision: Output only. List of revisons defined for the API proxy. Revision []string `json:"revision,omitempty"` @@ -1732,7 +1753,7 @@ type GoogleCloudApigeeV1ApiProxy struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Labels") to + // ForceSendFields is a list of field names (e.g. "ApiProxyType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1740,10 +1761,10 @@ type GoogleCloudApigeeV1ApiProxy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Labels") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ApiProxyType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -1757,6 +1778,13 @@ func (s *GoogleCloudApigeeV1ApiProxy) MarshalJSON() ([]byte, error) { // GoogleCloudApigeeV1ApiProxyRevision: API proxy revision. type GoogleCloudApigeeV1ApiProxyRevision struct { + // Archive: Output only. The archive that generated this proxy revision. + // This field is only present on proxy revisions that were generated by + // an archive. Proxies generated by archives cannot be updated, deleted, + // or deployed to other environments. Format: + // `organizations/*/environments/*/archiveDeployments/*` + Archive string `json:"archive,omitempty"` + // Basepaths: Base URL of the API proxy. Basepaths []string `json:"basepaths,omitempty"` @@ -1854,7 +1882,7 @@ type GoogleCloudApigeeV1ApiProxyRevision struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Basepaths") to + // ForceSendFields is a list of field names (e.g. "Archive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1862,7 +1890,7 @@ type GoogleCloudApigeeV1ApiProxyRevision struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Basepaths") to include in + // NullFields is a list of field names (e.g. "Archive") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -22186,7 +22214,8 @@ func (r *OrganizationsDevelopersAppsKeysService) UpdateDeveloperAppKey(name stri // Action sets the optional parameter "action": Approve or revoke the // consumer key by setting this value to `approve` or `revoke`, -// respectively. +// respectively. The `Content-Type` header must be set to +// `application/octet-stream`. func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Action(action string) *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall { c.urlParams_.Set("action", action) return c @@ -22293,7 +22322,7 @@ func (c *OrganizationsDevelopersAppsKeysUpdateDeveloperAppKeyCall) Do(opts ...go // ], // "parameters": { // "action": { - // "description": "Approve or revoke the consumer key by setting this value to `approve` or `revoke`, respectively.", + // "description": "Approve or revoke the consumer key by setting this value to `approve` or `revoke`, respectively. The `Content-Type` header must be set to `application/octet-stream`.", // "location": "query", // "type": "string" // }, diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json index aa785e819c7..45a406d5aec 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json @@ -1307,7 +1307,7 @@ } } }, - "revision": "20211123", + "revision": "20220212", "rootUrl": "https://authorizedbuyersmarketplace.googleapis.com/", "schemas": { "AcceptProposalRequest": { @@ -1577,6 +1577,21 @@ "description": "Message captures data about the creatives in the deal.", "id": "CreativeRequirements", "properties": { + "creativeFormat": { + "description": "Output only. The format of the creative, only applicable for programmatic guaranteed and preferred deals.", + "enum": [ + "CREATIVE_FORMAT_UNSPECIFIED", + "DISPLAY", + "VIDEO" + ], + "enumDescriptions": [ + "A placeholder for an unspecified creative format.", + "Banner creatives such as image or HTML5 assets.", + "Video creatives that can be played in a video player." + ], + "readOnly": true, + "type": "string" + }, "creativePreApprovalPolicy": { "description": "Output only. Specifies the creative pre-approval policy.", "enum": [ @@ -1607,6 +1622,12 @@ "readOnly": true, "type": "string" }, + "maxAdDurationMs": { + "description": "Output only. The max duration of the video creative in milliseconds. only applicable for deals with video creatives.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "programmaticCreativeSource": { "description": "Output only. Specifies the creative source for programmatic deals. PUBLISHER means creative is provided by seller and ADVERTISER means creative is provided by the buyer.", "enum": [ @@ -1621,6 +1642,25 @@ ], "readOnly": true, "type": "string" + }, + "skippableAdType": { + "description": "Output only. Skippable video ads allow viewers to skip ads after 5 seconds. Only applicable for deals with video creatives.", + "enum": [ + "SKIPPABLE_AD_TYPE_UNSPECIFIED", + "SKIPPABLE", + "INSTREAM_SELECT", + "NOT_SKIPPABLE", + "ANY" + ], + "enumDescriptions": [ + "A placeholder for an unspecified skippable ad type.", + "Video ad that can be skipped after 5 seconds. This value will appear in RTB bid requests as SkippableBidRequestType::REQUIRE_SKIPPABLE.", + "Video ad that can be skipped after 5 seconds, and is counted as engaged view after 30 seconds. The creative is hosted on YouTube only, and viewcount of the YouTube video increments after the engaged view. This value will appear in RTB bid requests as SkippableBidRequestType::REQUIRE_SKIPPABLE.", + "This video ad is not skippable. This value will appear in RTB bid requests as SkippableBidRequestType::BLOCK_SKIPPABLE.", + "This video ad can be skipped after 5 seconds or not-skippable. This value will appear in RTB bid requests as SkippableBidRequestType::ALLOW_SKIPPABLE." + ], + "readOnly": true, + "type": "string" } }, "type": "object" diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go index 848f5c86b50..2867cb9f245 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go @@ -691,6 +691,16 @@ func (s *Contact) MarshalJSON() ([]byte, error) { // CreativeRequirements: Message captures data about the creatives in // the deal. type CreativeRequirements struct { + // CreativeFormat: Output only. The format of the creative, only + // applicable for programmatic guaranteed and preferred deals. + // + // Possible values: + // "CREATIVE_FORMAT_UNSPECIFIED" - A placeholder for an unspecified + // creative format. + // "DISPLAY" - Banner creatives such as image or HTML5 assets. + // "VIDEO" - Video creatives that can be played in a video player. + CreativeFormat string `json:"creativeFormat,omitempty"` + // CreativePreApprovalPolicy: Output only. Specifies the creative // pre-approval policy. // @@ -715,6 +725,10 @@ type CreativeRequirements struct { // frame option. CreativeSafeFrameCompatibility string `json:"creativeSafeFrameCompatibility,omitempty"` + // MaxAdDurationMs: Output only. The max duration of the video creative + // in milliseconds. only applicable for deals with video creatives. + MaxAdDurationMs int64 `json:"maxAdDurationMs,omitempty,string"` + // ProgrammaticCreativeSource: Output only. Specifies the creative // source for programmatic deals. PUBLISHER means creative is provided // by seller and ADVERTISER means creative is provided by the buyer. @@ -726,22 +740,44 @@ type CreativeRequirements struct { // "PUBLISHER" - The publisher provides the creatives to be served. ProgrammaticCreativeSource string `json:"programmaticCreativeSource,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "CreativePreApprovalPolicy") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // SkippableAdType: Output only. Skippable video ads allow viewers to + // skip ads after 5 seconds. Only applicable for deals with video + // creatives. + // + // Possible values: + // "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an unspecified + // skippable ad type. + // "SKIPPABLE" - Video ad that can be skipped after 5 seconds. This + // value will appear in RTB bid requests as + // SkippableBidRequestType::REQUIRE_SKIPPABLE. + // "INSTREAM_SELECT" - Video ad that can be skipped after 5 seconds, + // and is counted as engaged view after 30 seconds. The creative is + // hosted on YouTube only, and viewcount of the YouTube video increments + // after the engaged view. This value will appear in RTB bid requests as + // SkippableBidRequestType::REQUIRE_SKIPPABLE. + // "NOT_SKIPPABLE" - This video ad is not skippable. This value will + // appear in RTB bid requests as + // SkippableBidRequestType::BLOCK_SKIPPABLE. + // "ANY" - This video ad can be skipped after 5 seconds or + // not-skippable. This value will appear in RTB bid requests as + // SkippableBidRequestType::ALLOW_SKIPPABLE. + SkippableAdType string `json:"skippableAdType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreativeFormat") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "CreativePreApprovalPolicy") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "CreativeFormat") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/baremetalsolution/v2/baremetalsolution-api.json b/baremetalsolution/v2/baremetalsolution-api.json index c32633021dc..feb0e4fe776 100644 --- a/baremetalsolution/v2/baremetalsolution-api.json +++ b/baremetalsolution/v2/baremetalsolution-api.json @@ -305,6 +305,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "start": { + "description": "Starts a server that was shutdown.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:start", + "httpMethod": "POST", + "id": "baremetalsolution.projects.locations.instances.start", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:start", + "request": { + "$ref": "StartInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -376,6 +404,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "listNetworkUsage": { + "description": "List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/networks:listNetworkUsage", + "httpMethod": "GET", + "id": "baremetalsolution.projects.locations.networks.listNetworkUsage", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. Parent value (project and location).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+location}/networks:listNetworkUsage", + "response": { + "$ref": "ListNetworkUsageResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "patch": { "description": "Update details of a single network.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/networks/{networksId}", @@ -412,6 +465,182 @@ } } }, + "nfsShares": { + "methods": { + "get": { + "description": "Get details of a single NFS share.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + "httpMethod": "GET", + "id": "baremetalsolution.projects.locations.nfsShares.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "NfsShare" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List NFS shares.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares", + "httpMethod": "GET", + "id": "baremetalsolution.projects.locations.nfsShares.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results from the server.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListNfsSharesRequest.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/nfsShares", + "response": { + "$ref": "ListNfsSharesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update details of a single NFS share.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + "httpMethod": "PATCH", + "id": "baremetalsolution.projects.locations.nfsShares.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The name of the NFS share.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to update. The only currently supported fields are: `labels`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "NfsShare" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "provisioningConfigs": { + "methods": { + "submit": { + "description": "Submit a provisiong configuration for a given project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs:submit", + "httpMethod": "POST", + "id": "baremetalsolution.projects.locations.provisioningConfigs.submit", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent project and location containing the ProvisioningConfig.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/provisioningConfigs:submit", + "request": { + "$ref": "SubmitProvisioningConfigRequest" + }, + "response": { + "$ref": "SubmitProvisioningConfigResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "provisioningQuotas": { + "methods": { + "list": { + "description": "List the budget details to provision resources on a given project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningQuotas", + "httpMethod": "GET", + "id": "baremetalsolution.projects.locations.provisioningQuotas.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default. Notice that page_size field is not supported and won't be respected in the API request for now, will be updated when pagination is supported.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results from the server.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListProvisioningQuotasRequest.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/provisioningQuotas", + "response": { + "$ref": "ListProvisioningQuotasResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "snapshotSchedulePolicies": { "methods": { "create": { @@ -659,7 +888,7 @@ "type": "string" }, "updateMask": { - "description": "The list of fields to update. The only currently supported fields are: `snapshot_auto_delete_behavior` `snapshot_schedule_policy_name` 'labels'", + "description": "The list of fields to update. The only currently supported fields are: `snapshot_auto_delete_behavior` `snapshot_schedule_policy_name` 'labels' 'requested_size_gib'", "format": "google-fieldmask", "location": "query", "type": "string" @@ -896,9 +1125,54 @@ } } }, - "revision": "20220119", + "revision": "20220209", "rootUrl": "https://baremetalsolution.googleapis.com/", "schemas": { + "AllowedClient": { + "description": "Represents an 'access point' for the share.", + "id": "AllowedClient", + "properties": { + "allowDev": { + "description": "Allow dev flag. Which controls whether to allow creation of devices.", + "type": "boolean" + }, + "allowSuid": { + "description": "Allow the setuid flag.", + "type": "boolean" + }, + "allowedClientsCidr": { + "description": "The subnet of IP addresses permitted to access the share.", + "type": "string" + }, + "mountPermissions": { + "description": "Mount permissions.", + "enum": [ + "MOUNT_PERMISSIONS_UNSPECIFIED", + "READ", + "READ_WRITE" + ], + "enumDescriptions": [ + "Permissions were not specified.", + "NFS share can be mount with read-only permissions.", + "NFS share can be mount with read-write permissions." + ], + "type": "string" + }, + "network": { + "description": "The network the access point sits on.", + "type": "string" + }, + "noRootSquash": { + "description": "Disable root squashing, which is a feature of NFS. Root squash is a special mapping of the remote superuser (root) identity when using identity authentication.", + "type": "boolean" + }, + "shareIp": { + "description": "The IP address of the share on this network.", + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", "id": "Empty", @@ -982,6 +1256,86 @@ }, "type": "object" }, + "InstanceConfig": { + "description": "Configuration parameters for a new instance.", + "id": "InstanceConfig", + "properties": { + "clientNetwork": { + "$ref": "NetworkAddress", + "description": "Client network address." + }, + "hyperthreading": { + "description": "Whether the instance should be provisioned with Hyperthreading enabled.", + "type": "boolean" + }, + "id": { + "description": "A transient unique identifier to idenfity an instance within an ProvisioningConfig request.", + "type": "string" + }, + "instanceType": { + "description": "Instance type. [Available types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)", + "type": "string" + }, + "name": { + "description": "Output only. The name of the instance config.", + "readOnly": true, + "type": "string" + }, + "osImage": { + "description": "OS image to initialize the instance. [Available images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)", + "type": "string" + }, + "privateNetwork": { + "$ref": "NetworkAddress", + "description": "Private network address, if any." + }, + "userNote": { + "description": "User note field, it can be used by customers to add additional information for the BMS Ops team .", + "type": "string" + } + }, + "type": "object" + }, + "InstanceQuota": { + "description": "A resource budget.", + "id": "InstanceQuota", + "properties": { + "availableMachineCount": { + "description": "Number of machines than can be created for the given location and instance_type.", + "format": "int32", + "type": "integer" + }, + "instanceType": { + "description": "Instance type.", + "type": "string" + }, + "location": { + "description": "Location where the quota applies.", + "type": "string" + }, + "name": { + "description": "Output only. The name of the instance quota.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "IntakeVlanAttachment": { + "description": "A GCP vlan attachment.", + "id": "IntakeVlanAttachment", + "properties": { + "id": { + "description": "Identifier of the VLAN attachment.", + "type": "string" + }, + "pairingKey": { + "description": "Attachment pairing key.", + "type": "string" + } + }, + "type": "object" + }, "ListInstancesResponse": { "description": "Response message for the list of servers.", "id": "ListInstancesResponse", @@ -1050,6 +1404,20 @@ }, "type": "object" }, + "ListNetworkUsageResponse": { + "description": "Response with Networks with IPs", + "id": "ListNetworkUsageResponse", + "properties": { + "networks": { + "description": "Networks with IPs.", + "items": { + "$ref": "NetworkUsage" + }, + "type": "array" + } + }, + "type": "object" + }, "ListNetworksResponse": { "description": "Response message containing the list of networks.", "id": "ListNetworksResponse", @@ -1075,7 +1443,50 @@ }, "type": "object" }, - "ListSnapshotSchedulePoliciesResponse": { + "ListNfsSharesResponse": { + "description": "Response message containing the list of NFS shares.", + "id": "ListNfsSharesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results from the server.", + "type": "string" + }, + "nfsShares": { + "description": "The list of NFS shares.", + "items": { + "$ref": "NfsShare" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListProvisioningQuotasResponse": { + "description": "Response message for the list of provisioning quotas.", + "id": "ListProvisioningQuotasResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "provisioningQuotas": { + "description": "The provisioning quotas registered in this project.", + "items": { + "$ref": "ProvisioningQuota" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListSnapshotSchedulePoliciesResponse": { "description": "Response message containing the list of snapshot schedule policies.", "id": "ListSnapshotSchedulePoliciesResponse", "properties": { @@ -1258,6 +1669,23 @@ }, "type": "object" }, + "LunRange": { + "description": "A LUN(Logical Unit Number) range.", + "id": "LunRange", + "properties": { + "quantity": { + "description": "Number of LUNs to create.", + "format": "int32", + "type": "integer" + }, + "sizeGb": { + "description": "The requested size of each LUN, in GB.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Network": { "description": "A Network.", "id": "Network", @@ -1336,6 +1764,216 @@ }, "type": "object" }, + "NetworkAddress": { + "description": "A network.", + "id": "NetworkAddress", + "properties": { + "address": { + "description": "IPv4 address to be assigned to the server.", + "type": "string" + }, + "existingNetworkId": { + "description": "Name of the existing network to use.", + "type": "string" + }, + "networkId": { + "description": "Id of the network to use, within the same ProvisioningConfig request.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkConfig": { + "description": "Configuration parameters for a new network.", + "id": "NetworkConfig", + "properties": { + "bandwidth": { + "description": "Interconnect bandwidth. Set only when type is CLIENT.", + "enum": [ + "BANDWIDTH_UNSPECIFIED", + "BW_1_GBPS", + "BW_2_GBPS", + "BW_5_GBPS", + "BW_10_GBPS" + ], + "enumDescriptions": [ + "Unspecified value.", + "1 Gbps.", + "2 Gbps.", + "5 Gbps.", + "10 Gbps." + ], + "type": "string" + }, + "cidr": { + "description": "CIDR range of the network.", + "type": "string" + }, + "id": { + "description": "A transient unique identifier to identify a volume within an ProvisioningConfig request.", + "type": "string" + }, + "name": { + "description": "Output only. The name of the network config.", + "readOnly": true, + "type": "string" + }, + "serviceCidr": { + "description": "Service CIDR, if any.", + "enum": [ + "SERVICE_CIDR_UNSPECIFIED", + "DISABLED", + "HIGH_26", + "HIGH_27", + "HIGH_28" + ], + "enumDescriptions": [ + "Unspecified value.", + "Services are disabled for the given network.", + "Use the highest /26 block of the network to host services.", + "Use the highest /27 block of the network to host services.", + "Use the highest /28 block of the network to host services." + ], + "type": "string" + }, + "type": { + "description": "The type of this network, either Client or Private.", + "enum": [ + "TYPE_UNSPECIFIED", + "CLIENT", + "PRIVATE" + ], + "enumDescriptions": [ + "Unspecified value.", + "Client network, that is a network peered to a GCP VPC.", + "Private network, that is a network local to the BMS POD." + ], + "type": "string" + }, + "userNote": { + "description": "User note field, it can be used by customers to add additional information for the BMS Ops team (b/194021617).", + "type": "string" + }, + "vlanAttachments": { + "description": "List of VLAN attachments. As of now there are always 2 attachments, but it is going to change in the future (multi vlan).", + "items": { + "$ref": "IntakeVlanAttachment" + }, + "type": "array" + } + }, + "type": "object" + }, + "NetworkUsage": { + "description": "Network with all used IP addresses.", + "id": "NetworkUsage", + "properties": { + "network": { + "$ref": "Network", + "description": "Network." + }, + "usedIps": { + "description": "All used IP addresses in this network.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "NfsExport": { + "description": "A NFS export entry.", + "id": "NfsExport", + "properties": { + "allowDev": { + "description": "Allow dev flag in NfsShare AllowedClientsRequest.", + "type": "boolean" + }, + "allowSuid": { + "description": "Allow the setuid flag.", + "type": "boolean" + }, + "cidr": { + "description": "A CIDR range.", + "type": "string" + }, + "machineId": { + "description": "Either a single machine, identified by an ID, or a comma-separated list of machine IDs.", + "type": "string" + }, + "networkId": { + "description": "Network to use to publish the export.", + "type": "string" + }, + "noRootSquash": { + "description": "Disable root squashing, which is a feature of NFS. Root squash is a special mapping of the remote superuser (root) identity when using identity authentication.", + "type": "boolean" + }, + "permissions": { + "description": "Export permissions.", + "enum": [ + "PERMISSIONS_UNSPECIFIED", + "READ_ONLY", + "READ_WRITE" + ], + "enumDescriptions": [ + "Unspecified value.", + "Read-only permission.", + "Read-write permission." + ], + "type": "string" + } + }, + "type": "object" + }, + "NfsShare": { + "description": "An NFS share.", + "id": "NfsShare", + "properties": { + "allowedClients": { + "description": "List of allowed access points.", + "items": { + "$ref": "AllowedClient" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels as key value pairs.", + "type": "object" + }, + "name": { + "description": "Output only. The name of the NFS share.", + "readOnly": true, + "type": "string" + }, + "nfsShareId": { + "description": "Output only. An identifier for the NFS share, generated by the backend.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "The state of the NFS share.", + "enum": [ + "STATE_UNSPECIFIED", + "PROVISIONED" + ], + "enumDescriptions": [ + "The share is in an unknown state.", + "The share has been provisioned." + ], + "type": "string" + }, + "volume": { + "description": "The volume containing the share.", + "type": "string" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -1371,6 +2009,92 @@ }, "type": "object" }, + "ProvisioningConfig": { + "description": "A provisioning configuration.", + "id": "ProvisioningConfig", + "properties": { + "handoverServiceAccount": { + "description": "A service account to enable customers to access instance credentials upon handover.", + "type": "string" + }, + "instances": { + "description": "Instances to be created.", + "items": { + "$ref": "InstanceConfig" + }, + "type": "array" + }, + "name": { + "description": "Output only. The name of the provisioning config.", + "readOnly": true, + "type": "string" + }, + "networks": { + "description": "Networks to be created.", + "items": { + "$ref": "NetworkConfig" + }, + "type": "array" + }, + "ticketId": { + "description": "A generated buganizer id to track provisioning request.", + "type": "string" + }, + "volumes": { + "description": "Volumes to be created.", + "items": { + "$ref": "VolumeConfig" + }, + "type": "array" + } + }, + "type": "object" + }, + "ProvisioningQuota": { + "description": "A provisioning quota for a given project.", + "id": "ProvisioningQuota", + "properties": { + "assetType": { + "description": "The asset type of this provisioning quota.", + "enum": [ + "ASSET_TYPE_UNSPECIFIED", + "ASSET_TYPE_SERVER", + "ASSET_TYPE_STORAGE", + "ASSET_TYPE_NETWORK" + ], + "enumDescriptions": [ + "The unspecified type.", + "The server asset type.", + "The storage asset type.", + "The network asset type." + ], + "type": "string" + }, + "availableCount": { + "description": "The available count of the provisioning quota.", + "format": "int32", + "type": "integer" + }, + "gcpService": { + "description": "The gcp service of the provisioning quota.", + "type": "string" + }, + "instanceQuota": { + "$ref": "InstanceQuota", + "description": "Instance quota." + }, + "location": { + "description": "The specific location of the provisioining quota.", + "type": "string" + }, + "name": { + "description": "Output only. The name of the provisioning quota.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "QosPolicy": { "description": "QOS policy parameters.", "id": "QosPolicy", @@ -1467,10 +2191,28 @@ "$ref": "Schedule" }, "type": "array" + }, + "state": { + "description": "The state of the snapshot schedule policy.", + "enum": [ + "STATE_UNSPECIFIED", + "PROVISIONED" + ], + "enumDescriptions": [ + "The policy is in an unknown state.", + "The policy is been provisioned." + ], + "type": "string" } }, "type": "object" }, + "StartInstanceRequest": { + "description": "Message requesting to start a server.", + "id": "StartInstanceRequest", + "properties": {}, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -1498,6 +2240,32 @@ }, "type": "object" }, + "SubmitProvisioningConfigRequest": { + "description": "Request for SubmitProvisioningConfig.", + "id": "SubmitProvisioningConfigRequest", + "properties": { + "email": { + "description": "Optional. Email provided to send a confirmation with provisioning config to.", + "type": "string" + }, + "provisioningConfig": { + "$ref": "ProvisioningConfig", + "description": "Required. The ProvisioningConfig to create." + } + }, + "type": "object" + }, + "SubmitProvisioningConfigResponse": { + "description": "Response for SubmitProvisioningConfig.", + "id": "SubmitProvisioningConfigResponse", + "properties": { + "provisioningConfig": { + "$ref": "ProvisioningConfig", + "description": "The submitted provisioning config." + } + }, + "type": "object" + }, "VRF": { "description": "A network VRF.", "id": "VRF", @@ -1651,6 +2419,84 @@ }, "type": "object" }, + "VolumeConfig": { + "description": "Configuration parameters for a new volume.", + "id": "VolumeConfig", + "properties": { + "id": { + "description": "A transient unique identifier to identify a volume within an ProvisioningConfig request.", + "type": "string" + }, + "lunRanges": { + "description": "LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.", + "items": { + "$ref": "LunRange" + }, + "type": "array" + }, + "machineIds": { + "description": "Machine ids connected to this volume. Set only when protocol is PROTOCOL_FC.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Output only. The name of the volume config.", + "readOnly": true, + "type": "string" + }, + "nfsExports": { + "description": "NFS exports. Set only when protocol is PROTOCOL_NFS.", + "items": { + "$ref": "NfsExport" + }, + "type": "array" + }, + "protocol": { + "description": "Volume protocol.", + "enum": [ + "PROTOCOL_UNSPECIFIED", + "PROTOCOL_FC", + "PROTOCOL_NFS" + ], + "enumDescriptions": [ + "Unspecified value.", + "Fibre channel.", + "Network file system." + ], + "type": "string" + }, + "sizeGb": { + "description": "The requested size of this volume, in GB.", + "format": "int32", + "type": "integer" + }, + "snapshotsEnabled": { + "description": "Whether snapshots should be enabled.", + "type": "boolean" + }, + "type": { + "description": "The type of this Volume.", + "enum": [ + "TYPE_UNSPECIFIED", + "FLASH", + "DISK" + ], + "enumDescriptions": [ + "The unspecified type.", + "This Volume is on flash.", + "This Volume is on disk." + ], + "type": "string" + }, + "userNote": { + "description": "User note field, it can be used by customers to add additional information for the BMS Ops team (b/194021617).", + "type": "string" + } + }, + "type": "object" + }, "VolumeSnapshot": { "description": "Snapshot registered for a given storage volume.", "id": "VolumeSnapshot", diff --git a/baremetalsolution/v2/baremetalsolution-gen.go b/baremetalsolution/v2/baremetalsolution-gen.go index e7510ebb121..b8917241aad 100644 --- a/baremetalsolution/v2/baremetalsolution-gen.go +++ b/baremetalsolution/v2/baremetalsolution-gen.go @@ -153,6 +153,9 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Instances = NewProjectsLocationsInstancesService(s) rs.Networks = NewProjectsLocationsNetworksService(s) + rs.NfsShares = NewProjectsLocationsNfsSharesService(s) + rs.ProvisioningConfigs = NewProjectsLocationsProvisioningConfigsService(s) + rs.ProvisioningQuotas = NewProjectsLocationsProvisioningQuotasService(s) rs.SnapshotSchedulePolicies = NewProjectsLocationsSnapshotSchedulePoliciesService(s) rs.Volumes = NewProjectsLocationsVolumesService(s) return rs @@ -165,6 +168,12 @@ type ProjectsLocationsService struct { Networks *ProjectsLocationsNetworksService + NfsShares *ProjectsLocationsNfsSharesService + + ProvisioningConfigs *ProjectsLocationsProvisioningConfigsService + + ProvisioningQuotas *ProjectsLocationsProvisioningQuotasService + SnapshotSchedulePolicies *ProjectsLocationsSnapshotSchedulePoliciesService Volumes *ProjectsLocationsVolumesService @@ -188,6 +197,33 @@ type ProjectsLocationsNetworksService struct { s *Service } +func NewProjectsLocationsNfsSharesService(s *Service) *ProjectsLocationsNfsSharesService { + rs := &ProjectsLocationsNfsSharesService{s: s} + return rs +} + +type ProjectsLocationsNfsSharesService struct { + s *Service +} + +func NewProjectsLocationsProvisioningConfigsService(s *Service) *ProjectsLocationsProvisioningConfigsService { + rs := &ProjectsLocationsProvisioningConfigsService{s: s} + return rs +} + +type ProjectsLocationsProvisioningConfigsService struct { + s *Service +} + +func NewProjectsLocationsProvisioningQuotasService(s *Service) *ProjectsLocationsProvisioningQuotasService { + rs := &ProjectsLocationsProvisioningQuotasService{s: s} + return rs +} + +type ProjectsLocationsProvisioningQuotasService struct { + s *Service +} + func NewProjectsLocationsSnapshotSchedulePoliciesService(s *Service) *ProjectsLocationsSnapshotSchedulePoliciesService { rs := &ProjectsLocationsSnapshotSchedulePoliciesService{s: s} return rs @@ -230,6 +266,61 @@ type ProjectsLocationsVolumesSnapshotsService struct { s *Service } +// AllowedClient: Represents an 'access point' for the share. +type AllowedClient struct { + // AllowDev: Allow dev flag. Which controls whether to allow creation of + // devices. + AllowDev bool `json:"allowDev,omitempty"` + + // AllowSuid: Allow the setuid flag. + AllowSuid bool `json:"allowSuid,omitempty"` + + // AllowedClientsCidr: The subnet of IP addresses permitted to access + // the share. + AllowedClientsCidr string `json:"allowedClientsCidr,omitempty"` + + // MountPermissions: Mount permissions. + // + // Possible values: + // "MOUNT_PERMISSIONS_UNSPECIFIED" - Permissions were not specified. + // "READ" - NFS share can be mount with read-only permissions. + // "READ_WRITE" - NFS share can be mount with read-write permissions. + MountPermissions string `json:"mountPermissions,omitempty"` + + // Network: The network the access point sits on. + Network string `json:"network,omitempty"` + + // NoRootSquash: Disable root squashing, which is a feature of NFS. Root + // squash is a special mapping of the remote superuser (root) identity + // when using identity authentication. + NoRootSquash bool `json:"noRootSquash,omitempty"` + + // ShareIp: The IP address of the share on this network. + ShareIp string `json:"shareIp,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowDev") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowDev") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AllowedClient) MarshalJSON() ([]byte, error) { + type NoMethod AllowedClient + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -317,6 +408,131 @@ func (s *Instance) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceConfig: Configuration parameters for a new instance. +type InstanceConfig struct { + // ClientNetwork: Client network address. + ClientNetwork *NetworkAddress `json:"clientNetwork,omitempty"` + + // Hyperthreading: Whether the instance should be provisioned with + // Hyperthreading enabled. + Hyperthreading bool `json:"hyperthreading,omitempty"` + + // Id: A transient unique identifier to idenfity an instance within an + // ProvisioningConfig request. + Id string `json:"id,omitempty"` + + // InstanceType: Instance type. Available types + // (https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + InstanceType string `json:"instanceType,omitempty"` + + // Name: Output only. The name of the instance config. + Name string `json:"name,omitempty"` + + // OsImage: OS image to initialize the instance. Available images + // (https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations) + OsImage string `json:"osImage,omitempty"` + + // PrivateNetwork: Private network address, if any. + PrivateNetwork *NetworkAddress `json:"privateNetwork,omitempty"` + + // UserNote: User note field, it can be used by customers to add + // additional information for the BMS Ops team . + UserNote string `json:"userNote,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClientNetwork") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClientNetwork") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod InstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InstanceQuota: A resource budget. +type InstanceQuota struct { + // AvailableMachineCount: Number of machines than can be created for the + // given location and instance_type. + AvailableMachineCount int64 `json:"availableMachineCount,omitempty"` + + // InstanceType: Instance type. + InstanceType string `json:"instanceType,omitempty"` + + // Location: Location where the quota applies. + Location string `json:"location,omitempty"` + + // Name: Output only. The name of the instance quota. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AvailableMachineCount") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AvailableMachineCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstanceQuota) MarshalJSON() ([]byte, error) { + type NoMethod InstanceQuota + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// IntakeVlanAttachment: A GCP vlan attachment. +type IntakeVlanAttachment struct { + // Id: Identifier of the VLAN attachment. + Id string `json:"id,omitempty"` + + // PairingKey: Attachment pairing key. + PairingKey string `json:"pairingKey,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IntakeVlanAttachment) MarshalJSON() ([]byte, error) { + type NoMethod IntakeVlanAttachment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListInstancesResponse: Response message for the list of servers. type ListInstancesResponse struct { // Instances: The list of servers. @@ -431,6 +647,38 @@ func (s *ListLunsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListNetworkUsageResponse: Response with Networks with IPs +type ListNetworkUsageResponse struct { + // Networks: Networks with IPs. + Networks []*NetworkUsage `json:"networks,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Networks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Networks") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListNetworkUsageResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListNetworkUsageResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListNetworksResponse: Response message containing the list of // networks. type ListNetworksResponse struct { @@ -470,6 +718,83 @@ func (s *ListNetworksResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListNfsSharesResponse: Response message containing the list of NFS +// shares. +type ListNfsSharesResponse struct { + // NextPageToken: A token identifying a page of results from the server. + NextPageToken string `json:"nextPageToken,omitempty"` + + // NfsShares: The list of NFS shares. + NfsShares []*NfsShare `json:"nfsShares,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListNfsSharesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListNfsSharesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListProvisioningQuotasResponse: Response message for the list of +// provisioning quotas. +type ListProvisioningQuotasResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ProvisioningQuotas: The provisioning quotas registered in this + // project. + ProvisioningQuotas []*ProvisioningQuota `json:"provisioningQuotas,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListProvisioningQuotasResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListProvisioningQuotasResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListSnapshotSchedulePoliciesResponse: Response message containing the // list of snapshot schedule policies. type ListSnapshotSchedulePoliciesResponse struct { @@ -714,6 +1039,37 @@ func (s *Lun) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LunRange: A LUN(Logical Unit Number) range. +type LunRange struct { + // Quantity: Number of LUNs to create. + Quantity int64 `json:"quantity,omitempty"` + + // SizeGb: The requested size of each LUN, in GB. + SizeGb int64 `json:"sizeGb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Quantity") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Quantity") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LunRange) MarshalJSON() ([]byte, error) { + type NoMethod LunRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Network: A Network. type Network struct { // Cidr: The cidr of the Network. @@ -790,34 +1146,282 @@ func (s *Network) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Operation: This resource represents a long-running operation that is -// the result of a network API call. -type Operation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. If `true`, the operation is completed, and either `error` - // or `response` is available. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. - Error *Status `json:"error,omitempty"` +// NetworkAddress: A network. +type NetworkAddress struct { + // Address: IPv4 address to be assigned to the server. + Address string `json:"address,omitempty"` - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // ExistingNetworkId: Name of the existing network to use. + ExistingNetworkId string `json:"existingNetworkId,omitempty"` - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the `name` should be a resource name ending with - // `operations/{unique_id}`. - Name string `json:"name,omitempty"` + // NetworkId: Id of the network to use, within the same + // ProvisioningConfig request. + NetworkId string `json:"networkId,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the - // response is `google.protobuf.Empty`. If the original method is + // ForceSendFields is a list of field names (e.g. "Address") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Address") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkAddress) MarshalJSON() ([]byte, error) { + type NoMethod NetworkAddress + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkConfig: Configuration parameters for a new network. +type NetworkConfig struct { + // Bandwidth: Interconnect bandwidth. Set only when type is CLIENT. + // + // Possible values: + // "BANDWIDTH_UNSPECIFIED" - Unspecified value. + // "BW_1_GBPS" - 1 Gbps. + // "BW_2_GBPS" - 2 Gbps. + // "BW_5_GBPS" - 5 Gbps. + // "BW_10_GBPS" - 10 Gbps. + Bandwidth string `json:"bandwidth,omitempty"` + + // Cidr: CIDR range of the network. + Cidr string `json:"cidr,omitempty"` + + // Id: A transient unique identifier to identify a volume within an + // ProvisioningConfig request. + Id string `json:"id,omitempty"` + + // Name: Output only. The name of the network config. + Name string `json:"name,omitempty"` + + // ServiceCidr: Service CIDR, if any. + // + // Possible values: + // "SERVICE_CIDR_UNSPECIFIED" - Unspecified value. + // "DISABLED" - Services are disabled for the given network. + // "HIGH_26" - Use the highest /26 block of the network to host + // services. + // "HIGH_27" - Use the highest /27 block of the network to host + // services. + // "HIGH_28" - Use the highest /28 block of the network to host + // services. + ServiceCidr string `json:"serviceCidr,omitempty"` + + // Type: The type of this network, either Client or Private. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified value. + // "CLIENT" - Client network, that is a network peered to a GCP VPC. + // "PRIVATE" - Private network, that is a network local to the BMS + // POD. + Type string `json:"type,omitempty"` + + // UserNote: User note field, it can be used by customers to add + // additional information for the BMS Ops team (b/194021617). + UserNote string `json:"userNote,omitempty"` + + // VlanAttachments: List of VLAN attachments. As of now there are always + // 2 attachments, but it is going to change in the future (multi vlan). + VlanAttachments []*IntakeVlanAttachment `json:"vlanAttachments,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bandwidth") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bandwidth") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkUsage: Network with all used IP addresses. +type NetworkUsage struct { + // Network: Network. + Network *Network `json:"network,omitempty"` + + // UsedIps: All used IP addresses in this network. + UsedIps []string `json:"usedIps,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Network") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkUsage) MarshalJSON() ([]byte, error) { + type NoMethod NetworkUsage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NfsExport: A NFS export entry. +type NfsExport struct { + // AllowDev: Allow dev flag in NfsShare AllowedClientsRequest. + AllowDev bool `json:"allowDev,omitempty"` + + // AllowSuid: Allow the setuid flag. + AllowSuid bool `json:"allowSuid,omitempty"` + + // Cidr: A CIDR range. + Cidr string `json:"cidr,omitempty"` + + // MachineId: Either a single machine, identified by an ID, or a + // comma-separated list of machine IDs. + MachineId string `json:"machineId,omitempty"` + + // NetworkId: Network to use to publish the export. + NetworkId string `json:"networkId,omitempty"` + + // NoRootSquash: Disable root squashing, which is a feature of NFS. Root + // squash is a special mapping of the remote superuser (root) identity + // when using identity authentication. + NoRootSquash bool `json:"noRootSquash,omitempty"` + + // Permissions: Export permissions. + // + // Possible values: + // "PERMISSIONS_UNSPECIFIED" - Unspecified value. + // "READ_ONLY" - Read-only permission. + // "READ_WRITE" - Read-write permission. + Permissions string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowDev") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowDev") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NfsExport) MarshalJSON() ([]byte, error) { + type NoMethod NfsExport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NfsShare: An NFS share. +type NfsShare struct { + // AllowedClients: List of allowed access points. + AllowedClients []*AllowedClient `json:"allowedClients,omitempty"` + + // Labels: Labels as key value pairs. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The name of the NFS share. + Name string `json:"name,omitempty"` + + // NfsShareId: Output only. An identifier for the NFS share, generated + // by the backend. + NfsShareId string `json:"nfsShareId,omitempty"` + + // State: The state of the NFS share. + // + // Possible values: + // "STATE_UNSPECIFIED" - The share is in an unknown state. + // "PROVISIONED" - The share has been provisioned. + State string `json:"state,omitempty"` + + // Volume: The volume containing the share. + Volume string `json:"volume,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AllowedClients") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowedClients") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NfsShare) MarshalJSON() ([]byte, error) { + type NoMethod NfsShare + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type // `XxxResponse`, where `Xxx` is the original method name. For example, @@ -852,6 +1456,101 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ProvisioningConfig: A provisioning configuration. +type ProvisioningConfig struct { + // HandoverServiceAccount: A service account to enable customers to + // access instance credentials upon handover. + HandoverServiceAccount string `json:"handoverServiceAccount,omitempty"` + + // Instances: Instances to be created. + Instances []*InstanceConfig `json:"instances,omitempty"` + + // Name: Output only. The name of the provisioning config. + Name string `json:"name,omitempty"` + + // Networks: Networks to be created. + Networks []*NetworkConfig `json:"networks,omitempty"` + + // TicketId: A generated buganizer id to track provisioning request. + TicketId string `json:"ticketId,omitempty"` + + // Volumes: Volumes to be created. + Volumes []*VolumeConfig `json:"volumes,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "HandoverServiceAccount") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HandoverServiceAccount") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ProvisioningConfig) MarshalJSON() ([]byte, error) { + type NoMethod ProvisioningConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ProvisioningQuota: A provisioning quota for a given project. +type ProvisioningQuota struct { + // AssetType: The asset type of this provisioning quota. + // + // Possible values: + // "ASSET_TYPE_UNSPECIFIED" - The unspecified type. + // "ASSET_TYPE_SERVER" - The server asset type. + // "ASSET_TYPE_STORAGE" - The storage asset type. + // "ASSET_TYPE_NETWORK" - The network asset type. + AssetType string `json:"assetType,omitempty"` + + // AvailableCount: The available count of the provisioning quota. + AvailableCount int64 `json:"availableCount,omitempty"` + + // GcpService: The gcp service of the provisioning quota. + GcpService string `json:"gcpService,omitempty"` + + // InstanceQuota: Instance quota. + InstanceQuota *InstanceQuota `json:"instanceQuota,omitempty"` + + // Location: The specific location of the provisioining quota. + Location string `json:"location,omitempty"` + + // Name: Output only. The name of the provisioning quota. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AssetType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AssetType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ProvisioningQuota) MarshalJSON() ([]byte, error) { + type NoMethod ProvisioningQuota + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // QosPolicy: QOS policy parameters. type QosPolicy struct { // BandwidthGbps: The bandwidth permitted by the QOS policy, in gbps. @@ -999,6 +1698,13 @@ type SnapshotSchedulePolicy struct { // specify a maximum of 5 schedules. Schedules []*Schedule `json:"schedules,omitempty"` + // State: The state of the snapshot schedule policy. + // + // Possible values: + // "STATE_UNSPECIFIED" - The policy is in an unknown state. + // "PROVISIONED" - The policy is been provisioned. + State string `json:"state,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -1026,6 +1732,10 @@ func (s *SnapshotSchedulePolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StartInstanceRequest: Message requesting to start a server. +type StartInstanceRequest struct { +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each @@ -1070,26 +1780,17 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VRF: A network VRF. -type VRF struct { - // Name: The name of the VRF. - Name string `json:"name,omitempty"` - - // QosPolicy: The QOS policy applied to this VRF. - QosPolicy *QosPolicy `json:"qosPolicy,omitempty"` - - // State: The possible state of VRF. - // - // Possible values: - // "STATE_UNSPECIFIED" - The unspecified state. - // "PROVISIONING" - The vrf is provisioning. - // "PROVISIONED" - The vrf is provisioned. - State string `json:"state,omitempty"` +// SubmitProvisioningConfigRequest: Request for +// SubmitProvisioningConfig. +type SubmitProvisioningConfigRequest struct { + // Email: Optional. Email provided to send a confirmation with + // provisioning config to. + Email string `json:"email,omitempty"` - // VlanAttachments: The list of VLAN attachments for the VRF. - VlanAttachments []*VlanAttachment `json:"vlanAttachments,omitempty"` + // ProvisioningConfig: Required. The ProvisioningConfig to create. + ProvisioningConfig *ProvisioningConfig `json:"provisioningConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "Email") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1097,7 +1798,7 @@ type VRF struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API + // NullFields is a list of field names (e.g. "Email") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1106,24 +1807,100 @@ type VRF struct { NullFields []string `json:"-"` } -func (s *VRF) MarshalJSON() ([]byte, error) { - type NoMethod VRF +func (s *SubmitProvisioningConfigRequest) MarshalJSON() ([]byte, error) { + type NoMethod SubmitProvisioningConfigRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VlanAttachment: VLAN attachment details. -type VlanAttachment struct { - // PeerIp: The peer IP of the attachment. - PeerIp string `json:"peerIp,omitempty"` - - // PeerVlanId: The peer vlan ID of the attachment. - PeerVlanId int64 `json:"peerVlanId,omitempty,string"` +// SubmitProvisioningConfigResponse: Response for +// SubmitProvisioningConfig. +type SubmitProvisioningConfigResponse struct { + // ProvisioningConfig: The submitted provisioning config. + ProvisioningConfig *ProvisioningConfig `json:"provisioningConfig,omitempty"` - // RouterIp: The router IP of the attachment. - RouterIp string `json:"routerIp,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "PeerIp") to + // ForceSendFields is a list of field names (e.g. "ProvisioningConfig") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ProvisioningConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SubmitProvisioningConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod SubmitProvisioningConfigResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VRF: A network VRF. +type VRF struct { + // Name: The name of the VRF. + Name string `json:"name,omitempty"` + + // QosPolicy: The QOS policy applied to this VRF. + QosPolicy *QosPolicy `json:"qosPolicy,omitempty"` + + // State: The possible state of VRF. + // + // Possible values: + // "STATE_UNSPECIFIED" - The unspecified state. + // "PROVISIONING" - The vrf is provisioning. + // "PROVISIONED" - The vrf is provisioned. + State string `json:"state,omitempty"` + + // VlanAttachments: The list of VLAN attachments for the VRF. + VlanAttachments []*VlanAttachment `json:"vlanAttachments,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VRF) MarshalJSON() ([]byte, error) { + type NoMethod VRF + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VlanAttachment: VLAN attachment details. +type VlanAttachment struct { + // PeerIp: The peer IP of the attachment. + PeerIp string `json:"peerIp,omitempty"` + + // PeerVlanId: The peer vlan ID of the attachment. + PeerVlanId int64 `json:"peerVlanId,omitempty,string"` + + // RouterIp: The router IP of the attachment. + RouterIp string `json:"routerIp,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PeerIp") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1244,6 +2021,75 @@ func (s *Volume) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VolumeConfig: Configuration parameters for a new volume. +type VolumeConfig struct { + // Id: A transient unique identifier to identify a volume within an + // ProvisioningConfig request. + Id string `json:"id,omitempty"` + + // LunRanges: LUN ranges to be configured. Set only when protocol is + // PROTOCOL_FC. + LunRanges []*LunRange `json:"lunRanges,omitempty"` + + // MachineIds: Machine ids connected to this volume. Set only when + // protocol is PROTOCOL_FC. + MachineIds []string `json:"machineIds,omitempty"` + + // Name: Output only. The name of the volume config. + Name string `json:"name,omitempty"` + + // NfsExports: NFS exports. Set only when protocol is PROTOCOL_NFS. + NfsExports []*NfsExport `json:"nfsExports,omitempty"` + + // Protocol: Volume protocol. + // + // Possible values: + // "PROTOCOL_UNSPECIFIED" - Unspecified value. + // "PROTOCOL_FC" - Fibre channel. + // "PROTOCOL_NFS" - Network file system. + Protocol string `json:"protocol,omitempty"` + + // SizeGb: The requested size of this volume, in GB. + SizeGb int64 `json:"sizeGb,omitempty"` + + // SnapshotsEnabled: Whether snapshots should be enabled. + SnapshotsEnabled bool `json:"snapshotsEnabled,omitempty"` + + // Type: The type of this Volume. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The unspecified type. + // "FLASH" - This Volume is on flash. + // "DISK" - This Volume is on disk. + Type string `json:"type,omitempty"` + + // UserNote: User note field, it can be used by customers to add + // additional information for the BMS Ops team (b/194021617). + UserNote string `json:"userNote,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VolumeConfig) MarshalJSON() ([]byte, error) { + type NoMethod VolumeConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VolumeSnapshot: Snapshot registered for a given storage volume. type VolumeSnapshot struct { // CreateTime: Output only. The creation time of the storage volume @@ -2298,6 +3144,148 @@ func (c *ProjectsLocationsInstancesResetCall) Do(opts ...googleapi.CallOption) ( } +// method id "baremetalsolution.projects.locations.instances.start": + +type ProjectsLocationsInstancesStartCall struct { + s *Service + name string + startinstancerequest *StartInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Start: Starts a server that was shutdown. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) Start(name string, startinstancerequest *StartInstanceRequest) *ProjectsLocationsInstancesStartCall { + c := &ProjectsLocationsInstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.startinstancerequest = startinstancerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsInstancesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesStartCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsInstancesStartCall) Context(ctx context.Context) *ProjectsLocationsInstancesStartCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsInstancesStartCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesStartCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.startinstancerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:start") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "baremetalsolution.projects.locations.instances.start" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts a server that was shutdown.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:start", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.instances.start", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}:start", + // "request": { + // "$ref": "StartInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "baremetalsolution.projects.locations.networks.get": type ProjectsLocationsNetworksGetCall struct { @@ -2648,33 +3636,180 @@ func (c *ProjectsLocationsNetworksListCall) Pages(ctx context.Context, f func(*L } } -// method id "baremetalsolution.projects.locations.networks.patch": +// method id "baremetalsolution.projects.locations.networks.listNetworkUsage": -type ProjectsLocationsNetworksPatchCall struct { - s *Service - name string - network *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNetworksListNetworkUsageCall struct { + s *Service + location string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Update details of a single network. +// ListNetworkUsage: List all Networks (and used IPs for each Network) +// in the vendor account associated with the specified project. // -// - name: Output only. The resource name of this `Network`. Resource -// names are schemeless URIs that follow the conventions in -// https://cloud.google.com/apis/design/resource_names. Format: -// `projects/{project}/locations/{location}/networks/{network}`. -func (r *ProjectsLocationsNetworksService) Patch(name string, network *Network) *ProjectsLocationsNetworksPatchCall { - c := &ProjectsLocationsNetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.network = network +// - location: Parent value (project and location). +func (r *ProjectsLocationsNetworksService) ListNetworkUsage(location string) *ProjectsLocationsNetworksListNetworkUsageCall { + c := &ProjectsLocationsNetworksListNetworkUsageCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location return c } -// UpdateMask sets the optional parameter "updateMask": The list of -// fields to update. The only currently supported fields are: `labels` -func (c *ProjectsLocationsNetworksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNetworksPatchCall { +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNetworksListNetworkUsageCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksListNetworkUsageCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsNetworksListNetworkUsageCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworksListNetworkUsageCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsNetworksListNetworkUsageCall) Context(ctx context.Context) *ProjectsLocationsNetworksListNetworkUsageCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNetworksListNetworkUsageCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworksListNetworkUsageCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+location}/networks:listNetworkUsage") + 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{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "baremetalsolution.projects.locations.networks.listNetworkUsage" call. +// Exactly one of *ListNetworkUsageResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListNetworkUsageResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworksListNetworkUsageCall) Do(opts ...googleapi.CallOption) (*ListNetworkUsageResponse, 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, &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, err + } + ret := &ListNetworkUsageResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/networks:listNetworkUsage", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.networks.listNetworkUsage", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. Parent value (project and location).", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+location}/networks:listNetworkUsage", + // "response": { + // "$ref": "ListNetworkUsageResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "baremetalsolution.projects.locations.networks.patch": + +type ProjectsLocationsNetworksPatchCall struct { + s *Service + name string + network *Network + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update details of a single network. +// +// - name: Output only. The resource name of this `Network`. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. Format: +// `projects/{project}/locations/{location}/networks/{network}`. +func (r *ProjectsLocationsNetworksService) Patch(name string, network *Network) *ProjectsLocationsNetworksPatchCall { + c := &ProjectsLocationsNetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.network = network + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. The only currently supported fields are: `labels` +func (c *ProjectsLocationsNetworksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNetworksPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -2806,6 +3941,850 @@ func (c *ProjectsLocationsNetworksPatchCall) Do(opts ...googleapi.CallOption) (* } +// method id "baremetalsolution.projects.locations.nfsShares.get": + +type ProjectsLocationsNfsSharesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get details of a single NFS share. +// +// - name: Name of the resource. +func (r *ProjectsLocationsNfsSharesService) Get(name string) *ProjectsLocationsNfsSharesGetCall { + c := &ProjectsLocationsNfsSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNfsSharesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsNfsSharesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNfsSharesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsNfsSharesGetCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNfsSharesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNfsSharesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "baremetalsolution.projects.locations.nfsShares.get" call. +// Exactly one of *NfsShare or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *NfsShare.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNfsSharesGetCall) Do(opts ...googleapi.CallOption) (*NfsShare, 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, &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, err + } + ret := &NfsShare{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get details of a single NFS share.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.nfsShares.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "NfsShare" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "baremetalsolution.projects.locations.nfsShares.list": + +type ProjectsLocationsNfsSharesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List NFS shares. +// +// - parent: Parent value for ListNfsSharesRequest. +func (r *ProjectsLocationsNfsSharesService) List(parent string) *ProjectsLocationsNfsSharesListCall { + c := &ProjectsLocationsNfsSharesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsNfsSharesListCall) Filter(filter string) *ProjectsLocationsNfsSharesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// server will pick an appropriate default. +func (c *ProjectsLocationsNfsSharesListCall) PageSize(pageSize int64) *ProjectsLocationsNfsSharesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results from the server. +func (c *ProjectsLocationsNfsSharesListCall) PageToken(pageToken string) *ProjectsLocationsNfsSharesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNfsSharesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsNfsSharesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNfsSharesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsNfsSharesListCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNfsSharesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNfsSharesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nfsShares") + 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 "baremetalsolution.projects.locations.nfsShares.list" call. +// Exactly one of *ListNfsSharesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListNfsSharesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsNfsSharesListCall) Do(opts ...googleapi.CallOption) (*ListNfsSharesResponse, 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, &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, err + } + ret := &ListNfsSharesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List NFS shares.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.nfsShares.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "List filter.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results from the server.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListNfsSharesRequest.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/nfsShares", + // "response": { + // "$ref": "ListNfsSharesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsNfsSharesListCall) Pages(ctx context.Context, f func(*ListNfsSharesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "baremetalsolution.projects.locations.nfsShares.patch": + +type ProjectsLocationsNfsSharesPatchCall struct { + s *Service + name string + nfsshare *NfsShare + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update details of a single NFS share. +// +// - name: Output only. The name of the NFS share. +func (r *ProjectsLocationsNfsSharesService) Patch(name string, nfsshare *NfsShare) *ProjectsLocationsNfsSharesPatchCall { + c := &ProjectsLocationsNfsSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.nfsshare = nfsshare + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to update. The only currently supported fields are: `labels` +func (c *ProjectsLocationsNfsSharesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNfsSharesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNfsSharesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsNfsSharesPatchCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsNfsSharesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNfsSharesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nfsshare) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "baremetalsolution.projects.locations.nfsShares.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNfsSharesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update details of a single NFS share.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nfsShares/{nfsSharesId}", + // "httpMethod": "PATCH", + // "id": "baremetalsolution.projects.locations.nfsShares.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The name of the NFS share.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nfsShares/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to update. The only currently supported fields are: `labels`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "NfsShare" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "baremetalsolution.projects.locations.provisioningConfigs.submit": + +type ProjectsLocationsProvisioningConfigsSubmitCall struct { + s *Service + parent string + submitprovisioningconfigrequest *SubmitProvisioningConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Submit: Submit a provisiong configuration for a given project. +// +// - parent: The parent project and location containing the +// ProvisioningConfig. +func (r *ProjectsLocationsProvisioningConfigsService) Submit(parent string, submitprovisioningconfigrequest *SubmitProvisioningConfigRequest) *ProjectsLocationsProvisioningConfigsSubmitCall { + c := &ProjectsLocationsProvisioningConfigsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.submitprovisioningconfigrequest = submitprovisioningconfigrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsSubmitCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsSubmitCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsProvisioningConfigsSubmitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitprovisioningconfigrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/provisioningConfigs:submit") + 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 "baremetalsolution.projects.locations.provisioningConfigs.submit" call. +// Exactly one of *SubmitProvisioningConfigResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *SubmitProvisioningConfigResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Do(opts ...googleapi.CallOption) (*SubmitProvisioningConfigResponse, 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, &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, err + } + ret := &SubmitProvisioningConfigResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Submit a provisiong configuration for a given project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningConfigs:submit", + // "httpMethod": "POST", + // "id": "baremetalsolution.projects.locations.provisioningConfigs.submit", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent project and location containing the ProvisioningConfig.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/provisioningConfigs:submit", + // "request": { + // "$ref": "SubmitProvisioningConfigRequest" + // }, + // "response": { + // "$ref": "SubmitProvisioningConfigResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "baremetalsolution.projects.locations.provisioningQuotas.list": + +type ProjectsLocationsProvisioningQuotasListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List the budget details to provision resources on a given +// project. +// +// - parent: Parent value for ListProvisioningQuotasRequest. +func (r *ProjectsLocationsProvisioningQuotasService) List(parent string) *ProjectsLocationsProvisioningQuotasListCall { + c := &ProjectsLocationsProvisioningQuotasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// server will pick an appropriate default. Notice that page_size field +// is not supported and won't be respected in the API request for now, +// will be updated when pagination is supported. +func (c *ProjectsLocationsProvisioningQuotasListCall) PageSize(pageSize int64) *ProjectsLocationsProvisioningQuotasListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results from the server. +func (c *ProjectsLocationsProvisioningQuotasListCall) PageToken(pageToken string) *ProjectsLocationsProvisioningQuotasListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsProvisioningQuotasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningQuotasListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsProvisioningQuotasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvisioningQuotasListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsProvisioningQuotasListCall) Context(ctx context.Context) *ProjectsLocationsProvisioningQuotasListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsProvisioningQuotasListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsProvisioningQuotasListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/provisioningQuotas") + 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 "baremetalsolution.projects.locations.provisioningQuotas.list" call. +// Exactly one of *ListProvisioningQuotasResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListProvisioningQuotasResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsProvisioningQuotasListCall) Do(opts ...googleapi.CallOption) (*ListProvisioningQuotasResponse, 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, &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, err + } + ret := &ListProvisioningQuotasResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List the budget details to provision resources on a given project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/provisioningQuotas", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.provisioningQuotas.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default. Notice that page_size field is not supported and won't be respected in the API request for now, will be updated when pagination is supported.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A token identifying a page of results from the server.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent value for ListProvisioningQuotasRequest.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/provisioningQuotas", + // "response": { + // "$ref": "ListProvisioningQuotasResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsProvisioningQuotasListCall) Pages(ctx context.Context, f func(*ListProvisioningQuotasResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "baremetalsolution.projects.locations.snapshotSchedulePolicies.create": type ProjectsLocationsSnapshotSchedulePoliciesCreateCall struct { @@ -3977,7 +5956,7 @@ func (r *ProjectsLocationsVolumesService) Patch(name string, volume *Volume) *Pr // UpdateMask sets the optional parameter "updateMask": The list of // fields to update. The only currently supported fields are: // `snapshot_auto_delete_behavior` `snapshot_schedule_policy_name` -// 'labels' +// 'labels' 'requested_size_gib' func (c *ProjectsLocationsVolumesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -4090,7 +6069,7 @@ func (c *ProjectsLocationsVolumesPatchCall) Do(opts ...googleapi.CallOption) (*O // "type": "string" // }, // "updateMask": { - // "description": "The list of fields to update. The only currently supported fields are: `snapshot_auto_delete_behavior` `snapshot_schedule_policy_name` 'labels'", + // "description": "The list of fields to update. The only currently supported fields are: `snapshot_auto_delete_behavior` `snapshot_schedule_policy_name` 'labels' 'requested_size_gib'", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index c926155ec0f..c83f3da93ae 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -449,7 +449,7 @@ "type": "string" }, "pageSize": { - "description": "Maximum number of results to return. Maximum and default are 100.", + "description": "Maximum number of results to return. Default value is 100. Maximum value is 200.", "format": "int32", "location": "query", "type": "integer" @@ -488,7 +488,7 @@ } } }, - "revision": "20220201", + "revision": "20220212", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index 5b9bba20e9b..be8918ae75e 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -3360,7 +3360,7 @@ func (c *CustomersTelemetryDevicesListCall) Filter(filter string) *CustomersTele } // PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. Maximum and default are 100. +// results to return. Default value is 100. Maximum value is 200. func (c *CustomersTelemetryDevicesListCall) PageSize(pageSize int64) *CustomersTelemetryDevicesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -3495,7 +3495,7 @@ func (c *CustomersTelemetryDevicesListCall) Do(opts ...googleapi.CallOption) (*G // "type": "string" // }, // "pageSize": { - // "description": "Maximum number of results to return. Maximum and default are 100.", + // "description": "Maximum number of results to return. Default value is 100. Maximum value is 200.", // "format": "int32", // "location": "query", // "type": "integer" diff --git a/classroom/v1/classroom-api.json b/classroom/v1/classroom-api.json index 6bbe3c7725f..f49f707aeac 100644 --- a/classroom/v1/classroom-api.json +++ b/classroom/v1/classroom-api.json @@ -170,7 +170,7 @@ "courses": { "methods": { "create": { - "description": "Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.", + "description": "Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. A non-admin requesting user can only create a course with themselves as the owner. Domain admins can create courses owned by any user within their domain. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.", "flatPath": "v1/courses", "httpMethod": "POST", "id": "classroom.courses.create", @@ -1612,7 +1612,7 @@ "teachers": { "methods": { "create": { - "description": "Creates a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course.", + "description": "Creates a teacher of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as teachers to courses within their domain. Non-admin users should send an Invitation instead. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course.", "flatPath": "v1/courses/{courseId}/teachers", "httpMethod": "POST", "id": "classroom.courses.teachers.create", @@ -2400,7 +2400,7 @@ } } }, - "revision": "20220202", + "revision": "20220209", "rootUrl": "https://classroom.googleapis.com/", "schemas": { "Announcement": { diff --git a/classroom/v1/classroom-gen.go b/classroom/v1/classroom-gen.go index 8405ef73df4..a91264c57b8 100644 --- a/classroom/v1/classroom-gen.go +++ b/classroom/v1/classroom-gen.go @@ -3244,14 +3244,16 @@ type CoursesCreateCall struct { } // Create: Creates a course. The user specified in `ownerId` is the -// owner of the created course and added as a teacher. This method -// returns the following error codes: * `PERMISSION_DENIED` if the -// requesting user is not permitted to create courses or for access -// errors. * `NOT_FOUND` if the primary teacher is not a valid user. * -// `FAILED_PRECONDITION` if the course owner's account is disabled or -// for the following request errors: * UserGroupsMembershipLimitReached -// * `ALREADY_EXISTS` if an alias was specified in the `id` and already -// exists. +// owner of the created course and added as a teacher. A non-admin +// requesting user can only create a course with themselves as the +// owner. Domain admins can create courses owned by any user within +// their domain. This method returns the following error codes: * +// `PERMISSION_DENIED` if the requesting user is not permitted to create +// courses or for access errors. * `NOT_FOUND` if the primary teacher is +// not a valid user. * `FAILED_PRECONDITION` if the course owner's +// account is disabled or for the following request errors: * +// UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was +// specified in the `id` and already exists. func (r *CoursesService) Create(course *Course) *CoursesCreateCall { c := &CoursesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.course = course @@ -3346,7 +3348,7 @@ func (c *CoursesCreateCall) Do(opts ...googleapi.CallOption) (*Course, error) { } return ret, nil // { - // "description": "Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.", + // "description": "Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. A non-admin requesting user can only create a course with themselves as the owner. Domain admins can create courses owned by any user within their domain. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.", // "flatPath": "v1/courses", // "httpMethod": "POST", // "id": "classroom.courses.create", @@ -9885,15 +9887,20 @@ type CoursesTeachersCreateCall struct { header_ http.Header } -// Create: Creates a teacher of a course. This method returns the -// following error codes: * `PERMISSION_DENIED` if the requesting user -// is not permitted to create teachers in this course or for access -// errors. * `NOT_FOUND` if the requested course ID does not exist. * -// `FAILED_PRECONDITION` if the requested user's account is disabled, -// for the following request errors: * CourseMemberLimitReached * -// CourseNotModifiable * CourseTeacherLimitReached * -// UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is -// already a teacher or student in the course. +// Create: Creates a teacher of a course. Domain administrators are +// permitted to directly add +// (https://developers.google.com/classroom/guides/manage-users) users +// within their domain as teachers to courses within their domain. +// Non-admin users should send an Invitation instead. This method +// returns the following error codes: * `PERMISSION_DENIED` if the +// requesting user is not permitted to create teachers in this course or +// for access errors. * `NOT_FOUND` if the requested course ID does not +// exist. * `FAILED_PRECONDITION` if the requested user's account is +// disabled, for the following request errors: * +// CourseMemberLimitReached * CourseNotModifiable * +// CourseTeacherLimitReached * UserGroupsMembershipLimitReached * +// `ALREADY_EXISTS` if the user is already a teacher or student in the +// course. // // - courseId: Identifier of the course. This identifier can be either // the Classroom-assigned identifier or an alias. @@ -9995,7 +10002,7 @@ func (c *CoursesTeachersCreateCall) Do(opts ...googleapi.CallOption) (*Teacher, } return ret, nil // { - // "description": "Creates a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course.", + // "description": "Creates a teacher of a course. Domain administrators are permitted to [directly add](https://developers.google.com/classroom/guides/manage-users) users within their domain as teachers to courses within their domain. Non-admin users should send an Invitation instead. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course or for access errors. * `NOT_FOUND` if the requested course ID does not exist. * `FAILED_PRECONDITION` if the requested user's account is disabled, for the following request errors: * CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a teacher or student in the course.", // "flatPath": "v1/courses/{courseId}/teachers", // "httpMethod": "POST", // "id": "classroom.courses.teachers.create", diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index bf03efeb404..8574a396f84 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -553,6 +553,11 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. Filters applied to the [CloudChannelService.ListCustomers] results. See https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers for more information.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50.", "format": "int32", @@ -735,6 +740,11 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. Filters applied to the [CloudChannelService.ListCustomers] results. See https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers for more information.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50.", "format": "int32", @@ -1589,7 +1599,7 @@ } } }, - "revision": "20220209", + "revision": "20220212", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index 0955eb62378..4c308a96704 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -6701,6 +6701,15 @@ func (r *AccountsChannelPartnerLinksCustomersService) List(parent string) *Accou return c } +// Filter sets the optional parameter "filter": Filters applied to the +// [CloudChannelService.ListCustomers] results. See +// https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers +// for more information. +func (c *AccountsChannelPartnerLinksCustomersListCall) Filter(filter string) *AccountsChannelPartnerLinksCustomersListCall { + c.urlParams_.Set("filter", filter) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number // of customers to return. The service may return fewer than this value. // If unspecified, returns at most 10 customers. The maximum value is @@ -6828,6 +6837,11 @@ func (c *AccountsChannelPartnerLinksCustomersListCall) Do(opts ...googleapi.Call // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. Filters applied to the [CloudChannelService.ListCustomers] results. See https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers for more information.", + // "location": "query", + // "type": "string" + // }, // "pageSize": { // "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50.", // "format": "int32", @@ -7657,6 +7671,15 @@ func (r *AccountsCustomersService) List(parent string) *AccountsCustomersListCal return c } +// Filter sets the optional parameter "filter": Filters applied to the +// [CloudChannelService.ListCustomers] results. See +// https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers +// for more information. +func (c *AccountsCustomersListCall) Filter(filter string) *AccountsCustomersListCall { + c.urlParams_.Set("filter", filter) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number // of customers to return. The service may return fewer than this value. // If unspecified, returns at most 10 customers. The maximum value is @@ -7784,6 +7807,11 @@ func (c *AccountsCustomersListCall) Do(opts ...googleapi.CallOption) (*GoogleClo // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. Filters applied to the [CloudChannelService.ListCustomers] results. See https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers for more information.", + // "location": "query", + // "type": "string" + // }, // "pageSize": { // "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50.", // "format": "int32", diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json new file mode 100644 index 00000000000..2f6ea16c793 --- /dev/null +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -0,0 +1,1729 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://cloudfunctions.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud Functions", + "description": "Manages lightweight user-provided functions executed in response to events.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/functions", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "cloudfunctions:v2alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://cloudfunctions.mtls.googleapis.com/", + "name": "cloudfunctions", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v2alpha/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "functions": { + "methods": { + "create": { + "description": "Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "functionId": { + "description": "The ID to use for the function, which will become the final component of the function's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location in which the function should be created, specified in the format `projects/*/locations/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/functions", + "request": { + "$ref": "Function" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "httpMethod": "DELETE", + "id": "cloudfunctions.projects.locations.functions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the function which should be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateDownloadUrl": { + "description": "Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:generateDownloadUrl", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.generateDownloadUrl", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of function for which source code Google Cloud Storage signed URL should be generated.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}:generateDownloadUrl", + "request": { + "$ref": "GenerateDownloadUrlRequest" + }, + "response": { + "$ref": "GenerateDownloadUrlResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateUploadUrl": { + "description": "Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions:generateUploadUrl", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.generateUploadUrl", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/functions:generateUploadUrl", + "request": { + "$ref": "GenerateUploadUrlRequest" + }, + "response": { + "$ref": "GenerateUploadUrlResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns a function with the given name from the requested project.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.functions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the function which details should be obtained.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "Function" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.functions.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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns a list of functions that belong to the requested project.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.functions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter for Functions that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "The sorting order of the resources returned. Value should be a comma separated list of fields. The default sorting oder is ascending. See https://google.aip.dev/132#ordering.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of functions to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListFunctionsResponse`; indicates that this is a continuation of a prior `ListFunctions` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the function should be listed, specified in the format `projects/*/locations/*` If you want to list functions in all locations, use \"-\" in place of a location. When listing functions in all locations, if one or more location(s) are unreachable, the response will contain functions from all reachable locations along with the names of any unreachable locations.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/functions", + "response": { + "$ref": "ListFunctionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates existing function.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "httpMethod": "PATCH", + "id": "cloudfunctions.projects.locations.functions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated. If no field mask is provided, all provided fields in the request will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "request": { + "$ref": "Function" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:setIamPolicy", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:testIamPermissions", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + "location": "query", + "type": "string" + }, + "name": { + "description": "Must not be set.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "runtimes": { + "methods": { + "list": { + "description": "Returns a list of runtimes that are supported for the requested project.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/runtimes", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.runtimes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter for Runtimes that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the runtimes should be listed, specified in the format `projects/*/locations/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/runtimes", + "response": { + "$ref": "ListRuntimesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20220203", + "rootUrl": "https://cloudfunctions.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "BuildConfig": { + "description": "Describes the Build step of the function that builds a container from the given source.", + "id": "BuildConfig", + "properties": { + "build": { + "description": "Output only. The Cloud Build name of the latest successful deployment of the function.", + "readOnly": true, + "type": "string" + }, + "dockerRepository": { + "description": "Optional. User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.", + "type": "string" + }, + "entryPoint": { + "description": "The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named \"function\". For Node.js this is name of a function exported by the module specified in `source_location`.", + "type": "string" + }, + "environmentVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "User-provided build-time environment variables for the function", + "type": "object" + }, + "runtime": { + "description": "The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the [`gcloud` command reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).", + "type": "string" + }, + "source": { + "$ref": "Source", + "description": "The location of the function source code." + }, + "sourceProvenance": { + "$ref": "SourceProvenance", + "description": "Output only. A permanent fixed identifier for source.", + "readOnly": true + }, + "workerPool": { + "description": "Name of the Cloud Build Custom Worker Pool that should be used to build the function. The format of this field is `projects/{project}/locations/{region}/workerPools/{workerPool}` where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool. If the project id is not the same as the function, then the Cloud Functions Service Agent (service-@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.", + "type": "string" + } + }, + "type": "object" + }, + "EventFilter": { + "description": "Filters events based on exact matches on the CloudEvents attributes.", + "id": "EventFilter", + "properties": { + "attribute": { + "description": "Required. The name of a CloudEvents attribute.", + "type": "string" + }, + "value": { + "description": "Required. The value for the attribute.", + "type": "string" + } + }, + "type": "object" + }, + "EventTrigger": { + "description": "Describes EventTrigger, used to request events to be sent from another service.", + "id": "EventTrigger", + "properties": { + "eventFilters": { + "description": "Criteria used to filter events.", + "items": { + "$ref": "EventFilter" + }, + "type": "array" + }, + "eventType": { + "description": "Required. The type of event to observe. For example: `google.cloud.audit.log.v1.written` or `google.cloud.pubsub.topic.v1.messagePublished`.", + "type": "string" + }, + "pubsubTopic": { + "description": "Optional. The name of a Pub/Sub topic in the same project that will be used as the transport topic for the event delivery. Format: `projects/{project}/topics/{topic}`. This is only valid for events of type `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here will not be deleted at function deletion.", + "type": "string" + }, + "retryPolicy": { + "description": "Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).", + "enum": [ + "RETRY_POLICY_UNSPECIFIED", + "RETRY_POLICY_DO_NOT_RETRY", + "RETRY_POLICY_RETRY" + ], + "enumDescriptions": [ + "Not specified.", + "Do not retry.", + "Retry on any failure, retry up to 7 days with an exponential backoff (capped at 10 seconds)." + ], + "type": "string" + }, + "serviceAccountEmail": { + "description": "Optional. The email of the trigger's service account. The service account must have permission to invoke Cloud Run services, the permission is `run.routes.invoke`. If empty, defaults to the Compute Engine default service account: `{project_number}-compute@developer.gserviceaccount.com`.", + "type": "string" + }, + "trigger": { + "description": "Output only. The resource name of the Eventarc trigger. The format of this field is `projects/{project}/locations/{region}/triggers/{trigger}`.", + "readOnly": true, + "type": "string" + }, + "triggerRegion": { + "description": "The region that the trigger will be in. The trigger will only receive events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function.", + "type": "string" + } + }, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "Function": { + "description": "Describes a Cloud Function that contains user computation executed in response to an event. It encapsulate function and triggers configurations.", + "id": "Function", + "properties": { + "buildConfig": { + "$ref": "BuildConfig", + "description": "Describes the Build step of the function that builds a container from the given source." + }, + "description": { + "description": "User-provided description of a function.", + "type": "string" + }, + "environment": { + "description": "Describe whether the function is gen1 or gen2.", + "enum": [ + "ENVIRONMENT_UNSPECIFIED", + "GEN_1", + "GEN_2" + ], + "enumDescriptions": [ + "Unspecified", + "Gen 1", + "Gen 2" + ], + "type": "string" + }, + "eventTrigger": { + "$ref": "EventTrigger", + "description": "An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels associated with this Cloud Function.", + "type": "object" + }, + "name": { + "description": "A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`", + "type": "string" + }, + "serviceConfig": { + "$ref": "ServiceConfig", + "description": "Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed)." + }, + "state": { + "description": "Output only. State of the function.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "FAILED", + "DEPLOYING", + "DELETING", + "UNKNOWN" + ], + "enumDescriptions": [ + "Not specified. Invalid state.", + "Function has been successfully deployed and is serving.", + "Function deployment failed and the function isn’t serving.", + "Function is being created or updated.", + "Function is being deleted.", + "Function deployment failed and the function serving state is undefined. The function should be updated or deleted to move it out of this state." + ], + "readOnly": true, + "type": "string" + }, + "stateMessages": { + "description": "Output only. State Messages for this Cloud Function.", + "items": { + "$ref": "GoogleCloudFunctionsV2alphaStateMessage" + }, + "readOnly": true, + "type": "array" + }, + "updateTime": { + "description": "Output only. The last update timestamp of a Cloud Function.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GenerateDownloadUrlRequest": { + "description": "Request of `GenerateDownloadUrl` method.", + "id": "GenerateDownloadUrlRequest", + "properties": {}, + "type": "object" + }, + "GenerateDownloadUrlResponse": { + "description": "Response of `GenerateDownloadUrl` method.", + "id": "GenerateDownloadUrlResponse", + "properties": { + "downloadUrl": { + "description": "The generated Google Cloud Storage signed URL that should be used for function source code download.", + "type": "string" + } + }, + "type": "object" + }, + "GenerateUploadUrlRequest": { + "description": "Request of `GenerateSourceUploadUrl` method.", + "id": "GenerateUploadUrlRequest", + "properties": {}, + "type": "object" + }, + "GenerateUploadUrlResponse": { + "description": "Response of `GenerateSourceUploadUrl` method.", + "id": "GenerateUploadUrlResponse", + "properties": { + "storageSource": { + "$ref": "StorageSource", + "description": "The location of the source code in the upload bucket. Once the archive is uploaded using the `upload_url` use this field to set the `function.build_config.source.storage_source` during CreateFunction and UpdateFunction. Generation defaults to 0, as Cloud Storage provides a new generation only upon uploading a new object or version of an object." + }, + "uploadUrl": { + "description": "The generated Google Cloud Storage signed URL that should be used for a function source code upload. The uploaded file should be a zip archive which contains a function.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2alphaOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudFunctionsV2alphaOperationMetadata", + "properties": { + "apiVersion": { + "description": "API version used to start the operation.", + "type": "string" + }, + "cancelRequested": { + "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "type": "boolean" + }, + "createTime": { + "description": "The time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "The time the operation finished running.", + "format": "google-datetime", + "type": "string" + }, + "requestResource": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The original request that started the operation.", + "type": "object" + }, + "stages": { + "description": "Mechanism for reporting in-progress stages", + "items": { + "$ref": "GoogleCloudFunctionsV2alphaStage" + }, + "type": "array" + }, + "statusDetail": { + "description": "Human-readable status of the operation, if any.", + "type": "string" + }, + "target": { + "description": "Server-defined resource path for the target of the operation.", + "type": "string" + }, + "verb": { + "description": "Name of the verb executed by the operation.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2alphaStage": { + "description": "Each Stage of the deployment process", + "id": "GoogleCloudFunctionsV2alphaStage", + "properties": { + "message": { + "description": "Message describing the Stage", + "type": "string" + }, + "name": { + "description": "Name of the Stage. This will be unique for each Stage.", + "enum": [ + "NAME_UNSPECIFIED", + "ARTIFACT_REGISTRY", + "BUILD", + "SERVICE", + "TRIGGER", + "SERVICE_ROLLBACK", + "TRIGGER_ROLLBACK" + ], + "enumDescriptions": [ + "Not specified. Invalid name.", + "Artifact Regsitry Stage", + "Build Stage", + "Service Stage", + "Trigger Stage", + "Service Rollback Stage", + "Trigger Rollback Stage" + ], + "type": "string" + }, + "resource": { + "description": "Resource of the Stage", + "type": "string" + }, + "resourceUri": { + "description": "Link to the current Stage resource", + "type": "string" + }, + "state": { + "description": "Current state of the Stage", + "enum": [ + "STATE_UNSPECIFIED", + "NOT_STARTED", + "IN_PROGRESS", + "COMPLETE" + ], + "enumDescriptions": [ + "Not specified. Invalid state.", + "Stage has not started.", + "Stage is in progress.", + "Stage has completed." + ], + "type": "string" + }, + "stateMessages": { + "description": "State messages from the current Stage.", + "items": { + "$ref": "GoogleCloudFunctionsV2alphaStateMessage" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2alphaStateMessage": { + "description": "Informational messages about the state of the Cloud Function or Operation.", + "id": "GoogleCloudFunctionsV2alphaStateMessage", + "properties": { + "message": { + "description": "The message.", + "type": "string" + }, + "severity": { + "description": "Severity of the state message.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Not specified. Invalid severity.", + "ERROR-level severity.", + "WARNING-level severity.", + "INFO-level severity." + ], + "type": "string" + }, + "type": { + "description": "One-word CamelCase type of the state message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2betaOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudFunctionsV2betaOperationMetadata", + "properties": { + "apiVersion": { + "description": "API version used to start the operation.", + "type": "string" + }, + "cancelRequested": { + "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "type": "boolean" + }, + "createTime": { + "description": "The time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "The time the operation finished running.", + "format": "google-datetime", + "type": "string" + }, + "requestResource": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The original request that started the operation.", + "type": "object" + }, + "stages": { + "description": "Mechanism for reporting in-progress stages", + "items": { + "$ref": "GoogleCloudFunctionsV2betaStage" + }, + "type": "array" + }, + "statusDetail": { + "description": "Human-readable status of the operation, if any.", + "type": "string" + }, + "target": { + "description": "Server-defined resource path for the target of the operation.", + "type": "string" + }, + "verb": { + "description": "Name of the verb executed by the operation.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2betaStage": { + "description": "Each Stage of the deployment process", + "id": "GoogleCloudFunctionsV2betaStage", + "properties": { + "message": { + "description": "Message describing the Stage", + "type": "string" + }, + "name": { + "description": "Name of the Stage. This will be unique for each Stage.", + "enum": [ + "NAME_UNSPECIFIED", + "ARTIFACT_REGISTRY", + "BUILD", + "SERVICE", + "TRIGGER", + "SERVICE_ROLLBACK", + "TRIGGER_ROLLBACK" + ], + "enumDescriptions": [ + "Not specified. Invalid name.", + "Artifact Regsitry Stage", + "Build Stage", + "Service Stage", + "Trigger Stage", + "Service Rollback Stage", + "Trigger Rollback Stage" + ], + "type": "string" + }, + "resource": { + "description": "Resource of the Stage", + "type": "string" + }, + "resourceUri": { + "description": "Link to the current Stage resource", + "type": "string" + }, + "state": { + "description": "Current state of the Stage", + "enum": [ + "STATE_UNSPECIFIED", + "NOT_STARTED", + "IN_PROGRESS", + "COMPLETE" + ], + "enumDescriptions": [ + "Not specified. Invalid state.", + "Stage has not started.", + "Stage is in progress.", + "Stage has completed." + ], + "type": "string" + }, + "stateMessages": { + "description": "State messages from the current Stage.", + "items": { + "$ref": "GoogleCloudFunctionsV2betaStateMessage" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2betaStateMessage": { + "description": "Informational messages about the state of the Cloud Function or Operation.", + "id": "GoogleCloudFunctionsV2betaStateMessage", + "properties": { + "message": { + "description": "The message.", + "type": "string" + }, + "severity": { + "description": "Severity of the state message.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Not specified. Invalid severity.", + "ERROR-level severity.", + "WARNING-level severity.", + "INFO-level severity." + ], + "type": "string" + }, + "type": { + "description": "One-word CamelCase type of the state message.", + "type": "string" + } + }, + "type": "object" + }, + "ListFunctionsResponse": { + "description": "Response for the `ListFunctions` method.", + "id": "ListFunctionsResponse", + "properties": { + "functions": { + "description": "The functions that match the request.", + "items": { + "$ref": "Function" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached. The response does not include any functions from these locations.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListRuntimesResponse": { + "description": "Response for the `ListRuntimes` method.", + "id": "ListRuntimesResponse", + "properties": { + "runtimes": { + "description": "The runtimes that match the request.", + "items": { + "$ref": "Runtime" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadataV1": { + "description": "Metadata describing an Operation", + "id": "OperationMetadataV1", + "properties": { + "buildId": { + "description": "The Cloud Build ID of the function created or updated by an API call. This field is only populated for Create and Update operations.", + "type": "string" + }, + "buildName": { + "description": "The Cloud Build Name of the function deployment. This field is only populated for Create and Update operations. `projects//locations//builds/`.", + "type": "string" + }, + "request": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The original request that started the operation.", + "type": "object" + }, + "sourceToken": { + "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", + "type": "string" + }, + "target": { + "description": "Target of the operation - for example `projects/project-1/locations/region-1/functions/function-1`", + "type": "string" + }, + "type": { + "description": "Type of operation.", + "enum": [ + "OPERATION_UNSPECIFIED", + "CREATE_FUNCTION", + "UPDATE_FUNCTION", + "DELETE_FUNCTION" + ], + "enumDescriptions": [ + "Unknown operation type.", + "Triggered by CreateFunction call", + "Triggered by UpdateFunction call", + "Triggered by DeleteFunction call." + ], + "type": "string" + }, + "updateTime": { + "description": "The last update timestamp of the operation.", + "format": "google-datetime", + "type": "string" + }, + "versionId": { + "description": "Version id of the function created or updated by an API call. This field is only populated for Create and Update operations.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "RepoSource": { + "description": "Location of the source in a Google Cloud Source Repository.", + "id": "RepoSource", + "properties": { + "branchName": { + "description": "Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + }, + "commitSha": { + "description": "Explicit commit SHA to build.", + "type": "string" + }, + "dir": { + "description": "Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. eg. helloworld (no leading slash allowed)", + "type": "string" + }, + "invertRegex": { + "description": "Only trigger a build if the revision regex does NOT match the revision regex.", + "type": "boolean" + }, + "projectId": { + "description": "ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.", + "type": "string" + }, + "repoName": { + "description": "Name of the Cloud Source Repository.", + "type": "string" + }, + "tagName": { + "description": "Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + } + }, + "type": "object" + }, + "Runtime": { + "description": "Describes a runtime and any special information (e.g., deprecation status) related to it.", + "id": "Runtime", + "properties": { + "displayName": { + "description": "The user facing name, eg 'Go 1.13', 'Node.js 12', etc.", + "type": "string" + }, + "environment": { + "description": "The environment for the runtime.", + "enum": [ + "ENVIRONMENT_UNSPECIFIED", + "GEN_1", + "GEN_2" + ], + "enumDescriptions": [ + "Unspecified", + "Gen 1", + "Gen 2" + ], + "type": "string" + }, + "name": { + "description": "The name of the runtime, e.g., 'go113', 'nodejs12', etc.", + "type": "string" + }, + "stage": { + "description": "The stage of life this runtime is in, e.g., BETA, GA, etc.", + "enum": [ + "RUNTIME_STAGE_UNSPECIFIED", + "DEVELOPMENT", + "ALPHA", + "BETA", + "GA", + "DEPRECATED", + "DECOMMISSIONED" + ], + "enumDescriptions": [ + "Not specified.", + "The runtime is in development.", + "The runtime is in the Alpha stage.", + "The runtime is in the Beta stage.", + "The runtime is generally available.", + "The runtime is deprecated.", + "The runtime is no longer supported." + ], + "type": "string" + }, + "warnings": { + "description": "Warning messages, e.g., a deprecation warning.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ServiceConfig": { + "description": "Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).", + "id": "ServiceConfig", + "properties": { + "allTrafficOnLatestRevision": { + "description": "Whether 100% of traffic is routed to the latest revision. On CreateFunction and UpdateFunction, when set to true, the revision being deployed will serve 100% of traffic, ignoring any traffic split settings, if any. On GetFunction, true will be returned if the latest revision is serving 100% of traffic.", + "type": "boolean" + }, + "availableMemory": { + "description": "The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.", + "type": "string" + }, + "environmentVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables that shall be available during function execution.", + "type": "object" + }, + "ingressSettings": { + "description": "The ingress settings for the function, controlling what traffic can reach it.", + "enum": [ + "INGRESS_SETTINGS_UNSPECIFIED", + "ALLOW_ALL", + "ALLOW_INTERNAL_ONLY", + "ALLOW_INTERNAL_AND_GCLB" + ], + "enumDescriptions": [ + "Unspecified.", + "Allow HTTP traffic from public and private sources.", + "Allow HTTP traffic from only private VPC sources.", + "Allow HTTP traffic from private VPC sources and through GCLB." + ], + "type": "string" + }, + "maxInstanceCount": { + "description": "The limit on the maximum number of function instances that may coexist at a given time. In some cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you may want to factor in a safety margin and set a lower max instances value than your function can tolerate. See the [Max Instances](https://cloud.google.com/functions/docs/max-instances) Guide for more details.", + "format": "int32", + "type": "integer" + }, + "minInstanceCount": { + "description": "The limit on the minimum number of function instances that may coexist at a given time. Function instances are kept in idle state for a short period after they finished executing the request to reduce cold start time for subsequent requests. Setting a minimum instance count will ensure that the given number of instances are kept running in idle state always. This can help with cold start times when jump in incoming request count occurs after the idle instance would have been stopped in the default case.", + "format": "int32", + "type": "integer" + }, + "service": { + "description": "Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`", + "readOnly": true, + "type": "string" + }, + "serviceAccountEmail": { + "description": "The email of the service's service account. If empty, defaults to `{project_number}-compute@developer.gserviceaccount.com`.", + "type": "string" + }, + "timeoutSeconds": { + "description": "The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.", + "format": "int32", + "type": "integer" + }, + "uri": { + "description": "Output only. URI of the Service deployed.", + "readOnly": true, + "type": "string" + }, + "vpcConnector": { + "description": "The Serverless VPC Access connector that this cloud function can connect to. The format of this field is `projects/*/locations/*/connectors/*`.", + "type": "string" + }, + "vpcConnectorEgressSettings": { + "description": "The egress settings for the connector, controlling what traffic is diverted through it.", + "enum": [ + "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED", + "PRIVATE_RANGES_ONLY", + "ALL_TRAFFIC" + ], + "enumDescriptions": [ + "Unspecified.", + "Use the VPC Access Connector only for private IP space from RFC1918.", + "Force the use of VPC Access Connector for all egress traffic from the function." + ], + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "Source": { + "description": "The location of the function source code.", + "id": "Source", + "properties": { + "repoSource": { + "$ref": "RepoSource", + "description": "If provided, get the source from this location in a Cloud Source Repository." + }, + "storageSource": { + "$ref": "StorageSource", + "description": "If provided, get the source from this location in Google Cloud Storage." + } + }, + "type": "object" + }, + "SourceProvenance": { + "description": "Provenance of the source. Ways to find the original source, or verify that some source was used for this build.", + "id": "SourceProvenance", + "properties": { + "resolvedRepoSource": { + "$ref": "RepoSource", + "description": "A copy of the build's `source.repo_source`, if exists, with any revisions resolved." + }, + "resolvedStorageSource": { + "$ref": "StorageSource", + "description": "A copy of the build's `source.storage_source`, if exists, with any generations resolved." + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "StorageSource": { + "description": "Location of the source in an archive file in Google Cloud Storage.", + "id": "StorageSource", + "properties": { + "bucket": { + "description": "Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", + "type": "string" + }, + "generation": { + "description": "Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", + "format": "int64", + "type": "string" + }, + "object": { + "description": "Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.", + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud Functions API", + "version": "v2alpha", + "version_module": true +} \ No newline at end of file diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go new file mode 100644 index 00000000000..a30cb3b672e --- /dev/null +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -0,0 +1,4331 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package cloudfunctions provides access to the Cloud Functions API. +// +// For product documentation, see: https://cloud.google.com/functions +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/cloudfunctions/v2alpha" +// ... +// ctx := context.Background() +// cloudfunctionsService, err := cloudfunctions.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package cloudfunctions // import "google.golang.org/api/cloudfunctions/v2alpha" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "cloudfunctions:v2alpha" +const apiName = "cloudfunctions" +const apiVersion = "v2alpha" +const basePath = "https://cloudfunctions.googleapis.com/" +const mtlsBasePath = "https://cloudfunctions.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Functions = NewProjectsLocationsFunctionsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.Runtimes = NewProjectsLocationsRuntimesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Functions *ProjectsLocationsFunctionsService + + Operations *ProjectsLocationsOperationsService + + Runtimes *ProjectsLocationsRuntimesService +} + +func NewProjectsLocationsFunctionsService(s *Service) *ProjectsLocationsFunctionsService { + rs := &ProjectsLocationsFunctionsService{s: s} + return rs +} + +type ProjectsLocationsFunctionsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsRuntimesService(s *Service) *ProjectsLocationsRuntimesService { + rs := &ProjectsLocationsRuntimesService{s: s} + return rs +} + +type ProjectsLocationsRuntimesService struct { + s *Service +} + +// AuditConfig: Specifies the audit configuration for a service. The +// configuration determines which permission types are logged, and what +// identities, if any, are exempted from logging. An AuditConfig must +// have one or more AuditLogConfigs. If there are AuditConfigs for both +// `allServices` and a specific service, the union of the two +// AuditConfigs is used for that service: the log_types specified in +// each AuditConfig are enabled, and the exempted_members in each +// AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// jose@example.com from DATA_READ logging, and aliya@example.com from +// DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members`, or principals, with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Cloud + // Platform resource. `members` can have the following values: * + // `allUsers`: A special identifier that represents anyone who is on the + // internet; with or without a Google account. * + // `allAuthenticatedUsers`: A special identifier that represents anyone + // who is authenticated with a Google account or a service account. * + // `user:{emailid}`: An email address that represents a specific Google + // account. For example, `alice@example.com` . * + // `serviceAccount:{emailid}`: An email address that represents a + // service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An + // email address that represents a Google group. For example, + // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An + // email address (plus unique identifier) representing a user that has + // been recently deleted. For example, + // `alice@example.com?uid=123456789012345678901`. If the user is + // recovered, this value reverts to `user:{emailid}` and the recovered + // user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. * `domain:{domain}`: The G + // Suite domain (primary) that represents all the users of that domain. + // For example, `google.com` or `example.com`. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BuildConfig: Describes the Build step of the function that builds a +// container from the given source. +type BuildConfig struct { + // Build: Output only. The Cloud Build name of the latest successful + // deployment of the function. + Build string `json:"build,omitempty"` + + // DockerRepository: Optional. User managed repository created in + // Artifact Registry optionally with a customer managed encryption key. + // This is the repository to which the function docker image will be + // pushed after it is built by Cloud Build. If unspecified, GCF will + // create and use a repository named 'gcf-artifacts' for every deployed + // region. It must match the pattern + // `projects/{project}/locations/{location}/repositories/{repository}`. + // Cross-project repositories are not supported. Cross-location + // repositories are not supported. Repository format must be 'DOCKER'. + DockerRepository string `json:"dockerRepository,omitempty"` + + // EntryPoint: The name of the function (as defined in source code) that + // will be executed. Defaults to the resource name suffix, if not + // specified. For backward compatibility, if function with given name is + // not found, then the system will try to use function named "function". + // For Node.js this is name of a function exported by the module + // specified in `source_location`. + EntryPoint string `json:"entryPoint,omitempty"` + + // EnvironmentVariables: User-provided build-time environment variables + // for the function + EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` + + // Runtime: The runtime in which to run the function. Required when + // deploying a new function, optional when updating an existing + // function. For a complete list of possible choices, see the `gcloud` + // command reference + // (https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + Runtime string `json:"runtime,omitempty"` + + // Source: The location of the function source code. + Source *Source `json:"source,omitempty"` + + // SourceProvenance: Output only. A permanent fixed identifier for + // source. + SourceProvenance *SourceProvenance `json:"sourceProvenance,omitempty"` + + // WorkerPool: Name of the Cloud Build Custom Worker Pool that should be + // used to build the function. The format of this field is + // `projects/{project}/locations/{region}/workerPools/{workerPool}` + // where {project} and {region} are the project id and region + // respectively where the worker pool is defined and {workerPool} is the + // short name of the worker pool. If the project id is not the same as + // the function, then the Cloud Functions Service Agent + // (service-@gcf-admin-robot.iam.gserviceaccount.com) must be granted + // the role Cloud Build Custom Workers Builder + // (roles/cloudbuild.customworkers.builder) in the project. + WorkerPool string `json:"workerPool,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Build") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Build") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BuildConfig) MarshalJSON() ([]byte, error) { + type NoMethod BuildConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EventFilter: Filters events based on exact matches on the CloudEvents +// attributes. +type EventFilter struct { + // Attribute: Required. The name of a CloudEvents attribute. + Attribute string `json:"attribute,omitempty"` + + // Value: Required. The value for the attribute. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Attribute") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attribute") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EventFilter) MarshalJSON() ([]byte, error) { + type NoMethod EventFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EventTrigger: Describes EventTrigger, used to request events to be +// sent from another service. +type EventTrigger struct { + // EventFilters: Criteria used to filter events. + EventFilters []*EventFilter `json:"eventFilters,omitempty"` + + // EventType: Required. The type of event to observe. For example: + // `google.cloud.audit.log.v1.written` or + // `google.cloud.pubsub.topic.v1.messagePublished`. + EventType string `json:"eventType,omitempty"` + + // PubsubTopic: Optional. The name of a Pub/Sub topic in the same + // project that will be used as the transport topic for the event + // delivery. Format: `projects/{project}/topics/{topic}`. This is only + // valid for events of type + // `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided + // here will not be deleted at function deletion. + PubsubTopic string `json:"pubsubTopic,omitempty"` + + // RetryPolicy: Optional. If unset, then defaults to ignoring failures + // (i.e. not retrying them). + // + // Possible values: + // "RETRY_POLICY_UNSPECIFIED" - Not specified. + // "RETRY_POLICY_DO_NOT_RETRY" - Do not retry. + // "RETRY_POLICY_RETRY" - Retry on any failure, retry up to 7 days + // with an exponential backoff (capped at 10 seconds). + RetryPolicy string `json:"retryPolicy,omitempty"` + + // ServiceAccountEmail: Optional. The email of the trigger's service + // account. The service account must have permission to invoke Cloud Run + // services, the permission is `run.routes.invoke`. If empty, defaults + // to the Compute Engine default service account: + // `{project_number}-compute@developer.gserviceaccount.com`. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // Trigger: Output only. The resource name of the Eventarc trigger. The + // format of this field is + // `projects/{project}/locations/{region}/triggers/{trigger}`. + Trigger string `json:"trigger,omitempty"` + + // TriggerRegion: The region that the trigger will be in. The trigger + // will only receive events originating in this region. It can be the + // same region as the function, a different region or multi-region, or + // the global region. If not provided, defaults to the same region as + // the function. + TriggerRegion string `json:"triggerRegion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EventFilters") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EventFilters") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EventTrigger) MarshalJSON() ([]byte, error) { + type NoMethod EventTrigger + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Function: Describes a Cloud Function that contains user computation +// executed in response to an event. It encapsulate function and +// triggers configurations. +type Function struct { + // BuildConfig: Describes the Build step of the function that builds a + // container from the given source. + BuildConfig *BuildConfig `json:"buildConfig,omitempty"` + + // Description: User-provided description of a function. + Description string `json:"description,omitempty"` + + // Environment: Describe whether the function is gen1 or gen2. + // + // Possible values: + // "ENVIRONMENT_UNSPECIFIED" - Unspecified + // "GEN_1" - Gen 1 + // "GEN_2" - Gen 2 + Environment string `json:"environment,omitempty"` + + // EventTrigger: An Eventarc trigger managed by Google Cloud Functions + // that fires events in response to a condition in another service. + EventTrigger *EventTrigger `json:"eventTrigger,omitempty"` + + // Labels: Labels associated with this Cloud Function. + Labels map[string]string `json:"labels,omitempty"` + + // Name: A user-defined name of the function. Function names must be + // unique globally and match pattern + // `projects/*/locations/*/functions/*` + Name string `json:"name,omitempty"` + + // ServiceConfig: Describes the Service being deployed. Currently + // deploys services to Cloud Run (fully managed). + ServiceConfig *ServiceConfig `json:"serviceConfig,omitempty"` + + // State: Output only. State of the function. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not specified. Invalid state. + // "ACTIVE" - Function has been successfully deployed and is serving. + // "FAILED" - Function deployment failed and the function isn’t + // serving. + // "DEPLOYING" - Function is being created or updated. + // "DELETING" - Function is being deleted. + // "UNKNOWN" - Function deployment failed and the function serving + // state is undefined. The function should be updated or deleted to move + // it out of this state. + State string `json:"state,omitempty"` + + // StateMessages: Output only. State Messages for this Cloud Function. + StateMessages []*GoogleCloudFunctionsV2alphaStateMessage `json:"stateMessages,omitempty"` + + // UpdateTime: Output only. The last update timestamp of a Cloud + // Function. + 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. "BuildConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BuildConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Function) MarshalJSON() ([]byte, error) { + type NoMethod Function + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateDownloadUrlRequest: Request of `GenerateDownloadUrl` method. +type GenerateDownloadUrlRequest struct { +} + +// GenerateDownloadUrlResponse: Response of `GenerateDownloadUrl` +// method. +type GenerateDownloadUrlResponse struct { + // DownloadUrl: The generated Google Cloud Storage signed URL that + // should be used for function source code download. + DownloadUrl string `json:"downloadUrl,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DownloadUrl") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DownloadUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateDownloadUrlResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateDownloadUrlResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateUploadUrlRequest: Request of `GenerateSourceUploadUrl` +// method. +type GenerateUploadUrlRequest struct { +} + +// GenerateUploadUrlResponse: Response of `GenerateSourceUploadUrl` +// method. +type GenerateUploadUrlResponse struct { + // StorageSource: The location of the source code in the upload bucket. + // Once the archive is uploaded using the `upload_url` use this field to + // set the `function.build_config.source.storage_source` during + // CreateFunction and UpdateFunction. Generation defaults to 0, as Cloud + // Storage provides a new generation only upon uploading a new object or + // version of an object. + StorageSource *StorageSource `json:"storageSource,omitempty"` + + // UploadUrl: The generated Google Cloud Storage signed URL that should + // be used for a function source code upload. The uploaded file should + // be a zip archive which contains a function. + UploadUrl string `json:"uploadUrl,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "StorageSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "StorageSource") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateUploadUrlResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateUploadUrlResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2alphaOperationMetadata: Represents the metadata +// of the long-running operation. +type GoogleCloudFunctionsV2alphaOperationMetadata struct { + // ApiVersion: API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CancelRequested: Identifies whether the user has requested + // cancellation of the operation. Operations that have successfully been + // cancelled have Operation.error value with a google.rpc.Status.code of + // 1, corresponding to `Code.CANCELLED`. + CancelRequested bool `json:"cancelRequested,omitempty"` + + // CreateTime: The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestResource: The original request that started the operation. + RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` + + // Stages: Mechanism for reporting in-progress stages + Stages []*GoogleCloudFunctionsV2alphaStage `json:"stages,omitempty"` + + // StatusDetail: Human-readable status of the operation, if any. + StatusDetail string `json:"statusDetail,omitempty"` + + // Target: Server-defined resource path for the target of the operation. + Target string `json:"target,omitempty"` + + // Verb: Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2alphaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2alphaOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2alphaStage: Each Stage of the deployment +// process +type GoogleCloudFunctionsV2alphaStage struct { + // Message: Message describing the Stage + Message string `json:"message,omitempty"` + + // Name: Name of the Stage. This will be unique for each Stage. + // + // Possible values: + // "NAME_UNSPECIFIED" - Not specified. Invalid name. + // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage + // "BUILD" - Build Stage + // "SERVICE" - Service Stage + // "TRIGGER" - Trigger Stage + // "SERVICE_ROLLBACK" - Service Rollback Stage + // "TRIGGER_ROLLBACK" - Trigger Rollback Stage + Name string `json:"name,omitempty"` + + // Resource: Resource of the Stage + Resource string `json:"resource,omitempty"` + + // ResourceUri: Link to the current Stage resource + ResourceUri string `json:"resourceUri,omitempty"` + + // State: Current state of the Stage + // + // Possible values: + // "STATE_UNSPECIFIED" - Not specified. Invalid state. + // "NOT_STARTED" - Stage has not started. + // "IN_PROGRESS" - Stage is in progress. + // "COMPLETE" - Stage has completed. + State string `json:"state,omitempty"` + + // StateMessages: State messages from the current Stage. + StateMessages []*GoogleCloudFunctionsV2alphaStateMessage `json:"stateMessages,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2alphaStage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2alphaStage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2alphaStateMessage: Informational messages about +// the state of the Cloud Function or Operation. +type GoogleCloudFunctionsV2alphaStateMessage struct { + // Message: The message. + Message string `json:"message,omitempty"` + + // Severity: Severity of the state message. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. + // "ERROR" - ERROR-level severity. + // "WARNING" - WARNING-level severity. + // "INFO" - INFO-level severity. + Severity string `json:"severity,omitempty"` + + // Type: One-word CamelCase type of the state message. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2alphaStateMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2alphaStateMessage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2betaOperationMetadata: Represents the metadata +// of the long-running operation. +type GoogleCloudFunctionsV2betaOperationMetadata struct { + // ApiVersion: API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CancelRequested: Identifies whether the user has requested + // cancellation of the operation. Operations that have successfully been + // cancelled have Operation.error value with a google.rpc.Status.code of + // 1, corresponding to `Code.CANCELLED`. + CancelRequested bool `json:"cancelRequested,omitempty"` + + // CreateTime: The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestResource: The original request that started the operation. + RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` + + // Stages: Mechanism for reporting in-progress stages + Stages []*GoogleCloudFunctionsV2betaStage `json:"stages,omitempty"` + + // StatusDetail: Human-readable status of the operation, if any. + StatusDetail string `json:"statusDetail,omitempty"` + + // Target: Server-defined resource path for the target of the operation. + Target string `json:"target,omitempty"` + + // Verb: Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2betaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2betaOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2betaStage: Each Stage of the deployment process +type GoogleCloudFunctionsV2betaStage struct { + // Message: Message describing the Stage + Message string `json:"message,omitempty"` + + // Name: Name of the Stage. This will be unique for each Stage. + // + // Possible values: + // "NAME_UNSPECIFIED" - Not specified. Invalid name. + // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage + // "BUILD" - Build Stage + // "SERVICE" - Service Stage + // "TRIGGER" - Trigger Stage + // "SERVICE_ROLLBACK" - Service Rollback Stage + // "TRIGGER_ROLLBACK" - Trigger Rollback Stage + Name string `json:"name,omitempty"` + + // Resource: Resource of the Stage + Resource string `json:"resource,omitempty"` + + // ResourceUri: Link to the current Stage resource + ResourceUri string `json:"resourceUri,omitempty"` + + // State: Current state of the Stage + // + // Possible values: + // "STATE_UNSPECIFIED" - Not specified. Invalid state. + // "NOT_STARTED" - Stage has not started. + // "IN_PROGRESS" - Stage is in progress. + // "COMPLETE" - Stage has completed. + State string `json:"state,omitempty"` + + // StateMessages: State messages from the current Stage. + StateMessages []*GoogleCloudFunctionsV2betaStateMessage `json:"stateMessages,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2betaStage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2betaStage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2betaStateMessage: Informational messages about +// the state of the Cloud Function or Operation. +type GoogleCloudFunctionsV2betaStateMessage struct { + // Message: The message. + Message string `json:"message,omitempty"` + + // Severity: Severity of the state message. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. + // "ERROR" - ERROR-level severity. + // "WARNING" - WARNING-level severity. + // "INFO" - INFO-level severity. + Severity string `json:"severity,omitempty"` + + // Type: One-word CamelCase type of the state message. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2betaStateMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2betaStateMessage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListFunctionsResponse: Response for the `ListFunctions` method. +type ListFunctionsResponse struct { + // Functions: The functions that match the request. + Functions []*Function `json:"functions,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. The response does + // not include any functions from these locations. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Functions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Functions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListFunctionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListFunctionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListRuntimesResponse: Response for the `ListRuntimes` method. +type ListRuntimesResponse struct { + // Runtimes: The runtimes that match the request. + Runtimes []*Runtime `json:"runtimes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Runtimes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Runtimes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListRuntimesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRuntimesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadataV1: Metadata describing an Operation +type OperationMetadataV1 struct { + // BuildId: The Cloud Build ID of the function created or updated by an + // API call. This field is only populated for Create and Update + // operations. + BuildId string `json:"buildId,omitempty"` + + // BuildName: The Cloud Build Name of the function deployment. This + // field is only populated for Create and Update operations. + // `projects//locations//builds/`. + BuildName string `json:"buildName,omitempty"` + + // Request: The original request that started the operation. + Request googleapi.RawMessage `json:"request,omitempty"` + + // SourceToken: An identifier for Firebase function sources. Disclaimer: + // This field is only supported for Firebase function deployments. + SourceToken string `json:"sourceToken,omitempty"` + + // Target: Target of the operation - for example + // `projects/project-1/locations/region-1/functions/function-1` + Target string `json:"target,omitempty"` + + // Type: Type of operation. + // + // Possible values: + // "OPERATION_UNSPECIFIED" - Unknown operation type. + // "CREATE_FUNCTION" - Triggered by CreateFunction call + // "UPDATE_FUNCTION" - Triggered by UpdateFunction call + // "DELETE_FUNCTION" - Triggered by DeleteFunction call. + Type string `json:"type,omitempty"` + + // UpdateTime: The last update timestamp of the operation. + UpdateTime string `json:"updateTime,omitempty"` + + // VersionId: Version id of the function created or updated by an API + // call. This field is only populated for Create and Update operations. + VersionId int64 `json:"versionId,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "BuildId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BuildId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadataV1 + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RepoSource: Location of the source in a Google Cloud Source +// Repository. +type RepoSource struct { + // BranchName: Regex matching branches to build. The syntax of the + // regular expressions accepted is the syntax accepted by RE2 and + // described at https://github.com/google/re2/wiki/Syntax + BranchName string `json:"branchName,omitempty"` + + // CommitSha: Explicit commit SHA to build. + CommitSha string `json:"commitSha,omitempty"` + + // Dir: Directory, relative to the source root, in which to run the + // build. This must be a relative path. If a step's `dir` is specified + // and is an absolute path, this value is ignored for that step's + // execution. eg. helloworld (no leading slash allowed) + Dir string `json:"dir,omitempty"` + + // InvertRegex: Only trigger a build if the revision regex does NOT + // match the revision regex. + InvertRegex bool `json:"invertRegex,omitempty"` + + // ProjectId: ID of the project that owns the Cloud Source Repository. + // If omitted, the project ID requesting the build is assumed. + ProjectId string `json:"projectId,omitempty"` + + // RepoName: Name of the Cloud Source Repository. + RepoName string `json:"repoName,omitempty"` + + // TagName: Regex matching tags to build. The syntax of the regular + // expressions accepted is the syntax accepted by RE2 and described at + // https://github.com/google/re2/wiki/Syntax + TagName string `json:"tagName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BranchName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BranchName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RepoSource) MarshalJSON() ([]byte, error) { + type NoMethod RepoSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Runtime: Describes a runtime and any special information (e.g., +// deprecation status) related to it. +type Runtime struct { + // DisplayName: The user facing name, eg 'Go 1.13', 'Node.js 12', etc. + DisplayName string `json:"displayName,omitempty"` + + // Environment: The environment for the runtime. + // + // Possible values: + // "ENVIRONMENT_UNSPECIFIED" - Unspecified + // "GEN_1" - Gen 1 + // "GEN_2" - Gen 2 + Environment string `json:"environment,omitempty"` + + // Name: The name of the runtime, e.g., 'go113', 'nodejs12', etc. + Name string `json:"name,omitempty"` + + // Stage: The stage of life this runtime is in, e.g., BETA, GA, etc. + // + // Possible values: + // "RUNTIME_STAGE_UNSPECIFIED" - Not specified. + // "DEVELOPMENT" - The runtime is in development. + // "ALPHA" - The runtime is in the Alpha stage. + // "BETA" - The runtime is in the Beta stage. + // "GA" - The runtime is generally available. + // "DEPRECATED" - The runtime is deprecated. + // "DECOMMISSIONED" - The runtime is no longer supported. + Stage string `json:"stage,omitempty"` + + // Warnings: Warning messages, e.g., a deprecation warning. + Warnings []string `json:"warnings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Runtime) MarshalJSON() ([]byte, error) { + type NoMethod Runtime + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceConfig: Describes the Service being deployed. Currently +// Supported : Cloud Run (fully managed). +type ServiceConfig struct { + // AllTrafficOnLatestRevision: Whether 100% of traffic is routed to the + // latest revision. On CreateFunction and UpdateFunction, when set to + // true, the revision being deployed will serve 100% of traffic, + // ignoring any traffic split settings, if any. On GetFunction, true + // will be returned if the latest revision is serving 100% of traffic. + AllTrafficOnLatestRevision bool `json:"allTrafficOnLatestRevision,omitempty"` + + // AvailableMemory: The amount of memory available for a function. + // Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is + // supplied the value is interpreted as bytes. See + // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go + // a full description. + AvailableMemory string `json:"availableMemory,omitempty"` + + // EnvironmentVariables: Environment variables that shall be available + // during function execution. + EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` + + // IngressSettings: The ingress settings for the function, controlling + // what traffic can reach it. + // + // Possible values: + // "INGRESS_SETTINGS_UNSPECIFIED" - Unspecified. + // "ALLOW_ALL" - Allow HTTP traffic from public and private sources. + // "ALLOW_INTERNAL_ONLY" - Allow HTTP traffic from only private VPC + // sources. + // "ALLOW_INTERNAL_AND_GCLB" - Allow HTTP traffic from private VPC + // sources and through GCLB. + IngressSettings string `json:"ingressSettings,omitempty"` + + // MaxInstanceCount: The limit on the maximum number of function + // instances that may coexist at a given time. In some cases, such as + // rapid traffic surges, Cloud Functions may, for a short period of + // time, create more instances than the specified max instances limit. + // If your function cannot tolerate this temporary behavior, you may + // want to factor in a safety margin and set a lower max instances value + // than your function can tolerate. See the Max Instances + // (https://cloud.google.com/functions/docs/max-instances) Guide for + // more details. + MaxInstanceCount int64 `json:"maxInstanceCount,omitempty"` + + // MinInstanceCount: The limit on the minimum number of function + // instances that may coexist at a given time. Function instances are + // kept in idle state for a short period after they finished executing + // the request to reduce cold start time for subsequent requests. + // Setting a minimum instance count will ensure that the given number of + // instances are kept running in idle state always. This can help with + // cold start times when jump in incoming request count occurs after the + // idle instance would have been stopped in the default case. + MinInstanceCount int64 `json:"minInstanceCount,omitempty"` + + // Service: Output only. Name of the service associated with a Function. + // The format of this field is + // `projects/{project}/locations/{region}/services/{service}` + Service string `json:"service,omitempty"` + + // ServiceAccountEmail: The email of the service's service account. If + // empty, defaults to + // `{project_number}-compute@developer.gserviceaccount.com`. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // TimeoutSeconds: The function execution timeout. Execution is + // considered failed and can be terminated if the function is not + // completed at the end of the timeout period. Defaults to 60 seconds. + TimeoutSeconds int64 `json:"timeoutSeconds,omitempty"` + + // Uri: Output only. URI of the Service deployed. + Uri string `json:"uri,omitempty"` + + // VpcConnector: The Serverless VPC Access connector that this cloud + // function can connect to. The format of this field is + // `projects/*/locations/*/connectors/*`. + VpcConnector string `json:"vpcConnector,omitempty"` + + // VpcConnectorEgressSettings: The egress settings for the connector, + // controlling what traffic is diverted through it. + // + // Possible values: + // "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" - Unspecified. + // "PRIVATE_RANGES_ONLY" - Use the VPC Access Connector only for + // private IP space from RFC1918. + // "ALL_TRAFFIC" - Force the use of VPC Access Connector for all + // egress traffic from the function. + VpcConnectorEgressSettings string `json:"vpcConnectorEgressSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AllTrafficOnLatestRevision") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AllTrafficOnLatestRevision") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Cloud Platform services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Source: The location of the function source code. +type Source struct { + // RepoSource: If provided, get the source from this location in a Cloud + // Source Repository. + RepoSource *RepoSource `json:"repoSource,omitempty"` + + // StorageSource: If provided, get the source from this location in + // Google Cloud Storage. + StorageSource *StorageSource `json:"storageSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RepoSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RepoSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Source) MarshalJSON() ([]byte, error) { + type NoMethod Source + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SourceProvenance: Provenance of the source. Ways to find the original +// source, or verify that some source was used for this build. +type SourceProvenance struct { + // ResolvedRepoSource: A copy of the build's `source.repo_source`, if + // exists, with any revisions resolved. + ResolvedRepoSource *RepoSource `json:"resolvedRepoSource,omitempty"` + + // ResolvedStorageSource: A copy of the build's `source.storage_source`, + // if exists, with any generations resolved. + ResolvedStorageSource *StorageSource `json:"resolvedStorageSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResolvedRepoSource") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResolvedRepoSource") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SourceProvenance) MarshalJSON() ([]byte, error) { + type NoMethod SourceProvenance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageSource: Location of the source in an archive file in Google +// Cloud Storage. +type StorageSource struct { + // Bucket: Google Cloud Storage bucket containing the source (see Bucket + // Name Requirements + // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). + Bucket string `json:"bucket,omitempty"` + + // Generation: Google Cloud Storage generation for the object. If the + // generation is omitted, the latest generation will be used. + Generation int64 `json:"generation,omitempty,string"` + + // Object: Google Cloud Storage object containing the source. This + // object must be a gzipped archive file (`.tar.gz`) containing source + // to build. + Object string `json:"object,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bucket") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StorageSource) MarshalJSON() ([]byte, error) { + type NoMethod StorageSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as '*' or 'storage.*') are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "cloudfunctions.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudfunctions.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v2alpha/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudfunctions.projects.locations.functions.create": + +type ProjectsLocationsFunctionsCreateCall struct { + s *Service + parent string + function *Function + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new function. If a function with the given name +// already exists in the specified project, the long running operation +// will return `ALREADY_EXISTS` error. +// +// - parent: The project and location in which the function should be +// created, specified in the format `projects/*/locations/*`. +func (r *ProjectsLocationsFunctionsService) Create(parent string, function *Function) *ProjectsLocationsFunctionsCreateCall { + c := &ProjectsLocationsFunctionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.function = function + return c +} + +// FunctionId sets the optional parameter "functionId": The ID to use +// for the function, which will become the final component of the +// function's resource name. This value should be 4-63 characters, and +// valid characters are /a-z-/. +func (c *ProjectsLocationsFunctionsCreateCall) FunctionId(functionId string) *ProjectsLocationsFunctionsCreateCall { + c.urlParams_.Set("functionId", functionId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsCreateCall) Context(ctx context.Context) *ProjectsLocationsFunctionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.function) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/functions") + 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 "cloudfunctions.projects.locations.functions.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "functionId": { + // "description": "The ID to use for the function, which will become the final component of the function's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location in which the function should be created, specified in the format `projects/*/locations/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+parent}/functions", + // "request": { + // "$ref": "Function" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.delete": + +type ProjectsLocationsFunctionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a function with the given name from the specified +// project. If the given function is used by some trigger, the trigger +// will be updated to remove this function. +// +// - name: The name of the function which should be deleted. +func (r *ProjectsLocationsFunctionsService) Delete(name string) *ProjectsLocationsFunctionsDeleteCall { + c := &ProjectsLocationsFunctionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFunctionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "cloudfunctions.projects.locations.functions.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + // "httpMethod": "DELETE", + // "id": "cloudfunctions.projects.locations.functions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the function which should be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.generateDownloadUrl": + +type ProjectsLocationsFunctionsGenerateDownloadUrlCall struct { + s *Service + name string + generatedownloadurlrequest *GenerateDownloadUrlRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateDownloadUrl: Returns a signed URL for downloading deployed +// function source code. The URL is only valid for a limited period and +// should be used within 30 minutes of generation. For more information +// about the signed URL usage see: +// https://cloud.google.com/storage/docs/access-control/signed-urls +// +// - name: The name of function for which source code Google Cloud +// Storage signed URL should be generated. +func (r *ProjectsLocationsFunctionsService) GenerateDownloadUrl(name string, generatedownloadurlrequest *GenerateDownloadUrlRequest) *ProjectsLocationsFunctionsGenerateDownloadUrlCall { + c := &ProjectsLocationsFunctionsGenerateDownloadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.generatedownloadurlrequest = generatedownloadurlrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGenerateDownloadUrlCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGenerateDownloadUrlCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatedownloadurlrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+name}:generateDownloadUrl") + 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 "cloudfunctions.projects.locations.functions.generateDownloadUrl" call. +// Exactly one of *GenerateDownloadUrlResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GenerateDownloadUrlResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Do(opts ...googleapi.CallOption) (*GenerateDownloadUrlResponse, 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, &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, err + } + ret := &GenerateDownloadUrlResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:generateDownloadUrl", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.generateDownloadUrl", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of function for which source code Google Cloud Storage signed URL should be generated.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}:generateDownloadUrl", + // "request": { + // "$ref": "GenerateDownloadUrlRequest" + // }, + // "response": { + // "$ref": "GenerateDownloadUrlResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.generateUploadUrl": + +type ProjectsLocationsFunctionsGenerateUploadUrlCall struct { + s *Service + parent string + generateuploadurlrequest *GenerateUploadUrlRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateUploadUrl: Returns a signed URL for uploading a function +// source code. For more information about the signed URL usage see: +// https://cloud.google.com/storage/docs/access-control/signed-urls. +// Once the function source code upload is complete, the used signed URL +// should be provided in CreateFunction or UpdateFunction request as a +// reference to the function source code. When uploading source code to +// the generated signed URL, please follow these restrictions: * Source +// file type should be a zip file. * No credentials should be attached - +// the signed URLs provide access to the target bucket using internal +// service identity; if credentials were attached, the identity from the +// credentials would be used, but that identity does not have +// permissions to upload files to the URL. When making a HTTP PUT +// request, these two headers need to be specified: * `content-type: +// application/zip` And this header SHOULD NOT be specified: * +// `Authorization: Bearer YOUR_TOKEN` +// +// - parent: The project and location in which the Google Cloud Storage +// signed URL should be generated, specified in the format +// `projects/*/locations/*`. +func (r *ProjectsLocationsFunctionsService) GenerateUploadUrl(parent string, generateuploadurlrequest *GenerateUploadUrlRequest) *ProjectsLocationsFunctionsGenerateUploadUrlCall { + c := &ProjectsLocationsFunctionsGenerateUploadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.generateuploadurlrequest = generateuploadurlrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGenerateUploadUrlCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGenerateUploadUrlCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateuploadurlrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/functions:generateUploadUrl") + 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 "cloudfunctions.projects.locations.functions.generateUploadUrl" call. +// Exactly one of *GenerateUploadUrlResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GenerateUploadUrlResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Do(opts ...googleapi.CallOption) (*GenerateUploadUrlResponse, 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, &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, err + } + ret := &GenerateUploadUrlResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions:generateUploadUrl", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.generateUploadUrl", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+parent}/functions:generateUploadUrl", + // "request": { + // "$ref": "GenerateUploadUrlRequest" + // }, + // "response": { + // "$ref": "GenerateUploadUrlResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.get": + +type ProjectsLocationsFunctionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns a function with the given name from the requested +// project. +// +// - name: The name of the function which details should be obtained. +func (r *ProjectsLocationsFunctionsService) Get(name string) *ProjectsLocationsFunctionsGetCall { + c := &ProjectsLocationsFunctionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsFunctionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGetCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "cloudfunctions.projects.locations.functions.get" call. +// Exactly one of *Function or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Function.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsGetCall) Do(opts ...googleapi.CallOption) (*Function, 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, &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, err + } + ret := &Function{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a function with the given name from the requested project.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.functions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the function which details should be obtained.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "response": { + // "$ref": "Function" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.getIamPolicy": + +type ProjectsLocationsFunctionsGetIamPolicyCall 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 the operation documentation for the appropriate +// value for this field. +func (r *ProjectsLocationsFunctionsService) GetIamPolicy(resource string) *ProjectsLocationsFunctionsGetIamPolicyCall { + c := &ProjectsLocationsFunctionsGetIamPolicyCall{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 *ProjectsLocationsFunctionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "cloudfunctions.projects.locations.functions.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.functions.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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.list": + +type ProjectsLocationsFunctionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of functions that belong to the requested +// project. +// +// - parent: The project and location from which the function should be +// listed, specified in the format `projects/*/locations/*` If you +// want to list functions in all locations, use "-" in place of a +// location. When listing functions in all locations, if one or more +// location(s) are unreachable, the response will contain functions +// from all reachable locations along with the names of any +// unreachable locations. +func (r *ProjectsLocationsFunctionsService) List(parent string) *ProjectsLocationsFunctionsListCall { + c := &ProjectsLocationsFunctionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter for Functions +// that match the filter expression, following the syntax outlined in +// https://google.aip.dev/160. +func (c *ProjectsLocationsFunctionsListCall) Filter(filter string) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The sorting order of +// the resources returned. Value should be a comma separated list of +// fields. The default sorting oder is ascending. See +// https://google.aip.dev/132#ordering. +func (c *ProjectsLocationsFunctionsListCall) OrderBy(orderBy string) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// functions to return per call. +func (c *ProjectsLocationsFunctionsListCall) PageSize(pageSize int64) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListFunctionsResponse`; indicates that this is a +// continuation of a prior `ListFunctions` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsFunctionsListCall) PageToken(pageToken string) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsFunctionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsListCall) Context(ctx context.Context) *ProjectsLocationsFunctionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/functions") + 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 "cloudfunctions.projects.locations.functions.list" call. +// Exactly one of *ListFunctionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListFunctionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsListCall) Do(opts ...googleapi.CallOption) (*ListFunctionsResponse, 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, &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, err + } + ret := &ListFunctionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a list of functions that belong to the requested project.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.functions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "The filter for Functions that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "The sorting order of the resources returned. Value should be a comma separated list of fields. The default sorting oder is ascending. See https://google.aip.dev/132#ordering.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of functions to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListFunctionsResponse`; indicates that this is a continuation of a prior `ListFunctions` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the function should be listed, specified in the format `projects/*/locations/*` If you want to list functions in all locations, use \"-\" in place of a location. When listing functions in all locations, if one or more location(s) are unreachable, the response will contain functions from all reachable locations along with the names of any unreachable locations.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+parent}/functions", + // "response": { + // "$ref": "ListFunctionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsFunctionsListCall) Pages(ctx context.Context, f func(*ListFunctionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudfunctions.projects.locations.functions.patch": + +type ProjectsLocationsFunctionsPatchCall struct { + s *Service + name string + function *Function + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates existing function. +// +// - name: A user-defined name of the function. Function names must be +// unique globally and match pattern +// `projects/*/locations/*/functions/*`. +func (r *ProjectsLocationsFunctionsService) Patch(name string, function *Function) *ProjectsLocationsFunctionsPatchCall { + c := &ProjectsLocationsFunctionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.function = function + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. If no field mask is provided, all provided +// fields in the request will be updated. +func (c *ProjectsLocationsFunctionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFunctionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsPatchCall) Context(ctx context.Context) *ProjectsLocationsFunctionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.function) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "cloudfunctions.projects.locations.functions.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates existing function.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + // "httpMethod": "PATCH", + // "id": "cloudfunctions.projects.locations.functions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated. If no field mask is provided, all provided fields in the request will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "request": { + // "$ref": "Function" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.setIamPolicy": + +type ProjectsLocationsFunctionsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See the operation documentation for the appropriate +// value for this field. +func (r *ProjectsLocationsFunctionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFunctionsSetIamPolicyCall { + c := &ProjectsLocationsFunctionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFunctionsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "cloudfunctions.projects.locations.functions.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsFunctionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.testIamPermissions": + +type ProjectsLocationsFunctionsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See the operation documentation for the +// appropriate value for this field. +func (r *ProjectsLocationsFunctionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFunctionsTestIamPermissionsCall { + c := &ProjectsLocationsFunctionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFunctionsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudfunctions.projects.locations.functions.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "cloudfunctions.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: Must not be set. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": Required. A filter for +// matching the requested operations. The supported formats of *filter* +// are: To query for a specific function: +// project:*,location:*,function:* To query for all of the latest +// operations for a project: project:*,latest:true +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of records that should be returned. Requested page size cannot exceed +// 100. If not set, the default page size is 100. Pagination is only +// supported when querying for a specific function. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token identifying +// which result to start with, which is returned by a previous list +// call. Pagination is only supported when querying for a specific +// function. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudfunctions.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Must not be set.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2alpha/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudfunctions.projects.locations.runtimes.list": + +type ProjectsLocationsRuntimesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of runtimes that are supported for the requested +// project. +// +// - parent: The project and location from which the runtimes should be +// listed, specified in the format `projects/*/locations/*`. +func (r *ProjectsLocationsRuntimesService) List(parent string) *ProjectsLocationsRuntimesListCall { + c := &ProjectsLocationsRuntimesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter for Runtimes +// that match the filter expression, following the syntax outlined in +// https://google.aip.dev/160. +func (c *ProjectsLocationsRuntimesListCall) Filter(filter string) *ProjectsLocationsRuntimesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRuntimesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRuntimesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRuntimesListCall) Context(ctx context.Context) *ProjectsLocationsRuntimesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRuntimesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRuntimesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/runtimes") + 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 "cloudfunctions.projects.locations.runtimes.list" call. +// Exactly one of *ListRuntimesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListRuntimesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRuntimesListCall) Do(opts ...googleapi.CallOption) (*ListRuntimesResponse, 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, &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, err + } + ret := &ListRuntimesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a list of runtimes that are supported for the requested project.", + // "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/runtimes", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.runtimes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "The filter for Runtimes that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the runtimes should be listed, specified in the format `projects/*/locations/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2alpha/{+parent}/runtimes", + // "response": { + // "$ref": "ListRuntimesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json new file mode 100644 index 00000000000..299c7207c20 --- /dev/null +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -0,0 +1,1729 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://cloudfunctions.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud Functions", + "description": "Manages lightweight user-provided functions executed in response to events.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/functions", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "cloudfunctions:v2beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://cloudfunctions.mtls.googleapis.com/", + "name": "cloudfunctions", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v2beta/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "functions": { + "methods": { + "create": { + "description": "Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "functionId": { + "description": "The ID to use for the function, which will become the final component of the function's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location in which the function should be created, specified in the format `projects/*/locations/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/functions", + "request": { + "$ref": "Function" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "httpMethod": "DELETE", + "id": "cloudfunctions.projects.locations.functions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the function which should be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateDownloadUrl": { + "description": "Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:generateDownloadUrl", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.generateDownloadUrl", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of function for which source code Google Cloud Storage signed URL should be generated.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}:generateDownloadUrl", + "request": { + "$ref": "GenerateDownloadUrlRequest" + }, + "response": { + "$ref": "GenerateDownloadUrlResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateUploadUrl": { + "description": "Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions:generateUploadUrl", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.generateUploadUrl", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/functions:generateUploadUrl", + "request": { + "$ref": "GenerateUploadUrlRequest" + }, + "response": { + "$ref": "GenerateUploadUrlResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns a function with the given name from the requested project.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.functions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the function which details should be obtained.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "Function" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.functions.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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns a list of functions that belong to the requested project.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.functions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter for Functions that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "The sorting order of the resources returned. Value should be a comma separated list of fields. The default sorting oder is ascending. See https://google.aip.dev/132#ordering.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of functions to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListFunctionsResponse`; indicates that this is a continuation of a prior `ListFunctions` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the function should be listed, specified in the format `projects/*/locations/*` If you want to list functions in all locations, use \"-\" in place of a location. When listing functions in all locations, if one or more location(s) are unreachable, the response will contain functions from all reachable locations along with the names of any unreachable locations.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/functions", + "response": { + "$ref": "ListFunctionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates existing function.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "httpMethod": "PATCH", + "id": "cloudfunctions.projects.locations.functions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated. If no field mask is provided, all provided fields in the request will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "request": { + "$ref": "Function" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:setIamPolicy", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:testIamPermissions", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + "location": "query", + "type": "string" + }, + "name": { + "description": "Must not be set.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "runtimes": { + "methods": { + "list": { + "description": "Returns a list of runtimes that are supported for the requested project.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/runtimes", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.runtimes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter for Runtimes that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the runtimes should be listed, specified in the format `projects/*/locations/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/runtimes", + "response": { + "$ref": "ListRuntimesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20220203", + "rootUrl": "https://cloudfunctions.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "BuildConfig": { + "description": "Describes the Build step of the function that builds a container from the given source.", + "id": "BuildConfig", + "properties": { + "build": { + "description": "Output only. The Cloud Build name of the latest successful deployment of the function.", + "readOnly": true, + "type": "string" + }, + "dockerRepository": { + "description": "Optional. User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.", + "type": "string" + }, + "entryPoint": { + "description": "The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named \"function\". For Node.js this is name of a function exported by the module specified in `source_location`.", + "type": "string" + }, + "environmentVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "User-provided build-time environment variables for the function", + "type": "object" + }, + "runtime": { + "description": "The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the [`gcloud` command reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).", + "type": "string" + }, + "source": { + "$ref": "Source", + "description": "The location of the function source code." + }, + "sourceProvenance": { + "$ref": "SourceProvenance", + "description": "Output only. A permanent fixed identifier for source.", + "readOnly": true + }, + "workerPool": { + "description": "Name of the Cloud Build Custom Worker Pool that should be used to build the function. The format of this field is `projects/{project}/locations/{region}/workerPools/{workerPool}` where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool. If the project id is not the same as the function, then the Cloud Functions Service Agent (service-@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.", + "type": "string" + } + }, + "type": "object" + }, + "EventFilter": { + "description": "Filters events based on exact matches on the CloudEvents attributes.", + "id": "EventFilter", + "properties": { + "attribute": { + "description": "Required. The name of a CloudEvents attribute.", + "type": "string" + }, + "value": { + "description": "Required. The value for the attribute.", + "type": "string" + } + }, + "type": "object" + }, + "EventTrigger": { + "description": "Describes EventTrigger, used to request events to be sent from another service.", + "id": "EventTrigger", + "properties": { + "eventFilters": { + "description": "Criteria used to filter events.", + "items": { + "$ref": "EventFilter" + }, + "type": "array" + }, + "eventType": { + "description": "Required. The type of event to observe. For example: `google.cloud.audit.log.v1.written` or `google.cloud.pubsub.topic.v1.messagePublished`.", + "type": "string" + }, + "pubsubTopic": { + "description": "Optional. The name of a Pub/Sub topic in the same project that will be used as the transport topic for the event delivery. Format: `projects/{project}/topics/{topic}`. This is only valid for events of type `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here will not be deleted at function deletion.", + "type": "string" + }, + "retryPolicy": { + "description": "Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).", + "enum": [ + "RETRY_POLICY_UNSPECIFIED", + "RETRY_POLICY_DO_NOT_RETRY", + "RETRY_POLICY_RETRY" + ], + "enumDescriptions": [ + "Not specified.", + "Do not retry.", + "Retry on any failure, retry up to 7 days with an exponential backoff (capped at 10 seconds)." + ], + "type": "string" + }, + "serviceAccountEmail": { + "description": "Optional. The email of the trigger's service account. The service account must have permission to invoke Cloud Run services, the permission is `run.routes.invoke`. If empty, defaults to the Compute Engine default service account: `{project_number}-compute@developer.gserviceaccount.com`.", + "type": "string" + }, + "trigger": { + "description": "Output only. The resource name of the Eventarc trigger. The format of this field is `projects/{project}/locations/{region}/triggers/{trigger}`.", + "readOnly": true, + "type": "string" + }, + "triggerRegion": { + "description": "The region that the trigger will be in. The trigger will only receive events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function.", + "type": "string" + } + }, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "Function": { + "description": "Describes a Cloud Function that contains user computation executed in response to an event. It encapsulate function and triggers configurations.", + "id": "Function", + "properties": { + "buildConfig": { + "$ref": "BuildConfig", + "description": "Describes the Build step of the function that builds a container from the given source." + }, + "description": { + "description": "User-provided description of a function.", + "type": "string" + }, + "environment": { + "description": "Describe whether the function is gen1 or gen2.", + "enum": [ + "ENVIRONMENT_UNSPECIFIED", + "GEN_1", + "GEN_2" + ], + "enumDescriptions": [ + "Unspecified", + "Gen 1", + "Gen 2" + ], + "type": "string" + }, + "eventTrigger": { + "$ref": "EventTrigger", + "description": "An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels associated with this Cloud Function.", + "type": "object" + }, + "name": { + "description": "A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`", + "type": "string" + }, + "serviceConfig": { + "$ref": "ServiceConfig", + "description": "Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed)." + }, + "state": { + "description": "Output only. State of the function.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "FAILED", + "DEPLOYING", + "DELETING", + "UNKNOWN" + ], + "enumDescriptions": [ + "Not specified. Invalid state.", + "Function has been successfully deployed and is serving.", + "Function deployment failed and the function isn’t serving.", + "Function is being created or updated.", + "Function is being deleted.", + "Function deployment failed and the function serving state is undefined. The function should be updated or deleted to move it out of this state." + ], + "readOnly": true, + "type": "string" + }, + "stateMessages": { + "description": "Output only. State Messages for this Cloud Function.", + "items": { + "$ref": "GoogleCloudFunctionsV2betaStateMessage" + }, + "readOnly": true, + "type": "array" + }, + "updateTime": { + "description": "Output only. The last update timestamp of a Cloud Function.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GenerateDownloadUrlRequest": { + "description": "Request of `GenerateDownloadUrl` method.", + "id": "GenerateDownloadUrlRequest", + "properties": {}, + "type": "object" + }, + "GenerateDownloadUrlResponse": { + "description": "Response of `GenerateDownloadUrl` method.", + "id": "GenerateDownloadUrlResponse", + "properties": { + "downloadUrl": { + "description": "The generated Google Cloud Storage signed URL that should be used for function source code download.", + "type": "string" + } + }, + "type": "object" + }, + "GenerateUploadUrlRequest": { + "description": "Request of `GenerateSourceUploadUrl` method.", + "id": "GenerateUploadUrlRequest", + "properties": {}, + "type": "object" + }, + "GenerateUploadUrlResponse": { + "description": "Response of `GenerateSourceUploadUrl` method.", + "id": "GenerateUploadUrlResponse", + "properties": { + "storageSource": { + "$ref": "StorageSource", + "description": "The location of the source code in the upload bucket. Once the archive is uploaded using the `upload_url` use this field to set the `function.build_config.source.storage_source` during CreateFunction and UpdateFunction. Generation defaults to 0, as Cloud Storage provides a new generation only upon uploading a new object or version of an object." + }, + "uploadUrl": { + "description": "The generated Google Cloud Storage signed URL that should be used for a function source code upload. The uploaded file should be a zip archive which contains a function.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2alphaOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudFunctionsV2alphaOperationMetadata", + "properties": { + "apiVersion": { + "description": "API version used to start the operation.", + "type": "string" + }, + "cancelRequested": { + "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "type": "boolean" + }, + "createTime": { + "description": "The time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "The time the operation finished running.", + "format": "google-datetime", + "type": "string" + }, + "requestResource": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The original request that started the operation.", + "type": "object" + }, + "stages": { + "description": "Mechanism for reporting in-progress stages", + "items": { + "$ref": "GoogleCloudFunctionsV2alphaStage" + }, + "type": "array" + }, + "statusDetail": { + "description": "Human-readable status of the operation, if any.", + "type": "string" + }, + "target": { + "description": "Server-defined resource path for the target of the operation.", + "type": "string" + }, + "verb": { + "description": "Name of the verb executed by the operation.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2alphaStage": { + "description": "Each Stage of the deployment process", + "id": "GoogleCloudFunctionsV2alphaStage", + "properties": { + "message": { + "description": "Message describing the Stage", + "type": "string" + }, + "name": { + "description": "Name of the Stage. This will be unique for each Stage.", + "enum": [ + "NAME_UNSPECIFIED", + "ARTIFACT_REGISTRY", + "BUILD", + "SERVICE", + "TRIGGER", + "SERVICE_ROLLBACK", + "TRIGGER_ROLLBACK" + ], + "enumDescriptions": [ + "Not specified. Invalid name.", + "Artifact Regsitry Stage", + "Build Stage", + "Service Stage", + "Trigger Stage", + "Service Rollback Stage", + "Trigger Rollback Stage" + ], + "type": "string" + }, + "resource": { + "description": "Resource of the Stage", + "type": "string" + }, + "resourceUri": { + "description": "Link to the current Stage resource", + "type": "string" + }, + "state": { + "description": "Current state of the Stage", + "enum": [ + "STATE_UNSPECIFIED", + "NOT_STARTED", + "IN_PROGRESS", + "COMPLETE" + ], + "enumDescriptions": [ + "Not specified. Invalid state.", + "Stage has not started.", + "Stage is in progress.", + "Stage has completed." + ], + "type": "string" + }, + "stateMessages": { + "description": "State messages from the current Stage.", + "items": { + "$ref": "GoogleCloudFunctionsV2alphaStateMessage" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2alphaStateMessage": { + "description": "Informational messages about the state of the Cloud Function or Operation.", + "id": "GoogleCloudFunctionsV2alphaStateMessage", + "properties": { + "message": { + "description": "The message.", + "type": "string" + }, + "severity": { + "description": "Severity of the state message.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Not specified. Invalid severity.", + "ERROR-level severity.", + "WARNING-level severity.", + "INFO-level severity." + ], + "type": "string" + }, + "type": { + "description": "One-word CamelCase type of the state message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2betaOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudFunctionsV2betaOperationMetadata", + "properties": { + "apiVersion": { + "description": "API version used to start the operation.", + "type": "string" + }, + "cancelRequested": { + "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "type": "boolean" + }, + "createTime": { + "description": "The time the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "The time the operation finished running.", + "format": "google-datetime", + "type": "string" + }, + "requestResource": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The original request that started the operation.", + "type": "object" + }, + "stages": { + "description": "Mechanism for reporting in-progress stages", + "items": { + "$ref": "GoogleCloudFunctionsV2betaStage" + }, + "type": "array" + }, + "statusDetail": { + "description": "Human-readable status of the operation, if any.", + "type": "string" + }, + "target": { + "description": "Server-defined resource path for the target of the operation.", + "type": "string" + }, + "verb": { + "description": "Name of the verb executed by the operation.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2betaStage": { + "description": "Each Stage of the deployment process", + "id": "GoogleCloudFunctionsV2betaStage", + "properties": { + "message": { + "description": "Message describing the Stage", + "type": "string" + }, + "name": { + "description": "Name of the Stage. This will be unique for each Stage.", + "enum": [ + "NAME_UNSPECIFIED", + "ARTIFACT_REGISTRY", + "BUILD", + "SERVICE", + "TRIGGER", + "SERVICE_ROLLBACK", + "TRIGGER_ROLLBACK" + ], + "enumDescriptions": [ + "Not specified. Invalid name.", + "Artifact Regsitry Stage", + "Build Stage", + "Service Stage", + "Trigger Stage", + "Service Rollback Stage", + "Trigger Rollback Stage" + ], + "type": "string" + }, + "resource": { + "description": "Resource of the Stage", + "type": "string" + }, + "resourceUri": { + "description": "Link to the current Stage resource", + "type": "string" + }, + "state": { + "description": "Current state of the Stage", + "enum": [ + "STATE_UNSPECIFIED", + "NOT_STARTED", + "IN_PROGRESS", + "COMPLETE" + ], + "enumDescriptions": [ + "Not specified. Invalid state.", + "Stage has not started.", + "Stage is in progress.", + "Stage has completed." + ], + "type": "string" + }, + "stateMessages": { + "description": "State messages from the current Stage.", + "items": { + "$ref": "GoogleCloudFunctionsV2betaStateMessage" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudFunctionsV2betaStateMessage": { + "description": "Informational messages about the state of the Cloud Function or Operation.", + "id": "GoogleCloudFunctionsV2betaStateMessage", + "properties": { + "message": { + "description": "The message.", + "type": "string" + }, + "severity": { + "description": "Severity of the state message.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Not specified. Invalid severity.", + "ERROR-level severity.", + "WARNING-level severity.", + "INFO-level severity." + ], + "type": "string" + }, + "type": { + "description": "One-word CamelCase type of the state message.", + "type": "string" + } + }, + "type": "object" + }, + "ListFunctionsResponse": { + "description": "Response for the `ListFunctions` method.", + "id": "ListFunctionsResponse", + "properties": { + "functions": { + "description": "The functions that match the request.", + "items": { + "$ref": "Function" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached. The response does not include any functions from these locations.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListRuntimesResponse": { + "description": "Response for the `ListRuntimes` method.", + "id": "ListRuntimesResponse", + "properties": { + "runtimes": { + "description": "The runtimes that match the request.", + "items": { + "$ref": "Runtime" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadataV1": { + "description": "Metadata describing an Operation", + "id": "OperationMetadataV1", + "properties": { + "buildId": { + "description": "The Cloud Build ID of the function created or updated by an API call. This field is only populated for Create and Update operations.", + "type": "string" + }, + "buildName": { + "description": "The Cloud Build Name of the function deployment. This field is only populated for Create and Update operations. `projects//locations//builds/`.", + "type": "string" + }, + "request": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The original request that started the operation.", + "type": "object" + }, + "sourceToken": { + "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", + "type": "string" + }, + "target": { + "description": "Target of the operation - for example `projects/project-1/locations/region-1/functions/function-1`", + "type": "string" + }, + "type": { + "description": "Type of operation.", + "enum": [ + "OPERATION_UNSPECIFIED", + "CREATE_FUNCTION", + "UPDATE_FUNCTION", + "DELETE_FUNCTION" + ], + "enumDescriptions": [ + "Unknown operation type.", + "Triggered by CreateFunction call", + "Triggered by UpdateFunction call", + "Triggered by DeleteFunction call." + ], + "type": "string" + }, + "updateTime": { + "description": "The last update timestamp of the operation.", + "format": "google-datetime", + "type": "string" + }, + "versionId": { + "description": "Version id of the function created or updated by an API call. This field is only populated for Create and Update operations.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "RepoSource": { + "description": "Location of the source in a Google Cloud Source Repository.", + "id": "RepoSource", + "properties": { + "branchName": { + "description": "Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + }, + "commitSha": { + "description": "Explicit commit SHA to build.", + "type": "string" + }, + "dir": { + "description": "Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. eg. helloworld (no leading slash allowed)", + "type": "string" + }, + "invertRegex": { + "description": "Only trigger a build if the revision regex does NOT match the revision regex.", + "type": "boolean" + }, + "projectId": { + "description": "ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.", + "type": "string" + }, + "repoName": { + "description": "Name of the Cloud Source Repository.", + "type": "string" + }, + "tagName": { + "description": "Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + } + }, + "type": "object" + }, + "Runtime": { + "description": "Describes a runtime and any special information (e.g., deprecation status) related to it.", + "id": "Runtime", + "properties": { + "displayName": { + "description": "The user facing name, eg 'Go 1.13', 'Node.js 12', etc.", + "type": "string" + }, + "environment": { + "description": "The environment for the runtime.", + "enum": [ + "ENVIRONMENT_UNSPECIFIED", + "GEN_1", + "GEN_2" + ], + "enumDescriptions": [ + "Unspecified", + "Gen 1", + "Gen 2" + ], + "type": "string" + }, + "name": { + "description": "The name of the runtime, e.g., 'go113', 'nodejs12', etc.", + "type": "string" + }, + "stage": { + "description": "The stage of life this runtime is in, e.g., BETA, GA, etc.", + "enum": [ + "RUNTIME_STAGE_UNSPECIFIED", + "DEVELOPMENT", + "ALPHA", + "BETA", + "GA", + "DEPRECATED", + "DECOMMISSIONED" + ], + "enumDescriptions": [ + "Not specified.", + "The runtime is in development.", + "The runtime is in the Alpha stage.", + "The runtime is in the Beta stage.", + "The runtime is generally available.", + "The runtime is deprecated.", + "The runtime is no longer supported." + ], + "type": "string" + }, + "warnings": { + "description": "Warning messages, e.g., a deprecation warning.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ServiceConfig": { + "description": "Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).", + "id": "ServiceConfig", + "properties": { + "allTrafficOnLatestRevision": { + "description": "Whether 100% of traffic is routed to the latest revision. On CreateFunction and UpdateFunction, when set to true, the revision being deployed will serve 100% of traffic, ignoring any traffic split settings, if any. On GetFunction, true will be returned if the latest revision is serving 100% of traffic.", + "type": "boolean" + }, + "availableMemory": { + "description": "The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.", + "type": "string" + }, + "environmentVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables that shall be available during function execution.", + "type": "object" + }, + "ingressSettings": { + "description": "The ingress settings for the function, controlling what traffic can reach it.", + "enum": [ + "INGRESS_SETTINGS_UNSPECIFIED", + "ALLOW_ALL", + "ALLOW_INTERNAL_ONLY", + "ALLOW_INTERNAL_AND_GCLB" + ], + "enumDescriptions": [ + "Unspecified.", + "Allow HTTP traffic from public and private sources.", + "Allow HTTP traffic from only private VPC sources.", + "Allow HTTP traffic from private VPC sources and through GCLB." + ], + "type": "string" + }, + "maxInstanceCount": { + "description": "The limit on the maximum number of function instances that may coexist at a given time. In some cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you may want to factor in a safety margin and set a lower max instances value than your function can tolerate. See the [Max Instances](https://cloud.google.com/functions/docs/max-instances) Guide for more details.", + "format": "int32", + "type": "integer" + }, + "minInstanceCount": { + "description": "The limit on the minimum number of function instances that may coexist at a given time. Function instances are kept in idle state for a short period after they finished executing the request to reduce cold start time for subsequent requests. Setting a minimum instance count will ensure that the given number of instances are kept running in idle state always. This can help with cold start times when jump in incoming request count occurs after the idle instance would have been stopped in the default case.", + "format": "int32", + "type": "integer" + }, + "service": { + "description": "Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`", + "readOnly": true, + "type": "string" + }, + "serviceAccountEmail": { + "description": "The email of the service's service account. If empty, defaults to `{project_number}-compute@developer.gserviceaccount.com`.", + "type": "string" + }, + "timeoutSeconds": { + "description": "The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.", + "format": "int32", + "type": "integer" + }, + "uri": { + "description": "Output only. URI of the Service deployed.", + "readOnly": true, + "type": "string" + }, + "vpcConnector": { + "description": "The Serverless VPC Access connector that this cloud function can connect to. The format of this field is `projects/*/locations/*/connectors/*`.", + "type": "string" + }, + "vpcConnectorEgressSettings": { + "description": "The egress settings for the connector, controlling what traffic is diverted through it.", + "enum": [ + "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED", + "PRIVATE_RANGES_ONLY", + "ALL_TRAFFIC" + ], + "enumDescriptions": [ + "Unspecified.", + "Use the VPC Access Connector only for private IP space from RFC1918.", + "Force the use of VPC Access Connector for all egress traffic from the function." + ], + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "Source": { + "description": "The location of the function source code.", + "id": "Source", + "properties": { + "repoSource": { + "$ref": "RepoSource", + "description": "If provided, get the source from this location in a Cloud Source Repository." + }, + "storageSource": { + "$ref": "StorageSource", + "description": "If provided, get the source from this location in Google Cloud Storage." + } + }, + "type": "object" + }, + "SourceProvenance": { + "description": "Provenance of the source. Ways to find the original source, or verify that some source was used for this build.", + "id": "SourceProvenance", + "properties": { + "resolvedRepoSource": { + "$ref": "RepoSource", + "description": "A copy of the build's `source.repo_source`, if exists, with any revisions resolved." + }, + "resolvedStorageSource": { + "$ref": "StorageSource", + "description": "A copy of the build's `source.storage_source`, if exists, with any generations resolved." + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "StorageSource": { + "description": "Location of the source in an archive file in Google Cloud Storage.", + "id": "StorageSource", + "properties": { + "bucket": { + "description": "Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", + "type": "string" + }, + "generation": { + "description": "Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", + "format": "int64", + "type": "string" + }, + "object": { + "description": "Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.", + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud Functions API", + "version": "v2beta", + "version_module": true +} \ No newline at end of file diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go new file mode 100644 index 00000000000..7e5c7e99e85 --- /dev/null +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -0,0 +1,4331 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package cloudfunctions provides access to the Cloud Functions API. +// +// For product documentation, see: https://cloud.google.com/functions +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/cloudfunctions/v2beta" +// ... +// ctx := context.Background() +// cloudfunctionsService, err := cloudfunctions.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package cloudfunctions // import "google.golang.org/api/cloudfunctions/v2beta" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "cloudfunctions:v2beta" +const apiName = "cloudfunctions" +const apiVersion = "v2beta" +const basePath = "https://cloudfunctions.googleapis.com/" +const mtlsBasePath = "https://cloudfunctions.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Functions = NewProjectsLocationsFunctionsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.Runtimes = NewProjectsLocationsRuntimesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Functions *ProjectsLocationsFunctionsService + + Operations *ProjectsLocationsOperationsService + + Runtimes *ProjectsLocationsRuntimesService +} + +func NewProjectsLocationsFunctionsService(s *Service) *ProjectsLocationsFunctionsService { + rs := &ProjectsLocationsFunctionsService{s: s} + return rs +} + +type ProjectsLocationsFunctionsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsRuntimesService(s *Service) *ProjectsLocationsRuntimesService { + rs := &ProjectsLocationsRuntimesService{s: s} + return rs +} + +type ProjectsLocationsRuntimesService struct { + s *Service +} + +// AuditConfig: Specifies the audit configuration for a service. The +// configuration determines which permission types are logged, and what +// identities, if any, are exempted from logging. An AuditConfig must +// have one or more AuditLogConfigs. If there are AuditConfigs for both +// `allServices` and a specific service, the union of the two +// AuditConfigs is used for that service: the log_types specified in +// each AuditConfig are enabled, and the exempted_members in each +// AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// jose@example.com from DATA_READ logging, and aliya@example.com from +// DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members`, or principals, with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Cloud + // Platform resource. `members` can have the following values: * + // `allUsers`: A special identifier that represents anyone who is on the + // internet; with or without a Google account. * + // `allAuthenticatedUsers`: A special identifier that represents anyone + // who is authenticated with a Google account or a service account. * + // `user:{emailid}`: An email address that represents a specific Google + // account. For example, `alice@example.com` . * + // `serviceAccount:{emailid}`: An email address that represents a + // service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An + // email address that represents a Google group. For example, + // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An + // email address (plus unique identifier) representing a user that has + // been recently deleted. For example, + // `alice@example.com?uid=123456789012345678901`. If the user is + // recovered, this value reverts to `user:{emailid}` and the recovered + // user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. * `domain:{domain}`: The G + // Suite domain (primary) that represents all the users of that domain. + // For example, `google.com` or `example.com`. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BuildConfig: Describes the Build step of the function that builds a +// container from the given source. +type BuildConfig struct { + // Build: Output only. The Cloud Build name of the latest successful + // deployment of the function. + Build string `json:"build,omitempty"` + + // DockerRepository: Optional. User managed repository created in + // Artifact Registry optionally with a customer managed encryption key. + // This is the repository to which the function docker image will be + // pushed after it is built by Cloud Build. If unspecified, GCF will + // create and use a repository named 'gcf-artifacts' for every deployed + // region. It must match the pattern + // `projects/{project}/locations/{location}/repositories/{repository}`. + // Cross-project repositories are not supported. Cross-location + // repositories are not supported. Repository format must be 'DOCKER'. + DockerRepository string `json:"dockerRepository,omitempty"` + + // EntryPoint: The name of the function (as defined in source code) that + // will be executed. Defaults to the resource name suffix, if not + // specified. For backward compatibility, if function with given name is + // not found, then the system will try to use function named "function". + // For Node.js this is name of a function exported by the module + // specified in `source_location`. + EntryPoint string `json:"entryPoint,omitempty"` + + // EnvironmentVariables: User-provided build-time environment variables + // for the function + EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` + + // Runtime: The runtime in which to run the function. Required when + // deploying a new function, optional when updating an existing + // function. For a complete list of possible choices, see the `gcloud` + // command reference + // (https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + Runtime string `json:"runtime,omitempty"` + + // Source: The location of the function source code. + Source *Source `json:"source,omitempty"` + + // SourceProvenance: Output only. A permanent fixed identifier for + // source. + SourceProvenance *SourceProvenance `json:"sourceProvenance,omitempty"` + + // WorkerPool: Name of the Cloud Build Custom Worker Pool that should be + // used to build the function. The format of this field is + // `projects/{project}/locations/{region}/workerPools/{workerPool}` + // where {project} and {region} are the project id and region + // respectively where the worker pool is defined and {workerPool} is the + // short name of the worker pool. If the project id is not the same as + // the function, then the Cloud Functions Service Agent + // (service-@gcf-admin-robot.iam.gserviceaccount.com) must be granted + // the role Cloud Build Custom Workers Builder + // (roles/cloudbuild.customworkers.builder) in the project. + WorkerPool string `json:"workerPool,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Build") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Build") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BuildConfig) MarshalJSON() ([]byte, error) { + type NoMethod BuildConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EventFilter: Filters events based on exact matches on the CloudEvents +// attributes. +type EventFilter struct { + // Attribute: Required. The name of a CloudEvents attribute. + Attribute string `json:"attribute,omitempty"` + + // Value: Required. The value for the attribute. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Attribute") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attribute") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EventFilter) MarshalJSON() ([]byte, error) { + type NoMethod EventFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EventTrigger: Describes EventTrigger, used to request events to be +// sent from another service. +type EventTrigger struct { + // EventFilters: Criteria used to filter events. + EventFilters []*EventFilter `json:"eventFilters,omitempty"` + + // EventType: Required. The type of event to observe. For example: + // `google.cloud.audit.log.v1.written` or + // `google.cloud.pubsub.topic.v1.messagePublished`. + EventType string `json:"eventType,omitempty"` + + // PubsubTopic: Optional. The name of a Pub/Sub topic in the same + // project that will be used as the transport topic for the event + // delivery. Format: `projects/{project}/topics/{topic}`. This is only + // valid for events of type + // `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided + // here will not be deleted at function deletion. + PubsubTopic string `json:"pubsubTopic,omitempty"` + + // RetryPolicy: Optional. If unset, then defaults to ignoring failures + // (i.e. not retrying them). + // + // Possible values: + // "RETRY_POLICY_UNSPECIFIED" - Not specified. + // "RETRY_POLICY_DO_NOT_RETRY" - Do not retry. + // "RETRY_POLICY_RETRY" - Retry on any failure, retry up to 7 days + // with an exponential backoff (capped at 10 seconds). + RetryPolicy string `json:"retryPolicy,omitempty"` + + // ServiceAccountEmail: Optional. The email of the trigger's service + // account. The service account must have permission to invoke Cloud Run + // services, the permission is `run.routes.invoke`. If empty, defaults + // to the Compute Engine default service account: + // `{project_number}-compute@developer.gserviceaccount.com`. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // Trigger: Output only. The resource name of the Eventarc trigger. The + // format of this field is + // `projects/{project}/locations/{region}/triggers/{trigger}`. + Trigger string `json:"trigger,omitempty"` + + // TriggerRegion: The region that the trigger will be in. The trigger + // will only receive events originating in this region. It can be the + // same region as the function, a different region or multi-region, or + // the global region. If not provided, defaults to the same region as + // the function. + TriggerRegion string `json:"triggerRegion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EventFilters") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EventFilters") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EventTrigger) MarshalJSON() ([]byte, error) { + type NoMethod EventTrigger + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Function: Describes a Cloud Function that contains user computation +// executed in response to an event. It encapsulate function and +// triggers configurations. +type Function struct { + // BuildConfig: Describes the Build step of the function that builds a + // container from the given source. + BuildConfig *BuildConfig `json:"buildConfig,omitempty"` + + // Description: User-provided description of a function. + Description string `json:"description,omitempty"` + + // Environment: Describe whether the function is gen1 or gen2. + // + // Possible values: + // "ENVIRONMENT_UNSPECIFIED" - Unspecified + // "GEN_1" - Gen 1 + // "GEN_2" - Gen 2 + Environment string `json:"environment,omitempty"` + + // EventTrigger: An Eventarc trigger managed by Google Cloud Functions + // that fires events in response to a condition in another service. + EventTrigger *EventTrigger `json:"eventTrigger,omitempty"` + + // Labels: Labels associated with this Cloud Function. + Labels map[string]string `json:"labels,omitempty"` + + // Name: A user-defined name of the function. Function names must be + // unique globally and match pattern + // `projects/*/locations/*/functions/*` + Name string `json:"name,omitempty"` + + // ServiceConfig: Describes the Service being deployed. Currently + // deploys services to Cloud Run (fully managed). + ServiceConfig *ServiceConfig `json:"serviceConfig,omitempty"` + + // State: Output only. State of the function. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not specified. Invalid state. + // "ACTIVE" - Function has been successfully deployed and is serving. + // "FAILED" - Function deployment failed and the function isn’t + // serving. + // "DEPLOYING" - Function is being created or updated. + // "DELETING" - Function is being deleted. + // "UNKNOWN" - Function deployment failed and the function serving + // state is undefined. The function should be updated or deleted to move + // it out of this state. + State string `json:"state,omitempty"` + + // StateMessages: Output only. State Messages for this Cloud Function. + StateMessages []*GoogleCloudFunctionsV2betaStateMessage `json:"stateMessages,omitempty"` + + // UpdateTime: Output only. The last update timestamp of a Cloud + // Function. + 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. "BuildConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BuildConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Function) MarshalJSON() ([]byte, error) { + type NoMethod Function + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateDownloadUrlRequest: Request of `GenerateDownloadUrl` method. +type GenerateDownloadUrlRequest struct { +} + +// GenerateDownloadUrlResponse: Response of `GenerateDownloadUrl` +// method. +type GenerateDownloadUrlResponse struct { + // DownloadUrl: The generated Google Cloud Storage signed URL that + // should be used for function source code download. + DownloadUrl string `json:"downloadUrl,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DownloadUrl") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DownloadUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateDownloadUrlResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateDownloadUrlResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateUploadUrlRequest: Request of `GenerateSourceUploadUrl` +// method. +type GenerateUploadUrlRequest struct { +} + +// GenerateUploadUrlResponse: Response of `GenerateSourceUploadUrl` +// method. +type GenerateUploadUrlResponse struct { + // StorageSource: The location of the source code in the upload bucket. + // Once the archive is uploaded using the `upload_url` use this field to + // set the `function.build_config.source.storage_source` during + // CreateFunction and UpdateFunction. Generation defaults to 0, as Cloud + // Storage provides a new generation only upon uploading a new object or + // version of an object. + StorageSource *StorageSource `json:"storageSource,omitempty"` + + // UploadUrl: The generated Google Cloud Storage signed URL that should + // be used for a function source code upload. The uploaded file should + // be a zip archive which contains a function. + UploadUrl string `json:"uploadUrl,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "StorageSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "StorageSource") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateUploadUrlResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateUploadUrlResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2alphaOperationMetadata: Represents the metadata +// of the long-running operation. +type GoogleCloudFunctionsV2alphaOperationMetadata struct { + // ApiVersion: API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CancelRequested: Identifies whether the user has requested + // cancellation of the operation. Operations that have successfully been + // cancelled have Operation.error value with a google.rpc.Status.code of + // 1, corresponding to `Code.CANCELLED`. + CancelRequested bool `json:"cancelRequested,omitempty"` + + // CreateTime: The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestResource: The original request that started the operation. + RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` + + // Stages: Mechanism for reporting in-progress stages + Stages []*GoogleCloudFunctionsV2alphaStage `json:"stages,omitempty"` + + // StatusDetail: Human-readable status of the operation, if any. + StatusDetail string `json:"statusDetail,omitempty"` + + // Target: Server-defined resource path for the target of the operation. + Target string `json:"target,omitempty"` + + // Verb: Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2alphaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2alphaOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2alphaStage: Each Stage of the deployment +// process +type GoogleCloudFunctionsV2alphaStage struct { + // Message: Message describing the Stage + Message string `json:"message,omitempty"` + + // Name: Name of the Stage. This will be unique for each Stage. + // + // Possible values: + // "NAME_UNSPECIFIED" - Not specified. Invalid name. + // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage + // "BUILD" - Build Stage + // "SERVICE" - Service Stage + // "TRIGGER" - Trigger Stage + // "SERVICE_ROLLBACK" - Service Rollback Stage + // "TRIGGER_ROLLBACK" - Trigger Rollback Stage + Name string `json:"name,omitempty"` + + // Resource: Resource of the Stage + Resource string `json:"resource,omitempty"` + + // ResourceUri: Link to the current Stage resource + ResourceUri string `json:"resourceUri,omitempty"` + + // State: Current state of the Stage + // + // Possible values: + // "STATE_UNSPECIFIED" - Not specified. Invalid state. + // "NOT_STARTED" - Stage has not started. + // "IN_PROGRESS" - Stage is in progress. + // "COMPLETE" - Stage has completed. + State string `json:"state,omitempty"` + + // StateMessages: State messages from the current Stage. + StateMessages []*GoogleCloudFunctionsV2alphaStateMessage `json:"stateMessages,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2alphaStage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2alphaStage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2alphaStateMessage: Informational messages about +// the state of the Cloud Function or Operation. +type GoogleCloudFunctionsV2alphaStateMessage struct { + // Message: The message. + Message string `json:"message,omitempty"` + + // Severity: Severity of the state message. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. + // "ERROR" - ERROR-level severity. + // "WARNING" - WARNING-level severity. + // "INFO" - INFO-level severity. + Severity string `json:"severity,omitempty"` + + // Type: One-word CamelCase type of the state message. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2alphaStateMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2alphaStateMessage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2betaOperationMetadata: Represents the metadata +// of the long-running operation. +type GoogleCloudFunctionsV2betaOperationMetadata struct { + // ApiVersion: API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CancelRequested: Identifies whether the user has requested + // cancellation of the operation. Operations that have successfully been + // cancelled have Operation.error value with a google.rpc.Status.code of + // 1, corresponding to `Code.CANCELLED`. + CancelRequested bool `json:"cancelRequested,omitempty"` + + // CreateTime: The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestResource: The original request that started the operation. + RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` + + // Stages: Mechanism for reporting in-progress stages + Stages []*GoogleCloudFunctionsV2betaStage `json:"stages,omitempty"` + + // StatusDetail: Human-readable status of the operation, if any. + StatusDetail string `json:"statusDetail,omitempty"` + + // Target: Server-defined resource path for the target of the operation. + Target string `json:"target,omitempty"` + + // Verb: Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2betaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2betaOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2betaStage: Each Stage of the deployment process +type GoogleCloudFunctionsV2betaStage struct { + // Message: Message describing the Stage + Message string `json:"message,omitempty"` + + // Name: Name of the Stage. This will be unique for each Stage. + // + // Possible values: + // "NAME_UNSPECIFIED" - Not specified. Invalid name. + // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage + // "BUILD" - Build Stage + // "SERVICE" - Service Stage + // "TRIGGER" - Trigger Stage + // "SERVICE_ROLLBACK" - Service Rollback Stage + // "TRIGGER_ROLLBACK" - Trigger Rollback Stage + Name string `json:"name,omitempty"` + + // Resource: Resource of the Stage + Resource string `json:"resource,omitempty"` + + // ResourceUri: Link to the current Stage resource + ResourceUri string `json:"resourceUri,omitempty"` + + // State: Current state of the Stage + // + // Possible values: + // "STATE_UNSPECIFIED" - Not specified. Invalid state. + // "NOT_STARTED" - Stage has not started. + // "IN_PROGRESS" - Stage is in progress. + // "COMPLETE" - Stage has completed. + State string `json:"state,omitempty"` + + // StateMessages: State messages from the current Stage. + StateMessages []*GoogleCloudFunctionsV2betaStateMessage `json:"stateMessages,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2betaStage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2betaStage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudFunctionsV2betaStateMessage: Informational messages about +// the state of the Cloud Function or Operation. +type GoogleCloudFunctionsV2betaStateMessage struct { + // Message: The message. + Message string `json:"message,omitempty"` + + // Severity: Severity of the state message. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. + // "ERROR" - ERROR-level severity. + // "WARNING" - WARNING-level severity. + // "INFO" - INFO-level severity. + Severity string `json:"severity,omitempty"` + + // Type: One-word CamelCase type of the state message. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2betaStateMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2betaStateMessage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListFunctionsResponse: Response for the `ListFunctions` method. +type ListFunctionsResponse struct { + // Functions: The functions that match the request. + Functions []*Function `json:"functions,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. The response does + // not include any functions from these locations. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Functions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Functions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListFunctionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListFunctionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListRuntimesResponse: Response for the `ListRuntimes` method. +type ListRuntimesResponse struct { + // Runtimes: The runtimes that match the request. + Runtimes []*Runtime `json:"runtimes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Runtimes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Runtimes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListRuntimesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRuntimesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadataV1: Metadata describing an Operation +type OperationMetadataV1 struct { + // BuildId: The Cloud Build ID of the function created or updated by an + // API call. This field is only populated for Create and Update + // operations. + BuildId string `json:"buildId,omitempty"` + + // BuildName: The Cloud Build Name of the function deployment. This + // field is only populated for Create and Update operations. + // `projects//locations//builds/`. + BuildName string `json:"buildName,omitempty"` + + // Request: The original request that started the operation. + Request googleapi.RawMessage `json:"request,omitempty"` + + // SourceToken: An identifier for Firebase function sources. Disclaimer: + // This field is only supported for Firebase function deployments. + SourceToken string `json:"sourceToken,omitempty"` + + // Target: Target of the operation - for example + // `projects/project-1/locations/region-1/functions/function-1` + Target string `json:"target,omitempty"` + + // Type: Type of operation. + // + // Possible values: + // "OPERATION_UNSPECIFIED" - Unknown operation type. + // "CREATE_FUNCTION" - Triggered by CreateFunction call + // "UPDATE_FUNCTION" - Triggered by UpdateFunction call + // "DELETE_FUNCTION" - Triggered by DeleteFunction call. + Type string `json:"type,omitempty"` + + // UpdateTime: The last update timestamp of the operation. + UpdateTime string `json:"updateTime,omitempty"` + + // VersionId: Version id of the function created or updated by an API + // call. This field is only populated for Create and Update operations. + VersionId int64 `json:"versionId,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "BuildId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BuildId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadataV1 + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RepoSource: Location of the source in a Google Cloud Source +// Repository. +type RepoSource struct { + // BranchName: Regex matching branches to build. The syntax of the + // regular expressions accepted is the syntax accepted by RE2 and + // described at https://github.com/google/re2/wiki/Syntax + BranchName string `json:"branchName,omitempty"` + + // CommitSha: Explicit commit SHA to build. + CommitSha string `json:"commitSha,omitempty"` + + // Dir: Directory, relative to the source root, in which to run the + // build. This must be a relative path. If a step's `dir` is specified + // and is an absolute path, this value is ignored for that step's + // execution. eg. helloworld (no leading slash allowed) + Dir string `json:"dir,omitempty"` + + // InvertRegex: Only trigger a build if the revision regex does NOT + // match the revision regex. + InvertRegex bool `json:"invertRegex,omitempty"` + + // ProjectId: ID of the project that owns the Cloud Source Repository. + // If omitted, the project ID requesting the build is assumed. + ProjectId string `json:"projectId,omitempty"` + + // RepoName: Name of the Cloud Source Repository. + RepoName string `json:"repoName,omitempty"` + + // TagName: Regex matching tags to build. The syntax of the regular + // expressions accepted is the syntax accepted by RE2 and described at + // https://github.com/google/re2/wiki/Syntax + TagName string `json:"tagName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BranchName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BranchName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RepoSource) MarshalJSON() ([]byte, error) { + type NoMethod RepoSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Runtime: Describes a runtime and any special information (e.g., +// deprecation status) related to it. +type Runtime struct { + // DisplayName: The user facing name, eg 'Go 1.13', 'Node.js 12', etc. + DisplayName string `json:"displayName,omitempty"` + + // Environment: The environment for the runtime. + // + // Possible values: + // "ENVIRONMENT_UNSPECIFIED" - Unspecified + // "GEN_1" - Gen 1 + // "GEN_2" - Gen 2 + Environment string `json:"environment,omitempty"` + + // Name: The name of the runtime, e.g., 'go113', 'nodejs12', etc. + Name string `json:"name,omitempty"` + + // Stage: The stage of life this runtime is in, e.g., BETA, GA, etc. + // + // Possible values: + // "RUNTIME_STAGE_UNSPECIFIED" - Not specified. + // "DEVELOPMENT" - The runtime is in development. + // "ALPHA" - The runtime is in the Alpha stage. + // "BETA" - The runtime is in the Beta stage. + // "GA" - The runtime is generally available. + // "DEPRECATED" - The runtime is deprecated. + // "DECOMMISSIONED" - The runtime is no longer supported. + Stage string `json:"stage,omitempty"` + + // Warnings: Warning messages, e.g., a deprecation warning. + Warnings []string `json:"warnings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Runtime) MarshalJSON() ([]byte, error) { + type NoMethod Runtime + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceConfig: Describes the Service being deployed. Currently +// Supported : Cloud Run (fully managed). +type ServiceConfig struct { + // AllTrafficOnLatestRevision: Whether 100% of traffic is routed to the + // latest revision. On CreateFunction and UpdateFunction, when set to + // true, the revision being deployed will serve 100% of traffic, + // ignoring any traffic split settings, if any. On GetFunction, true + // will be returned if the latest revision is serving 100% of traffic. + AllTrafficOnLatestRevision bool `json:"allTrafficOnLatestRevision,omitempty"` + + // AvailableMemory: The amount of memory available for a function. + // Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is + // supplied the value is interpreted as bytes. See + // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go + // a full description. + AvailableMemory string `json:"availableMemory,omitempty"` + + // EnvironmentVariables: Environment variables that shall be available + // during function execution. + EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` + + // IngressSettings: The ingress settings for the function, controlling + // what traffic can reach it. + // + // Possible values: + // "INGRESS_SETTINGS_UNSPECIFIED" - Unspecified. + // "ALLOW_ALL" - Allow HTTP traffic from public and private sources. + // "ALLOW_INTERNAL_ONLY" - Allow HTTP traffic from only private VPC + // sources. + // "ALLOW_INTERNAL_AND_GCLB" - Allow HTTP traffic from private VPC + // sources and through GCLB. + IngressSettings string `json:"ingressSettings,omitempty"` + + // MaxInstanceCount: The limit on the maximum number of function + // instances that may coexist at a given time. In some cases, such as + // rapid traffic surges, Cloud Functions may, for a short period of + // time, create more instances than the specified max instances limit. + // If your function cannot tolerate this temporary behavior, you may + // want to factor in a safety margin and set a lower max instances value + // than your function can tolerate. See the Max Instances + // (https://cloud.google.com/functions/docs/max-instances) Guide for + // more details. + MaxInstanceCount int64 `json:"maxInstanceCount,omitempty"` + + // MinInstanceCount: The limit on the minimum number of function + // instances that may coexist at a given time. Function instances are + // kept in idle state for a short period after they finished executing + // the request to reduce cold start time for subsequent requests. + // Setting a minimum instance count will ensure that the given number of + // instances are kept running in idle state always. This can help with + // cold start times when jump in incoming request count occurs after the + // idle instance would have been stopped in the default case. + MinInstanceCount int64 `json:"minInstanceCount,omitempty"` + + // Service: Output only. Name of the service associated with a Function. + // The format of this field is + // `projects/{project}/locations/{region}/services/{service}` + Service string `json:"service,omitempty"` + + // ServiceAccountEmail: The email of the service's service account. If + // empty, defaults to + // `{project_number}-compute@developer.gserviceaccount.com`. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // TimeoutSeconds: The function execution timeout. Execution is + // considered failed and can be terminated if the function is not + // completed at the end of the timeout period. Defaults to 60 seconds. + TimeoutSeconds int64 `json:"timeoutSeconds,omitempty"` + + // Uri: Output only. URI of the Service deployed. + Uri string `json:"uri,omitempty"` + + // VpcConnector: The Serverless VPC Access connector that this cloud + // function can connect to. The format of this field is + // `projects/*/locations/*/connectors/*`. + VpcConnector string `json:"vpcConnector,omitempty"` + + // VpcConnectorEgressSettings: The egress settings for the connector, + // controlling what traffic is diverted through it. + // + // Possible values: + // "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" - Unspecified. + // "PRIVATE_RANGES_ONLY" - Use the VPC Access Connector only for + // private IP space from RFC1918. + // "ALL_TRAFFIC" - Force the use of VPC Access Connector for all + // egress traffic from the function. + VpcConnectorEgressSettings string `json:"vpcConnectorEgressSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AllTrafficOnLatestRevision") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AllTrafficOnLatestRevision") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Cloud Platform services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Source: The location of the function source code. +type Source struct { + // RepoSource: If provided, get the source from this location in a Cloud + // Source Repository. + RepoSource *RepoSource `json:"repoSource,omitempty"` + + // StorageSource: If provided, get the source from this location in + // Google Cloud Storage. + StorageSource *StorageSource `json:"storageSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RepoSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RepoSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Source) MarshalJSON() ([]byte, error) { + type NoMethod Source + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SourceProvenance: Provenance of the source. Ways to find the original +// source, or verify that some source was used for this build. +type SourceProvenance struct { + // ResolvedRepoSource: A copy of the build's `source.repo_source`, if + // exists, with any revisions resolved. + ResolvedRepoSource *RepoSource `json:"resolvedRepoSource,omitempty"` + + // ResolvedStorageSource: A copy of the build's `source.storage_source`, + // if exists, with any generations resolved. + ResolvedStorageSource *StorageSource `json:"resolvedStorageSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResolvedRepoSource") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResolvedRepoSource") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SourceProvenance) MarshalJSON() ([]byte, error) { + type NoMethod SourceProvenance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageSource: Location of the source in an archive file in Google +// Cloud Storage. +type StorageSource struct { + // Bucket: Google Cloud Storage bucket containing the source (see Bucket + // Name Requirements + // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). + Bucket string `json:"bucket,omitempty"` + + // Generation: Google Cloud Storage generation for the object. If the + // generation is omitted, the latest generation will be used. + Generation int64 `json:"generation,omitempty,string"` + + // Object: Google Cloud Storage object containing the source. This + // object must be a gzipped archive file (`.tar.gz`) containing source + // to build. + Object string `json:"object,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bucket") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StorageSource) MarshalJSON() ([]byte, error) { + type NoMethod StorageSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as '*' or 'storage.*') are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "cloudfunctions.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudfunctions.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v2beta/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudfunctions.projects.locations.functions.create": + +type ProjectsLocationsFunctionsCreateCall struct { + s *Service + parent string + function *Function + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new function. If a function with the given name +// already exists in the specified project, the long running operation +// will return `ALREADY_EXISTS` error. +// +// - parent: The project and location in which the function should be +// created, specified in the format `projects/*/locations/*`. +func (r *ProjectsLocationsFunctionsService) Create(parent string, function *Function) *ProjectsLocationsFunctionsCreateCall { + c := &ProjectsLocationsFunctionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.function = function + return c +} + +// FunctionId sets the optional parameter "functionId": The ID to use +// for the function, which will become the final component of the +// function's resource name. This value should be 4-63 characters, and +// valid characters are /a-z-/. +func (c *ProjectsLocationsFunctionsCreateCall) FunctionId(functionId string) *ProjectsLocationsFunctionsCreateCall { + c.urlParams_.Set("functionId", functionId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsCreateCall) Context(ctx context.Context) *ProjectsLocationsFunctionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.function) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/functions") + 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 "cloudfunctions.projects.locations.functions.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "functionId": { + // "description": "The ID to use for the function, which will become the final component of the function's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location in which the function should be created, specified in the format `projects/*/locations/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+parent}/functions", + // "request": { + // "$ref": "Function" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.delete": + +type ProjectsLocationsFunctionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a function with the given name from the specified +// project. If the given function is used by some trigger, the trigger +// will be updated to remove this function. +// +// - name: The name of the function which should be deleted. +func (r *ProjectsLocationsFunctionsService) Delete(name string) *ProjectsLocationsFunctionsDeleteCall { + c := &ProjectsLocationsFunctionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFunctionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "cloudfunctions.projects.locations.functions.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + // "httpMethod": "DELETE", + // "id": "cloudfunctions.projects.locations.functions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the function which should be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.generateDownloadUrl": + +type ProjectsLocationsFunctionsGenerateDownloadUrlCall struct { + s *Service + name string + generatedownloadurlrequest *GenerateDownloadUrlRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateDownloadUrl: Returns a signed URL for downloading deployed +// function source code. The URL is only valid for a limited period and +// should be used within 30 minutes of generation. For more information +// about the signed URL usage see: +// https://cloud.google.com/storage/docs/access-control/signed-urls +// +// - name: The name of function for which source code Google Cloud +// Storage signed URL should be generated. +func (r *ProjectsLocationsFunctionsService) GenerateDownloadUrl(name string, generatedownloadurlrequest *GenerateDownloadUrlRequest) *ProjectsLocationsFunctionsGenerateDownloadUrlCall { + c := &ProjectsLocationsFunctionsGenerateDownloadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.generatedownloadurlrequest = generatedownloadurlrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGenerateDownloadUrlCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGenerateDownloadUrlCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatedownloadurlrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:generateDownloadUrl") + 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 "cloudfunctions.projects.locations.functions.generateDownloadUrl" call. +// Exactly one of *GenerateDownloadUrlResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GenerateDownloadUrlResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Do(opts ...googleapi.CallOption) (*GenerateDownloadUrlResponse, 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, &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, err + } + ret := &GenerateDownloadUrlResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:generateDownloadUrl", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.generateDownloadUrl", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of function for which source code Google Cloud Storage signed URL should be generated.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}:generateDownloadUrl", + // "request": { + // "$ref": "GenerateDownloadUrlRequest" + // }, + // "response": { + // "$ref": "GenerateDownloadUrlResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.generateUploadUrl": + +type ProjectsLocationsFunctionsGenerateUploadUrlCall struct { + s *Service + parent string + generateuploadurlrequest *GenerateUploadUrlRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateUploadUrl: Returns a signed URL for uploading a function +// source code. For more information about the signed URL usage see: +// https://cloud.google.com/storage/docs/access-control/signed-urls. +// Once the function source code upload is complete, the used signed URL +// should be provided in CreateFunction or UpdateFunction request as a +// reference to the function source code. When uploading source code to +// the generated signed URL, please follow these restrictions: * Source +// file type should be a zip file. * No credentials should be attached - +// the signed URLs provide access to the target bucket using internal +// service identity; if credentials were attached, the identity from the +// credentials would be used, but that identity does not have +// permissions to upload files to the URL. When making a HTTP PUT +// request, these two headers need to be specified: * `content-type: +// application/zip` And this header SHOULD NOT be specified: * +// `Authorization: Bearer YOUR_TOKEN` +// +// - parent: The project and location in which the Google Cloud Storage +// signed URL should be generated, specified in the format +// `projects/*/locations/*`. +func (r *ProjectsLocationsFunctionsService) GenerateUploadUrl(parent string, generateuploadurlrequest *GenerateUploadUrlRequest) *ProjectsLocationsFunctionsGenerateUploadUrlCall { + c := &ProjectsLocationsFunctionsGenerateUploadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.generateuploadurlrequest = generateuploadurlrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGenerateUploadUrlCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGenerateUploadUrlCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateuploadurlrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/functions:generateUploadUrl") + 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 "cloudfunctions.projects.locations.functions.generateUploadUrl" call. +// Exactly one of *GenerateUploadUrlResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GenerateUploadUrlResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Do(opts ...googleapi.CallOption) (*GenerateUploadUrlResponse, 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, &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, err + } + ret := &GenerateUploadUrlResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions:generateUploadUrl", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.generateUploadUrl", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+parent}/functions:generateUploadUrl", + // "request": { + // "$ref": "GenerateUploadUrlRequest" + // }, + // "response": { + // "$ref": "GenerateUploadUrlResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.get": + +type ProjectsLocationsFunctionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns a function with the given name from the requested +// project. +// +// - name: The name of the function which details should be obtained. +func (r *ProjectsLocationsFunctionsService) Get(name string) *ProjectsLocationsFunctionsGetCall { + c := &ProjectsLocationsFunctionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsFunctionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGetCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "cloudfunctions.projects.locations.functions.get" call. +// Exactly one of *Function or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Function.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsGetCall) Do(opts ...googleapi.CallOption) (*Function, 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, &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, err + } + ret := &Function{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a function with the given name from the requested project.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.functions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the function which details should be obtained.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}", + // "response": { + // "$ref": "Function" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.getIamPolicy": + +type ProjectsLocationsFunctionsGetIamPolicyCall 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 the operation documentation for the appropriate +// value for this field. +func (r *ProjectsLocationsFunctionsService) GetIamPolicy(resource string) *ProjectsLocationsFunctionsGetIamPolicyCall { + c := &ProjectsLocationsFunctionsGetIamPolicyCall{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 *ProjectsLocationsFunctionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "cloudfunctions.projects.locations.functions.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.functions.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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.list": + +type ProjectsLocationsFunctionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of functions that belong to the requested +// project. +// +// - parent: The project and location from which the function should be +// listed, specified in the format `projects/*/locations/*` If you +// want to list functions in all locations, use "-" in place of a +// location. When listing functions in all locations, if one or more +// location(s) are unreachable, the response will contain functions +// from all reachable locations along with the names of any +// unreachable locations. +func (r *ProjectsLocationsFunctionsService) List(parent string) *ProjectsLocationsFunctionsListCall { + c := &ProjectsLocationsFunctionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter for Functions +// that match the filter expression, following the syntax outlined in +// https://google.aip.dev/160. +func (c *ProjectsLocationsFunctionsListCall) Filter(filter string) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The sorting order of +// the resources returned. Value should be a comma separated list of +// fields. The default sorting oder is ascending. See +// https://google.aip.dev/132#ordering. +func (c *ProjectsLocationsFunctionsListCall) OrderBy(orderBy string) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// functions to return per call. +func (c *ProjectsLocationsFunctionsListCall) PageSize(pageSize int64) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListFunctionsResponse`; indicates that this is a +// continuation of a prior `ListFunctions` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsFunctionsListCall) PageToken(pageToken string) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsFunctionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsListCall) Context(ctx context.Context) *ProjectsLocationsFunctionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/functions") + 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 "cloudfunctions.projects.locations.functions.list" call. +// Exactly one of *ListFunctionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListFunctionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsListCall) Do(opts ...googleapi.CallOption) (*ListFunctionsResponse, 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, &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, err + } + ret := &ListFunctionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a list of functions that belong to the requested project.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.functions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "The filter for Functions that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "The sorting order of the resources returned. Value should be a comma separated list of fields. The default sorting oder is ascending. See https://google.aip.dev/132#ordering.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of functions to return per call.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListFunctionsResponse`; indicates that this is a continuation of a prior `ListFunctions` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the function should be listed, specified in the format `projects/*/locations/*` If you want to list functions in all locations, use \"-\" in place of a location. When listing functions in all locations, if one or more location(s) are unreachable, the response will contain functions from all reachable locations along with the names of any unreachable locations.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+parent}/functions", + // "response": { + // "$ref": "ListFunctionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsFunctionsListCall) Pages(ctx context.Context, f func(*ListFunctionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudfunctions.projects.locations.functions.patch": + +type ProjectsLocationsFunctionsPatchCall struct { + s *Service + name string + function *Function + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates existing function. +// +// - name: A user-defined name of the function. Function names must be +// unique globally and match pattern +// `projects/*/locations/*/functions/*`. +func (r *ProjectsLocationsFunctionsService) Patch(name string, function *Function) *ProjectsLocationsFunctionsPatchCall { + c := &ProjectsLocationsFunctionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.function = function + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. If no field mask is provided, all provided +// fields in the request will be updated. +func (c *ProjectsLocationsFunctionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFunctionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsPatchCall) Context(ctx context.Context) *ProjectsLocationsFunctionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.function) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "cloudfunctions.projects.locations.functions.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates existing function.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + // "httpMethod": "PATCH", + // "id": "cloudfunctions.projects.locations.functions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated. If no field mask is provided, all provided fields in the request will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}", + // "request": { + // "$ref": "Function" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.setIamPolicy": + +type ProjectsLocationsFunctionsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See the operation documentation for the appropriate +// value for this field. +func (r *ProjectsLocationsFunctionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFunctionsSetIamPolicyCall { + c := &ProjectsLocationsFunctionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFunctionsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "cloudfunctions.projects.locations.functions.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsFunctionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.testIamPermissions": + +type ProjectsLocationsFunctionsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See the operation documentation for the +// appropriate value for this field. +func (r *ProjectsLocationsFunctionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFunctionsTestIamPermissionsCall { + c := &ProjectsLocationsFunctionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFunctionsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudfunctions.projects.locations.functions.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "cloudfunctions.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: Must not be set. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": Required. A filter for +// matching the requested operations. The supported formats of *filter* +// are: To query for a specific function: +// project:*,location:*,function:* To query for all of the latest +// operations for a project: project:*,latest:true +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of records that should be returned. Requested page size cannot exceed +// 100. If not set, the default page size is 100. Pagination is only +// supported when querying for a specific function. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token identifying +// which result to start with, which is returned by a previous list +// call. Pagination is only supported when querying for a specific +// function. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudfunctions.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "Required. A filter for matching the requested operations. The supported formats of *filter* are: To query for a specific function: project:*,location:*,function:* To query for all of the latest operations for a project: project:*,latest:true", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Must not be set.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set, the default page size is 100. Pagination is only supported when querying for a specific function.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token identifying which result to start with, which is returned by a previous list call. Pagination is only supported when querying for a specific function.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudfunctions.projects.locations.runtimes.list": + +type ProjectsLocationsRuntimesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of runtimes that are supported for the requested +// project. +// +// - parent: The project and location from which the runtimes should be +// listed, specified in the format `projects/*/locations/*`. +func (r *ProjectsLocationsRuntimesService) List(parent string) *ProjectsLocationsRuntimesListCall { + c := &ProjectsLocationsRuntimesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter for Runtimes +// that match the filter expression, following the syntax outlined in +// https://google.aip.dev/160. +func (c *ProjectsLocationsRuntimesListCall) Filter(filter string) *ProjectsLocationsRuntimesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRuntimesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRuntimesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRuntimesListCall) Context(ctx context.Context) *ProjectsLocationsRuntimesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRuntimesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRuntimesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/runtimes") + 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 "cloudfunctions.projects.locations.runtimes.list" call. +// Exactly one of *ListRuntimesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListRuntimesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRuntimesListCall) Do(opts ...googleapi.CallOption) (*ListRuntimesResponse, 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, &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, err + } + ret := &ListRuntimesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a list of runtimes that are supported for the requested project.", + // "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/runtimes", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.runtimes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "The filter for Runtimes that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the runtimes should be listed, specified in the format `projects/*/locations/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta/{+parent}/runtimes", + // "response": { + // "$ref": "ListRuntimesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/cloudsearch/v1/cloudsearch-api.json b/cloudsearch/v1/cloudsearch-api.json index 66c99b1d348..e4cefd6aa10 100644 --- a/cloudsearch/v1/cloudsearch-api.json +++ b/cloudsearch/v1/cloudsearch-api.json @@ -1994,7 +1994,7 @@ } } }, - "revision": "20220201", + "revision": "20220207", "rootUrl": "https://cloudsearch.googleapis.com/", "schemas": { "AclInfo": { @@ -2034,6 +2034,64 @@ }, "type": "object" }, + "AppId": { + "description": "Identifier of an App.", + "id": "AppId", + "properties": { + "appType": { + "description": "Enum indicating the type of App this is.", + "enum": [ + "APP_TYPE_UNSPECIFIED", + "APP", + "GSUITE_APP", + "INCOMING_WEBHOOK" + ], + "enumDescriptions": [ + "", + "3P APP eg. external Bots(Asana Bot), 1P Bots(Drive Bot).", + "1P APP eg. Tasks, Meet, Docs, Calendar..", + "Asynchronous messages via an incoming webhook." + ], + "type": "string" + }, + "gsuiteAppType": { + "description": "Enum indicating which 1P App this is when app_type is GSUITE_APP. Determined \u0026 set by the 1P API as a convenience for all users of this identifier(Eg. clients, chime, backend etc.) to map to 1P properties.", + "enum": [ + "GSUITE_APP_TYPE_UNSPECIFIED", + "TASKS_APP", + "CALENDAR_APP", + "DOCS_APP", + "SHEETS_APP", + "SLIDES_APP", + "MEET_APP", + "FILE_SUGGESTION_APP", + "CONTACTS_APP", + "ACTIVITY_FEED_APP", + "DRIVE_APP" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "Powered by Bullseye", + "", + "", + "" + ], + "type": "string" + }, + "id": { + "description": "Numeric identifier of the App. Set to Project number for 1/3P Apps. For Webhook, this is WebhookId. Determined \u0026 set by the 1P API from App credentials on the side channel.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "AuditLoggingSettings": { "description": "Represents the settings for Cloud audit logging", "id": "AuditLoggingSettings", @@ -2057,6 +2115,15 @@ }, "type": "object" }, + "AvatarInfo": { + "id": "AvatarInfo", + "properties": { + "emoji": { + "$ref": "Emoji" + } + }, + "type": "object" + }, "BooleanOperatorOptions": { "description": "Used to provide a search operator for boolean properties. This is optional. Search operators let users restrict the query to specific fields relevant to the type of item being searched.", "id": "BooleanOperatorOptions", @@ -2134,6 +2201,74 @@ }, "type": "object" }, + "CustomEmoji": { + "description": "Proto representation of a custom emoji. May be used in both APIs and in Spanner, but certain fields should be restricted to one or the other. See the per-field documentation for details. NEXT_TAG: 11", + "id": "CustomEmoji", + "properties": { + "blobId": { + "description": "ID for the underlying image data in Blobstore. This field should *only* be present in Spanner or within the server, but should not be exposed in public APIs.", + "type": "string" + }, + "createTimeMicros": { + "description": "Time when the Emoji was created, in microseconds. This field may be present in Spanner, within the server, or in public APIs.", + "format": "int64", + "type": "string" + }, + "creatorUserId": { + "$ref": "UserId", + "description": "This field should *never* be persisted to Spanner." + }, + "ownerCustomerId": { + "$ref": "CustomerId", + "description": "This field should *never* be persisted to Spanner." + }, + "readToken": { + "description": "Opaque token that clients use to construct the URL for accessing the custom emoji’s image data. This field is intended for API consumption, and should *never* be persisted to Spanner.", + "type": "string" + }, + "shortcode": { + "description": "User-provided, human-readable ID for the custom emoji. Users are expected to observe this field in the UI instead of the UUID. This shortcode should be unique within an organization, but has no global uniqueness guarantees, unlike the UUID. This field should *never* be persisted to Spanner.", + "type": "string" + }, + "state": { + "description": "Snapshot of the current state of the emoji, which may differ from the source-of-truth in the CustomEmojis table. This field should *never* be persisted to Spanner.", + "enum": [ + "EMOJI_STATE_UNSPECIFIED", + "EMOJI_ENABLED", + "EMOJI_SYSTEM_DISABLED", + "EMOJI_HIDDEN", + "EMOJI_DELETED" + ], + "enumDescriptions": [ + "", + "Emoji is visible and available to be used, subject to access control requirements.", + "Emoji can no longer be used (e.g. due to a shortcode conflict), but is not removed from existing embeddings.", + "Emoji is hidden from pickers, so new usages are not allowed, but is not removed from existing embeddings.", + "Emoji is removed everywhere and is not available to end-users." + ], + "type": "string" + }, + "updateTimeMicros": { + "format": "int64", + "type": "string" + }, + "uuid": { + "description": "Unique key for a custom emoji resource. Required. This field is *always* populated.", + "type": "string" + } + }, + "type": "object" + }, + "CustomerId": { + "description": "Represents a GSuite customer ID. Obfuscated with CustomerIdObfuscator.", + "id": "CustomerId", + "properties": { + "customerId": { + "type": "string" + } + }, + "type": "object" + }, "CustomerIndexStats": { "description": "Aggregation of items by status code as of the specified date.", "id": "CustomerIndexStats", @@ -2432,6 +2567,16 @@ }, "type": "object" }, + "DmId": { + "id": "DmId", + "properties": { + "dmId": { + "description": "Unique server assigned Id, per Direct Message Space.", + "type": "string" + } + }, + "type": "object" + }, "DoubleOperatorOptions": { "description": "Used to provide a search operator for double properties. This is optional. Search operators let users restrict the query to specific fields relevant to the type of item being searched.", "id": "DoubleOperatorOptions", @@ -2589,6 +2734,20 @@ }, "type": "object" }, + "Emoji": { + "id": "Emoji", + "properties": { + "customEmoji": { + "$ref": "CustomEmoji", + "description": "A custom emoji." + }, + "unicode": { + "description": "A basic emoji represented by a unicode string.", + "type": "string" + } + }, + "type": "object" + }, "EnumOperatorOptions": { "description": "Used to provide a search operator for enum properties. This is optional. Search operators let users restrict the query to specific fields relevant to the type of item being searched. For example, if you provide no operator for a *priority* enum property with possible values *p0* and *p1*, a query that contains the term *p0* returns items that have *p0* as the value of the *priority* property, as well as any items that contain the string *p0* in other fields. If you provide an operator name for the enum, such as *priority*, then search users can use that operator to refine results to only items that have *p0* as this property's value, with the query *priority:p0*.", "id": "EnumOperatorOptions", @@ -3075,6 +3234,21 @@ }, "type": "object" }, + "GroupId": { + "description": "Id representing a group that could be a space, a chat, or a direct message space. Which ID is set here will determine which group", + "id": "GroupId", + "properties": { + "dmId": { + "$ref": "DmId", + "description": "Unique, immutable ID of the Direct Message Space" + }, + "spaceId": { + "$ref": "SpaceId", + "description": "Unique, immutable ID of the Space" + } + }, + "type": "object" + }, "HtmlOperatorOptions": { "description": "Used to provide a search operator for html properties. This is optional. Search operators let users restrict the query to specific fields relevant to the type of item being searched.", "id": "HtmlOperatorOptions", @@ -4923,7 +5097,7 @@ "type": "integer" }, "query": { - "description": "The raw query string. See supported search operators in the [Cloud search Cheat Sheet](https://support.google.com/a/users/answer/9299929)", + "description": "The raw query string. See supported search operators in the [Narrow your search with operators](https://support.google.com/cloudsearch/answer/6172299)", "type": "string" }, "queryInterpretationOptions": { @@ -5234,6 +5408,58 @@ }, "type": "object" }, + "SpaceId": { + "description": "Primary key for Space resource.", + "id": "SpaceId", + "properties": { + "spaceId": { + "description": "Unique, immutable ID of the Space", + "type": "string" + } + }, + "type": "object" + }, + "SpaceInfo": { + "description": "Defines the representation of a single matching space.", + "id": "SpaceInfo", + "properties": { + "avatarInfo": { + "$ref": "AvatarInfo" + }, + "description": { + "type": "string" + }, + "groupId": { + "$ref": "GroupId" + }, + "name": { + "type": "string" + }, + "numMembers": { + "format": "int32", + "type": "integer" + }, + "userMembershipState": { + "description": "searching user's membership state in this space", + "enum": [ + "MEMBER_UNKNOWN", + "MEMBER_INVITED", + "MEMBER_JOINED", + "MEMBER_NOT_A_MEMBER", + "MEMBER_FAILED" + ], + "enumDescriptions": [ + "Default state, do not use", + "An invitation to the space has been sent", + "User has joined the space", + "User is not a member", + "This state should never be stored in Spanner. It is a state for responses to the clients to indicate that membership mutations have failed and the member is in its previous state." + ], + "type": "string" + } + }, + "type": "object" + }, "SpellResult": { "id": "SpellResult", "properties": { @@ -5559,6 +5785,33 @@ }, "type": "object" }, + "UserId": { + "description": "Primary key for User resource.", + "id": "UserId", + "properties": { + "id": { + "description": "Opaque, server-assigned ID of the User.", + "type": "string" + }, + "originAppId": { + "$ref": "AppId", + "description": "Optional. Identifier of the App involved (directly or on behalf of a human creator) in creating this message. This is not set if the user posted a message directly, but is used in the case of, for example, a message being generated by a 1P integration based on a user action (creating an event, creating a task etc). This should only be used on the BE. For clients, please use the field in the FE message proto instead (google3/apps/dynamite/v1/frontend/api/message.proto?q=origin_app_id)." + }, + "type": { + "description": "Clients do not need to send UserType to Backend, but Backend will always send this field to clients per the following rule: 1. For HUMAN Ids, the field is empty but by default .getType() will return HUMAN. 2. For BOT Ids, the field is ALWAYS set to BOT.", + "enum": [ + "HUMAN", + "BOT" + ], + "enumDescriptions": [ + "Notes on HUMAN type: 1) Leaving UserId.UserType field empty will return HUMAN as default value. This is expected because all the existing UserIds are without explicitly setting UserType, most of which are HUMAN Ids. For Bot Ids we will always set BOT in UserType field. 2) DO NOT explicitly set HUMAN as type. This is a proto2 issue, that a UserId with explicitly set default value HUMAN as type is NOT equal to an id without setting the field. aka. UserId id1 = UserId.newBuilder() .setId(\"dummy\").setType(UserType.HUMAN).build(); UserId id2 = UserId.newBuilder().setId(\"dummy\").build(); AssertThat(id1).isNotEqual(id2); AssertThat(id2.getType()).isEqualTo(UserType.HUMAN);", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "VPCSettings": { "id": "VPCSettings", "properties": { diff --git a/cloudsearch/v1/cloudsearch-gen.go b/cloudsearch/v1/cloudsearch-gen.go index da9b821a65a..73b27a37482 100644 --- a/cloudsearch/v1/cloudsearch-gen.go +++ b/cloudsearch/v1/cloudsearch-gen.go @@ -551,6 +551,64 @@ func (s *AclInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AppId: Identifier of an App. +type AppId struct { + // AppType: Enum indicating the type of App this is. + // + // Possible values: + // "APP_TYPE_UNSPECIFIED" + // "APP" - 3P APP eg. external Bots(Asana Bot), 1P Bots(Drive Bot). + // "GSUITE_APP" - 1P APP eg. Tasks, Meet, Docs, Calendar.. + // "INCOMING_WEBHOOK" - Asynchronous messages via an incoming webhook. + AppType string `json:"appType,omitempty"` + + // GsuiteAppType: Enum indicating which 1P App this is when app_type is + // GSUITE_APP. Determined & set by the 1P API as a convenience for all + // users of this identifier(Eg. clients, chime, backend etc.) to map to + // 1P properties. + // + // Possible values: + // "GSUITE_APP_TYPE_UNSPECIFIED" + // "TASKS_APP" + // "CALENDAR_APP" + // "DOCS_APP" + // "SHEETS_APP" + // "SLIDES_APP" + // "MEET_APP" + // "FILE_SUGGESTION_APP" - Powered by Bullseye + // "CONTACTS_APP" + // "ACTIVITY_FEED_APP" + // "DRIVE_APP" + GsuiteAppType string `json:"gsuiteAppType,omitempty"` + + // Id: Numeric identifier of the App. Set to Project number for 1/3P + // Apps. For Webhook, this is WebhookId. Determined & set by the 1P API + // from App credentials on the side channel. + Id int64 `json:"id,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "AppType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AppType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AppId) MarshalJSON() ([]byte, error) { + type NoMethod AppId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AuditLoggingSettings: Represents the settings for Cloud audit logging type AuditLoggingSettings struct { // LogAdminReadActions: Indicates whether audit logging is on/off for @@ -595,6 +653,32 @@ func (s *AuditLoggingSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type AvatarInfo struct { + Emoji *Emoji `json:"emoji,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Emoji") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Emoji") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AvatarInfo) MarshalJSON() ([]byte, error) { + type NoMethod AvatarInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BooleanOperatorOptions: Used to provide a search operator for boolean // properties. This is optional. Search operators let users restrict the // query to specific fields relevant to the type of item being searched. @@ -770,6 +854,112 @@ func (s *ContextAttribute) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CustomEmoji: Proto representation of a custom emoji. May be used in +// both APIs and in Spanner, but certain fields should be restricted to +// one or the other. See the per-field documentation for details. +// NEXT_TAG: 11 +type CustomEmoji struct { + // BlobId: ID for the underlying image data in Blobstore. This field + // should *only* be present in Spanner or within the server, but should + // not be exposed in public APIs. + BlobId string `json:"blobId,omitempty"` + + // CreateTimeMicros: Time when the Emoji was created, in microseconds. + // This field may be present in Spanner, within the server, or in public + // APIs. + CreateTimeMicros int64 `json:"createTimeMicros,omitempty,string"` + + // CreatorUserId: This field should *never* be persisted to Spanner. + CreatorUserId *UserId `json:"creatorUserId,omitempty"` + + // OwnerCustomerId: This field should *never* be persisted to Spanner. + OwnerCustomerId *CustomerId `json:"ownerCustomerId,omitempty"` + + // ReadToken: Opaque token that clients use to construct the URL for + // accessing the custom emoji’s image data. This field is intended for + // API consumption, and should *never* be persisted to Spanner. + ReadToken string `json:"readToken,omitempty"` + + // Shortcode: User-provided, human-readable ID for the custom emoji. + // Users are expected to observe this field in the UI instead of the + // UUID. This shortcode should be unique within an organization, but has + // no global uniqueness guarantees, unlike the UUID. This field should + // *never* be persisted to Spanner. + Shortcode string `json:"shortcode,omitempty"` + + // State: Snapshot of the current state of the emoji, which may differ + // from the source-of-truth in the CustomEmojis table. This field should + // *never* be persisted to Spanner. + // + // Possible values: + // "EMOJI_STATE_UNSPECIFIED" + // "EMOJI_ENABLED" - Emoji is visible and available to be used, + // subject to access control requirements. + // "EMOJI_SYSTEM_DISABLED" - Emoji can no longer be used (e.g. due to + // a shortcode conflict), but is not removed from existing embeddings. + // "EMOJI_HIDDEN" - Emoji is hidden from pickers, so new usages are + // not allowed, but is not removed from existing embeddings. + // "EMOJI_DELETED" - Emoji is removed everywhere and is not available + // to end-users. + State string `json:"state,omitempty"` + + UpdateTimeMicros int64 `json:"updateTimeMicros,omitempty,string"` + + // Uuid: Unique key for a custom emoji resource. Required. This field is + // *always* populated. + Uuid string `json:"uuid,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BlobId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BlobId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CustomEmoji) MarshalJSON() ([]byte, error) { + type NoMethod CustomEmoji + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CustomerId: Represents a GSuite customer ID. Obfuscated with +// CustomerIdObfuscator. +type CustomerId struct { + CustomerId string `json:"customerId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomerId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomerId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CustomerId) MarshalJSON() ([]byte, error) { + type NoMethod CustomerId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CustomerIndexStats: Aggregation of items by status code as of the // specified date. type CustomerIndexStats struct { @@ -1392,6 +1582,33 @@ func (s *DisplayedProperty) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type DmId struct { + // DmId: Unique server assigned Id, per Direct Message Space. + DmId string `json:"dmId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DmId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DmId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DmId) MarshalJSON() ([]byte, error) { + type NoMethod DmId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DoubleOperatorOptions: Used to provide a search operator for double // properties. This is optional. Search operators let users restrict the // query to specific fields relevant to the type of item being searched. @@ -1653,6 +1870,36 @@ func (s *EmailAddress) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type Emoji struct { + // CustomEmoji: A custom emoji. + CustomEmoji *CustomEmoji `json:"customEmoji,omitempty"` + + // Unicode: A basic emoji represented by a unicode string. + Unicode string `json:"unicode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomEmoji") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomEmoji") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Emoji) MarshalJSON() ([]byte, error) { + type NoMethod Emoji + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // EnumOperatorOptions: Used to provide a search operator for enum // properties. This is optional. Search operators let users restrict the // query to specific fields relevant to the type of item being searched. @@ -2642,6 +2889,38 @@ func (s *GoogleDocsResultInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GroupId: Id representing a group that could be a space, a chat, or a +// direct message space. Which ID is set here will determine which group +type GroupId struct { + // DmId: Unique, immutable ID of the Direct Message Space + DmId *DmId `json:"dmId,omitempty"` + + // SpaceId: Unique, immutable ID of the Space + SpaceId *SpaceId `json:"spaceId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DmId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DmId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GroupId) MarshalJSON() ([]byte, error) { + type NoMethod GroupId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HtmlOperatorOptions: Used to provide a search operator for html // properties. This is optional. Search operators let users restrict the // query to specific fields relevant to the type of item being searched. @@ -5834,8 +6113,8 @@ type SearchRequest struct { PageSize int64 `json:"pageSize,omitempty"` // Query: The raw query string. See supported search operators in the - // Cloud search Cheat Sheet - // (https://support.google.com/a/users/answer/9299929) + // Narrow your search with operators + // (https://support.google.com/cloudsearch/answer/6172299) Query string `json:"query,omitempty"` // QueryInterpretationOptions: Options to interpret the user query. @@ -6295,6 +6574,81 @@ func (s *SourceScoringConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SpaceId: Primary key for Space resource. +type SpaceId struct { + // SpaceId: Unique, immutable ID of the Space + SpaceId string `json:"spaceId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SpaceId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SpaceId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SpaceId) MarshalJSON() ([]byte, error) { + type NoMethod SpaceId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SpaceInfo: Defines the representation of a single matching space. +type SpaceInfo struct { + AvatarInfo *AvatarInfo `json:"avatarInfo,omitempty"` + + Description string `json:"description,omitempty"` + + GroupId *GroupId `json:"groupId,omitempty"` + + Name string `json:"name,omitempty"` + + NumMembers int64 `json:"numMembers,omitempty"` + + // UserMembershipState: searching user's membership state in this space + // + // Possible values: + // "MEMBER_UNKNOWN" - Default state, do not use + // "MEMBER_INVITED" - An invitation to the space has been sent + // "MEMBER_JOINED" - User has joined the space + // "MEMBER_NOT_A_MEMBER" - User is not a member + // "MEMBER_FAILED" - This state should never be stored in Spanner. It + // is a state for responses to the clients to indicate that membership + // mutations have failed and the member is in its previous state. + UserMembershipState string `json:"userMembershipState,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AvatarInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AvatarInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SpaceInfo) MarshalJSON() ([]byte, error) { + type NoMethod SpaceInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SpellResult struct { // SuggestedQuery: The suggested spelling of the query. SuggestedQuery string `json:"suggestedQuery,omitempty"` @@ -7015,6 +7369,65 @@ func (s *UploadItemRef) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UserId: Primary key for User resource. +type UserId struct { + // Id: Opaque, server-assigned ID of the User. + Id string `json:"id,omitempty"` + + // OriginAppId: Optional. Identifier of the App involved (directly or on + // behalf of a human creator) in creating this message. This is not set + // if the user posted a message directly, but is used in the case of, + // for example, a message being generated by a 1P integration based on a + // user action (creating an event, creating a task etc). This should + // only be used on the BE. For clients, please use the field in the FE + // message proto instead + // (google3/apps/dynamite/v1/frontend/api/message.proto?q=origin_app_id). + OriginAppId *AppId `json:"originAppId,omitempty"` + + // Type: Clients do not need to send UserType to Backend, but Backend + // will always send this field to clients per the following rule: 1. For + // HUMAN Ids, the field is empty but by default .getType() will return + // HUMAN. 2. For BOT Ids, the field is ALWAYS set to BOT. + // + // Possible values: + // "HUMAN" - Notes on HUMAN type: 1) Leaving UserId.UserType field + // empty will return HUMAN as default value. This is expected because + // all the existing UserIds are without explicitly setting UserType, + // most of which are HUMAN Ids. For Bot Ids we will always set BOT in + // UserType field. 2) DO NOT explicitly set HUMAN as type. This is a + // proto2 issue, that a UserId with explicitly set default value HUMAN + // as type is NOT equal to an id without setting the field. aka. UserId + // id1 = UserId.newBuilder() + // .setId("dummy").setType(UserType.HUMAN).build(); UserId id2 = + // UserId.newBuilder().setId("dummy").build(); + // AssertThat(id1).isNotEqual(id2); + // AssertThat(id2.getType()).isEqualTo(UserType.HUMAN); + // "BOT" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserId) MarshalJSON() ([]byte, error) { + type NoMethod UserId + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type VPCSettings struct { // Project: The resource name of the GCP Project to be used for VPC SC // policy check. VPC security settings on this project will be honored diff --git a/datacatalog/v1/datacatalog-api.json b/datacatalog/v1/datacatalog-api.json index 4ba641eeb1e..22d4bd10a06 100644 --- a/datacatalog/v1/datacatalog-api.json +++ b/datacatalog/v1/datacatalog-api.json @@ -1953,7 +1953,7 @@ } } }, - "revision": "20220201", + "revision": "20220209", "rootUrl": "https://datacatalog.googleapis.com/", "schemas": { "Binding": { @@ -2266,6 +2266,15 @@ "BigQuery service." ], "type": "string" + }, + "sourceEntry": { + "description": "Output only. Data Catalog entry name, if applicable.", + "readOnly": true, + "type": "string" + }, + "storageProperties": { + "$ref": "GoogleCloudDatacatalogV1StorageProperties", + "description": "Detailed properties of the underlying storage." } }, "type": "object" @@ -2285,6 +2294,10 @@ "description": "Specification that applies to a table resource. Valid only for entries with the `TABLE` type.", "id": "GoogleCloudDatacatalogV1DatabaseTableSpec", "properties": { + "dataplexTable": { + "$ref": "GoogleCloudDatacatalogV1DataplexTableSpec", + "description": "Fields specific to a Dataplex table and present only in the Dataplex table entries." + }, "type": { "description": "Type of this table.", "enum": [ @@ -2302,6 +2315,99 @@ }, "type": "object" }, + "GoogleCloudDatacatalogV1DataplexExternalTable": { + "description": "External table registered by Dataplex. Dataplex publishes data discovered from an asset into multiple other systems (BigQuery, DPMS) in form of tables. We call them \"external tables\". External tables are also synced into the Data Catalog. This message contains pointers to those external tables (fully qualified name, resource name et cetera) within the Data Catalog.", + "id": "GoogleCloudDatacatalogV1DataplexExternalTable", + "properties": { + "dataCatalogEntry": { + "description": "Name of the Data Catalog entry representing the external table.", + "type": "string" + }, + "fullyQualifiedName": { + "description": "Fully qualified name (FQN) of the external table.", + "type": "string" + }, + "googleCloudResource": { + "description": "Google Cloud resource name of the external table.", + "type": "string" + }, + "system": { + "description": "Service in which the external table is registered.", + "enum": [ + "INTEGRATED_SYSTEM_UNSPECIFIED", + "BIGQUERY", + "CLOUD_PUBSUB", + "DATAPROC_METASTORE", + "DATAPLEX" + ], + "enumDescriptions": [ + "Default unknown system.", + "BigQuery.", + "Cloud Pub/Sub.", + "Dataproc Metastore.", + "Dataplex." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDatacatalogV1DataplexFilesetSpec": { + "description": "Entry specyfication for a Dataplex fileset.", + "id": "GoogleCloudDatacatalogV1DataplexFilesetSpec", + "properties": { + "dataplexSpec": { + "$ref": "GoogleCloudDatacatalogV1DataplexSpec", + "description": "Common Dataplex fields." + } + }, + "type": "object" + }, + "GoogleCloudDatacatalogV1DataplexSpec": { + "description": "Common Dataplex fields.", + "id": "GoogleCloudDatacatalogV1DataplexSpec", + "properties": { + "asset": { + "description": "Fully qualified resource name of an asset in Dataplex, to which the underlying data source (Cloud Storage bucket or BigQuery dataset) of the entity is attached.", + "type": "string" + }, + "compressionFormat": { + "description": "Compression format of the data, e.g., zip, gzip etc.", + "type": "string" + }, + "dataFormat": { + "$ref": "GoogleCloudDatacatalogV1PhysicalSchema", + "description": "Format of the data." + }, + "projectId": { + "description": "Project ID of the underlying Cloud Storage or BigQuery data. Note that this may not be the same project as the correspondingly Dataplex lake / zone / asset.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDatacatalogV1DataplexTableSpec": { + "description": "Entry specification for a Dataplex table.", + "id": "GoogleCloudDatacatalogV1DataplexTableSpec", + "properties": { + "dataplexSpec": { + "$ref": "GoogleCloudDatacatalogV1DataplexSpec", + "description": "Common Dataplex fields." + }, + "externalTables": { + "description": "List of external tables registered by Dataplex in other systems based on the same underlying data. External tables allow to query this data in those systems.", + "items": { + "$ref": "GoogleCloudDatacatalogV1DataplexExternalTable" + }, + "type": "array" + }, + "userManaged": { + "description": "Indicates if the table schema is managed by the user or not.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDatacatalogV1Entry": { "description": "Entry metadata. A Data Catalog entry represents another resource in Google Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or outside of it. You can use the `linked_resource` field in the entry resource to refer to the original resource ID of the source system. An entry resource contains resource details, for example, its schema. Additionally, you can attach flexible metadata to an entry in the form of a Tag.", "id": "GoogleCloudDatacatalogV1Entry", @@ -2339,6 +2445,10 @@ "description": "Display name of an entry. The name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and can't start or end with spaces. The maximum size is 200 bytes when encoded in UTF-8. Default value is an empty string.", "type": "string" }, + "filesetSpec": { + "$ref": "GoogleCloudDatacatalogV1FilesetSpec", + "description": "Specification that applies to a fileset resource. Valid only for entries with the `FILESET` type." + }, "fullyQualifiedName": { "description": "Fully qualified name (FQN) of the resource. Set automatically for entries representing resources from synced systems. Settable only during creation and read-only afterwards. Can be used for search and lookup of the entries. FQNs take two forms: * For non-regionalized resources: `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` * For regionalized resources: `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` Example for a DPMS table: `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}`", "type": "string" @@ -2353,13 +2463,15 @@ "INTEGRATED_SYSTEM_UNSPECIFIED", "BIGQUERY", "CLOUD_PUBSUB", - "DATAPROC_METASTORE" + "DATAPROC_METASTORE", + "DATAPLEX" ], "enumDescriptions": [ "Default unknown system.", "BigQuery.", "Cloud Pub/Sub.", - "Dataproc Metastore." + "Dataproc Metastore.", + "Dataplex." ], "readOnly": true, "type": "string" @@ -2409,6 +2521,8 @@ "DATABASE", "DATA_SOURCE_CONNECTION", "ROUTINE", + "LAKE", + "ZONE", "SERVICE" ], "enumDescriptions": [ @@ -2421,6 +2535,8 @@ "A database.", "Output only. Connection to a data source. For example, a BigQuery connection.", "Output only. Routine, for example, a BigQuery routine.", + "A Dataproc Metastore lake.", + "A Dataproc Metastore zone.", "A service, for example, a Dataproc Metastore service." ], "type": "string" @@ -2543,6 +2659,17 @@ }, "type": "object" }, + "GoogleCloudDatacatalogV1FilesetSpec": { + "description": "Specification that applies to a fileset. Valid only for entries with the 'FILESET' type.", + "id": "GoogleCloudDatacatalogV1FilesetSpec", + "properties": { + "dataplexFileset": { + "$ref": "GoogleCloudDatacatalogV1DataplexFilesetSpec", + "description": "Fields specific to a Dataplex fileset and present only in the Dataplex fileset entries." + } + }, + "type": "object" + }, "GoogleCloudDatacatalogV1GcsFileSpec": { "description": "Specification of a single file in Cloud Storage.", "id": "GoogleCloudDatacatalogV1GcsFileSpec", @@ -2758,6 +2885,88 @@ }, "type": "object" }, + "GoogleCloudDatacatalogV1PhysicalSchema": { + "description": "Native schema used by a resource represented as an entry. Used by query engines for deserializing and parsing source data.", + "id": "GoogleCloudDatacatalogV1PhysicalSchema", + "properties": { + "avro": { + "$ref": "GoogleCloudDatacatalogV1PhysicalSchemaAvroSchema", + "description": "Schema in Avro JSON format." + }, + "csv": { + "$ref": "GoogleCloudDatacatalogV1PhysicalSchemaCsvSchema", + "description": "Marks a CSV-encoded data source." + }, + "orc": { + "$ref": "GoogleCloudDatacatalogV1PhysicalSchemaOrcSchema", + "description": "Marks an ORC-encoded data source." + }, + "parquet": { + "$ref": "GoogleCloudDatacatalogV1PhysicalSchemaParquetSchema", + "description": "Marks a Parquet-encoded data source." + }, + "protobuf": { + "$ref": "GoogleCloudDatacatalogV1PhysicalSchemaProtobufSchema", + "description": "Schema in protocol buffer format." + }, + "thrift": { + "$ref": "GoogleCloudDatacatalogV1PhysicalSchemaThriftSchema", + "description": "Schema in Thrift format." + } + }, + "type": "object" + }, + "GoogleCloudDatacatalogV1PhysicalSchemaAvroSchema": { + "description": "Schema in Avro JSON format.", + "id": "GoogleCloudDatacatalogV1PhysicalSchemaAvroSchema", + "properties": { + "text": { + "description": "JSON source of the Avro schema.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDatacatalogV1PhysicalSchemaCsvSchema": { + "description": "Marks a CSV-encoded data source.", + "id": "GoogleCloudDatacatalogV1PhysicalSchemaCsvSchema", + "properties": {}, + "type": "object" + }, + "GoogleCloudDatacatalogV1PhysicalSchemaOrcSchema": { + "description": "Marks an ORC-encoded data source.", + "id": "GoogleCloudDatacatalogV1PhysicalSchemaOrcSchema", + "properties": {}, + "type": "object" + }, + "GoogleCloudDatacatalogV1PhysicalSchemaParquetSchema": { + "description": "Marks a Parquet-encoded data source.", + "id": "GoogleCloudDatacatalogV1PhysicalSchemaParquetSchema", + "properties": {}, + "type": "object" + }, + "GoogleCloudDatacatalogV1PhysicalSchemaProtobufSchema": { + "description": "Schema in protocol buffer format.", + "id": "GoogleCloudDatacatalogV1PhysicalSchemaProtobufSchema", + "properties": { + "text": { + "description": "Protocol buffer source of the schema.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDatacatalogV1PhysicalSchemaThriftSchema": { + "description": "Schema in Thrift format.", + "id": "GoogleCloudDatacatalogV1PhysicalSchemaThriftSchema", + "properties": { + "text": { + "description": "Thrift IDL source of the schema.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDatacatalogV1PolicyTag": { "description": "Denotes one policy tag in a taxonomy, for example, SSN. Policy tags can be defined in a hierarchy. For example: ``` + Geolocation + LatLong + City + ZipCode ``` Where the \"Geolocation\" policy tag contains three children.", "id": "GoogleCloudDatacatalogV1PolicyTag", @@ -3027,13 +3236,15 @@ "INTEGRATED_SYSTEM_UNSPECIFIED", "BIGQUERY", "CLOUD_PUBSUB", - "DATAPROC_METASTORE" + "DATAPROC_METASTORE", + "DATAPLEX" ], "enumDescriptions": [ "Default unknown system.", "BigQuery.", "Cloud Pub/Sub.", - "Dataproc Metastore." + "Dataproc Metastore.", + "Dataplex." ], "readOnly": true, "type": "string" @@ -3153,6 +3364,24 @@ "properties": {}, "type": "object" }, + "GoogleCloudDatacatalogV1StorageProperties": { + "description": "Details the properties of the underlying storage.", + "id": "GoogleCloudDatacatalogV1StorageProperties", + "properties": { + "filePattern": { + "description": "Patterns to identify a set of files for this fileset. Examples of a valid `file_pattern`: * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir` directory * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` and all subdirectories recursively * `gs://bucket_name/file*`: matches files prefixed by `file` in `bucket_name` * `gs://bucket_name/??.txt`: matches files with two characters followed by `.txt` in `bucket_name` * `gs://bucket_name/[aeiou].txt`: matches files that contain a single vowel character followed by `.txt` in `bucket_name` * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... or `m` followed by `.txt` in `bucket_name` * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match the `a/*/b` pattern, such as `a/c/b`, `a/d/b` * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`", + "items": { + "type": "string" + }, + "type": "array" + }, + "fileType": { + "description": "File type in MIME format, for example, `text/plain`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDatacatalogV1SystemTimestamps": { "description": "Timestamps associated with this resource in a particular system.", "id": "GoogleCloudDatacatalogV1SystemTimestamps", diff --git a/datacatalog/v1/datacatalog-gen.go b/datacatalog/v1/datacatalog-gen.go index a7a07e99ee8..9df115a059b 100644 --- a/datacatalog/v1/datacatalog-gen.go +++ b/datacatalog/v1/datacatalog-gen.go @@ -900,6 +900,12 @@ type GoogleCloudDatacatalogV1DataSource struct { // "BIGQUERY" - BigQuery service. Service string `json:"service,omitempty"` + // SourceEntry: Output only. Data Catalog entry name, if applicable. + SourceEntry string `json:"sourceEntry,omitempty"` + + // StorageProperties: Detailed properties of the underlying storage. + StorageProperties *GoogleCloudDatacatalogV1StorageProperties `json:"storageProperties,omitempty"` + // ForceSendFields is a list of field names (e.g. "Resource") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -958,6 +964,10 @@ func (s *GoogleCloudDatacatalogV1DataSourceConnectionSpec) MarshalJSON() ([]byte // GoogleCloudDatacatalogV1DatabaseTableSpec: Specification that applies // to a table resource. Valid only for entries with the `TABLE` type. type GoogleCloudDatacatalogV1DatabaseTableSpec struct { + // DataplexTable: Fields specific to a Dataplex table and present only + // in the Dataplex table entries. + DataplexTable *GoogleCloudDatacatalogV1DataplexTableSpec `json:"dataplexTable,omitempty"` + // Type: Type of this table. // // Possible values: @@ -966,7 +976,131 @@ type GoogleCloudDatacatalogV1DatabaseTableSpec struct { // "EXTERNAL" - External table. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to + // ForceSendFields is a list of field names (e.g. "DataplexTable") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataplexTable") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1DatabaseTableSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1DatabaseTableSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDatacatalogV1DataplexExternalTable: External table +// registered by Dataplex. Dataplex publishes data discovered from an +// asset into multiple other systems (BigQuery, DPMS) in form of tables. +// We call them "external tables". External tables are also synced into +// the Data Catalog. This message contains pointers to those external +// tables (fully qualified name, resource name et cetera) within the +// Data Catalog. +type GoogleCloudDatacatalogV1DataplexExternalTable struct { + // DataCatalogEntry: Name of the Data Catalog entry representing the + // external table. + DataCatalogEntry string `json:"dataCatalogEntry,omitempty"` + + // FullyQualifiedName: Fully qualified name (FQN) of the external table. + FullyQualifiedName string `json:"fullyQualifiedName,omitempty"` + + // GoogleCloudResource: Google Cloud resource name of the external + // table. + GoogleCloudResource string `json:"googleCloudResource,omitempty"` + + // System: Service in which the external table is registered. + // + // Possible values: + // "INTEGRATED_SYSTEM_UNSPECIFIED" - Default unknown system. + // "BIGQUERY" - BigQuery. + // "CLOUD_PUBSUB" - Cloud Pub/Sub. + // "DATAPROC_METASTORE" - Dataproc Metastore. + // "DATAPLEX" - Dataplex. + System string `json:"system,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataCatalogEntry") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataCatalogEntry") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1DataplexExternalTable) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1DataplexExternalTable + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDatacatalogV1DataplexFilesetSpec: Entry specyfication for +// a Dataplex fileset. +type GoogleCloudDatacatalogV1DataplexFilesetSpec struct { + // DataplexSpec: Common Dataplex fields. + DataplexSpec *GoogleCloudDatacatalogV1DataplexSpec `json:"dataplexSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataplexSpec") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataplexSpec") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1DataplexFilesetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1DataplexFilesetSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDatacatalogV1DataplexSpec: Common Dataplex fields. +type GoogleCloudDatacatalogV1DataplexSpec struct { + // Asset: Fully qualified resource name of an asset in Dataplex, to + // which the underlying data source (Cloud Storage bucket or BigQuery + // dataset) of the entity is attached. + Asset string `json:"asset,omitempty"` + + // CompressionFormat: Compression format of the data, e.g., zip, gzip + // etc. + CompressionFormat string `json:"compressionFormat,omitempty"` + + // DataFormat: Format of the data. + DataFormat *GoogleCloudDatacatalogV1PhysicalSchema `json:"dataFormat,omitempty"` + + // ProjectId: Project ID of the underlying Cloud Storage or BigQuery + // data. Note that this may not be the same project as the + // correspondingly Dataplex lake / zone / asset. + ProjectId string `json:"projectId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asset") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -974,7 +1108,7 @@ type GoogleCloudDatacatalogV1DatabaseTableSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API + // NullFields is a list of field names (e.g. "Asset") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -983,8 +1117,46 @@ type GoogleCloudDatacatalogV1DatabaseTableSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDatacatalogV1DatabaseTableSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDatacatalogV1DatabaseTableSpec +func (s *GoogleCloudDatacatalogV1DataplexSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1DataplexSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDatacatalogV1DataplexTableSpec: Entry specification for a +// Dataplex table. +type GoogleCloudDatacatalogV1DataplexTableSpec struct { + // DataplexSpec: Common Dataplex fields. + DataplexSpec *GoogleCloudDatacatalogV1DataplexSpec `json:"dataplexSpec,omitempty"` + + // ExternalTables: List of external tables registered by Dataplex in + // other systems based on the same underlying data. External tables + // allow to query this data in those systems. + ExternalTables []*GoogleCloudDatacatalogV1DataplexExternalTable `json:"externalTables,omitempty"` + + // UserManaged: Indicates if the table schema is managed by the user or + // not. + UserManaged bool `json:"userManaged,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataplexSpec") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataplexSpec") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1DataplexTableSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1DataplexTableSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -1037,6 +1209,10 @@ type GoogleCloudDatacatalogV1Entry struct { // when encoded in UTF-8. Default value is an empty string. DisplayName string `json:"displayName,omitempty"` + // FilesetSpec: Specification that applies to a fileset resource. Valid + // only for entries with the `FILESET` type. + FilesetSpec *GoogleCloudDatacatalogV1FilesetSpec `json:"filesetSpec,omitempty"` + // FullyQualifiedName: Fully qualified name (FQN) of the resource. Set // automatically for entries representing resources from synced systems. // Settable only during creation and read-only afterwards. Can be used @@ -1063,6 +1239,7 @@ type GoogleCloudDatacatalogV1Entry struct { // "BIGQUERY" - BigQuery. // "CLOUD_PUBSUB" - Cloud Pub/Sub. // "DATAPROC_METASTORE" - Dataproc Metastore. + // "DATAPLEX" - Dataplex. IntegratedSystem string `json:"integratedSystem,omitempty"` // Labels: Cloud labels attached to the entry. In Data Catalog, you can @@ -1131,6 +1308,8 @@ type GoogleCloudDatacatalogV1Entry struct { // "DATA_SOURCE_CONNECTION" - Output only. Connection to a data // source. For example, a BigQuery connection. // "ROUTINE" - Output only. Routine, for example, a BigQuery routine. + // "LAKE" - A Dataproc Metastore lake. + // "ZONE" - A Dataproc Metastore zone. // "SERVICE" - A service, for example, a Dataproc Metastore service. Type string `json:"type,omitempty"` @@ -1409,6 +1588,37 @@ func (s *GoogleCloudDatacatalogV1FieldTypeEnumTypeEnumValue) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDatacatalogV1FilesetSpec: Specification that applies to a +// fileset. Valid only for entries with the 'FILESET' type. +type GoogleCloudDatacatalogV1FilesetSpec struct { + // DataplexFileset: Fields specific to a Dataplex fileset and present + // only in the Dataplex fileset entries. + DataplexFileset *GoogleCloudDatacatalogV1DataplexFilesetSpec `json:"dataplexFileset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataplexFileset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataplexFileset") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1FilesetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1FilesetSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDatacatalogV1GcsFileSpec: Specification of a single file // in Cloud Storage. type GoogleCloudDatacatalogV1GcsFileSpec struct { @@ -1868,6 +2078,153 @@ func (s *GoogleCloudDatacatalogV1PersonalDetails) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDatacatalogV1PhysicalSchema: Native schema used by a +// resource represented as an entry. Used by query engines for +// deserializing and parsing source data. +type GoogleCloudDatacatalogV1PhysicalSchema struct { + // Avro: Schema in Avro JSON format. + Avro *GoogleCloudDatacatalogV1PhysicalSchemaAvroSchema `json:"avro,omitempty"` + + // Csv: Marks a CSV-encoded data source. + Csv *GoogleCloudDatacatalogV1PhysicalSchemaCsvSchema `json:"csv,omitempty"` + + // Orc: Marks an ORC-encoded data source. + Orc *GoogleCloudDatacatalogV1PhysicalSchemaOrcSchema `json:"orc,omitempty"` + + // Parquet: Marks a Parquet-encoded data source. + Parquet *GoogleCloudDatacatalogV1PhysicalSchemaParquetSchema `json:"parquet,omitempty"` + + // Protobuf: Schema in protocol buffer format. + Protobuf *GoogleCloudDatacatalogV1PhysicalSchemaProtobufSchema `json:"protobuf,omitempty"` + + // Thrift: Schema in Thrift format. + Thrift *GoogleCloudDatacatalogV1PhysicalSchemaThriftSchema `json:"thrift,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Avro") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Avro") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1PhysicalSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1PhysicalSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDatacatalogV1PhysicalSchemaAvroSchema: Schema in Avro JSON +// format. +type GoogleCloudDatacatalogV1PhysicalSchemaAvroSchema struct { + // Text: JSON source of the Avro schema. + Text string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Text") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Text") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1PhysicalSchemaAvroSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1PhysicalSchemaAvroSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDatacatalogV1PhysicalSchemaCsvSchema: Marks a CSV-encoded +// data source. +type GoogleCloudDatacatalogV1PhysicalSchemaCsvSchema struct { +} + +// GoogleCloudDatacatalogV1PhysicalSchemaOrcSchema: Marks an ORC-encoded +// data source. +type GoogleCloudDatacatalogV1PhysicalSchemaOrcSchema struct { +} + +// GoogleCloudDatacatalogV1PhysicalSchemaParquetSchema: Marks a +// Parquet-encoded data source. +type GoogleCloudDatacatalogV1PhysicalSchemaParquetSchema struct { +} + +// GoogleCloudDatacatalogV1PhysicalSchemaProtobufSchema: Schema in +// protocol buffer format. +type GoogleCloudDatacatalogV1PhysicalSchemaProtobufSchema struct { + // Text: Protocol buffer source of the schema. + Text string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Text") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Text") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1PhysicalSchemaProtobufSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1PhysicalSchemaProtobufSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDatacatalogV1PhysicalSchemaThriftSchema: Schema in Thrift +// format. +type GoogleCloudDatacatalogV1PhysicalSchemaThriftSchema struct { + // Text: Thrift IDL source of the schema. + Text string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Text") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Text") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1PhysicalSchemaThriftSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1PhysicalSchemaThriftSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDatacatalogV1PolicyTag: Denotes one policy tag in a // taxonomy, for example, SSN. Policy tags can be defined in a // hierarchy. For example: ``` + Geolocation + LatLong + City + ZipCode @@ -2347,6 +2704,7 @@ type GoogleCloudDatacatalogV1SearchCatalogResult struct { // "BIGQUERY" - BigQuery. // "CLOUD_PUBSUB" - Cloud Pub/Sub. // "DATAPROC_METASTORE" - Dataproc Metastore. + // "DATAPLEX" - Dataplex. IntegratedSystem string `json:"integratedSystem,omitempty"` // LinkedResource: The full name of the Google Cloud resource the entry @@ -2517,6 +2875,51 @@ type GoogleCloudDatacatalogV1StarEntryResponse struct { googleapi.ServerResponse `json:"-"` } +// GoogleCloudDatacatalogV1StorageProperties: Details the properties of +// the underlying storage. +type GoogleCloudDatacatalogV1StorageProperties struct { + // FilePattern: Patterns to identify a set of files for this fileset. + // Examples of a valid `file_pattern`: * `gs://bucket_name/dir/*`: + // matches all files in the `bucket_name/dir` directory * + // `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` + // and all subdirectories recursively * `gs://bucket_name/file*`: + // matches files prefixed by `file` in `bucket_name` * + // `gs://bucket_name/??.txt`: matches files with two characters followed + // by `.txt` in `bucket_name` * `gs://bucket_name/[aeiou].txt`: matches + // files that contain a single vowel character followed by `.txt` in + // `bucket_name` * `gs://bucket_name/[a-m].txt`: matches files that + // contain `a`, `b`, ... or `m` followed by `.txt` in `bucket_name` * + // `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that + // match the `a/*/b` pattern, such as `a/c/b`, `a/d/b` * + // `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + FilePattern []string `json:"filePattern,omitempty"` + + // FileType: File type in MIME format, for example, `text/plain`. + FileType string `json:"fileType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FilePattern") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FilePattern") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1StorageProperties) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1StorageProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDatacatalogV1SystemTimestamps: Timestamps associated with // this resource in a particular system. type GoogleCloudDatacatalogV1SystemTimestamps struct { diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json new file mode 100644 index 00000000000..9261627227d --- /dev/null +++ b/dataplex/v1/dataplex-api.json @@ -0,0 +1,5363 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://dataplex.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud Dataplex", + "description": "Dataplex API is used to manage the lifecycle of data lakes.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/dataplex/docs", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "dataplex:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://dataplex.mtls.googleapis.com/", + "name": "dataplex", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudLocationLocation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "dataplex.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in AIP-160 (https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "GoogleCloudLocationListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "lakes": { + "methods": { + "create": { + "description": "Creates a lake resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "lakeId": { + "description": "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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the lake location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/lakes", + "request": { + "$ref": "GoogleCloudDataplexV1Lake" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.lakes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a lake resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Lake" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists lake resources in a project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter request.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Order by fields for the result.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the lake location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/lakes", + "response": { + "$ref": "GoogleCloudDataplexV1ListLakesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a lake resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.lakes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The relative resource name of the lake, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1Lake" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "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}/lakes/{lakesId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "actions": { + "methods": { + "list": { + "description": "Lists action resources in a lake.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/actions", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.actions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/actions", + "response": { + "$ref": "GoogleCloudDataplexV1ListActionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "content": { + "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}/lakes/{lakesId}/content/{contentId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.content.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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + "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}/lakes/{lakesId}/content/{contentId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.content.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + "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}/lakes/{lakesId}/content/{contentId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.content.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "contentitems": { + "methods": { + "create": { + "description": "Create a content.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.contentitems.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/contentitems", + "request": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "response": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a content.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.lakes.contentitems.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get a content resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.contentitems.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. Specify content view to make a partial request.", + "enum": [ + "CONTENT_VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "enumDescriptions": [ + "Content view not specified. Defaults to BASIC. The API will default to the BASIC view.", + "Will not return the data_text field.", + "Returns the complete proto." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List content.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.contentitems.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/contentitems", + "response": { + "$ref": "GoogleCloudDataplexV1ListContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update a content. Only supports full resource update.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.lakes.contentitems.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The relative resource name of the content, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "response": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "environments": { + "methods": { + "create": { + "description": "Create an environment resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.environments.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "environmentId": { + "description": "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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/environments", + "request": { + "$ref": "GoogleCloudDataplexV1Environment" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.lakes.environments.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get environment resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.environments.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Environment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.environments.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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists environments under the given lake.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.environments.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter request.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Order by fields for the result.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/environments", + "response": { + "$ref": "GoogleCloudDataplexV1ListEnvironmentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update the environment resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.lakes.environments.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The relative resource name of the environment, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1Environment" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.environments.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + "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}/lakes/{lakesId}/environments/{environmentsId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.environments.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "sessions": { + "methods": { + "list": { + "description": "Lists session resources in an environment.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}/sessions", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.environments.sessions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/sessions", + "response": { + "$ref": "GoogleCloudDataplexV1ListSessionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "tasks": { + "methods": { + "create": { + "description": "Creates a task resource within a lake.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.tasks.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + }, + "taskId": { + "description": "Required. Task identifier.", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/tasks", + "request": { + "$ref": "GoogleCloudDataplexV1Task" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete the task resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.lakes.tasks.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /task/{task_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get task resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.tasks.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /tasks/{tasks_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Task" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.tasks.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists tasks under the given lake.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.tasks.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter request.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Order by fields for the result.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/tasks", + "response": { + "$ref": "GoogleCloudDataplexV1ListTasksResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update the task resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.lakes.tasks.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The relative resource name of the task, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ tasks/{task_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1Task" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.tasks.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + "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}/lakes/{lakesId}/tasks/{tasksId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.tasks.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "jobs": { + "methods": { + "cancel": { + "description": "Cancel jobs running for the task resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}/jobs/{jobsId}:cancel", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.tasks.jobs.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /task/{task_id}/job/{job_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleCloudDataplexV1CancelJobRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get job resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}/jobs/{jobsId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.tasks.jobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /tasks/{task_id}/jobs/{job_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Jobs under the given task.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}/jobs", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.tasks.jobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/jobs", + "response": { + "$ref": "GoogleCloudDataplexV1ListJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "zones": { + "methods": { + "create": { + "description": "Creates a zone resource within a lake.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.zones.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + }, + "zoneId": { + "description": "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\")", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/zones", + "request": { + "$ref": "GoogleCloudDataplexV1Zone" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.lakes.zones.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a zone resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Zone" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists zone resources in a lake.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter request.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Order by fields for the result.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/zones", + "response": { + "$ref": "GoogleCloudDataplexV1ListZonesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a zone resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.lakes.zones.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The relative resource name of the zone, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1Zone" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.zones.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "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}/lakes/{lakesId}/zones/{zonesId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.zones.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "actions": { + "methods": { + "list": { + "description": "Lists action resources in a zone.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/actions", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.actions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/actions", + "response": { + "$ref": "GoogleCloudDataplexV1ListActionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "assets": { + "methods": { + "create": { + "description": "Creates an asset resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.zones.assets.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "assetId": { + "description": "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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/assets", + "request": { + "$ref": "GoogleCloudDataplexV1Asset" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.lakes.zones.assets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}/assets/{asset_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves an asset resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.assets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}/assets/{asset_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Asset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.assets.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 the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists asset resources in a zone.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.assets.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter request.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Order by fields for the result.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/assets", + "response": { + "$ref": "GoogleCloudDataplexV1ListAssetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an asset resource.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}", + "httpMethod": "PATCH", + "id": "dataplex.projects.locations.lakes.zones.assets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The relative resource name of the asset, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1Asset" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.zones.assets.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + "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}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.zones.assets.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "actions": { + "methods": { + "list": { + "description": "Lists action resources in an asset.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}/actions", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.assets.actions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/actions", + "response": { + "$ref": "GoogleCloudDataplexV1ListActionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "entities": { + "methods": { + "create": { + "description": "Create a metadata entity.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.zones.entities.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/entities", + "request": { + "$ref": "GoogleCloudDataplexV1Entity" + }, + "response": { + "$ref": "GoogleCloudDataplexV1Entity" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a metadata entity.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.lakes.zones.entities.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Required. The etag associated with the partition if it was previously retrieved.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the entity: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get a metadata entity.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.entities.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the entity: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. Used to select the subset of entity information to return. Defaults to BASIC.", + "enum": [ + "ENTITY_VIEW_UNSPECIFIED", + "BASIC", + "SCHEMA", + "FULL" + ], + "enumDescriptions": [ + "The API will default to the BASIC view.", + "Minimal view that does not include the schema.", + "Include basic information and schema.", + "Include everything. Currently, this is the same as the SCHEMA view." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Entity" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List metadata entities in a zone.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.entities.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. 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”", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Required. Specify the entity view to make a partial list request.", + "enum": [ + "ENTITY_VIEW_UNSPECIFIED", + "TABLES", + "FILESETS" + ], + "enumDescriptions": [ + "The default unset value. The API will default to the FULL view.", + "Only list table entities.", + "Only list fileset entities." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/entities", + "response": { + "$ref": "GoogleCloudDataplexV1ListEntitiesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "update": { + "description": "Update a metadata entity. Only supports full resource update.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}", + "httpMethod": "PUT", + "id": "dataplex.projects.locations.lakes.zones.entities.update", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the entity, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDataplexV1Entity" + }, + "response": { + "$ref": "GoogleCloudDataplexV1Entity" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "partitions": { + "methods": { + "create": { + "description": "Create a metadata partition.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}/partitions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.lakes.zones.entities.partitions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/partitions", + "request": { + "$ref": "GoogleCloudDataplexV1Partition" + }, + "response": { + "$ref": "GoogleCloudDataplexV1Partition" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a metadata partition.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}/partitions/{partitionsId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.lakes.zones.entities.partitions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. The etag associated with the partition if it was previously retrieved.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the partition. format: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_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.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get a metadata partition of an entity.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}/partitions/{partitionsId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.entities.partitions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the partition: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_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.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDataplexV1Partition" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List metadata partitions of an entity.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}/partitions", + "httpMethod": "GET", + "id": "dataplex.projects.locations.lakes.zones.entities.partitions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter the partitions returned to the caller using a key vslue pair expression. The filter expression supports: logical operators: AND, OR comparison operators: \u003c, \u003e, \u003e=, \u003c= ,=, != 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 \u003c value1 OR key2 \u003e 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.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. 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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent entity: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/partitions", + "response": { + "$ref": "GoogleCloudDataplexV1ListPartitionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "dataplex.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "dataplex.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "dataplex.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "dataplex.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20220208", + "rootUrl": "https://dataplex.googleapis.com/", + "schemas": { + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for Empty is empty JSON object {}.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "GoogleCloudDataplexV1Action": { + "description": "Action represents an issue requiring administrator action for resolution.", + "id": "GoogleCloudDataplexV1Action", + "properties": { + "asset": { + "description": "Output only. The relative resource name of the asset, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.", + "readOnly": true, + "type": "string" + }, + "category": { + "description": "The category of issue associated with the action.", + "enum": [ + "CATEGORY_UNSPECIFIED", + "RESOURCE_MANAGEMENT", + "SECURITY_POLICY", + "DATA_DISCOVERY" + ], + "enumDescriptions": [ + "Unspecified category.", + "Resource management related issues.", + "Security policy related issues.", + "Data and discovery related issues." + ], + "type": "string" + }, + "dataLocations": { + "description": "The list of data locations associated with this action. Cloud Storage locations are represented as URI paths(E.g. gs://bucket/table1/year=2020/month=Jan/). BigQuery locations refer to resource names(E.g. bigquery.googleapis.com/projects/project-id/datasets/dataset-id).", + "items": { + "type": "string" + }, + "type": "array" + }, + "detectTime": { + "description": "The time that the issue was detected.", + "format": "google-datetime", + "type": "string" + }, + "failedSecurityPolicyApply": { + "$ref": "GoogleCloudDataplexV1ActionFailedSecurityPolicyApply", + "description": "Details for issues related to applying security policy." + }, + "incompatibleDataSchema": { + "$ref": "GoogleCloudDataplexV1ActionIncompatibleDataSchema", + "description": "Details for issues related to incompatible schemas detected within data." + }, + "invalidDataFormat": { + "$ref": "GoogleCloudDataplexV1ActionInvalidDataFormat", + "description": "Details for issues related to invalid or unsupported data formats." + }, + "invalidDataOrganization": { + "$ref": "GoogleCloudDataplexV1ActionInvalidDataOrganization", + "description": "Details for issues related to invalid data arrangement." + }, + "invalidDataPartition": { + "$ref": "GoogleCloudDataplexV1ActionInvalidDataPartition", + "description": "Details for issues related to invalid or unsupported data partition structure." + }, + "issue": { + "description": "Detailed description of the issue requiring action.", + "type": "string" + }, + "lake": { + "description": "Output only. The relative resource name of the lake, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", + "readOnly": true, + "type": "string" + }, + "missingData": { + "$ref": "GoogleCloudDataplexV1ActionMissingData", + "description": "Details for issues related to absence of data within managed resources." + }, + "missingResource": { + "$ref": "GoogleCloudDataplexV1ActionMissingResource", + "description": "Details for issues related to absence of a managed resource." + }, + "name": { + "description": "Output only. The relative resource name of the action, of the form: projects/{project}/locations/{location}/lakes/{lake}/actions/{action} projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action} projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}.", + "readOnly": true, + "type": "string" + }, + "unauthorizedResource": { + "$ref": "GoogleCloudDataplexV1ActionUnauthorizedResource", + "description": "Details for issues related to lack of permissions to access data resources." + }, + "zone": { + "description": "Output only. The relative resource name of the zone, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ActionFailedSecurityPolicyApply": { + "description": "Failed to apply security policy to the managed resource(s) under a lake, zone or an asset. For a lake or zone resource, one or more underlying assets has a failure applying security policy to the associated managed resource.", + "id": "GoogleCloudDataplexV1ActionFailedSecurityPolicyApply", + "properties": { + "asset": { + "description": "Resource name of one of the assets with failing security policy application. Populated for a lake or zone resource only.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ActionIncompatibleDataSchema": { + "description": "Action details for incompatible schemas detected by discovery.", + "id": "GoogleCloudDataplexV1ActionIncompatibleDataSchema", + "properties": { + "existingSchema": { + "description": "The existing and expected schema of the table. The schema is provided as a JSON formatted structure listing columns and data types.", + "type": "string" + }, + "newSchema": { + "description": "The new and incompatible schema within the table. The schema is provided as a JSON formatted structured listing columns and data types.", + "type": "string" + }, + "sampledDataLocations": { + "description": "The list of data locations sampled and used for format/schema inference.", + "items": { + "type": "string" + }, + "type": "array" + }, + "schemaChange": { + "description": "Whether the action relates to a schema that is incompatible or modified.", + "enum": [ + "SCHEMA_CHANGE_UNSPECIFIED", + "INCOMPATIBLE", + "MODIFIED" + ], + "enumDescriptions": [ + "Schema change unspecified.", + "Newly discovered schema is incompatible with existing schema.", + "Newly discovered schema has changed from existing schema for data in a curated zone." + ], + "type": "string" + }, + "table": { + "description": "The name of the table containing invalid data.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ActionInvalidDataFormat": { + "description": "Action details for invalid or unsupported data files detected by discovery.", + "id": "GoogleCloudDataplexV1ActionInvalidDataFormat", + "properties": { + "expectedFormat": { + "description": "The expected data format of the entity.", + "type": "string" + }, + "newFormat": { + "description": "The new unexpected data format within the entity.", + "type": "string" + }, + "sampledDataLocations": { + "description": "The list of data locations sampled and used for format/schema inference.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ActionInvalidDataOrganization": { + "description": "Action details for invalid data arrangement.", + "id": "GoogleCloudDataplexV1ActionInvalidDataOrganization", + "properties": {}, + "type": "object" + }, + "GoogleCloudDataplexV1ActionInvalidDataPartition": { + "description": "Action details for invalid or unsupported partitions detected by discovery.", + "id": "GoogleCloudDataplexV1ActionInvalidDataPartition", + "properties": { + "expectedStructure": { + "description": "The issue type of InvalidDataPartition.", + "enum": [ + "PARTITION_STRUCTURE_UNSPECIFIED", + "CONSISTENT_KEYS", + "HIVE_STYLE_KEYS" + ], + "enumDescriptions": [ + "PartitionStructure unspecified.", + "Consistent hive-style partition definition (both raw and curated zone).", + "Hive style partition definition (curated zone only)." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ActionMissingData": { + "description": "Action details for absence of data detected by discovery.", + "id": "GoogleCloudDataplexV1ActionMissingData", + "properties": {}, + "type": "object" + }, + "GoogleCloudDataplexV1ActionMissingResource": { + "description": "Action details for resource references in assets that cannot be located.", + "id": "GoogleCloudDataplexV1ActionMissingResource", + "properties": {}, + "type": "object" + }, + "GoogleCloudDataplexV1ActionUnauthorizedResource": { + "description": "Action details for unauthorized resource issues raised to indicate that the service account associated with the lake instance is not authorized to access or manage the resource associated with an asset.", + "id": "GoogleCloudDataplexV1ActionUnauthorizedResource", + "properties": {}, + "type": "object" + }, + "GoogleCloudDataplexV1Asset": { + "description": "An asset represents a cloud resource that is being managed within a lake as a member of a zone.", + "id": "GoogleCloudDataplexV1Asset", + "properties": { + "createTime": { + "description": "Output only. The time when the asset was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the asset.", + "type": "string" + }, + "discoverySpec": { + "$ref": "GoogleCloudDataplexV1AssetDiscoverySpec", + "description": "Optional. Specification of the discovery feature applied to data referenced by this asset. When this spec is left unset, the asset will use the spec set on the parent zone." + }, + "discoveryStatus": { + "$ref": "GoogleCloudDataplexV1AssetDiscoveryStatus", + "description": "Output only. Status of the discovery feature applied to data referenced by this asset.", + "readOnly": true + }, + "displayName": { + "description": "Optional. User friendly display name.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User defined labels for the asset.", + "type": "object" + }, + "name": { + "description": "Output only. The relative resource name of the asset, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.", + "readOnly": true, + "type": "string" + }, + "resourceSpec": { + "$ref": "GoogleCloudDataplexV1AssetResourceSpec", + "description": "Required. Specification of the resource that is referenced by this asset." + }, + "resourceStatus": { + "$ref": "GoogleCloudDataplexV1AssetResourceStatus", + "description": "Output only. Status of the resource referenced by this asset.", + "readOnly": true + }, + "securityStatus": { + "$ref": "GoogleCloudDataplexV1AssetSecurityStatus", + "description": "Output only. Status of the security policy applied to resource referenced by this asset.", + "readOnly": true + }, + "state": { + "description": "Output only. Current state of the asset.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "DELETING", + "ACTION_REQUIRED" + ], + "enumDescriptions": [ + "State is not specified.", + "Resource is active, i.e., ready to use.", + "Resource is under creation.", + "Resource is under deletion.", + "Resource is active but has unresolved actions." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System generated globally unique ID for the asset. This ID will be different if the asset is deleted and re-created with the same name.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the asset was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AssetDiscoverySpec": { + "description": "Settings to manage the metadata discovery and publishing for an asset.", + "id": "GoogleCloudDataplexV1AssetDiscoverySpec", + "properties": { + "csvOptions": { + "$ref": "GoogleCloudDataplexV1AssetDiscoverySpecCsvOptions", + "description": "Optional. Configuration for CSV data." + }, + "enabled": { + "description": "Optional. Whether discovery is enabled.", + "type": "boolean" + }, + "excludePatterns": { + "description": "Optional. The list of patterns to apply for selecting data to exclude during discovery. For Cloud Storage bucket assets, these are interpreted as glob patterns used to match object names. For BigQuery dataset assets, these are interpreted as patterns to match table names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "includePatterns": { + "description": "Optional. The list of patterns to apply for selecting data to include during discovery if only a subset of the data should considered. For Cloud Storage bucket assets, these are interpreted as glob patterns used to match object names. For BigQuery dataset assets, these are interpreted as patterns to match table names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "jsonOptions": { + "$ref": "GoogleCloudDataplexV1AssetDiscoverySpecJsonOptions", + "description": "Optional. Configuration for Json data." + }, + "schedule": { + "description": "Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running discovery periodically. Successive discovery runs must be scheduled at least 60 minutes apart. The default value is to run discovery every 60 minutes. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: \"CRON_TZ=${IANA_TIME_ZONE}\" or TZ=${IANA_TIME_ZONE}\". The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone database. For example, \"CRON_TZ=America/New_York 1 * * * *\", or \"TZ=America/New_York 1 * * * *\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AssetDiscoverySpecCsvOptions": { + "description": "Describe CSV and similar semi-structured data formats.", + "id": "GoogleCloudDataplexV1AssetDiscoverySpecCsvOptions", + "properties": { + "delimiter": { + "description": "Optional. The delimiter being used to separate values. This defaults to ','.", + "type": "string" + }, + "disableTypeInference": { + "description": "Optional. Whether to disable the inference of data type for CSV data. If true, all columns will be registered as strings.", + "type": "boolean" + }, + "encoding": { + "description": "Optional. The character encoding of the data. The default is UTF-8.", + "type": "string" + }, + "headerRows": { + "description": "Optional. The number of rows to interpret as header rows that should be skipped when reading data rows.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AssetDiscoverySpecJsonOptions": { + "description": "Describe JSON data format.", + "id": "GoogleCloudDataplexV1AssetDiscoverySpecJsonOptions", + "properties": { + "disableTypeInference": { + "description": "Optional. Whether to disable the inference of data type for Json data. If true, all columns will be registered as their primitive types (strings, number or boolean).", + "type": "boolean" + }, + "encoding": { + "description": "Optional. The character encoding of the data. The default is UTF-8.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AssetDiscoveryStatus": { + "description": "Status of discovery for an asset.", + "id": "GoogleCloudDataplexV1AssetDiscoveryStatus", + "properties": { + "lastRunDuration": { + "description": "The duration of the last discovery run.", + "format": "google-duration", + "type": "string" + }, + "lastRunTime": { + "description": "The start time of the last discovery run.", + "format": "google-datetime", + "type": "string" + }, + "message": { + "description": "Additional information about the current state.", + "type": "string" + }, + "state": { + "description": "The current status of the discovery feature.", + "enum": [ + "STATE_UNSPECIFIED", + "SCHEDULED", + "IN_PROGRESS", + "PAUSED", + "DISABLED" + ], + "enumDescriptions": [ + "State is unspecified.", + "Discovery for the asset is scheduled.", + "Discovery for the asset is running.", + "Discovery for the asset is currently paused (e.g. due to a lack of available resources). It will be automatically resumed.", + "Discovery for the asset is disabled." + ], + "type": "string" + }, + "stats": { + "$ref": "GoogleCloudDataplexV1AssetDiscoveryStatusStats", + "description": "Data Stats of the asset reported by discovery." + }, + "updateTime": { + "description": "Last update time of the status.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AssetDiscoveryStatusStats": { + "description": "The aggregated data statistics for the asset reported by discovery.", + "id": "GoogleCloudDataplexV1AssetDiscoveryStatusStats", + "properties": { + "dataItems": { + "description": "The count of data items within the referenced resource.", + "format": "int64", + "type": "string" + }, + "dataSize": { + "description": "The number of stored data bytes within the referenced resource.", + "format": "int64", + "type": "string" + }, + "filesets": { + "description": "The count of fileset entities within the referenced resource.", + "format": "int64", + "type": "string" + }, + "tables": { + "description": "The count of table entities within the referenced resource.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AssetResourceSpec": { + "description": "Identifies the cloud resource that is referenced by this asset.", + "id": "GoogleCloudDataplexV1AssetResourceSpec", + "properties": { + "name": { + "description": "Immutable. Relative name of the cloud resource that contains the data that is being managed within a lake. For example: projects/{project_number}/buckets/{bucket_id} projects/{project_number}/datasets/{dataset_id}", + "type": "string" + }, + "type": { + "description": "Required. Immutable. Type of resource.", + "enum": [ + "TYPE_UNSPECIFIED", + "STORAGE_BUCKET", + "BIGQUERY_DATASET" + ], + "enumDescriptions": [ + "Type not specified.", + "Cloud Storage bucket.", + "BigQuery dataset." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AssetResourceStatus": { + "description": "Status of the resource referenced by an asset.", + "id": "GoogleCloudDataplexV1AssetResourceStatus", + "properties": { + "message": { + "description": "Additional information about the current state.", + "type": "string" + }, + "state": { + "description": "The current state of the managed resource.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "ERROR" + ], + "enumDescriptions": [ + "State unspecified.", + "Resource does not have any errors.", + "Resource has errors." + ], + "type": "string" + }, + "updateTime": { + "description": "Last update time of the status.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AssetSecurityStatus": { + "description": "Security policy status of the asset. Data security policy, i.e., readers, writers \u0026 owners, should be specified in the lake/zone/asset IAM policy.", + "id": "GoogleCloudDataplexV1AssetSecurityStatus", + "properties": { + "message": { + "description": "Additional information about the current state.", + "type": "string" + }, + "state": { + "description": "The current state of the security policy applied to the attached resource.", + "enum": [ + "STATE_UNSPECIFIED", + "READY", + "APPLYING", + "ERROR" + ], + "enumDescriptions": [ + "State unspecified.", + "Security policy has been successfully applied to the attached resource.", + "Security policy is in the process of being applied to the attached resource.", + "Security policy could not be applied to the attached resource due to errors." + ], + "type": "string" + }, + "updateTime": { + "description": "Last update time of the status.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1AssetStatus": { + "description": "Aggregated status of the underlying assets of a lake or zone.", + "id": "GoogleCloudDataplexV1AssetStatus", + "properties": { + "activeAssets": { + "description": "Number of active assets.", + "format": "int32", + "type": "integer" + }, + "securityPolicyApplyingAssets": { + "description": "Number of assets that are in process of updating the security policy on attached resources.", + "format": "int32", + "type": "integer" + }, + "updateTime": { + "description": "Last update time of the status.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1CancelJobRequest": { + "description": "Cancel task jobs.", + "id": "GoogleCloudDataplexV1CancelJobRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudDataplexV1Content": { + "description": "Content represents a user-visible notebook or a sql script", + "id": "GoogleCloudDataplexV1Content", + "properties": { + "createTime": { + "description": "Output only. Content creation time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataText": { + "description": "Required. Content data in string format.", + "type": "string" + }, + "description": { + "description": "Optional. Description of the content.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User defined labels for the content.", + "type": "object" + }, + "name": { + "description": "Output only. The relative resource name of the content, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + "readOnly": true, + "type": "string" + }, + "notebook": { + "$ref": "GoogleCloudDataplexV1ContentNotebook", + "description": "Notebook related configurations." + }, + "path": { + "description": "Required. The path for the Content file, represented as directory structure. Unique within a lake. Limited to alphanumerics, hyphens, underscores, dots and slashes.", + "type": "string" + }, + "sqlScript": { + "$ref": "GoogleCloudDataplexV1ContentSqlScript", + "description": "Sql Script related configurations." + }, + "uid": { + "description": "Output only. System generated globally unique ID for the content. This ID will be different if the content is deleted and re-created with the same name.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the content was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ContentNotebook": { + "description": "Configuration for Notebook content.", + "id": "GoogleCloudDataplexV1ContentNotebook", + "properties": { + "kernelType": { + "description": "Required. Kernel Type of the notebook.", + "enum": [ + "KERNEL_TYPE_UNSPECIFIED", + "PYTHON3" + ], + "enumDescriptions": [ + "Kernel Type unspecified.", + "Python 3 Kernel." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ContentSqlScript": { + "description": "Configuration for the Sql Script content.", + "id": "GoogleCloudDataplexV1ContentSqlScript", + "properties": { + "engine": { + "description": "Required. Query Engine to be used for the Sql Query.", + "enum": [ + "QUERY_ENGINE_UNSPECIFIED", + "SPARK" + ], + "enumDescriptions": [ + "Value was unspecified.", + "Spark SQL Query." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1DiscoveryEvent": { + "description": "The payload associated with Discovery data processing.", + "id": "GoogleCloudDataplexV1DiscoveryEvent", + "properties": { + "action": { + "$ref": "GoogleCloudDataplexV1DiscoveryEventActionDetails", + "description": "Details about the action associated with the event." + }, + "assetId": { + "description": "The id of the associated asset.", + "type": "string" + }, + "config": { + "$ref": "GoogleCloudDataplexV1DiscoveryEventConfigDetails", + "description": "Details about discovery configuration in effect." + }, + "dataLocation": { + "description": "The data location associated with the event.", + "type": "string" + }, + "entity": { + "$ref": "GoogleCloudDataplexV1DiscoveryEventEntityDetails", + "description": "Details about the entity associated with the event." + }, + "lakeId": { + "description": "The id of the associated lake.", + "type": "string" + }, + "message": { + "description": "The log message.", + "type": "string" + }, + "partition": { + "$ref": "GoogleCloudDataplexV1DiscoveryEventPartitionDetails", + "description": "Details about the partition associated with the event." + }, + "type": { + "description": "The type of the event being logged.", + "enum": [ + "EVENT_TYPE_UNSPECIFIED", + "CONFIG", + "ENTITY_CREATED", + "ENTITY_UPDATED", + "ENTITY_DELETED", + "PARTITION_CREATED", + "PARTITION_UPDATED", + "PARTITION_DELETED" + ], + "enumDescriptions": [ + "An unspecified event type.", + "An event representing discovery configuration in effect.", + "An event representing a metadata entity being created.", + "An event representing a metadata entity being updated.", + "An event representing a metadata entity being deleted.", + "An event representing a partition being created.", + "An event representing a partition being updated.", + "An event representing a partition being deleted." + ], + "type": "string" + }, + "zoneId": { + "description": "The id of the associated zone.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1DiscoveryEventActionDetails": { + "description": "Details about the action.", + "id": "GoogleCloudDataplexV1DiscoveryEventActionDetails", + "properties": { + "type": { + "description": "The type of action. Eg. IncompatibleDataSchema, InvalidDataFormat", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1DiscoveryEventConfigDetails": { + "description": "Details about configuration events.", + "id": "GoogleCloudDataplexV1DiscoveryEventConfigDetails", + "properties": { + "parameters": { + "additionalProperties": { + "type": "string" + }, + "description": "A list of discovery configuration parameters in effect. The keys are the field paths within DiscoverySpec. Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, etc.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1DiscoveryEventEntityDetails": { + "description": "Details about the entity.", + "id": "GoogleCloudDataplexV1DiscoveryEventEntityDetails", + "properties": { + "entity": { + "description": "The name of the entity resource. The name is the fully-qualified resource name.", + "type": "string" + }, + "type": { + "description": "The type of the entity resource.", + "enum": [ + "ENTITY_TYPE_UNSPECIFIED", + "TABLE", + "FILESET" + ], + "enumDescriptions": [ + "An unspecified event type.", + "Entities representing structured data.", + "Entities representing unstructured data." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1DiscoveryEventPartitionDetails": { + "description": "Details about the partition.", + "id": "GoogleCloudDataplexV1DiscoveryEventPartitionDetails", + "properties": { + "entity": { + "description": "The name to the containing entity resource. The name is the fully-qualified resource name.", + "type": "string" + }, + "partition": { + "description": "The name to the partition resource. The name is the fully-qualified resource name.", + "type": "string" + }, + "type": { + "description": "The type of the containing entity resource.", + "enum": [ + "ENTITY_TYPE_UNSPECIFIED", + "TABLE", + "FILESET" + ], + "enumDescriptions": [ + "An unspecified event type.", + "Entities representing structured data.", + "Entities representing unstructured data." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1Entity": { + "description": "Represents tables and fileset metadata contained within a zone.", + "id": "GoogleCloudDataplexV1Entity", + "properties": { + "asset": { + "description": "Required. Immutable. The ID of the asset associated with the storage location containing the entity data. The entity must be with in the same zone with the asset.", + "type": "string" + }, + "catalogEntry": { + "description": "Output only. The name of the associated Data Catalog entry.", + "readOnly": true, + "type": "string" + }, + "compatibility": { + "$ref": "GoogleCloudDataplexV1EntityCompatibilityStatus", + "description": "Output only. Metadata stores that the entity is compatible with.", + "readOnly": true + }, + "createTime": { + "description": "Output only. The time when the entity was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataPath": { + "description": "Required. Immutable. The storage path of the entity data. For Cloud Storage data, this is the fully-qualified path to the entity, such as gs://bucket/path/to/data. For BigQuery data, this is the name of the table resource, such as projects/project_id/datasets/dataset_id/tables/table_id.", + "type": "string" + }, + "dataPathPattern": { + "description": "Optional. The set of items within the data path constituting the data in the entity, represented as a glob path. Example: gs://bucket/path/to/data/**/*.csv.", + "type": "string" + }, + "description": { + "description": "Optional. User friendly longer description text. Must be shorter than or equal to 1024 characters.", + "type": "string" + }, + "displayName": { + "description": "Optional. Display name must be shorter than or equal to 63 characters.", + "type": "string" + }, + "etag": { + "description": "Optional. The etag for this entity. Required for update and delete requests. Must match the server's etag.", + "type": "string" + }, + "format": { + "$ref": "GoogleCloudDataplexV1StorageFormat", + "description": "Required. Identifies the storage format of the entity data. It does not apply to entities with data stored in BigQuery." + }, + "id": { + "description": "Required. A user-provided entity ID. It is mutable, and will be used as the published table name. Specifying a new ID in an update entity request will override the existing value. The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores. Must begin with a letter.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the entity, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}.", + "readOnly": true, + "type": "string" + }, + "schema": { + "$ref": "GoogleCloudDataplexV1Schema", + "description": "Required. The description of the data structure and layout. The schema is not included in list responses. It is only included in SCHEMA and FULL entity views of a GetEntity response." + }, + "system": { + "description": "Required. Immutable. Identifies the storage system of the entity data.", + "enum": [ + "STORAGE_SYSTEM_UNSPECIFIED", + "CLOUD_STORAGE", + "BIGQUERY" + ], + "enumDescriptions": [ + "Storage system unspecified.", + "The entity data is contained within a Cloud Storage bucket.", + "The entity data is contained within a BigQuery dataset." + ], + "type": "string" + }, + "type": { + "description": "Required. Immutable. The type of entity.", + "enum": [ + "TYPE_UNSPECIFIED", + "TABLE", + "FILESET" + ], + "enumDescriptions": [ + "Type unspecified.", + "Structured and semi-structured data.", + "Unstructured data." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the entity was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EntityCompatibilityStatus": { + "description": "Provides compatibility information for various metadata stores.", + "id": "GoogleCloudDataplexV1EntityCompatibilityStatus", + "properties": { + "bigquery": { + "$ref": "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility", + "description": "Output only. Whether this entity is compatible with BigQuery.", + "readOnly": true + }, + "hiveMetastore": { + "$ref": "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility", + "description": "Output only. Whether this entity is compatible with Hive Metastore.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility": { + "description": "Provides compatibility information for a specific metadata store.", + "id": "GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility", + "properties": { + "compatible": { + "description": "Output only. Whether the entity is compatible and can be represented in the metadata store.", + "readOnly": true, + "type": "boolean" + }, + "reason": { + "description": "Output only. Provides additional detail if the entity is incompatible with the metadata store.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1Environment": { + "description": "Environment represents a user-visible compute infrastructure for analytics within a lake.", + "id": "GoogleCloudDataplexV1Environment", + "properties": { + "createTime": { + "description": "Output only. Environment creation time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the environment.", + "type": "string" + }, + "displayName": { + "description": "Optional. User friendly display name.", + "type": "string" + }, + "endpoints": { + "$ref": "GoogleCloudDataplexV1EnvironmentEndpoints", + "description": "Output only. URI Endpoints to access sessions associated with the Environment.", + "readOnly": true + }, + "infrastructureSpec": { + "$ref": "GoogleCloudDataplexV1EnvironmentInfrastructureSpec", + "description": "Required. Infrastructure specification for the Environment." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User defined labels for the environment.", + "type": "object" + }, + "name": { + "description": "Output only. The relative resource name of the environment, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}", + "readOnly": true, + "type": "string" + }, + "sessionSpec": { + "$ref": "GoogleCloudDataplexV1EnvironmentSessionSpec", + "description": "Optional. Configuration for sessions created for this environment." + }, + "sessionStatus": { + "$ref": "GoogleCloudDataplexV1EnvironmentSessionStatus", + "description": "Output only. Status of sessions created for this environment.", + "readOnly": true + }, + "state": { + "description": "Output only. Current state of the environment.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "DELETING", + "ACTION_REQUIRED" + ], + "enumDescriptions": [ + "State is not specified.", + "Resource is active, i.e., ready to use.", + "Resource is under creation.", + "Resource is under deletion.", + "Resource is active but has unresolved actions." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System generated globally unique ID for the environment. This ID will be different if the environment is deleted and re-created with the same name.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the environment was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EnvironmentEndpoints": { + "id": "GoogleCloudDataplexV1EnvironmentEndpoints", + "properties": { + "notebooks": { + "description": "Output only. URI to serve notebook APIs", + "readOnly": true, + "type": "string" + }, + "sql": { + "description": "Output only. URI to serve SQL APIs", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EnvironmentInfrastructureSpec": { + "description": "Configuration for the underlying infrastructure used to run workloads.", + "id": "GoogleCloudDataplexV1EnvironmentInfrastructureSpec", + "properties": { + "compute": { + "$ref": "GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources", + "description": "Optional. Compute resources needed for analyze interactive workloads." + }, + "osImage": { + "$ref": "GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime", + "description": "Required. Software Runtime Configuration for analyze interactive workloads." + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources": { + "description": "Compute resources associated with the analyze interactive workloads.", + "id": "GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources", + "properties": { + "diskSizeGb": { + "description": "Optional. Size in GB of the disk. Default is 100 GB.", + "format": "int32", + "type": "integer" + }, + "maxNodeCount": { + "description": "Optional. Max configurable nodes. If max_node_count \u003e node_count, then auto-scaling is enabled.", + "format": "int32", + "type": "integer" + }, + "nodeCount": { + "description": "Optional. Total number of nodes in the sessions created for this environment.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime": { + "description": "Software Runtime Configuration to run Analyze.", + "id": "GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime", + "properties": { + "imageVersion": { + "description": "Required. Dataplex Image version.", + "type": "string" + }, + "javaLibraries": { + "description": "Optional. List of Java jars to be included in the runtime environment. Valid input includes Cloud Storage URIs to Jar binaries. For example, gs://bucket-name/my/path/to/file.jar", + "items": { + "type": "string" + }, + "type": "array" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Spark properties to provide configuration for use in sessions created for this environment. The properties to set on daemon config files. Property keys are specified in prefix:property format. The prefix must be \"spark\".", + "type": "object" + }, + "pythonPackages": { + "description": "Optional. A list of python packages to be installed. Valid formats include Cloud Storage URI to a PIP installable library. For example, gs://bucket-name/my/path/to/lib.tar.gz", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EnvironmentSessionSpec": { + "id": "GoogleCloudDataplexV1EnvironmentSessionSpec", + "properties": { + "enableFastStartup": { + "description": "Optional. If True, this causes sessions to be pre-created and available for faster startup to enable interactive exploration use-cases. This defaults to False to avoid additional billed charges. These can only be set to True for the environment with name set to \"default\", and with default configuration.", + "type": "boolean" + }, + "maxIdleDuration": { + "description": "Optional. The idle time configuration of the session. The session will be auto-terminated at the end of this period.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1EnvironmentSessionStatus": { + "id": "GoogleCloudDataplexV1EnvironmentSessionStatus", + "properties": { + "active": { + "description": "Output only. Queries over sessions to mark whether the environment is currently active or not", + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1Job": { + "description": "A job represents an instance of a task.", + "id": "GoogleCloudDataplexV1Job", + "properties": { + "endTime": { + "description": "Output only. The time when the job ended.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "message": { + "description": "Output only. Additional information about the current state.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The relative resource name of the job, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ tasks/{task_id}/jobs/{job_id}.", + "readOnly": true, + "type": "string" + }, + "retryCount": { + "description": "Output only. . The number of times the job has been retried (excluding the initial attempt).", + "format": "uint32", + "readOnly": true, + "type": "integer" + }, + "service": { + "description": "Output only. The underlying service running a job.", + "enum": [ + "SERVICE_UNSPECIFIED", + "DATAPROC" + ], + "enumDescriptions": [ + "Service used to run the job is unspecified.", + "Dataproc service is used to run this job." + ], + "readOnly": true, + "type": "string" + }, + "serviceJob": { + "description": "Output only. The full resource name for the job run under a particular service.", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The time when the job was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Execution state for the job.", + "enum": [ + "STATE_UNSPECIFIED", + "RUNNING", + "CANCELLING", + "CANCELLED", + "SUCCEEDED", + "FAILED", + "ABORTED" + ], + "enumDescriptions": [ + "The job state is unknown.", + "The job is running.", + "The job is cancelling.", + "The job cancellation was successful.", + "The job completed successfully.", + "The job is no longer running due to an error.", + "The job was cancelled outside of Dataplex." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System generated globally unique ID for the job.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1JobEvent": { + "description": "The payload associated with Job logs that contains events describing jobs that have run within a Lake.", + "id": "GoogleCloudDataplexV1JobEvent", + "properties": { + "endTime": { + "description": "The time when the job ended running.", + "format": "google-datetime", + "type": "string" + }, + "jobId": { + "description": "The unique id identifying the job.", + "type": "string" + }, + "message": { + "description": "The log message.", + "type": "string" + }, + "retries": { + "description": "The number of retries.", + "format": "int32", + "type": "integer" + }, + "service": { + "description": "The service used to execute the job.", + "enum": [ + "SERVICE_UNSPECIFIED", + "DATAPROC" + ], + "enumDescriptions": [ + "Unspecified service.", + "Cloud Dataproc." + ], + "type": "string" + }, + "serviceJob": { + "description": "The reference to the job within the service.", + "type": "string" + }, + "startTime": { + "description": "The time when the job started running.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "The job state on completion.", + "enum": [ + "STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED", + "CANCELLED", + "ABORTED" + ], + "enumDescriptions": [ + "Unspecified job state.", + "Job successfully completed.", + "Job was unsuccessful.", + "Job was cancelled by the user.", + "Job was cancelled or aborted via the service executing the job." + ], + "type": "string" + }, + "type": { + "description": "The type of the job.", + "enum": [ + "TYPE_UNSPECIFIED", + "SPARK", + "NOTEBOOK" + ], + "enumDescriptions": [ + "Unspecified job type.", + "Spark jobs.", + "Notebook jobs." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1Lake": { + "description": "A lake is a centralized repository for managing enterprise data across the organization distributed across many cloud projects, and stored in a variety of storage services such as Google Cloud Storage and BigQuery. The resources attached to a lake are referred to as managed resources. Data within these managed resources can be structured or unstructured. A lake provides data admins with tools to organize, secure and manage their data at scale, and provides data scientists and data engineers an integrated experience to easily search, discover, analyze and transform data and associated metadata.", + "id": "GoogleCloudDataplexV1Lake", + "properties": { + "assetStatus": { + "$ref": "GoogleCloudDataplexV1AssetStatus", + "description": "Output only. Aggregated status of the underlying assets of the lake.", + "readOnly": true + }, + "createTime": { + "description": "Output only. The time when the lake was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the lake.", + "type": "string" + }, + "displayName": { + "description": "Optional. User friendly display name.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User-defined labels for the lake.", + "type": "object" + }, + "metastore": { + "$ref": "GoogleCloudDataplexV1LakeMetastore", + "description": "Optional. Settings to manage lake and Dataproc Metastore service instance association." + }, + "metastoreStatus": { + "$ref": "GoogleCloudDataplexV1LakeMetastoreStatus", + "description": "Output only. Metastore status of the lake.", + "readOnly": true + }, + "name": { + "description": "Output only. The relative resource name of the lake, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", + "readOnly": true, + "type": "string" + }, + "serviceAccount": { + "description": "Output only. Service account associated with this lake. This service account must be authorized to access or operate on resources managed by the lake.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Current state of the lake.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "DELETING", + "ACTION_REQUIRED" + ], + "enumDescriptions": [ + "State is not specified.", + "Resource is active, i.e., ready to use.", + "Resource is under creation.", + "Resource is under deletion.", + "Resource is active but has unresolved actions." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System generated globally unique ID for the lake. This ID will be different if the lake is deleted and re-created with the same name.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the lake was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1LakeMetastore": { + "description": "Settings to manage association of Dataproc Metastore with a lake.", + "id": "GoogleCloudDataplexV1LakeMetastore", + "properties": { + "service": { + "description": "Optional. A relative reference to the Dataproc Metastore (https://cloud.google.com/dataproc-metastore/docs) service associated with the lake: projects/{project_id}/locations/{location_id}/services/{service_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1LakeMetastoreStatus": { + "description": "Status of Lake and Dataproc Metastore service instance association.", + "id": "GoogleCloudDataplexV1LakeMetastoreStatus", + "properties": { + "endpoint": { + "description": "The URI of the endpoint used to access the Metastore service.", + "type": "string" + }, + "message": { + "description": "Additional information about the current status.", + "type": "string" + }, + "state": { + "description": "Current state of association.", + "enum": [ + "STATE_UNSPECIFIED", + "NONE", + "READY", + "UPDATING", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified.", + "A Metastore service instance is not associated with the lake.", + "A Metastore service instance is attached to the lake.", + "Attach/detach is in progress.", + "Attach/detach could not be done due to errors." + ], + "type": "string" + }, + "updateTime": { + "description": "Last update time of the metastore status of the lake.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListActionsResponse": { + "description": "List actions response.", + "id": "GoogleCloudDataplexV1ListActionsResponse", + "properties": { + "actions": { + "description": "Actions under the given parent lake/zone/asset.", + "items": { + "$ref": "GoogleCloudDataplexV1Action" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListAssetsResponse": { + "description": "List assets response.", + "id": "GoogleCloudDataplexV1ListAssetsResponse", + "properties": { + "assets": { + "description": "Asset under the given parent zone.", + "items": { + "$ref": "GoogleCloudDataplexV1Asset" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListContentResponse": { + "description": "List content response.", + "id": "GoogleCloudDataplexV1ListContentResponse", + "properties": { + "content": { + "description": "Content under the given parent lake.", + "items": { + "$ref": "GoogleCloudDataplexV1Content" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListEntitiesResponse": { + "description": "List metadata entities response.", + "id": "GoogleCloudDataplexV1ListEntitiesResponse", + "properties": { + "entities": { + "description": "Entities in the specified parent zone.", + "items": { + "$ref": "GoogleCloudDataplexV1Entity" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no remaining results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListEnvironmentsResponse": { + "description": "List environments response.", + "id": "GoogleCloudDataplexV1ListEnvironmentsResponse", + "properties": { + "environments": { + "description": "Environments under the given parent lake.", + "items": { + "$ref": "GoogleCloudDataplexV1Environment" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListJobsResponse": { + "description": "List jobs response.", + "id": "GoogleCloudDataplexV1ListJobsResponse", + "properties": { + "jobs": { + "description": "Jobs under a given task.", + "items": { + "$ref": "GoogleCloudDataplexV1Job" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListLakesResponse": { + "description": "List lakes response.", + "id": "GoogleCloudDataplexV1ListLakesResponse", + "properties": { + "lakes": { + "description": "Lakes under the given parent location.", + "items": { + "$ref": "GoogleCloudDataplexV1Lake" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachableLocations": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListPartitionsResponse": { + "description": "List metadata partitions response.", + "id": "GoogleCloudDataplexV1ListPartitionsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no remaining results in the list.", + "type": "string" + }, + "partitions": { + "description": "Partitions under the specified parent entity.", + "items": { + "$ref": "GoogleCloudDataplexV1Partition" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListSessionsResponse": { + "description": "List sessions response.", + "id": "GoogleCloudDataplexV1ListSessionsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "sessions": { + "description": "Sessions under a given environment.", + "items": { + "$ref": "GoogleCloudDataplexV1Session" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListTasksResponse": { + "description": "List tasks response.", + "id": "GoogleCloudDataplexV1ListTasksResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "tasks": { + "description": "Tasks under the given parent lake.", + "items": { + "$ref": "GoogleCloudDataplexV1Task" + }, + "type": "array" + }, + "unreachableLocations": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ListZonesResponse": { + "description": "List zones response.", + "id": "GoogleCloudDataplexV1ListZonesResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "zones": { + "description": "Zones under the given parent lake.", + "items": { + "$ref": "GoogleCloudDataplexV1Zone" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1OperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudDataplexV1OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1Partition": { + "description": "Represents partition metadata contained within entity instances.", + "id": "GoogleCloudDataplexV1Partition", + "properties": { + "etag": { + "description": "Optional. The etag for this partition.", + "type": "string" + }, + "location": { + "description": "Required. Immutable. The location of the entity data within the partition, for example, gs://bucket/path/to/entity/key1=value1/key2=value2. Or projects//datasets//tables/", + "type": "string" + }, + "name": { + "description": "Output only. The values must be HTML URL encoded two times before constructing the path. For example, if you have a value of \"US:CA\", encoded it two times and you get \"US%253ACA\". Then if you have the 2nd value is \"CA#Sunnyvale\", encoded two times and you get \"CA%2523Sunnyvale\". The partition values path is \"US%253ACA/CA%2523Sunnyvale\". The final URL will be \"https://.../partitions/US%253ACA/CA%2523Sunnyvale\". The name field in the responses will always have the encoded format.", + "readOnly": true, + "type": "string" + }, + "values": { + "description": "Required. Immutable. The set of values representing the partition, which correspond to the partition schema defined in the parent entity.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1Schema": { + "description": "Schema information describing the structure and layout of the data.", + "id": "GoogleCloudDataplexV1Schema", + "properties": { + "fields": { + "description": "Optional. The sequence of fields describing data in table entities.", + "items": { + "$ref": "GoogleCloudDataplexV1SchemaSchemaField" + }, + "type": "array" + }, + "partitionFields": { + "description": "Optional. The sequence of fields describing the partition structure in entities. If this field is empty, there are no partitions within the data.", + "items": { + "$ref": "GoogleCloudDataplexV1SchemaPartitionField" + }, + "type": "array" + }, + "partitionStyle": { + "description": "Optional. The structure of paths containing partition data within the entity.", + "enum": [ + "PARTITION_STYLE_UNSPECIFIED", + "HIVE_COMPATIBLE" + ], + "enumDescriptions": [ + "PartitionStyle unspecified", + "Partitions are hive-compatible. Examples: gs://bucket/path/to/table/dt=2019-10-31/lang=en, gs://bucket/path/to/table/dt=2019-10-31/lang=en/late." + ], + "type": "string" + }, + "userManaged": { + "description": "Required. Whether the schema is user-managed or managed by the service. - Set user_manage to false if you would like Dataplex to help you manage the schema. You will get the full service provided by Dataplex discovery, including new data discovery, schema inference and schema evolution. You can still provide input the schema of the entities, for example renaming a schema field, changing CSV or Json options if you think the discovered values are not as accurate. Dataplex will consider your input as the initial schema (as if they were produced by the previous discovery run), and will evolve schema or flag actions based on that. - Set user_manage to true if you would like to fully manage the entity schema by yourself. This is useful when you would like to manually specify the schema for a table. In this case, the schema defined by the user is guaranteed to be kept unchanged and would not be overwritten. But this also means Dataplex will not provide schema evolution management for you. Dataplex will still be able to manage partition registration (i.e., keeping the list of partitions up to date) when Dataplex discovery is turned on and user_managed is set to true.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1SchemaPartitionField": { + "description": "Represents a key field within the entity's partition structure. You could have up to 20 partition fields, but only the first 10 partitions have the filtering ability due to performance consideration.", + "id": "GoogleCloudDataplexV1SchemaPartitionField", + "properties": { + "name": { + "description": "Required. Partition name is editable if only the partition style is not HIVE compatible. The maximum length allowed is 767 characters.", + "type": "string" + }, + "type": { + "description": "Required. Immutable. The type of field.", + "enum": [ + "TYPE_UNSPECIFIED", + "BOOLEAN", + "BYTE", + "INT16", + "INT32", + "INT64", + "FLOAT", + "DOUBLE", + "DECIMAL", + "STRING", + "BINARY", + "TIMESTAMP", + "DATE", + "TIME", + "RECORD", + "NULL" + ], + "enumDescriptions": [ + "SchemaType unspecified.", + "Boolean field.", + "Single byte numeric field.", + "16-bit numeric field.", + "32-bit numeric field.", + "64-bit numeric field.", + "Floating point numeric field.", + "Double precision numeric field.", + "Real value numeric field.", + "Sequence of characters field.", + "Sequence of bytes field.", + "Date and time field.", + "Date field.", + "Time field.", + "Structured field. Nested fields that define the structure of the map. If all nested fields are nullable, this field represents a union.", + "Null field that does not have values." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1SchemaSchemaField": { + "description": "Represents a column field within a table schema.", + "id": "GoogleCloudDataplexV1SchemaSchemaField", + "properties": { + "description": { + "description": "Optional. User friendly field description. Must be less than or equal to 1024 characters.", + "type": "string" + }, + "fields": { + "description": "Optional. Any nested field for complex types.", + "items": { + "$ref": "GoogleCloudDataplexV1SchemaSchemaField" + }, + "type": "array" + }, + "mode": { + "description": "Required. Additional field semantics.", + "enum": [ + "MODE_UNSPECIFIED", + "REQUIRED", + "NULLABLE", + "REPEATED" + ], + "enumDescriptions": [ + "Mode unspecified.", + "The field has required semantics.", + "The field has optional semantics, and may be null.", + "The field has repeated (0 or more) semantics, and is a list of values." + ], + "type": "string" + }, + "name": { + "description": "Required. The name of the field. The maximum length is 767 characters. The name must begins with a letter and not contains : and ..", + "type": "string" + }, + "type": { + "description": "Required. The type of field.", + "enum": [ + "TYPE_UNSPECIFIED", + "BOOLEAN", + "BYTE", + "INT16", + "INT32", + "INT64", + "FLOAT", + "DOUBLE", + "DECIMAL", + "STRING", + "BINARY", + "TIMESTAMP", + "DATE", + "TIME", + "RECORD", + "NULL" + ], + "enumDescriptions": [ + "SchemaType unspecified.", + "Boolean field.", + "Single byte numeric field.", + "16-bit numeric field.", + "32-bit numeric field.", + "64-bit numeric field.", + "Floating point numeric field.", + "Double precision numeric field.", + "Real value numeric field.", + "Sequence of characters field.", + "Sequence of bytes field.", + "Date and time field.", + "Date field.", + "Time field.", + "Structured field. Nested fields that define the structure of the map. If all nested fields are nullable, this field represents a union.", + "Null field that does not have values." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1Session": { + "description": "Represents an active analyze session running for a user.", + "id": "GoogleCloudDataplexV1Session", + "properties": { + "createTime": { + "description": "Output only. Session start time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The relative resource name of the content, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id}", + "readOnly": true, + "type": "string" + }, + "state": { + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "DELETING", + "ACTION_REQUIRED" + ], + "enumDescriptions": [ + "State is not specified.", + "Resource is active, i.e., ready to use.", + "Resource is under creation.", + "Resource is under deletion.", + "Resource is active but has unresolved actions." + ], + "readOnly": true, + "type": "string" + }, + "userId": { + "description": "Output only. Email of user running the session.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1SessionEvent": { + "description": "These messages contain information about sessions within an environment. The monitored resource is 'Environment'.", + "id": "GoogleCloudDataplexV1SessionEvent", + "properties": { + "message": { + "description": "The log message.", + "type": "string" + }, + "query": { + "$ref": "GoogleCloudDataplexV1SessionEventQueryDetail", + "description": "The execution details of the query." + }, + "sessionId": { + "description": "Unique identifier for the session.", + "type": "string" + }, + "type": { + "description": "The type of the event.", + "enum": [ + "EVENT_TYPE_UNSPECIFIED", + "START", + "STOP", + "QUERY" + ], + "enumDescriptions": [ + "An unspecified event type.", + "Event for start of a session.", + "Event for stop of a session.", + "Query events in the session." + ], + "type": "string" + }, + "userId": { + "description": "The information about the user that created the session.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1SessionEventQueryDetail": { + "description": "Execution details of the query.", + "id": "GoogleCloudDataplexV1SessionEventQueryDetail", + "properties": { + "dataProcessedBytes": { + "description": "The data processed by the query.", + "format": "int64", + "type": "string" + }, + "duration": { + "description": "Time taken for execution of the query.", + "format": "google-duration", + "type": "string" + }, + "engine": { + "description": "Query Execution engine.", + "enum": [ + "ENGINE_UNSPECIFIED", + "SPARK_SQL", + "BIGQUERY" + ], + "enumDescriptions": [ + "An unspecified Engine type.", + "Spark-sql engine is specified in Query.", + "BigQuery engine is specified in Query." + ], + "type": "string" + }, + "queryId": { + "description": "The unique Query id identifying the query.", + "type": "string" + }, + "queryText": { + "description": "The query text executed.", + "type": "string" + }, + "resultSizeBytes": { + "description": "The size of results the query produced.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1StorageFormat": { + "description": "Describes the format of the data within its storage location.", + "id": "GoogleCloudDataplexV1StorageFormat", + "properties": { + "compressionFormat": { + "description": "Optional. The compression type associated with the stored data. If unspecified, the data is uncompressed.", + "enum": [ + "COMPRESSION_FORMAT_UNSPECIFIED", + "GZIP", + "BZIP2" + ], + "enumDescriptions": [ + "CompressionFormat unspecified. Implies uncompressed data.", + "GZip compressed set of files.", + "BZip2 compressed set of files." + ], + "type": "string" + }, + "csv": { + "$ref": "GoogleCloudDataplexV1StorageFormatCsvOptions", + "description": "Optional. Additional information about CSV formatted data." + }, + "format": { + "description": "Output only. The data format associated with the stored data, which represents content type values. The value is inferred from mime type.", + "enum": [ + "FORMAT_UNSPECIFIED", + "PARQUET", + "AVRO", + "ORC", + "CSV", + "JSON", + "IMAGE", + "AUDIO", + "VIDEO", + "TEXT", + "TFRECORD", + "OTHER", + "UNKNOWN" + ], + "enumDescriptions": [ + "Format unspecified.", + "Parquet-formatted structured data.", + "Avro-formatted structured data.", + "Orc-formatted structured data.", + "Csv-formatted semi-structured data.", + "Json-formatted semi-structured data.", + "Image data formats (such as jpg and png).", + "Audio data formats (such as mp3, and wav).", + "Video data formats (such as mp4 and mpg).", + "Textual data formats (such as txt and xml).", + "TensorFlow record format.", + "Data that doesn't match a specific format.", + "Data of an unknown format." + ], + "readOnly": true, + "type": "string" + }, + "json": { + "$ref": "GoogleCloudDataplexV1StorageFormatJsonOptions", + "description": "Optional. Additional information about CSV formatted data." + }, + "mimeType": { + "description": "Required. The mime type descriptor for the data. Must match the pattern {type}/{subtype}. Supported values: - application/x-parquet - application/x-avro - application/x-orc - application/x-tfrecord - application/json - application/{subtypes} - text/csv - text/ - image/{image subtype} - video/{video subtype} - audio/{audio subtype}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1StorageFormatCsvOptions": { + "description": "Describes CSV and similar semi-structured data formats.", + "id": "GoogleCloudDataplexV1StorageFormatCsvOptions", + "properties": { + "delimiter": { + "description": "Optional. The delimiter used to separate values. Defaults to ','.", + "type": "string" + }, + "encoding": { + "description": "Optional. The character encoding of the data. Accepts \"US-ASCII\", \"UTF-8\", and \"ISO-8859-1\". Defaults to UTF-8 if unspecified.", + "type": "string" + }, + "headerRows": { + "description": "Optional. The number of rows to interpret as header rows that should be skipped when reading data rows. Defaults to 0.", + "format": "int32", + "type": "integer" + }, + "quote": { + "description": "Optional. The character used to quote column values. Accepts '\"' and '''. Defaults to '\"' if unspecified.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1StorageFormatJsonOptions": { + "description": "Describes JSON data format.", + "id": "GoogleCloudDataplexV1StorageFormatJsonOptions", + "properties": { + "encoding": { + "description": "Optional. The character encoding of the data. Accepts \"US-ASCII\", \"UTF-8\" and \"ISO-8859-1\". Defaults to UTF-8 if not specified.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1Task": { + "description": "A task represents a user-visible job.", + "id": "GoogleCloudDataplexV1Task", + "properties": { + "createTime": { + "description": "Output only. The time when the task was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the task.", + "type": "string" + }, + "displayName": { + "description": "Optional. User friendly display name.", + "type": "string" + }, + "executionSpec": { + "$ref": "GoogleCloudDataplexV1TaskExecutionSpec", + "description": "Required. Spec related to how a task is executed." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User-defined labels for the task.", + "type": "object" + }, + "name": { + "description": "Output only. The relative resource name of the task, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ tasks/{task_id}.", + "readOnly": true, + "type": "string" + }, + "spark": { + "$ref": "GoogleCloudDataplexV1TaskSparkTaskConfig", + "description": "Config related to running custom Spark tasks." + }, + "state": { + "description": "Output only. Current state of the task.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "DELETING", + "ACTION_REQUIRED" + ], + "enumDescriptions": [ + "State is not specified.", + "Resource is active, i.e., ready to use.", + "Resource is under creation.", + "Resource is under deletion.", + "Resource is active but has unresolved actions." + ], + "readOnly": true, + "type": "string" + }, + "triggerSpec": { + "$ref": "GoogleCloudDataplexV1TaskTriggerSpec", + "description": "Required. Spec related to how often and when a task should be triggered." + }, + "uid": { + "description": "Output only. System generated globally unique ID for the task. This ID will be different if the task is deleted and re-created with the same name.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the task was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1TaskExecutionSpec": { + "description": "Execution related settings, like retry and service_account.", + "id": "GoogleCloudDataplexV1TaskExecutionSpec", + "properties": { + "args": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The arguments to pass to the task. The args can use placeholders of the format ${placeholder} as part of key/value string. These will be interpolated before passing the args to the driver. Currently supported placeholders: - ${task_id} - ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.", + "type": "object" + }, + "maxJobExecutionLifetime": { + "description": "Optional. The maximum duration after which the job execution is expired.", + "format": "google-duration", + "type": "string" + }, + "serviceAccount": { + "description": "Required. Service account to use to execute a task. If not provided, the default Compute service account for the project is used.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1TaskInfrastructureSpec": { + "description": "Configuration for the underlying infrastructure used to run workloads.", + "id": "GoogleCloudDataplexV1TaskInfrastructureSpec", + "properties": { + "batch": { + "$ref": "GoogleCloudDataplexV1TaskInfrastructureSpecBatchComputeResources", + "description": "Compute resources needed for a Task when using Dataproc Serverless." + }, + "containerImage": { + "$ref": "GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime", + "description": "Container Image Runtime Configuration." + }, + "vpcNetwork": { + "$ref": "GoogleCloudDataplexV1TaskInfrastructureSpecVpcNetwork", + "description": "Vpc network." + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1TaskInfrastructureSpecBatchComputeResources": { + "description": "Batch compute resources associated with the task.", + "id": "GoogleCloudDataplexV1TaskInfrastructureSpecBatchComputeResources", + "properties": { + "executorsCount": { + "description": "Optional. Total number of job executors.", + "format": "int32", + "type": "integer" + }, + "maxExecutorsCount": { + "description": "Optional. Max configurable executors. If max_executors_count \u003e executors_count, then auto-scaling is enabled.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime": { + "description": "Container Image Runtime Configuration used with Batch execution.", + "id": "GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime", + "properties": { + "javaJars": { + "description": "Optional. A list of Java JARS to add to the classpath. Valid input includes Cloud Storage URIs to Jar binaries. For example, gs://bucket-name/my/path/to/file.jar", + "items": { + "type": "string" + }, + "type": "array" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Override to common configuration of open source components installed on the Dataproc cluster. The properties to set on daemon config files. Property keys are specified in prefix:property format, for example core:hadoop.tmp.dir. For more information, see Cluster properties (https://cloud.google.com/dataproc/docs/concepts/cluster-properties).", + "type": "object" + }, + "pythonPackages": { + "description": "Optional. A list of python packages to be installed. Valid formats include Cloud Storage URI to a PIP installable library. For example, gs://bucket-name/my/path/to/lib.tar.gz", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1TaskInfrastructureSpecVpcNetwork": { + "description": "Cloud VPC Network used to run the infrastructure.", + "id": "GoogleCloudDataplexV1TaskInfrastructureSpecVpcNetwork", + "properties": { + "network": { + "description": "Optional. The Cloud VPC network in which the job is run. By default, the Cloud VPC network named Default within the project is used.", + "type": "string" + }, + "networkTags": { + "description": "Optional. List of network tags to apply to the job.", + "items": { + "type": "string" + }, + "type": "array" + }, + "subNetwork": { + "description": "Optional. The Cloud VPC sub-network in which the job is run.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1TaskSparkTaskConfig": { + "description": "User-specified config for running a Spark task.", + "id": "GoogleCloudDataplexV1TaskSparkTaskConfig", + "properties": { + "archiveUris": { + "description": "Optional. Cloud Storage URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, + "fileUris": { + "description": "Optional. Cloud Storage URIs of files to be placed in the working directory of each executor.", + "items": { + "type": "string" + }, + "type": "array" + }, + "infrastructureSpec": { + "$ref": "GoogleCloudDataplexV1TaskInfrastructureSpec", + "description": "Optional. Infrastructure specification for the execution." + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris. The execution args are passed in as a sequence of named process arguments (--key=value).", + "type": "string" + }, + "mainJarFileUri": { + "description": "The Cloud Storage URI of the jar file that contains the main class. The execution args are passed in as a sequence of named process arguments (--key=value).", + "type": "string" + }, + "pythonScriptFile": { + "description": "The Gcloud Storage URI of the main Python file to use as the driver. Must be a .py file. The execution args are passed in as a sequence of named process arguments (--key=value).", + "type": "string" + }, + "sqlScript": { + "description": "The query text. The execution args are used to declare a set of script variables (set key=\"value\";).", + "type": "string" + }, + "sqlScriptFile": { + "description": "A reference to a query file. This can be the Cloud Storage URI of the query file or it can the path to a SqlScript Content. The execution args are used to declare a set of script variables (set key=\"value\";).", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1TaskTriggerSpec": { + "description": "Task scheduling and trigger settings.", + "id": "GoogleCloudDataplexV1TaskTriggerSpec", + "properties": { + "disabled": { + "description": "Optional. Prevent the task from executing. This does not cancel already running tasks. It is intended to temporarily disable RECURRING tasks.", + "type": "boolean" + }, + "maxRetries": { + "description": "Optional. Number of retry attempts before aborting. Set to zero to never attempt to retry a failed task.", + "format": "int32", + "type": "integer" + }, + "schedule": { + "description": "Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running tasks periodically. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: \"CRON_TZ=${IANA_TIME_ZONE}\" or \"TZ=${IANA_TIME_ZONE}\". The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone database. For example, \"CRON_TZ=America/New_York 1 * * * *\", or \"TZ=America/New_York 1 * * * *\". This field is required for RECURRING tasks.", + "type": "string" + }, + "startTime": { + "description": "Optional. The first run of the task will be after this time. If not specified, the task will run shortly after being submitted if ON_DEMAND and based on the schedule if RECURRING.", + "format": "google-datetime", + "type": "string" + }, + "type": { + "description": "Required. Immutable. Trigger type of the user-specified Task.", + "enum": [ + "TYPE_UNSPECIFIED", + "ON_DEMAND", + "RECURRING" + ], + "enumDescriptions": [ + "Unspecified trigger type.", + "The task runs one-time shortly after Task Creation.", + "The task is scheduled to run periodically." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1Zone": { + "description": "A zone represents a logical group of related assets within a lake. A zone can be used to map to organizational structure or represent stages of data readiness from raw to curated. It provides managing behavior that is shared or inherited by all contained assets.", + "id": "GoogleCloudDataplexV1Zone", + "properties": { + "assetStatus": { + "$ref": "GoogleCloudDataplexV1AssetStatus", + "description": "Output only. Aggregated status of the underlying assets of the zone.", + "readOnly": true + }, + "createTime": { + "description": "Output only. The time when the zone was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the zone.", + "type": "string" + }, + "discoverySpec": { + "$ref": "GoogleCloudDataplexV1ZoneDiscoverySpec", + "description": "Optional. Specification of the discovery feature applied to data in this zone." + }, + "displayName": { + "description": "Optional. User friendly display name.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User defined labels for the zone.", + "type": "object" + }, + "name": { + "description": "Output only. The relative resource name of the zone, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", + "readOnly": true, + "type": "string" + }, + "resourceSpec": { + "$ref": "GoogleCloudDataplexV1ZoneResourceSpec", + "description": "Required. Specification of the resources that are referenced by the assets within this zone." + }, + "state": { + "description": "Output only. Current state of the zone.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "DELETING", + "ACTION_REQUIRED" + ], + "enumDescriptions": [ + "State is not specified.", + "Resource is active, i.e., ready to use.", + "Resource is under creation.", + "Resource is under deletion.", + "Resource is active but has unresolved actions." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. Immutable. The type of the zone.", + "enum": [ + "TYPE_UNSPECIFIED", + "RAW", + "CURATED" + ], + "enumDescriptions": [ + "Zone type not specified.", + "A zone that contains data that needs further processing before it is considered generally ready for consumption and analytics workloads.", + "A zone that contains data that is considered to be ready for broader consumption and analytics workloads. Curated structured data stored in Cloud Storage must conform to certain file formats (parquet, avro and orc) and organized in a hive-compatible directory layout." + ], + "type": "string" + }, + "uid": { + "description": "Output only. System generated globally unique ID for the zone. This ID will be different if the zone is deleted and re-created with the same name.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the zone was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ZoneDiscoverySpec": { + "description": "Settings to manage the metadata discovery and publishing in a zone.", + "id": "GoogleCloudDataplexV1ZoneDiscoverySpec", + "properties": { + "csvOptions": { + "$ref": "GoogleCloudDataplexV1ZoneDiscoverySpecCsvOptions", + "description": "Optional. Configuration for CSV data." + }, + "enabled": { + "description": "Required. Whether discovery is enabled.", + "type": "boolean" + }, + "excludePatterns": { + "description": "Optional. The list of patterns to apply for selecting data to exclude during discovery. For Cloud Storage bucket assets, these are interpreted as glob patterns used to match object names. For BigQuery dataset assets, these are interpreted as patterns to match table names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "includePatterns": { + "description": "Optional. The list of patterns to apply for selecting data to include during discovery if only a subset of the data should considered. For Cloud Storage bucket assets, these are interpreted as glob patterns used to match object names. For BigQuery dataset assets, these are interpreted as patterns to match table names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "jsonOptions": { + "$ref": "GoogleCloudDataplexV1ZoneDiscoverySpecJsonOptions", + "description": "Optional. Configuration for Json data." + }, + "schedule": { + "description": "Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running discovery periodically. Successive discovery runs must be scheduled at least 60 minutes apart. The default value is to run discovery every 60 minutes. To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: \"CRON_TZ=${IANA_TIME_ZONE}\" or TZ=${IANA_TIME_ZONE}\". The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone database. For example, \"CRON_TZ=America/New_York 1 * * * *\", or \"TZ=America/New_York 1 * * * *\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ZoneDiscoverySpecCsvOptions": { + "description": "Describe CSV and similar semi-structured data formats.", + "id": "GoogleCloudDataplexV1ZoneDiscoverySpecCsvOptions", + "properties": { + "delimiter": { + "description": "Optional. The delimiter being used to separate values. This defaults to ','.", + "type": "string" + }, + "disableTypeInference": { + "description": "Optional. Whether to disable the inference of data type for CSV data. If true, all columns will be registered as strings.", + "type": "boolean" + }, + "encoding": { + "description": "Optional. The character encoding of the data. The default is UTF-8.", + "type": "string" + }, + "headerRows": { + "description": "Optional. The number of rows to interpret as header rows that should be skipped when reading data rows.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ZoneDiscoverySpecJsonOptions": { + "description": "Describe JSON data format.", + "id": "GoogleCloudDataplexV1ZoneDiscoverySpecJsonOptions", + "properties": { + "disableTypeInference": { + "description": "Optional. Whether to disable the inference of data type for Json data. If true, all columns will be registered as their primitive types (strings, number or boolean).", + "type": "boolean" + }, + "encoding": { + "description": "Optional. The character encoding of the data. The default is UTF-8.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDataplexV1ZoneResourceSpec": { + "description": "Settings for resources attached as assets within a zone.", + "id": "GoogleCloudDataplexV1ZoneResourceSpec", + "properties": { + "locationType": { + "description": "Required. Immutable. The location type of the resources that are allowed to be attached to the assets within this zone.", + "enum": [ + "LOCATION_TYPE_UNSPECIFIED", + "SINGLE_REGION", + "MULTI_REGION" + ], + "enumDescriptions": [ + "Unspecified location type.", + "Resources that are associated with a single region.", + "Resources that are associated with a multi-region location." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudLocationListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "GoogleCloudLocationListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleCloudLocationLocation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudLocationLocation": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "GoogleCloudLocationLocation", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"} ", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.If there are AuditConfigs for both allServices and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "GoogleIamV1AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "GoogleIamV1AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "GoogleIamV1AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1Binding": { + "description": "Associates members, or principals, with a role.", + "id": "GoogleIamV1Binding", + "properties": { + "condition": { + "$ref": "GoogleTypeExpr", + "description": "The condition that is associated with this binding.If the condition evaluates to true, then this binding applies to the current request.If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Cloud Platform resource. members can have the following values: allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account. allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com . serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. group:{emailid}: An email address that represents a Google group. For example, admins@example.com. deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a user that has been recently deleted. For example, alice@example.com?uid=123456789012345678901. If the user is recovered, this value reverts to user:{emailid} and the recovered user retains the role in the binding. deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding. deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901. If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding. domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).JSON example: { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } YAML example: bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the IAM documentation (https://cloud.google.com/iam/docs/).", + "id": "GoogleIamV1Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "GoogleIamV1AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of members, or principals, with a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one principal.The bindings in a Policy can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the bindings grant 50 different roles to user:alice@example.com, and not to any other principal, then you can add another 1,450 principals to the bindings in the Policy.", + "items": { + "$ref": "GoogleIamV1Binding" + }, + "type": "array" + }, + "etag": { + "description": "etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy.Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations: Getting a policy that includes a conditional role binding Adding a conditional role binding to a policy Changing a conditional role binding in a policy Removing any role binding, with or without a condition, from a policy that includes conditionsImportant: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleIamV1SetIamPolicyRequest": { + "description": "Request message for SetIamPolicy method.", + "id": "GoogleIamV1SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "GoogleIamV1Policy", + "description": "REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used:paths: \"bindings, etag\"", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1TestIamPermissionsRequest": { + "description": "Request message for TestIamPermissions method.", + "id": "GoogleIamV1TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the resource. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleIamV1TestIamPermissionsResponse": { + "description": "Response message for TestIamPermissions method.", + "id": "GoogleIamV1TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of TestPermissionsRequest.permissions that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleLongrunningCancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "GoogleLongrunningCancelOperationRequest", + "properties": {}, + "type": "object" + }, + "GoogleLongrunningListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "GoogleLongrunningListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleLongrunningOperation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleTypeExpr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "GoogleTypeExpr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud Dataplex API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go new file mode 100644 index 00000000000..1d7fe20e6a6 --- /dev/null +++ b/dataplex/v1/dataplex-gen.go @@ -0,0 +1,16370 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package dataplex provides access to the Cloud Dataplex API. +// +// For product documentation, see: https://cloud.google.com/dataplex/docs +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/dataplex/v1" +// ... +// ctx := context.Background() +// dataplexService, err := dataplex.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// dataplexService, err := dataplex.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// dataplexService, err := dataplex.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package dataplex // import "google.golang.org/api/dataplex/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "dataplex:v1" +const apiName = "dataplex" +const apiVersion = "v1" +const basePath = "https://dataplex.googleapis.com/" +const mtlsBasePath = "https://dataplex.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Lakes = NewProjectsLocationsLakesService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Lakes *ProjectsLocationsLakesService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsLakesService(s *Service) *ProjectsLocationsLakesService { + rs := &ProjectsLocationsLakesService{s: s} + rs.Actions = NewProjectsLocationsLakesActionsService(s) + rs.Content = NewProjectsLocationsLakesContentService(s) + rs.Contentitems = NewProjectsLocationsLakesContentitemsService(s) + rs.Environments = NewProjectsLocationsLakesEnvironmentsService(s) + rs.Tasks = NewProjectsLocationsLakesTasksService(s) + rs.Zones = NewProjectsLocationsLakesZonesService(s) + return rs +} + +type ProjectsLocationsLakesService struct { + s *Service + + Actions *ProjectsLocationsLakesActionsService + + Content *ProjectsLocationsLakesContentService + + Contentitems *ProjectsLocationsLakesContentitemsService + + Environments *ProjectsLocationsLakesEnvironmentsService + + Tasks *ProjectsLocationsLakesTasksService + + Zones *ProjectsLocationsLakesZonesService +} + +func NewProjectsLocationsLakesActionsService(s *Service) *ProjectsLocationsLakesActionsService { + rs := &ProjectsLocationsLakesActionsService{s: s} + return rs +} + +type ProjectsLocationsLakesActionsService struct { + s *Service +} + +func NewProjectsLocationsLakesContentService(s *Service) *ProjectsLocationsLakesContentService { + rs := &ProjectsLocationsLakesContentService{s: s} + return rs +} + +type ProjectsLocationsLakesContentService struct { + s *Service +} + +func NewProjectsLocationsLakesContentitemsService(s *Service) *ProjectsLocationsLakesContentitemsService { + rs := &ProjectsLocationsLakesContentitemsService{s: s} + return rs +} + +type ProjectsLocationsLakesContentitemsService struct { + s *Service +} + +func NewProjectsLocationsLakesEnvironmentsService(s *Service) *ProjectsLocationsLakesEnvironmentsService { + rs := &ProjectsLocationsLakesEnvironmentsService{s: s} + rs.Sessions = NewProjectsLocationsLakesEnvironmentsSessionsService(s) + return rs +} + +type ProjectsLocationsLakesEnvironmentsService struct { + s *Service + + Sessions *ProjectsLocationsLakesEnvironmentsSessionsService +} + +func NewProjectsLocationsLakesEnvironmentsSessionsService(s *Service) *ProjectsLocationsLakesEnvironmentsSessionsService { + rs := &ProjectsLocationsLakesEnvironmentsSessionsService{s: s} + return rs +} + +type ProjectsLocationsLakesEnvironmentsSessionsService struct { + s *Service +} + +func NewProjectsLocationsLakesTasksService(s *Service) *ProjectsLocationsLakesTasksService { + rs := &ProjectsLocationsLakesTasksService{s: s} + rs.Jobs = NewProjectsLocationsLakesTasksJobsService(s) + return rs +} + +type ProjectsLocationsLakesTasksService struct { + s *Service + + Jobs *ProjectsLocationsLakesTasksJobsService +} + +func NewProjectsLocationsLakesTasksJobsService(s *Service) *ProjectsLocationsLakesTasksJobsService { + rs := &ProjectsLocationsLakesTasksJobsService{s: s} + return rs +} + +type ProjectsLocationsLakesTasksJobsService struct { + s *Service +} + +func NewProjectsLocationsLakesZonesService(s *Service) *ProjectsLocationsLakesZonesService { + rs := &ProjectsLocationsLakesZonesService{s: s} + rs.Actions = NewProjectsLocationsLakesZonesActionsService(s) + rs.Assets = NewProjectsLocationsLakesZonesAssetsService(s) + rs.Entities = NewProjectsLocationsLakesZonesEntitiesService(s) + return rs +} + +type ProjectsLocationsLakesZonesService struct { + s *Service + + Actions *ProjectsLocationsLakesZonesActionsService + + Assets *ProjectsLocationsLakesZonesAssetsService + + Entities *ProjectsLocationsLakesZonesEntitiesService +} + +func NewProjectsLocationsLakesZonesActionsService(s *Service) *ProjectsLocationsLakesZonesActionsService { + rs := &ProjectsLocationsLakesZonesActionsService{s: s} + return rs +} + +type ProjectsLocationsLakesZonesActionsService struct { + s *Service +} + +func NewProjectsLocationsLakesZonesAssetsService(s *Service) *ProjectsLocationsLakesZonesAssetsService { + rs := &ProjectsLocationsLakesZonesAssetsService{s: s} + rs.Actions = NewProjectsLocationsLakesZonesAssetsActionsService(s) + return rs +} + +type ProjectsLocationsLakesZonesAssetsService struct { + s *Service + + Actions *ProjectsLocationsLakesZonesAssetsActionsService +} + +func NewProjectsLocationsLakesZonesAssetsActionsService(s *Service) *ProjectsLocationsLakesZonesAssetsActionsService { + rs := &ProjectsLocationsLakesZonesAssetsActionsService{s: s} + return rs +} + +type ProjectsLocationsLakesZonesAssetsActionsService struct { + s *Service +} + +func NewProjectsLocationsLakesZonesEntitiesService(s *Service) *ProjectsLocationsLakesZonesEntitiesService { + rs := &ProjectsLocationsLakesZonesEntitiesService{s: s} + rs.Partitions = NewProjectsLocationsLakesZonesEntitiesPartitionsService(s) + return rs +} + +type ProjectsLocationsLakesZonesEntitiesService struct { + s *Service + + Partitions *ProjectsLocationsLakesZonesEntitiesPartitionsService +} + +func NewProjectsLocationsLakesZonesEntitiesPartitionsService(s *Service) *ProjectsLocationsLakesZonesEntitiesPartitionsService { + rs := &ProjectsLocationsLakesZonesEntitiesPartitionsService{s: s} + return rs +} + +type ProjectsLocationsLakesZonesEntitiesPartitionsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } The JSON representation for Empty is empty +// JSON object {}. +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleCloudDataplexV1Action: Action represents an issue requiring +// administrator action for resolution. +type GoogleCloudDataplexV1Action struct { + // Asset: Output only. The relative resource name of the asset, of the + // form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zone + // s/{zone_id}/assets/{asset_id}. + Asset string `json:"asset,omitempty"` + + // Category: The category of issue associated with the action. + // + // Possible values: + // "CATEGORY_UNSPECIFIED" - Unspecified category. + // "RESOURCE_MANAGEMENT" - Resource management related issues. + // "SECURITY_POLICY" - Security policy related issues. + // "DATA_DISCOVERY" - Data and discovery related issues. + Category string `json:"category,omitempty"` + + // DataLocations: The list of data locations associated with this + // action. Cloud Storage locations are represented as URI paths(E.g. + // gs://bucket/table1/year=2020/month=Jan/). BigQuery locations refer to + // resource names(E.g. + // bigquery.googleapis.com/projects/project-id/datasets/dataset-id). + DataLocations []string `json:"dataLocations,omitempty"` + + // DetectTime: The time that the issue was detected. + DetectTime string `json:"detectTime,omitempty"` + + // FailedSecurityPolicyApply: Details for issues related to applying + // security policy. + FailedSecurityPolicyApply *GoogleCloudDataplexV1ActionFailedSecurityPolicyApply `json:"failedSecurityPolicyApply,omitempty"` + + // IncompatibleDataSchema: Details for issues related to incompatible + // schemas detected within data. + IncompatibleDataSchema *GoogleCloudDataplexV1ActionIncompatibleDataSchema `json:"incompatibleDataSchema,omitempty"` + + // InvalidDataFormat: Details for issues related to invalid or + // unsupported data formats. + InvalidDataFormat *GoogleCloudDataplexV1ActionInvalidDataFormat `json:"invalidDataFormat,omitempty"` + + // InvalidDataOrganization: Details for issues related to invalid data + // arrangement. + InvalidDataOrganization *GoogleCloudDataplexV1ActionInvalidDataOrganization `json:"invalidDataOrganization,omitempty"` + + // InvalidDataPartition: Details for issues related to invalid or + // unsupported data partition structure. + InvalidDataPartition *GoogleCloudDataplexV1ActionInvalidDataPartition `json:"invalidDataPartition,omitempty"` + + // Issue: Detailed description of the issue requiring action. + Issue string `json:"issue,omitempty"` + + // Lake: Output only. The relative resource name of the lake, of the + // form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}. + Lake string `json:"lake,omitempty"` + + // MissingData: Details for issues related to absence of data within + // managed resources. + MissingData *GoogleCloudDataplexV1ActionMissingData `json:"missingData,omitempty"` + + // MissingResource: Details for issues related to absence of a managed + // resource. + MissingResource *GoogleCloudDataplexV1ActionMissingResource `json:"missingResource,omitempty"` + + // Name: Output only. The relative resource name of the action, of the + // form: + // projects/{project}/locations/{location}/lakes/{lake}/actions/{action} + // projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/acti + // ons/{action} + // projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/asse + // ts/{asset}/actions/{action}. + Name string `json:"name,omitempty"` + + // UnauthorizedResource: Details for issues related to lack of + // permissions to access data resources. + UnauthorizedResource *GoogleCloudDataplexV1ActionUnauthorizedResource `json:"unauthorizedResource,omitempty"` + + // Zone: Output only. The relative resource name of the zone, of the + // form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zone + // s/{zone_id}. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asset") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Action) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Action + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ActionFailedSecurityPolicyApply: Failed to apply +// security policy to the managed resource(s) under a lake, zone or an +// asset. For a lake or zone resource, one or more underlying assets has +// a failure applying security policy to the associated managed +// resource. +type GoogleCloudDataplexV1ActionFailedSecurityPolicyApply struct { + // Asset: Resource name of one of the assets with failing security + // policy application. Populated for a lake or zone resource only. + Asset string `json:"asset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asset") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ActionFailedSecurityPolicyApply) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ActionFailedSecurityPolicyApply + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ActionIncompatibleDataSchema: Action details for +// incompatible schemas detected by discovery. +type GoogleCloudDataplexV1ActionIncompatibleDataSchema struct { + // ExistingSchema: The existing and expected schema of the table. The + // schema is provided as a JSON formatted structure listing columns and + // data types. + ExistingSchema string `json:"existingSchema,omitempty"` + + // NewSchema: The new and incompatible schema within the table. The + // schema is provided as a JSON formatted structured listing columns and + // data types. + NewSchema string `json:"newSchema,omitempty"` + + // SampledDataLocations: The list of data locations sampled and used for + // format/schema inference. + SampledDataLocations []string `json:"sampledDataLocations,omitempty"` + + // SchemaChange: Whether the action relates to a schema that is + // incompatible or modified. + // + // Possible values: + // "SCHEMA_CHANGE_UNSPECIFIED" - Schema change unspecified. + // "INCOMPATIBLE" - Newly discovered schema is incompatible with + // existing schema. + // "MODIFIED" - Newly discovered schema has changed from existing + // schema for data in a curated zone. + SchemaChange string `json:"schemaChange,omitempty"` + + // Table: The name of the table containing invalid data. + Table string `json:"table,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExistingSchema") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExistingSchema") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ActionIncompatibleDataSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ActionIncompatibleDataSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ActionInvalidDataFormat: Action details for +// invalid or unsupported data files detected by discovery. +type GoogleCloudDataplexV1ActionInvalidDataFormat struct { + // ExpectedFormat: The expected data format of the entity. + ExpectedFormat string `json:"expectedFormat,omitempty"` + + // NewFormat: The new unexpected data format within the entity. + NewFormat string `json:"newFormat,omitempty"` + + // SampledDataLocations: The list of data locations sampled and used for + // format/schema inference. + SampledDataLocations []string `json:"sampledDataLocations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpectedFormat") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpectedFormat") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ActionInvalidDataFormat) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ActionInvalidDataFormat + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ActionInvalidDataOrganization: Action details +// for invalid data arrangement. +type GoogleCloudDataplexV1ActionInvalidDataOrganization struct { +} + +// GoogleCloudDataplexV1ActionInvalidDataPartition: Action details for +// invalid or unsupported partitions detected by discovery. +type GoogleCloudDataplexV1ActionInvalidDataPartition struct { + // ExpectedStructure: The issue type of InvalidDataPartition. + // + // Possible values: + // "PARTITION_STRUCTURE_UNSPECIFIED" - PartitionStructure unspecified. + // "CONSISTENT_KEYS" - Consistent hive-style partition definition + // (both raw and curated zone). + // "HIVE_STYLE_KEYS" - Hive style partition definition (curated zone + // only). + ExpectedStructure string `json:"expectedStructure,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpectedStructure") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpectedStructure") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ActionInvalidDataPartition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ActionInvalidDataPartition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ActionMissingData: Action details for absence of +// data detected by discovery. +type GoogleCloudDataplexV1ActionMissingData struct { +} + +// GoogleCloudDataplexV1ActionMissingResource: Action details for +// resource references in assets that cannot be located. +type GoogleCloudDataplexV1ActionMissingResource struct { +} + +// GoogleCloudDataplexV1ActionUnauthorizedResource: Action details for +// unauthorized resource issues raised to indicate that the service +// account associated with the lake instance is not authorized to access +// or manage the resource associated with an asset. +type GoogleCloudDataplexV1ActionUnauthorizedResource struct { +} + +// GoogleCloudDataplexV1Asset: An asset represents a cloud resource that +// is being managed within a lake as a member of a zone. +type GoogleCloudDataplexV1Asset struct { + // CreateTime: Output only. The time when the asset was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Description of the asset. + Description string `json:"description,omitempty"` + + // DiscoverySpec: Optional. Specification of the discovery feature + // applied to data referenced by this asset. When this spec is left + // unset, the asset will use the spec set on the parent zone. + DiscoverySpec *GoogleCloudDataplexV1AssetDiscoverySpec `json:"discoverySpec,omitempty"` + + // DiscoveryStatus: Output only. Status of the discovery feature applied + // to data referenced by this asset. + DiscoveryStatus *GoogleCloudDataplexV1AssetDiscoveryStatus `json:"discoveryStatus,omitempty"` + + // DisplayName: Optional. User friendly display name. + DisplayName string `json:"displayName,omitempty"` + + // Labels: Optional. User defined labels for the asset. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The relative resource name of the asset, of the + // form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zone + // s/{zone_id}/assets/{asset_id}. + Name string `json:"name,omitempty"` + + // ResourceSpec: Required. Specification of the resource that is + // referenced by this asset. + ResourceSpec *GoogleCloudDataplexV1AssetResourceSpec `json:"resourceSpec,omitempty"` + + // ResourceStatus: Output only. Status of the resource referenced by + // this asset. + ResourceStatus *GoogleCloudDataplexV1AssetResourceStatus `json:"resourceStatus,omitempty"` + + // SecurityStatus: Output only. Status of the security policy applied to + // resource referenced by this asset. + SecurityStatus *GoogleCloudDataplexV1AssetSecurityStatus `json:"securityStatus,omitempty"` + + // State: Output only. Current state of the asset. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is not specified. + // "ACTIVE" - Resource is active, i.e., ready to use. + // "CREATING" - Resource is under creation. + // "DELETING" - Resource is under deletion. + // "ACTION_REQUIRED" - Resource is active but has unresolved actions. + State string `json:"state,omitempty"` + + // Uid: Output only. System generated globally unique ID for the asset. + // This ID will be different if the asset is deleted and re-created with + // the same name. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the asset was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Asset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Asset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AssetDiscoverySpec: Settings to manage the +// metadata discovery and publishing for an asset. +type GoogleCloudDataplexV1AssetDiscoverySpec struct { + // CsvOptions: Optional. Configuration for CSV data. + CsvOptions *GoogleCloudDataplexV1AssetDiscoverySpecCsvOptions `json:"csvOptions,omitempty"` + + // Enabled: Optional. Whether discovery is enabled. + Enabled bool `json:"enabled,omitempty"` + + // ExcludePatterns: Optional. The list of patterns to apply for + // selecting data to exclude during discovery. For Cloud Storage bucket + // assets, these are interpreted as glob patterns used to match object + // names. For BigQuery dataset assets, these are interpreted as patterns + // to match table names. + ExcludePatterns []string `json:"excludePatterns,omitempty"` + + // IncludePatterns: Optional. The list of patterns to apply for + // selecting data to include during discovery if only a subset of the + // data should considered. For Cloud Storage bucket assets, these are + // interpreted as glob patterns used to match object names. For BigQuery + // dataset assets, these are interpreted as patterns to match table + // names. + IncludePatterns []string `json:"includePatterns,omitempty"` + + // JsonOptions: Optional. Configuration for Json data. + JsonOptions *GoogleCloudDataplexV1AssetDiscoverySpecJsonOptions `json:"jsonOptions,omitempty"` + + // Schedule: Optional. Cron schedule + // (https://en.wikipedia.org/wiki/Cron) for running discovery + // periodically. Successive discovery runs must be scheduled at least 60 + // minutes apart. The default value is to run discovery every 60 + // minutes. To explicitly set a timezone to the cron tab, apply a prefix + // in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + // TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid + // string from IANA time zone database. For example, + // "CRON_TZ=America/New_York 1 * * * *", or "TZ=America/New_York 1 * * * + // *". + Schedule string `json:"schedule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CsvOptions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CsvOptions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1AssetDiscoverySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AssetDiscoverySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AssetDiscoverySpecCsvOptions: Describe CSV and +// similar semi-structured data formats. +type GoogleCloudDataplexV1AssetDiscoverySpecCsvOptions struct { + // Delimiter: Optional. The delimiter being used to separate values. + // This defaults to ','. + Delimiter string `json:"delimiter,omitempty"` + + // DisableTypeInference: Optional. Whether to disable the inference of + // data type for CSV data. If true, all columns will be registered as + // strings. + DisableTypeInference bool `json:"disableTypeInference,omitempty"` + + // Encoding: Optional. The character encoding of the data. The default + // is UTF-8. + Encoding string `json:"encoding,omitempty"` + + // HeaderRows: Optional. The number of rows to interpret as header rows + // that should be skipped when reading data rows. + HeaderRows int64 `json:"headerRows,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Delimiter") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Delimiter") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1AssetDiscoverySpecCsvOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AssetDiscoverySpecCsvOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AssetDiscoverySpecJsonOptions: Describe JSON +// data format. +type GoogleCloudDataplexV1AssetDiscoverySpecJsonOptions struct { + // DisableTypeInference: Optional. Whether to disable the inference of + // data type for Json data. If true, all columns will be registered as + // their primitive types (strings, number or boolean). + DisableTypeInference bool `json:"disableTypeInference,omitempty"` + + // Encoding: Optional. The character encoding of the data. The default + // is UTF-8. + Encoding string `json:"encoding,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DisableTypeInference") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisableTypeInference") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1AssetDiscoverySpecJsonOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AssetDiscoverySpecJsonOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AssetDiscoveryStatus: Status of discovery for an +// asset. +type GoogleCloudDataplexV1AssetDiscoveryStatus struct { + // LastRunDuration: The duration of the last discovery run. + LastRunDuration string `json:"lastRunDuration,omitempty"` + + // LastRunTime: The start time of the last discovery run. + LastRunTime string `json:"lastRunTime,omitempty"` + + // Message: Additional information about the current state. + Message string `json:"message,omitempty"` + + // State: The current status of the discovery feature. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is unspecified. + // "SCHEDULED" - Discovery for the asset is scheduled. + // "IN_PROGRESS" - Discovery for the asset is running. + // "PAUSED" - Discovery for the asset is currently paused (e.g. due to + // a lack of available resources). It will be automatically resumed. + // "DISABLED" - Discovery for the asset is disabled. + State string `json:"state,omitempty"` + + // Stats: Data Stats of the asset reported by discovery. + Stats *GoogleCloudDataplexV1AssetDiscoveryStatusStats `json:"stats,omitempty"` + + // UpdateTime: Last update time of the status. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LastRunDuration") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LastRunDuration") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1AssetDiscoveryStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AssetDiscoveryStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AssetDiscoveryStatusStats: The aggregated data +// statistics for the asset reported by discovery. +type GoogleCloudDataplexV1AssetDiscoveryStatusStats struct { + // DataItems: The count of data items within the referenced resource. + DataItems int64 `json:"dataItems,omitempty,string"` + + // DataSize: The number of stored data bytes within the referenced + // resource. + DataSize int64 `json:"dataSize,omitempty,string"` + + // Filesets: The count of fileset entities within the referenced + // resource. + Filesets int64 `json:"filesets,omitempty,string"` + + // Tables: The count of table entities within the referenced resource. + Tables int64 `json:"tables,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DataItems") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataItems") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1AssetDiscoveryStatusStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AssetDiscoveryStatusStats + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AssetResourceSpec: Identifies the cloud resource +// that is referenced by this asset. +type GoogleCloudDataplexV1AssetResourceSpec struct { + // Name: Immutable. Relative name of the cloud resource that contains + // the data that is being managed within a lake. For example: + // projects/{project_number}/buckets/{bucket_id} + // projects/{project_number}/datasets/{dataset_id} + Name string `json:"name,omitempty"` + + // Type: Required. Immutable. Type of resource. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Type not specified. + // "STORAGE_BUCKET" - Cloud Storage bucket. + // "BIGQUERY_DATASET" - BigQuery dataset. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1AssetResourceSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AssetResourceSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AssetResourceStatus: Status of the resource +// referenced by an asset. +type GoogleCloudDataplexV1AssetResourceStatus struct { + // Message: Additional information about the current state. + Message string `json:"message,omitempty"` + + // State: The current state of the managed resource. + // + // Possible values: + // "STATE_UNSPECIFIED" - State unspecified. + // "READY" - Resource does not have any errors. + // "ERROR" - Resource has errors. + State string `json:"state,omitempty"` + + // UpdateTime: Last update time of the status. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1AssetResourceStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AssetResourceStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AssetSecurityStatus: Security policy status of +// the asset. Data security policy, i.e., readers, writers & owners, +// should be specified in the lake/zone/asset IAM policy. +type GoogleCloudDataplexV1AssetSecurityStatus struct { + // Message: Additional information about the current state. + Message string `json:"message,omitempty"` + + // State: The current state of the security policy applied to the + // attached resource. + // + // Possible values: + // "STATE_UNSPECIFIED" - State unspecified. + // "READY" - Security policy has been successfully applied to the + // attached resource. + // "APPLYING" - Security policy is in the process of being applied to + // the attached resource. + // "ERROR" - Security policy could not be applied to the attached + // resource due to errors. + State string `json:"state,omitempty"` + + // UpdateTime: Last update time of the status. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1AssetSecurityStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AssetSecurityStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1AssetStatus: Aggregated status of the underlying +// assets of a lake or zone. +type GoogleCloudDataplexV1AssetStatus struct { + // ActiveAssets: Number of active assets. + ActiveAssets int64 `json:"activeAssets,omitempty"` + + // SecurityPolicyApplyingAssets: Number of assets that are in process of + // updating the security policy on attached resources. + SecurityPolicyApplyingAssets int64 `json:"securityPolicyApplyingAssets,omitempty"` + + // UpdateTime: Last update time of the status. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActiveAssets") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActiveAssets") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1AssetStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1AssetStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1CancelJobRequest: Cancel task jobs. +type GoogleCloudDataplexV1CancelJobRequest struct { +} + +// GoogleCloudDataplexV1Content: Content represents a user-visible +// notebook or a sql script +type GoogleCloudDataplexV1Content struct { + // CreateTime: Output only. Content creation time. + CreateTime string `json:"createTime,omitempty"` + + // DataText: Required. Content data in string format. + DataText string `json:"dataText,omitempty"` + + // Description: Optional. Description of the content. + Description string `json:"description,omitempty"` + + // Labels: Optional. User defined labels for the content. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The relative resource name of the content, of the + // form: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/ + // {content_id} + Name string `json:"name,omitempty"` + + // Notebook: Notebook related configurations. + Notebook *GoogleCloudDataplexV1ContentNotebook `json:"notebook,omitempty"` + + // Path: Required. The path for the Content file, represented as + // directory structure. Unique within a lake. Limited to alphanumerics, + // hyphens, underscores, dots and slashes. + Path string `json:"path,omitempty"` + + // SqlScript: Sql Script related configurations. + SqlScript *GoogleCloudDataplexV1ContentSqlScript `json:"sqlScript,omitempty"` + + // Uid: Output only. System generated globally unique ID for the + // content. This ID will be different if the content is deleted and + // re-created with the same name. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the content was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Content) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Content + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ContentNotebook: Configuration for Notebook +// content. +type GoogleCloudDataplexV1ContentNotebook struct { + // KernelType: Required. Kernel Type of the notebook. + // + // Possible values: + // "KERNEL_TYPE_UNSPECIFIED" - Kernel Type unspecified. + // "PYTHON3" - Python 3 Kernel. + KernelType string `json:"kernelType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KernelType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KernelType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ContentNotebook) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ContentNotebook + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ContentSqlScript: Configuration for the Sql +// Script content. +type GoogleCloudDataplexV1ContentSqlScript struct { + // Engine: Required. Query Engine to be used for the Sql Query. + // + // Possible values: + // "QUERY_ENGINE_UNSPECIFIED" - Value was unspecified. + // "SPARK" - Spark SQL Query. + Engine string `json:"engine,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Engine") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ContentSqlScript) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ContentSqlScript + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1DiscoveryEvent: The payload associated with +// Discovery data processing. +type GoogleCloudDataplexV1DiscoveryEvent struct { + // Action: Details about the action associated with the event. + Action *GoogleCloudDataplexV1DiscoveryEventActionDetails `json:"action,omitempty"` + + // AssetId: The id of the associated asset. + AssetId string `json:"assetId,omitempty"` + + // Config: Details about discovery configuration in effect. + Config *GoogleCloudDataplexV1DiscoveryEventConfigDetails `json:"config,omitempty"` + + // DataLocation: The data location associated with the event. + DataLocation string `json:"dataLocation,omitempty"` + + // Entity: Details about the entity associated with the event. + Entity *GoogleCloudDataplexV1DiscoveryEventEntityDetails `json:"entity,omitempty"` + + // LakeId: The id of the associated lake. + LakeId string `json:"lakeId,omitempty"` + + // Message: The log message. + Message string `json:"message,omitempty"` + + // Partition: Details about the partition associated with the event. + Partition *GoogleCloudDataplexV1DiscoveryEventPartitionDetails `json:"partition,omitempty"` + + // Type: The type of the event being logged. + // + // Possible values: + // "EVENT_TYPE_UNSPECIFIED" - An unspecified event type. + // "CONFIG" - An event representing discovery configuration in effect. + // "ENTITY_CREATED" - An event representing a metadata entity being + // created. + // "ENTITY_UPDATED" - An event representing a metadata entity being + // updated. + // "ENTITY_DELETED" - An event representing a metadata entity being + // deleted. + // "PARTITION_CREATED" - An event representing a partition being + // created. + // "PARTITION_UPDATED" - An event representing a partition being + // updated. + // "PARTITION_DELETED" - An event representing a partition being + // deleted. + Type string `json:"type,omitempty"` + + // ZoneId: The id of the associated zone. + ZoneId string `json:"zoneId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1DiscoveryEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1DiscoveryEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1DiscoveryEventActionDetails: Details about the +// action. +type GoogleCloudDataplexV1DiscoveryEventActionDetails struct { + // Type: The type of action. Eg. IncompatibleDataSchema, + // InvalidDataFormat + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1DiscoveryEventActionDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1DiscoveryEventActionDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1DiscoveryEventConfigDetails: Details about +// configuration events. +type GoogleCloudDataplexV1DiscoveryEventConfigDetails struct { + // Parameters: A list of discovery configuration parameters in effect. + // The keys are the field paths within DiscoverySpec. Eg. + // includePatterns, excludePatterns, csvOptions.disableTypeInference, + // etc. + Parameters map[string]string `json:"parameters,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Parameters") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Parameters") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1DiscoveryEventConfigDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1DiscoveryEventConfigDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1DiscoveryEventEntityDetails: Details about the +// entity. +type GoogleCloudDataplexV1DiscoveryEventEntityDetails struct { + // Entity: The name of the entity resource. The name is the + // fully-qualified resource name. + Entity string `json:"entity,omitempty"` + + // Type: The type of the entity resource. + // + // Possible values: + // "ENTITY_TYPE_UNSPECIFIED" - An unspecified event type. + // "TABLE" - Entities representing structured data. + // "FILESET" - Entities representing unstructured data. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entity") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Entity") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1DiscoveryEventEntityDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1DiscoveryEventEntityDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1DiscoveryEventPartitionDetails: Details about +// the partition. +type GoogleCloudDataplexV1DiscoveryEventPartitionDetails struct { + // Entity: The name to the containing entity resource. The name is the + // fully-qualified resource name. + Entity string `json:"entity,omitempty"` + + // Partition: The name to the partition resource. The name is the + // fully-qualified resource name. + Partition string `json:"partition,omitempty"` + + // Type: The type of the containing entity resource. + // + // Possible values: + // "ENTITY_TYPE_UNSPECIFIED" - An unspecified event type. + // "TABLE" - Entities representing structured data. + // "FILESET" - Entities representing unstructured data. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Entity") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Entity") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1DiscoveryEventPartitionDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1DiscoveryEventPartitionDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1Entity: Represents tables and fileset metadata +// contained within a zone. +type GoogleCloudDataplexV1Entity struct { + // Asset: Required. Immutable. The ID of the asset associated with the + // storage location containing the entity data. The entity must be with + // in the same zone with the asset. + Asset string `json:"asset,omitempty"` + + // CatalogEntry: Output only. The name of the associated Data Catalog + // entry. + CatalogEntry string `json:"catalogEntry,omitempty"` + + // Compatibility: Output only. Metadata stores that the entity is + // compatible with. + Compatibility *GoogleCloudDataplexV1EntityCompatibilityStatus `json:"compatibility,omitempty"` + + // CreateTime: Output only. The time when the entity was created. + CreateTime string `json:"createTime,omitempty"` + + // DataPath: Required. Immutable. The storage path of the entity data. + // For Cloud Storage data, this is the fully-qualified path to the + // entity, such as gs://bucket/path/to/data. For BigQuery data, this is + // the name of the table resource, such as + // projects/project_id/datasets/dataset_id/tables/table_id. + DataPath string `json:"dataPath,omitempty"` + + // DataPathPattern: Optional. The set of items within the data path + // constituting the data in the entity, represented as a glob path. + // Example: gs://bucket/path/to/data/**/*.csv. + DataPathPattern string `json:"dataPathPattern,omitempty"` + + // Description: Optional. User friendly longer description text. Must be + // shorter than or equal to 1024 characters. + Description string `json:"description,omitempty"` + + // DisplayName: Optional. Display name must be shorter than or equal to + // 63 characters. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Optional. The etag for this entity. Required for update and + // delete requests. Must match the server's etag. + Etag string `json:"etag,omitempty"` + + // Format: Required. Identifies the storage format of the entity data. + // It does not apply to entities with data stored in BigQuery. + Format *GoogleCloudDataplexV1StorageFormat `json:"format,omitempty"` + + // Id: Required. A user-provided entity ID. It is mutable, and will be + // used as the published table name. Specifying a new ID in an update + // entity request will override the existing value. The ID must contain + // only letters (a-z, A-Z), numbers (0-9), and underscores. Must begin + // with a letter. + Id string `json:"id,omitempty"` + + // Name: Output only. The resource name of the entity, of the form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zone + // s/{zone_id}/entities/{id}. + Name string `json:"name,omitempty"` + + // Schema: Required. The description of the data structure and layout. + // The schema is not included in list responses. It is only included in + // SCHEMA and FULL entity views of a GetEntity response. + Schema *GoogleCloudDataplexV1Schema `json:"schema,omitempty"` + + // System: Required. Immutable. Identifies the storage system of the + // entity data. + // + // Possible values: + // "STORAGE_SYSTEM_UNSPECIFIED" - Storage system unspecified. + // "CLOUD_STORAGE" - The entity data is contained within a Cloud + // Storage bucket. + // "BIGQUERY" - The entity data is contained within a BigQuery + // dataset. + System string `json:"system,omitempty"` + + // Type: Required. Immutable. The type of entity. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Type unspecified. + // "TABLE" - Structured and semi-structured data. + // "FILESET" - Unstructured data. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. The time when the entity was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Asset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asset") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Entity) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Entity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EntityCompatibilityStatus: Provides +// compatibility information for various metadata stores. +type GoogleCloudDataplexV1EntityCompatibilityStatus struct { + // Bigquery: Output only. Whether this entity is compatible with + // BigQuery. + Bigquery *GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility `json:"bigquery,omitempty"` + + // HiveMetastore: Output only. Whether this entity is compatible with + // Hive Metastore. + HiveMetastore *GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility `json:"hiveMetastore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bigquery") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bigquery") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1EntityCompatibilityStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EntityCompatibilityStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility: Provides +// compatibility information for a specific metadata store. +type GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility struct { + // Compatible: Output only. Whether the entity is compatible and can be + // represented in the metadata store. + Compatible bool `json:"compatible,omitempty"` + + // Reason: Output only. Provides additional detail if the entity is + // incompatible with the metadata store. + Reason string `json:"reason,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compatible") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Compatible") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EntityCompatibilityStatusCompatibility + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1Environment: Environment represents a +// user-visible compute infrastructure for analytics within a lake. +type GoogleCloudDataplexV1Environment struct { + // CreateTime: Output only. Environment creation time. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Description of the environment. + Description string `json:"description,omitempty"` + + // DisplayName: Optional. User friendly display name. + DisplayName string `json:"displayName,omitempty"` + + // Endpoints: Output only. URI Endpoints to access sessions associated + // with the Environment. + Endpoints *GoogleCloudDataplexV1EnvironmentEndpoints `json:"endpoints,omitempty"` + + // InfrastructureSpec: Required. Infrastructure specification for the + // Environment. + InfrastructureSpec *GoogleCloudDataplexV1EnvironmentInfrastructureSpec `json:"infrastructureSpec,omitempty"` + + // Labels: Optional. User defined labels for the environment. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The relative resource name of the environment, of + // the form: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environm + // ent/{environment_id} + Name string `json:"name,omitempty"` + + // SessionSpec: Optional. Configuration for sessions created for this + // environment. + SessionSpec *GoogleCloudDataplexV1EnvironmentSessionSpec `json:"sessionSpec,omitempty"` + + // SessionStatus: Output only. Status of sessions created for this + // environment. + SessionStatus *GoogleCloudDataplexV1EnvironmentSessionStatus `json:"sessionStatus,omitempty"` + + // State: Output only. Current state of the environment. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is not specified. + // "ACTIVE" - Resource is active, i.e., ready to use. + // "CREATING" - Resource is under creation. + // "DELETING" - Resource is under deletion. + // "ACTION_REQUIRED" - Resource is active but has unresolved actions. + State string `json:"state,omitempty"` + + // Uid: Output only. System generated globally unique ID for the + // environment. This ID will be different if the environment is deleted + // and re-created with the same name. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the environment was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Environment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Environment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type GoogleCloudDataplexV1EnvironmentEndpoints struct { + // Notebooks: Output only. URI to serve notebook APIs + Notebooks string `json:"notebooks,omitempty"` + + // Sql: Output only. URI to serve SQL APIs + Sql string `json:"sql,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Notebooks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Notebooks") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1EnvironmentEndpoints) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EnvironmentEndpoints + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EnvironmentInfrastructureSpec: Configuration for +// the underlying infrastructure used to run workloads. +type GoogleCloudDataplexV1EnvironmentInfrastructureSpec struct { + // Compute: Optional. Compute resources needed for analyze interactive + // workloads. + Compute *GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources `json:"compute,omitempty"` + + // OsImage: Required. Software Runtime Configuration for analyze + // interactive workloads. + OsImage *GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime `json:"osImage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compute") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Compute") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1EnvironmentInfrastructureSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EnvironmentInfrastructureSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources: +// Compute resources associated with the analyze interactive workloads. +type GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources struct { + // DiskSizeGb: Optional. Size in GB of the disk. Default is 100 GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty"` + + // MaxNodeCount: Optional. Max configurable nodes. If max_node_count > + // node_count, then auto-scaling is enabled. + MaxNodeCount int64 `json:"maxNodeCount,omitempty"` + + // NodeCount: Optional. Total number of nodes in the sessions created + // for this environment. + NodeCount int64 `json:"nodeCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskSizeGb") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EnvironmentInfrastructureSpecComputeResources + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime: +// Software Runtime Configuration to run Analyze. +type GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime struct { + // ImageVersion: Required. Dataplex Image version. + ImageVersion string `json:"imageVersion,omitempty"` + + // JavaLibraries: Optional. List of Java jars to be included in the + // runtime environment. Valid input includes Cloud Storage URIs to Jar + // binaries. For example, gs://bucket-name/my/path/to/file.jar + JavaLibraries []string `json:"javaLibraries,omitempty"` + + // Properties: Optional. Spark properties to provide configuration for + // use in sessions created for this environment. The properties to set + // on daemon config files. Property keys are specified in + // prefix:property format. The prefix must be "spark". + Properties map[string]string `json:"properties,omitempty"` + + // PythonPackages: Optional. A list of python packages to be installed. + // Valid formats include Cloud Storage URI to a PIP installable library. + // For example, gs://bucket-name/my/path/to/lib.tar.gz + PythonPackages []string `json:"pythonPackages,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ImageVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ImageVersion") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EnvironmentInfrastructureSpecOsImageRuntime + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type GoogleCloudDataplexV1EnvironmentSessionSpec struct { + // EnableFastStartup: Optional. If True, this causes sessions to be + // pre-created and available for faster startup to enable interactive + // exploration use-cases. This defaults to False to avoid additional + // billed charges. These can only be set to True for the environment + // with name set to "default", and with default configuration. + EnableFastStartup bool `json:"enableFastStartup,omitempty"` + + // MaxIdleDuration: Optional. The idle time configuration of the + // session. The session will be auto-terminated at the end of this + // period. + MaxIdleDuration string `json:"maxIdleDuration,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EnableFastStartup") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableFastStartup") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1EnvironmentSessionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EnvironmentSessionSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type GoogleCloudDataplexV1EnvironmentSessionStatus struct { + // Active: Output only. Queries over sessions to mark whether the + // environment is currently active or not + Active bool `json:"active,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Active") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Active") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1EnvironmentSessionStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1EnvironmentSessionStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. + EndTime string `json:"endTime,omitempty"` + + // Message: Output only. Additional information about the current state. + Message string `json:"message,omitempty"` + + // Name: Output only. The relative resource name of the job, of the + // form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ + // tasks/{task_id}/jobs/{job_id}. + Name string `json:"name,omitempty"` + + // RetryCount: Output only. . The number of times the job has been + // retried (excluding the initial attempt). + RetryCount int64 `json:"retryCount,omitempty"` + + // Service: Output only. The underlying service running a job. + // + // Possible values: + // "SERVICE_UNSPECIFIED" - Service used to run the job is unspecified. + // "DATAPROC" - Dataproc service is used to run this job. + Service string `json:"service,omitempty"` + + // ServiceJob: Output only. The full resource name for the job run under + // a particular service. + ServiceJob string `json:"serviceJob,omitempty"` + + // StartTime: Output only. The time when the job was started. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. Execution state for the job. + // + // Possible values: + // "STATE_UNSPECIFIED" - The job state is unknown. + // "RUNNING" - The job is running. + // "CANCELLING" - The job is cancelling. + // "CANCELLED" - The job cancellation was successful. + // "SUCCEEDED" - The job completed successfully. + // "FAILED" - The job is no longer running due to an error. + // "ABORTED" - The job was cancelled outside of Dataplex. + State string `json:"state,omitempty"` + + // Uid: Output only. System generated globally unique ID for the job. + Uid string `json:"uid,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Job) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Job + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1JobEvent: The payload associated with Job logs +// that contains events describing jobs that have run within a Lake. +type GoogleCloudDataplexV1JobEvent struct { + // EndTime: The time when the job ended running. + EndTime string `json:"endTime,omitempty"` + + // JobId: The unique id identifying the job. + JobId string `json:"jobId,omitempty"` + + // Message: The log message. + Message string `json:"message,omitempty"` + + // Retries: The number of retries. + Retries int64 `json:"retries,omitempty"` + + // Service: The service used to execute the job. + // + // Possible values: + // "SERVICE_UNSPECIFIED" - Unspecified service. + // "DATAPROC" - Cloud Dataproc. + Service string `json:"service,omitempty"` + + // ServiceJob: The reference to the job within the service. + ServiceJob string `json:"serviceJob,omitempty"` + + // StartTime: The time when the job started running. + StartTime string `json:"startTime,omitempty"` + + // State: The job state on completion. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified job state. + // "SUCCEEDED" - Job successfully completed. + // "FAILED" - Job was unsuccessful. + // "CANCELLED" - Job was cancelled by the user. + // "ABORTED" - Job was cancelled or aborted via the service executing + // the job. + State string `json:"state,omitempty"` + + // Type: The type of the job. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified job type. + // "SPARK" - Spark jobs. + // "NOTEBOOK" - Notebook jobs. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1JobEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1JobEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1Lake: A lake is a centralized repository for +// managing enterprise data across the organization distributed across +// many cloud projects, and stored in a variety of storage services such +// as Google Cloud Storage and BigQuery. The resources attached to a +// lake are referred to as managed resources. Data within these managed +// resources can be structured or unstructured. A lake provides data +// admins with tools to organize, secure and manage their data at scale, +// and provides data scientists and data engineers an integrated +// experience to easily search, discover, analyze and transform data and +// associated metadata. +type GoogleCloudDataplexV1Lake struct { + // AssetStatus: Output only. Aggregated status of the underlying assets + // of the lake. + AssetStatus *GoogleCloudDataplexV1AssetStatus `json:"assetStatus,omitempty"` + + // CreateTime: Output only. The time when the lake was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Description of the lake. + Description string `json:"description,omitempty"` + + // DisplayName: Optional. User friendly display name. + DisplayName string `json:"displayName,omitempty"` + + // Labels: Optional. User-defined labels for the lake. + Labels map[string]string `json:"labels,omitempty"` + + // Metastore: Optional. Settings to manage lake and Dataproc Metastore + // service instance association. + Metastore *GoogleCloudDataplexV1LakeMetastore `json:"metastore,omitempty"` + + // MetastoreStatus: Output only. Metastore status of the lake. + MetastoreStatus *GoogleCloudDataplexV1LakeMetastoreStatus `json:"metastoreStatus,omitempty"` + + // Name: Output only. The relative resource name of the lake, of the + // form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}. + Name string `json:"name,omitempty"` + + // ServiceAccount: Output only. Service account associated with this + // lake. This service account must be authorized to access or operate on + // resources managed by the lake. + ServiceAccount string `json:"serviceAccount,omitempty"` + + // State: Output only. Current state of the lake. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is not specified. + // "ACTIVE" - Resource is active, i.e., ready to use. + // "CREATING" - Resource is under creation. + // "DELETING" - Resource is under deletion. + // "ACTION_REQUIRED" - Resource is active but has unresolved actions. + State string `json:"state,omitempty"` + + // Uid: Output only. System generated globally unique ID for the lake. + // This ID will be different if the lake is deleted and re-created with + // the same name. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the lake was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AssetStatus") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AssetStatus") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Lake) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Lake + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1LakeMetastore: Settings to manage association of +// Dataproc Metastore with a lake. +type GoogleCloudDataplexV1LakeMetastore struct { + // Service: Optional. A relative reference to the Dataproc Metastore + // (https://cloud.google.com/dataproc-metastore/docs) service associated + // with the lake: + // projects/{project_id}/locations/{location_id}/services/{service_id} + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Service") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Service") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1LakeMetastore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1LakeMetastore + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1LakeMetastoreStatus: Status of Lake and Dataproc +// Metastore service instance association. +type GoogleCloudDataplexV1LakeMetastoreStatus struct { + // Endpoint: The URI of the endpoint used to access the Metastore + // service. + Endpoint string `json:"endpoint,omitempty"` + + // Message: Additional information about the current status. + Message string `json:"message,omitempty"` + + // State: Current state of association. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified. + // "NONE" - A Metastore service instance is not associated with the + // lake. + // "READY" - A Metastore service instance is attached to the lake. + // "UPDATING" - Attach/detach is in progress. + // "ERROR" - Attach/detach could not be done due to errors. + State string `json:"state,omitempty"` + + // UpdateTime: Last update time of the metastore status of the lake. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Endpoint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Endpoint") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1LakeMetastoreStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1LakeMetastoreStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListActionsResponse: List actions response. +type GoogleCloudDataplexV1ListActionsResponse struct { + // Actions: Actions under the given parent lake/zone/asset. + Actions []*GoogleCloudDataplexV1Action `json:"actions,omitempty"` + + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Actions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Actions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListActionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListActionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListAssetsResponse: List assets response. +type GoogleCloudDataplexV1ListAssetsResponse struct { + // Assets: Asset under the given parent zone. + Assets []*GoogleCloudDataplexV1Asset `json:"assets,omitempty"` + + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Assets") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Assets") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListAssetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListAssetsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListContentResponse: List content response. +type GoogleCloudDataplexV1ListContentResponse struct { + // Content: Content under the given parent lake. + Content []*GoogleCloudDataplexV1Content `json:"content,omitempty"` + + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Content") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListContentResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListContentResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListEntitiesResponse: List metadata entities +// response. +type GoogleCloudDataplexV1ListEntitiesResponse struct { + // Entities: Entities in the specified parent zone. + Entities []*GoogleCloudDataplexV1Entity `json:"entities,omitempty"` + + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no remaining results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Entities") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Entities") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListEntitiesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListEntitiesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListEnvironmentsResponse: List environments +// response. +type GoogleCloudDataplexV1ListEnvironmentsResponse struct { + // Environments: Environments under the given parent lake. + Environments []*GoogleCloudDataplexV1Environment `json:"environments,omitempty"` + + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Environments") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Environments") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListEnvironmentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListEnvironmentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListJobsResponse: List jobs response. +type GoogleCloudDataplexV1ListJobsResponse struct { + // Jobs: Jobs under a given task. + Jobs []*GoogleCloudDataplexV1Job `json:"jobs,omitempty"` + + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Jobs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Jobs") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListJobsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListLakesResponse: List lakes response. +type GoogleCloudDataplexV1ListLakesResponse struct { + // Lakes: Lakes under the given parent location. + Lakes []*GoogleCloudDataplexV1Lake `json:"lakes,omitempty"` + + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // UnreachableLocations: Locations that could not be reached. + UnreachableLocations []string `json:"unreachableLocations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Lakes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Lakes") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListLakesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListLakesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListPartitionsResponse: List metadata partitions +// response. +type GoogleCloudDataplexV1ListPartitionsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no remaining results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Partitions: Partitions under the specified parent entity. + Partitions []*GoogleCloudDataplexV1Partition `json:"partitions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListPartitionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListPartitionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListSessionsResponse: List sessions response. +type GoogleCloudDataplexV1ListSessionsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Sessions: Sessions under a given environment. + Sessions []*GoogleCloudDataplexV1Session `json:"sessions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListSessionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListSessionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListTasksResponse: List tasks response. +type GoogleCloudDataplexV1ListTasksResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Tasks: Tasks under the given parent lake. + Tasks []*GoogleCloudDataplexV1Task `json:"tasks,omitempty"` + + // UnreachableLocations: Locations that could not be reached. + UnreachableLocations []string `json:"unreachableLocations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListTasksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListTasksResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ListZonesResponse: List zones response. +type GoogleCloudDataplexV1ListZonesResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Zones: Zones under the given parent lake. + Zones []*GoogleCloudDataplexV1Zone `json:"zones,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ListZonesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ListZonesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1OperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudDataplexV1OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1Partition: Represents partition metadata +// contained within entity instances. +type GoogleCloudDataplexV1Partition struct { + // Etag: Optional. The etag for this partition. + Etag string `json:"etag,omitempty"` + + // Location: Required. Immutable. The location of the entity data within + // the partition, for example, + // gs://bucket/path/to/entity/key1=value1/key2=value2. Or + // projects//datasets//tables/ + Location string `json:"location,omitempty"` + + // Name: Output only. The values must be HTML URL encoded two times + // before constructing the path. For example, if you have a value of + // "US:CA", encoded it two times and you get "US%253ACA". Then if you + // have the 2nd value is "CA#Sunnyvale", encoded two times and you get + // "CA%2523Sunnyvale". The partition values path is + // "US%253ACA/CA%2523Sunnyvale". The final URL will be + // "https://.../partitions/US%253ACA/CA%2523Sunnyvale". The name field + // in the responses will always have the encoded format. + Name string `json:"name,omitempty"` + + // Values: Required. Immutable. The set of values representing the + // partition, which correspond to the partition schema defined in the + // parent entity. + Values []string `json:"values,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Partition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Partition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1Schema: Schema information describing the +// structure and layout of the data. +type GoogleCloudDataplexV1Schema struct { + // Fields: Optional. The sequence of fields describing data in table + // entities. + Fields []*GoogleCloudDataplexV1SchemaSchemaField `json:"fields,omitempty"` + + // PartitionFields: Optional. The sequence of fields describing the + // partition structure in entities. If this field is empty, there are no + // partitions within the data. + PartitionFields []*GoogleCloudDataplexV1SchemaPartitionField `json:"partitionFields,omitempty"` + + // PartitionStyle: Optional. The structure of paths containing partition + // data within the entity. + // + // Possible values: + // "PARTITION_STYLE_UNSPECIFIED" - PartitionStyle unspecified + // "HIVE_COMPATIBLE" - Partitions are hive-compatible. Examples: + // gs://bucket/path/to/table/dt=2019-10-31/lang=en, + // gs://bucket/path/to/table/dt=2019-10-31/lang=en/late. + PartitionStyle string `json:"partitionStyle,omitempty"` + + // UserManaged: Required. Whether the schema is user-managed or managed + // by the service. - Set user_manage to false if you would like Dataplex + // to help you manage the schema. You will get the full service provided + // by Dataplex discovery, including new data discovery, schema inference + // and schema evolution. You can still provide input the schema of the + // entities, for example renaming a schema field, changing CSV or Json + // options if you think the discovered values are not as accurate. + // Dataplex will consider your input as the initial schema (as if they + // were produced by the previous discovery run), and will evolve schema + // or flag actions based on that. - Set user_manage to true if you would + // like to fully manage the entity schema by yourself. This is useful + // when you would like to manually specify the schema for a table. In + // this case, the schema defined by the user is guaranteed to be kept + // unchanged and would not be overwritten. But this also means Dataplex + // will not provide schema evolution management for you. Dataplex will + // still be able to manage partition registration (i.e., keeping the + // list of partitions up to date) when Dataplex discovery is turned on + // and user_managed is set to true. + UserManaged bool `json:"userManaged,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fields") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Fields") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Schema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Schema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1SchemaPartitionField: Represents a key field +// within the entity's partition structure. You could have up to 20 +// partition fields, but only the first 10 partitions have the filtering +// ability due to performance consideration. +type GoogleCloudDataplexV1SchemaPartitionField struct { + // Name: Required. Partition name is editable if only the partition + // style is not HIVE compatible. The maximum length allowed is 767 + // characters. + Name string `json:"name,omitempty"` + + // Type: Required. Immutable. The type of field. + // + // Possible values: + // "TYPE_UNSPECIFIED" - SchemaType unspecified. + // "BOOLEAN" - Boolean field. + // "BYTE" - Single byte numeric field. + // "INT16" - 16-bit numeric field. + // "INT32" - 32-bit numeric field. + // "INT64" - 64-bit numeric field. + // "FLOAT" - Floating point numeric field. + // "DOUBLE" - Double precision numeric field. + // "DECIMAL" - Real value numeric field. + // "STRING" - Sequence of characters field. + // "BINARY" - Sequence of bytes field. + // "TIMESTAMP" - Date and time field. + // "DATE" - Date field. + // "TIME" - Time field. + // "RECORD" - Structured field. Nested fields that define the + // structure of the map. If all nested fields are nullable, this field + // represents a union. + // "NULL" - Null field that does not have values. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1SchemaPartitionField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1SchemaPartitionField + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1SchemaSchemaField: Represents a column field +// within a table schema. +type GoogleCloudDataplexV1SchemaSchemaField struct { + // Description: Optional. User friendly field description. Must be less + // than or equal to 1024 characters. + Description string `json:"description,omitempty"` + + // Fields: Optional. Any nested field for complex types. + Fields []*GoogleCloudDataplexV1SchemaSchemaField `json:"fields,omitempty"` + + // Mode: Required. Additional field semantics. + // + // Possible values: + // "MODE_UNSPECIFIED" - Mode unspecified. + // "REQUIRED" - The field has required semantics. + // "NULLABLE" - The field has optional semantics, and may be null. + // "REPEATED" - The field has repeated (0 or more) semantics, and is a + // list of values. + Mode string `json:"mode,omitempty"` + + // Name: Required. The name of the field. The maximum length is 767 + // characters. The name must begins with a letter and not contains : and + // .. + Name string `json:"name,omitempty"` + + // Type: Required. The type of field. + // + // Possible values: + // "TYPE_UNSPECIFIED" - SchemaType unspecified. + // "BOOLEAN" - Boolean field. + // "BYTE" - Single byte numeric field. + // "INT16" - 16-bit numeric field. + // "INT32" - 32-bit numeric field. + // "INT64" - 64-bit numeric field. + // "FLOAT" - Floating point numeric field. + // "DOUBLE" - Double precision numeric field. + // "DECIMAL" - Real value numeric field. + // "STRING" - Sequence of characters field. + // "BINARY" - Sequence of bytes field. + // "TIMESTAMP" - Date and time field. + // "DATE" - Date field. + // "TIME" - Time field. + // "RECORD" - Structured field. Nested fields that define the + // structure of the map. If all nested fields are nullable, this field + // represents a union. + // "NULL" - Null field that does not have values. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1SchemaSchemaField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1SchemaSchemaField + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1Session: Represents an active analyze session +// running for a user. +type GoogleCloudDataplexV1Session struct { + // CreateTime: Output only. Session start time. + CreateTime string `json:"createTime,omitempty"` + + // Name: Output only. The relative resource name of the content, of the + // form: + // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environm + // ent/{environment_id}/sessions/{session_id} + Name string `json:"name,omitempty"` + + // Possible values: + // "STATE_UNSPECIFIED" - State is not specified. + // "ACTIVE" - Resource is active, i.e., ready to use. + // "CREATING" - Resource is under creation. + // "DELETING" - Resource is under deletion. + // "ACTION_REQUIRED" - Resource is active but has unresolved actions. + State string `json:"state,omitempty"` + + // UserId: Output only. Email of user running the session. + UserId string `json:"userId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Session) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Session + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1SessionEvent: These messages contain information +// about sessions within an environment. The monitored resource is +// 'Environment'. +type GoogleCloudDataplexV1SessionEvent struct { + // Message: The log message. + Message string `json:"message,omitempty"` + + // Query: The execution details of the query. + Query *GoogleCloudDataplexV1SessionEventQueryDetail `json:"query,omitempty"` + + // SessionId: Unique identifier for the session. + SessionId string `json:"sessionId,omitempty"` + + // Type: The type of the event. + // + // Possible values: + // "EVENT_TYPE_UNSPECIFIED" - An unspecified event type. + // "START" - Event for start of a session. + // "STOP" - Event for stop of a session. + // "QUERY" - Query events in the session. + Type string `json:"type,omitempty"` + + // UserId: The information about the user that created the session. + UserId string `json:"userId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1SessionEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1SessionEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1SessionEventQueryDetail: Execution details of +// the query. +type GoogleCloudDataplexV1SessionEventQueryDetail struct { + // DataProcessedBytes: The data processed by the query. + DataProcessedBytes int64 `json:"dataProcessedBytes,omitempty,string"` + + // Duration: Time taken for execution of the query. + Duration string `json:"duration,omitempty"` + + // Engine: Query Execution engine. + // + // Possible values: + // "ENGINE_UNSPECIFIED" - An unspecified Engine type. + // "SPARK_SQL" - Spark-sql engine is specified in Query. + // "BIGQUERY" - BigQuery engine is specified in Query. + Engine string `json:"engine,omitempty"` + + // QueryId: The unique Query id identifying the query. + QueryId string `json:"queryId,omitempty"` + + // QueryText: The query text executed. + QueryText string `json:"queryText,omitempty"` + + // ResultSizeBytes: The size of results the query produced. + ResultSizeBytes int64 `json:"resultSizeBytes,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DataProcessedBytes") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataProcessedBytes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1SessionEventQueryDetail) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1SessionEventQueryDetail + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1StorageFormat: Describes the format of the data +// within its storage location. +type GoogleCloudDataplexV1StorageFormat struct { + // CompressionFormat: Optional. The compression type associated with the + // stored data. If unspecified, the data is uncompressed. + // + // Possible values: + // "COMPRESSION_FORMAT_UNSPECIFIED" - CompressionFormat unspecified. + // Implies uncompressed data. + // "GZIP" - GZip compressed set of files. + // "BZIP2" - BZip2 compressed set of files. + CompressionFormat string `json:"compressionFormat,omitempty"` + + // Csv: Optional. Additional information about CSV formatted data. + Csv *GoogleCloudDataplexV1StorageFormatCsvOptions `json:"csv,omitempty"` + + // Format: Output only. The data format associated with the stored data, + // which represents content type values. The value is inferred from mime + // type. + // + // Possible values: + // "FORMAT_UNSPECIFIED" - Format unspecified. + // "PARQUET" - Parquet-formatted structured data. + // "AVRO" - Avro-formatted structured data. + // "ORC" - Orc-formatted structured data. + // "CSV" - Csv-formatted semi-structured data. + // "JSON" - Json-formatted semi-structured data. + // "IMAGE" - Image data formats (such as jpg and png). + // "AUDIO" - Audio data formats (such as mp3, and wav). + // "VIDEO" - Video data formats (such as mp4 and mpg). + // "TEXT" - Textual data formats (such as txt and xml). + // "TFRECORD" - TensorFlow record format. + // "OTHER" - Data that doesn't match a specific format. + // "UNKNOWN" - Data of an unknown format. + Format string `json:"format,omitempty"` + + // Json: Optional. Additional information about CSV formatted data. + Json *GoogleCloudDataplexV1StorageFormatJsonOptions `json:"json,omitempty"` + + // MimeType: Required. The mime type descriptor for the data. Must match + // the pattern {type}/{subtype}. Supported values: - + // application/x-parquet - application/x-avro - application/x-orc - + // application/x-tfrecord - application/json - application/{subtypes} - + // text/csv - text/ - image/{image subtype} - video/{video subtype} - + // audio/{audio subtype} + MimeType string `json:"mimeType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompressionFormat") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompressionFormat") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1StorageFormat) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1StorageFormat + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1StorageFormatCsvOptions: Describes CSV and +// similar semi-structured data formats. +type GoogleCloudDataplexV1StorageFormatCsvOptions struct { + // Delimiter: Optional. The delimiter used to separate values. Defaults + // to ','. + Delimiter string `json:"delimiter,omitempty"` + + // Encoding: Optional. The character encoding of the data. Accepts + // "US-ASCII", "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if + // unspecified. + Encoding string `json:"encoding,omitempty"` + + // HeaderRows: Optional. The number of rows to interpret as header rows + // that should be skipped when reading data rows. Defaults to 0. + HeaderRows int64 `json:"headerRows,omitempty"` + + // Quote: Optional. The character used to quote column values. Accepts + // '"' and '''. Defaults to '"' if unspecified. + Quote string `json:"quote,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Delimiter") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Delimiter") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1StorageFormatCsvOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1StorageFormatCsvOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1StorageFormatJsonOptions: Describes JSON data +// format. +type GoogleCloudDataplexV1StorageFormatJsonOptions struct { + // Encoding: Optional. The character encoding of the data. Accepts + // "US-ASCII", "UTF-8" and "ISO-8859-1". Defaults to UTF-8 if not + // specified. + Encoding string `json:"encoding,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Encoding") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Encoding") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1StorageFormatJsonOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1StorageFormatJsonOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1Task: A task represents a user-visible job. +type GoogleCloudDataplexV1Task struct { + // CreateTime: Output only. The time when the task was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Description of the task. + Description string `json:"description,omitempty"` + + // DisplayName: Optional. User friendly display name. + DisplayName string `json:"displayName,omitempty"` + + // ExecutionSpec: Required. Spec related to how a task is executed. + ExecutionSpec *GoogleCloudDataplexV1TaskExecutionSpec `json:"executionSpec,omitempty"` + + // Labels: Optional. User-defined labels for the task. + Labels map[string]string `json:"labels,omitempty"` + + // 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}. + Name string `json:"name,omitempty"` + + // Spark: Config related to running custom Spark tasks. + Spark *GoogleCloudDataplexV1TaskSparkTaskConfig `json:"spark,omitempty"` + + // State: Output only. Current state of the task. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is not specified. + // "ACTIVE" - Resource is active, i.e., ready to use. + // "CREATING" - Resource is under creation. + // "DELETING" - Resource is under deletion. + // "ACTION_REQUIRED" - Resource is active but has unresolved actions. + State string `json:"state,omitempty"` + + // TriggerSpec: Required. Spec related to how often and when a task + // should be triggered. + TriggerSpec *GoogleCloudDataplexV1TaskTriggerSpec `json:"triggerSpec,omitempty"` + + // Uid: Output only. System generated globally unique ID for the task. + // This ID will be different if the task is deleted and re-created with + // the same name. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the task was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Task) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Task + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1TaskExecutionSpec: Execution related settings, +// like retry and service_account. +type GoogleCloudDataplexV1TaskExecutionSpec struct { + // Args: Optional. The arguments to pass to the task. The args can use + // placeholders of the format ${placeholder} as part of key/value + // string. These will be interpolated before passing the args to the + // driver. Currently supported placeholders: - ${task_id} - ${job_time} + // To pass positional args, set the key as TASK_ARGS. The value should + // be a comma-separated string of all the positional arguments. To use a + // delimiter other than comma, refer to + // https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case + // of other keys being present in the args, then TASK_ARGS will be + // passed as the last argument. + Args map[string]string `json:"args,omitempty"` + + // MaxJobExecutionLifetime: Optional. The maximum duration after which + // the job execution is expired. + MaxJobExecutionLifetime string `json:"maxJobExecutionLifetime,omitempty"` + + // ServiceAccount: Required. Service account to use to execute a task. + // If not provided, the default Compute service account for the project + // is used. + ServiceAccount string `json:"serviceAccount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Args") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Args") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1TaskExecutionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1TaskExecutionSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1TaskInfrastructureSpec: Configuration for the +// underlying infrastructure used to run workloads. +type GoogleCloudDataplexV1TaskInfrastructureSpec struct { + // Batch: Compute resources needed for a Task when using Dataproc + // Serverless. + Batch *GoogleCloudDataplexV1TaskInfrastructureSpecBatchComputeResources `json:"batch,omitempty"` + + // ContainerImage: Container Image Runtime Configuration. + ContainerImage *GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime `json:"containerImage,omitempty"` + + // VpcNetwork: Vpc network. + VpcNetwork *GoogleCloudDataplexV1TaskInfrastructureSpecVpcNetwork `json:"vpcNetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Batch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Batch") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1TaskInfrastructureSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1TaskInfrastructureSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1TaskInfrastructureSpecBatchComputeResources: +// Batch compute resources associated with the task. +type GoogleCloudDataplexV1TaskInfrastructureSpecBatchComputeResources struct { + // ExecutorsCount: Optional. Total number of job executors. + ExecutorsCount int64 `json:"executorsCount,omitempty"` + + // MaxExecutorsCount: Optional. Max configurable executors. If + // max_executors_count > executors_count, then auto-scaling is enabled. + MaxExecutorsCount int64 `json:"maxExecutorsCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExecutorsCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExecutorsCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1TaskInfrastructureSpecBatchComputeResources) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1TaskInfrastructureSpecBatchComputeResources + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime: +// Container Image Runtime Configuration used with Batch execution. +type GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime struct { + // JavaJars: Optional. A list of Java JARS to add to the classpath. + // Valid input includes Cloud Storage URIs to Jar binaries. For example, + // gs://bucket-name/my/path/to/file.jar + JavaJars []string `json:"javaJars,omitempty"` + + // Properties: Optional. Override to common configuration of open source + // components installed on the Dataproc cluster. The properties to set + // on daemon config files. Property keys are specified in + // prefix:property format, for example core:hadoop.tmp.dir. For more + // information, see Cluster properties + // (https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + Properties map[string]string `json:"properties,omitempty"` + + // PythonPackages: Optional. A list of python packages to be installed. + // Valid formats include Cloud Storage URI to a PIP installable library. + // For example, gs://bucket-name/my/path/to/lib.tar.gz + PythonPackages []string `json:"pythonPackages,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JavaJars") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JavaJars") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1TaskInfrastructureSpecVpcNetwork: Cloud VPC +// Network used to run the infrastructure. +type GoogleCloudDataplexV1TaskInfrastructureSpecVpcNetwork struct { + // Network: Optional. The Cloud VPC network in which the job is run. By + // default, the Cloud VPC network named Default within the project is + // used. + Network string `json:"network,omitempty"` + + // NetworkTags: Optional. List of network tags to apply to the job. + NetworkTags []string `json:"networkTags,omitempty"` + + // SubNetwork: Optional. The Cloud VPC sub-network in which the job is + // run. + SubNetwork string `json:"subNetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Network") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1TaskInfrastructureSpecVpcNetwork) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1TaskInfrastructureSpecVpcNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1TaskSparkTaskConfig: User-specified config for +// running a Spark task. +type GoogleCloudDataplexV1TaskSparkTaskConfig struct { + // ArchiveUris: Optional. Cloud Storage URIs of archives to be extracted + // into the working directory of each executor. Supported file types: + // .jar, .tar, .tar.gz, .tgz, and .zip. + ArchiveUris []string `json:"archiveUris,omitempty"` + + // FileUris: Optional. Cloud Storage URIs of files to be placed in the + // working directory of each executor. + FileUris []string `json:"fileUris,omitempty"` + + // InfrastructureSpec: Optional. Infrastructure specification for the + // execution. + InfrastructureSpec *GoogleCloudDataplexV1TaskInfrastructureSpec `json:"infrastructureSpec,omitempty"` + + // MainClass: The name of the driver's main class. The jar file that + // contains the class must be in the default CLASSPATH or specified in + // jar_file_uris. The execution args are passed in as a sequence of + // named process arguments (--key=value). + MainClass string `json:"mainClass,omitempty"` + + // MainJarFileUri: The Cloud Storage URI of the jar file that contains + // the main class. The execution args are passed in as a sequence of + // named process arguments (--key=value). + MainJarFileUri string `json:"mainJarFileUri,omitempty"` + + // PythonScriptFile: The Gcloud Storage URI of the main Python file to + // use as the driver. Must be a .py file. The execution args are passed + // in as a sequence of named process arguments (--key=value). + PythonScriptFile string `json:"pythonScriptFile,omitempty"` + + // SqlScript: The query text. The execution args are used to declare a + // set of script variables (set key="value";). + SqlScript string `json:"sqlScript,omitempty"` + + // SqlScriptFile: A reference to a query file. This can be the Cloud + // Storage URI of the query file or it can the path to a SqlScript + // Content. The execution args are used to declare a set of script + // variables (set key="value";). + SqlScriptFile string `json:"sqlScriptFile,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ArchiveUris") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ArchiveUris") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1TaskSparkTaskConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1TaskSparkTaskConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1TaskTriggerSpec: Task scheduling and trigger +// settings. +type GoogleCloudDataplexV1TaskTriggerSpec struct { + // Disabled: Optional. Prevent the task from executing. This does not + // cancel already running tasks. It is intended to temporarily disable + // RECURRING tasks. + Disabled bool `json:"disabled,omitempty"` + + // MaxRetries: Optional. Number of retry attempts before aborting. Set + // to zero to never attempt to retry a failed task. + MaxRetries int64 `json:"maxRetries,omitempty"` + + // Schedule: Optional. Cron schedule + // (https://en.wikipedia.org/wiki/Cron) for running tasks periodically. + // To explicitly set a timezone to the cron tab, apply a prefix in the + // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". The + // ${IANA_TIME_ZONE} may only be a valid string from IANA time zone + // database. For example, "CRON_TZ=America/New_York 1 * * * *", or + // "TZ=America/New_York 1 * * * *". This field is required for RECURRING + // tasks. + Schedule string `json:"schedule,omitempty"` + + // StartTime: Optional. The first run of the task will be after this + // time. If not specified, the task will run shortly after being + // submitted if ON_DEMAND and based on the schedule if RECURRING. + StartTime string `json:"startTime,omitempty"` + + // Type: Required. Immutable. Trigger type of the user-specified Task. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified trigger type. + // "ON_DEMAND" - The task runs one-time shortly after Task Creation. + // "RECURRING" - The task is scheduled to run periodically. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Disabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1TaskTriggerSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1TaskTriggerSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1Zone: A zone represents a logical group of +// related assets within a lake. A zone can be used to map to +// organizational structure or represent stages of data readiness from +// raw to curated. It provides managing behavior that is shared or +// inherited by all contained assets. +type GoogleCloudDataplexV1Zone struct { + // AssetStatus: Output only. Aggregated status of the underlying assets + // of the zone. + AssetStatus *GoogleCloudDataplexV1AssetStatus `json:"assetStatus,omitempty"` + + // CreateTime: Output only. The time when the zone was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. Description of the zone. + Description string `json:"description,omitempty"` + + // DiscoverySpec: Optional. Specification of the discovery feature + // applied to data in this zone. + DiscoverySpec *GoogleCloudDataplexV1ZoneDiscoverySpec `json:"discoverySpec,omitempty"` + + // DisplayName: Optional. User friendly display name. + DisplayName string `json:"displayName,omitempty"` + + // Labels: Optional. User defined labels for the zone. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The relative resource name of the zone, of the + // form: + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zone + // s/{zone_id}. + Name string `json:"name,omitempty"` + + // ResourceSpec: Required. Specification of the resources that are + // referenced by the assets within this zone. + ResourceSpec *GoogleCloudDataplexV1ZoneResourceSpec `json:"resourceSpec,omitempty"` + + // State: Output only. Current state of the zone. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is not specified. + // "ACTIVE" - Resource is active, i.e., ready to use. + // "CREATING" - Resource is under creation. + // "DELETING" - Resource is under deletion. + // "ACTION_REQUIRED" - Resource is active but has unresolved actions. + State string `json:"state,omitempty"` + + // Type: Required. Immutable. The type of the zone. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Zone type not specified. + // "RAW" - A zone that contains data that needs further processing + // before it is considered generally ready for consumption and analytics + // workloads. + // "CURATED" - A zone that contains data that is considered to be + // ready for broader consumption and analytics workloads. Curated + // structured data stored in Cloud Storage must conform to certain file + // formats (parquet, avro and orc) and organized in a hive-compatible + // directory layout. + Type string `json:"type,omitempty"` + + // Uid: Output only. System generated globally unique ID for the zone. + // This ID will be different if the zone is deleted and re-created with + // the same name. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The time when the zone was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AssetStatus") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AssetStatus") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1Zone) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1Zone + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ZoneDiscoverySpec: Settings to manage the +// metadata discovery and publishing in a zone. +type GoogleCloudDataplexV1ZoneDiscoverySpec struct { + // CsvOptions: Optional. Configuration for CSV data. + CsvOptions *GoogleCloudDataplexV1ZoneDiscoverySpecCsvOptions `json:"csvOptions,omitempty"` + + // Enabled: Required. Whether discovery is enabled. + Enabled bool `json:"enabled,omitempty"` + + // ExcludePatterns: Optional. The list of patterns to apply for + // selecting data to exclude during discovery. For Cloud Storage bucket + // assets, these are interpreted as glob patterns used to match object + // names. For BigQuery dataset assets, these are interpreted as patterns + // to match table names. + ExcludePatterns []string `json:"excludePatterns,omitempty"` + + // IncludePatterns: Optional. The list of patterns to apply for + // selecting data to include during discovery if only a subset of the + // data should considered. For Cloud Storage bucket assets, these are + // interpreted as glob patterns used to match object names. For BigQuery + // dataset assets, these are interpreted as patterns to match table + // names. + IncludePatterns []string `json:"includePatterns,omitempty"` + + // JsonOptions: Optional. Configuration for Json data. + JsonOptions *GoogleCloudDataplexV1ZoneDiscoverySpecJsonOptions `json:"jsonOptions,omitempty"` + + // Schedule: Optional. Cron schedule + // (https://en.wikipedia.org/wiki/Cron) for running discovery + // periodically. Successive discovery runs must be scheduled at least 60 + // minutes apart. The default value is to run discovery every 60 + // minutes. To explicitly set a timezone to the cron tab, apply a prefix + // in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or + // TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid + // string from IANA time zone database. For example, + // "CRON_TZ=America/New_York 1 * * * *", or "TZ=America/New_York 1 * * * + // *". + Schedule string `json:"schedule,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CsvOptions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CsvOptions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ZoneDiscoverySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ZoneDiscoverySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ZoneDiscoverySpecCsvOptions: Describe CSV and +// similar semi-structured data formats. +type GoogleCloudDataplexV1ZoneDiscoverySpecCsvOptions struct { + // Delimiter: Optional. The delimiter being used to separate values. + // This defaults to ','. + Delimiter string `json:"delimiter,omitempty"` + + // DisableTypeInference: Optional. Whether to disable the inference of + // data type for CSV data. If true, all columns will be registered as + // strings. + DisableTypeInference bool `json:"disableTypeInference,omitempty"` + + // Encoding: Optional. The character encoding of the data. The default + // is UTF-8. + Encoding string `json:"encoding,omitempty"` + + // HeaderRows: Optional. The number of rows to interpret as header rows + // that should be skipped when reading data rows. + HeaderRows int64 `json:"headerRows,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Delimiter") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Delimiter") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ZoneDiscoverySpecCsvOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ZoneDiscoverySpecCsvOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ZoneDiscoverySpecJsonOptions: Describe JSON data +// format. +type GoogleCloudDataplexV1ZoneDiscoverySpecJsonOptions struct { + // DisableTypeInference: Optional. Whether to disable the inference of + // data type for Json data. If true, all columns will be registered as + // their primitive types (strings, number or boolean). + DisableTypeInference bool `json:"disableTypeInference,omitempty"` + + // Encoding: Optional. The character encoding of the data. The default + // is UTF-8. + Encoding string `json:"encoding,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DisableTypeInference") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisableTypeInference") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ZoneDiscoverySpecJsonOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ZoneDiscoverySpecJsonOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDataplexV1ZoneResourceSpec: Settings for resources +// attached as assets within a zone. +type GoogleCloudDataplexV1ZoneResourceSpec struct { + // LocationType: Required. Immutable. The location type of the resources + // that are allowed to be attached to the assets within this zone. + // + // Possible values: + // "LOCATION_TYPE_UNSPECIFIED" - Unspecified location type. + // "SINGLE_REGION" - Resources that are associated with a single + // region. + // "MULTI_REGION" - Resources that are associated with a multi-region + // location. + LocationType string `json:"locationType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LocationType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LocationType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDataplexV1ZoneResourceSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDataplexV1ZoneResourceSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationListLocationsResponse: The response message for +// Locations.ListLocations. +type GoogleCloudLocationListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationLocation: A resource that represents Google Cloud +// Platform location. +type GoogleCloudLocationLocation struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditConfig: Specifies the audit configuration for a +// service. The configuration determines which permission types are +// logged, and what identities, if any, are exempted from logging. An +// AuditConfig must have one or more AuditLogConfigs.If there are +// AuditConfigs for both allServices and a specific service, the union +// of the two AuditConfigs is used for that service: the log_types +// specified in each AuditConfig are enabled, and the exempted_members +// in each AuditLogConfig are exempted.Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// jose@example.com from DATA_READ logging, and aliya@example.com from +// DATA_WRITE logging. +type GoogleIamV1AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, storage.googleapis.com, cloudsql.googleapis.com. + // allServices is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditLogConfig: Provides the configuration for logging a +// type of permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type GoogleIamV1AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Binding: Associates members, or principals, with a role. +type GoogleIamV1Binding struct { + // Condition: The condition that is associated with this binding.If the + // condition evaluates to true, then this binding applies to the current + // request.If the condition evaluates to false, then this binding does + // not apply to the current request. However, a different role binding + // might grant the same role to one or more of the principals in this + // binding.To learn which resources support conditions in their IAM + // policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *GoogleTypeExpr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Cloud + // Platform resource. members can have the following values: allUsers: A + // special identifier that represents anyone who is on the internet; + // with or without a Google account. allAuthenticatedUsers: A special + // identifier that represents anyone who is authenticated with a Google + // account or a service account. user:{emailid}: An email address that + // represents a specific Google account. For example, alice@example.com + // . serviceAccount:{emailid}: An email address that represents a + // service account. For example, + // my-other-app@appspot.gserviceaccount.com. group:{emailid}: An email + // address that represents a Google group. For example, + // admins@example.com. deleted:user:{emailid}?uid={uniqueid}: An email + // address (plus unique identifier) representing a user that has been + // recently deleted. For example, + // alice@example.com?uid=123456789012345678901. If the user is + // recovered, this value reverts to user:{emailid} and the recovered + // user retains the role in the binding. + // deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. + // If the service account is undeleted, this value reverts to + // serviceAccount:{emailid} and the undeleted service account retains + // the role in the binding. deleted:group:{emailid}?uid={uniqueid}: An + // email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // admins@example.com?uid=123456789012345678901. If the group is + // recovered, this value reverts to group:{emailid} and the recovered + // group retains the role in the binding. domain:{domain}: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, google.com or example.com. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of members, or principals. + // For example, roles/viewer, roles/editor, or roles/owner. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, +// which specifies access controls for Google Cloud resources.A Policy +// is a collection of bindings. A binding binds one or more members, or +// principals, to a single role. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// role is a named list of permissions; each role can be an IAM +// predefined role or a user-created custom role.For some types of +// Google Cloud resources, a binding can also specify a condition, which +// is a logical expression that allows access to a resource only if the +// expression evaluates to true. A condition can add constraints based +// on attributes of the request, the resource, or both. To learn which +// resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies).JSON +// example: { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } YAML example: bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type GoogleIamV1Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of members, or principals, with a role. + // Optionally, may specify a condition that determines how and when the + // bindings are applied. Each of the bindings must contain at least one + // principal.The bindings in a Policy can refer to up to 1,500 + // principals; up to 250 of these principals can be Google groups. Each + // occurrence of a principal counts towards these limits. For example, + // if the bindings grant 50 different roles to user:alice@example.com, + // and not to any other principal, then you can add another 1,450 + // principals to the bindings in the Policy. + Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"` + + // Etag: etag is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the etag in + // the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An etag is returned in the response to + // getIamPolicy, and systems are expected to put that etag in the + // request to setIamPolicy to ensure that their change will be applied + // to the same version of the policy.Important: If you use IAM + // Conditions, you must include the etag field whenever you call + // setIamPolicy. If you omit this field, then IAM allows you to + // overwrite a version 3 policy with a version 1 policy, and all of the + // conditions in the version 3 policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy.Valid values are 0, 1, + // and 3. Requests that specify an invalid value are rejected.Any + // operation that affects conditional role bindings must specify version + // 3. This requirement applies to the following operations: Getting a + // policy that includes a conditional role binding Adding a conditional + // role binding to a policy Changing a conditional role binding in a + // policy Removing any role binding, with or without a condition, from a + // policy that includes conditionsImportant: If you use IAM Conditions, + // you must include the etag field whenever you call setIamPolicy. If + // you omit this field, then IAM allows you to overwrite a version 3 + // policy with a version 1 policy, and all of the conditions in the + // version 3 policy are lost.If a policy does not include any + // conditions, operations on that policy may specify any valid version + // or leave the field unset.To learn which resources support conditions + // in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1SetIamPolicyRequest: Request message for SetIamPolicy +// method. +type GoogleIamV1SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the resource. + // The size of the policy is limited to a few 10s of KB. An empty policy + // is a valid policy but certain Cloud Platform services (such as + // Projects) might reject them. + Policy *GoogleIamV1Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used:paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1TestIamPermissionsRequest: Request message for +// TestIamPermissions method. +type GoogleIamV1TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the resource. + // Permissions with wildcards (such as '*' or 'storage.*') are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1TestIamPermissionsResponse: Response message for +// TestIamPermissions method. +type GoogleIamV1TestIamPermissionsResponse struct { + // Permissions: A subset of TestPermissionsRequest.permissions that the + // caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningCancelOperationRequest: The request message for +// Operations.CancelOperation. +type GoogleLongrunningCancelOperationRequest struct { +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is false, it means the operation is still in + // progress. If true, the operation is completed, and either error or + // response is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the name should be a resource name ending with + // operations/{unique_id}. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as Delete, the + // response is google.protobuf.Empty. If the original method is standard + // Get/Create/Update, the response should be the resource. For other + // methods, the response should have the type XxxResponse, where Xxx is + // the original method name. For example, if the original method name is + // TakeSnapshot(), the inferred response type is TakeSnapshotResponse. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleRpcStatus: The Status type defines a logical error model that +// is suitable for different programming environments, including REST +// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// Status message contains three pieces of data: error code, error +// message, and error details.You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeExpr: Represents a textual expression in the Common +// Expression Language (CEL) syntax. CEL is a C-like expression +// language. The syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec.Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type GoogleTypeExpr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "dataplex.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.get" call. +// Exactly one of *GoogleCloudLocationLocation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleCloudLocationLocation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudLocationLocation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the next_page_token field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.list" call. +// Exactly one of *GoogleCloudLocationListLocationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleCloudLocationListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in AIP-160 (https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "GoogleCloudLocationListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.create": + +type ProjectsLocationsLakesCreateCall struct { + s *Service + parent string + googleclouddataplexv1lake *GoogleCloudDataplexV1Lake + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a lake resource. +// +// - 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesCreateCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1lake) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lakes") + 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.lakes.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesCreateCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a lake resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "lakeId": { + // "description": "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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the lake location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/lakes", + // "request": { + // "$ref": "GoogleCloudDataplexV1Lake" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.delete": + +type ProjectsLocationsLakesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// 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 + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesDeleteCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesDeleteCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a lake resource. All zones within the lake must be deleted before the lake can be deleted.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.lakes.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.get": + +type ProjectsLocationsLakesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a lake resource. +// +// - 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 information. +func (c *ProjectsLocationsLakesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesGetCall) Context(ctx context.Context) *ProjectsLocationsLakesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesGetCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.get" call. +// Exactly one of *GoogleCloudDataplexV1Lake or error will be non-nil. +// 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) { + 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, &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, err + } + ret := &GoogleCloudDataplexV1Lake{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a lake resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1Lake" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.getIamPolicy": + +type ProjectsLocationsLakesGetIamPolicyCall 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 the operation documentation 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 + 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 information. +func (c *ProjectsLocationsLakesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesGetIamPolicyCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesGetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.list": + +type ProjectsLocationsLakesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// 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) List(parent string) *ProjectsLocationsLakesListCall { + c := &ProjectsLocationsLakesListCall{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 { + 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 information. +func (c *ProjectsLocationsLakesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesListCall) Context(ctx context.Context) *ProjectsLocationsLakesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lakes") + 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.lakes.list" call. +// Exactly one of *GoogleCloudDataplexV1ListLakesResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *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 *ProjectsLocationsLakesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListLakesResponse, 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, &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, err + } + ret := &GoogleCloudDataplexV1ListLakesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists lake resources in a project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter request.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields for the result.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the lake location, of the form: projects/{project_number}/locations/{location_id} where location_id refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/lakes", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListLakesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListLakesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.patch": + +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 +} + +// 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1lake) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesPatchCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a lake resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.lakes.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The relative resource name of the lake, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1Lake" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.setIamPolicy": + +type ProjectsLocationsLakesSetIamPolicyCall 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 the operation documentation 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 information. +func (c *ProjectsLocationsLakesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesSetIamPolicyCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesSetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.testIamPermissions": + +type ProjectsLocationsLakesTestIamPermissionsCall 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 the operation documentation 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 + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTestIamPermissionsCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.actions.list": + +type ProjectsLocationsLakesActionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists action resources in a lake. +// +// - 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 +} + +// 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 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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesActionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesActionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesActionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesActionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesActionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesActionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesActionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesActionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/actions") + 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.lakes.actions.list" call. +// Exactly one of *GoogleCloudDataplexV1ListActionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *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 *ProjectsLocationsLakesActionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListActionsResponse, 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, &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, err + } + ret := &GoogleCloudDataplexV1ListActionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists action resources in a lake.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/actions", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.actions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/actions", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListActionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesActionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListActionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.content.getIamPolicy": + +type ProjectsLocationsLakesContentGetIamPolicyCall 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 the operation documentation 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 + 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 information. +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.content.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesContentGetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.content.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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.content.setIamPolicy": + +type ProjectsLocationsLakesContentSetIamPolicyCall 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 the operation documentation 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesContentSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesContentSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesContentSetIamPolicyCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.content.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesContentSetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.content.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.content.testIamPermissions": + +type ProjectsLocationsLakesContentTestIamPermissionsCall 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 the operation documentation 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 information. +func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesContentTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.content.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesContentTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/content/{contentId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.content.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.contentitems.create": + +type ProjectsLocationsLakesContentitemsCreateCall struct { + s *Service + parent string + googleclouddataplexv1content *GoogleCloudDataplexV1Content + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a content. +// +// - 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 +} + +// 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 information. +func (c *ProjectsLocationsLakesContentitemsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesContentitemsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesContentitemsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentitemsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1content) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contentitems") + 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.lakes.contentitems.create" call. +// Exactly one of *GoogleCloudDataplexV1Content or error will be +// non-nil. 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) { + 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, &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, err + } + ret := &GoogleCloudDataplexV1Content{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create a content.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.contentitems.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/contentitems", + // "request": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, + // "response": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.contentitems.delete": + +type ProjectsLocationsLakesContentitemsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a content. +// +// - name: The resource name of the content: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/conten +// t/{content_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 information. +func (c *ProjectsLocationsLakesContentitemsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesContentitemsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesContentitemsDeleteCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.contentitems.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsLakesContentitemsDeleteCall) 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, &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, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Delete a content.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.lakes.contentitems.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.contentitems.get": + +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}/conten +// t/{content_id}. +func (r *ProjectsLocationsLakesContentitemsService) Get(name string) *ProjectsLocationsLakesContentitemsGetCall { + c := &ProjectsLocationsLakesContentitemsGetCall{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 *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 information. +func (c *ProjectsLocationsLakesContentitemsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesContentitemsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesContentitemsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesContentitemsGetCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.contentitems.get" call. +// Exactly one of *GoogleCloudDataplexV1Content or error will be +// non-nil. 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 *ProjectsLocationsLakesContentitemsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, 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, &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, err + } + ret := &GoogleCloudDataplexV1Content{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get a content resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.contentitems.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the content: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. Specify content view to make a partial request.", + // "enum": [ + // "CONTENT_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "Content view not specified. Defaults to BASIC. The API will default to the BASIC view.", + // "Will not return the data_text field.", + // "Returns the complete proto." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.contentitems.list": + +type ProjectsLocationsLakesContentitemsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List content. +// +// - 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 information. +func (c *ProjectsLocationsLakesContentitemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesContentitemsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesContentitemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesContentitemsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesContentitemsListCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesContentitemsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesContentitemsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contentitems") + 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.lakes.contentitems.list" call. +// Exactly one of *GoogleCloudDataplexV1ListContentResponse or error +// will be non-nil. 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 *ProjectsLocationsLakesContentitemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListContentResponse, 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, &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, err + } + ret := &GoogleCloudDataplexV1ListContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List content.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.contentitems.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/contentitems", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListContentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesContentitemsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListContentResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.contentitems.patch": + +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}/conten +// t/{content_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 *ProjectsLocationsLakesContentitemsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesContentitemsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesContentitemsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesContentitemsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesContentitemsPatchCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1content) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.contentitems.patch" call. +// Exactly one of *GoogleCloudDataplexV1Content or error will be +// non-nil. 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 *ProjectsLocationsLakesContentitemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Content, 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, &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, err + } + ret := &GoogleCloudDataplexV1Content{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update a content. Only supports full resource update.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/contentitems/{contentitemsId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.lakes.contentitems.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The relative resource name of the content, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems/.*$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, + // "response": { + // "$ref": "GoogleCloudDataplexV1Content" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.environments.create": + +type ProjectsLocationsLakesEnvironmentsCreateCall struct { + s *Service + parent string + googleclouddataplexv1environment *GoogleCloudDataplexV1Environment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create an 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 + 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) + 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 information. +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1environment) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments") + 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.lakes.environments.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesEnvironmentsCreateCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create an environment resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.environments.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "environmentId": { + // "description": "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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/environments", + // "request": { + // "$ref": "GoogleCloudDataplexV1Environment" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.environments.delete": + +type ProjectsLocationsLakesEnvironmentsDeleteCall struct { + s *Service + name string + 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. +// +// - name: The resource name of the environment: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/enviro +// nments/{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 information. +func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.environments.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Delete the environment resource. All the child resources must have been deleted before environment deletion can be initiated.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.lakes.environments.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.environments.get": + +type ProjectsLocationsLakesEnvironmentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get environment resource. +// +// - name: The resource name of the environment: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/enviro +// nments/{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 information. +func (c *ProjectsLocationsLakesEnvironmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesEnvironmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesEnvironmentsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesEnvironmentsGetCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.environments.get" call. +// Exactly one of *GoogleCloudDataplexV1Environment or error will be +// non-nil. 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 googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleCloudDataplexV1Environment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get environment resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.environments.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1Environment" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.environments.getIamPolicy": + +type ProjectsLocationsLakesEnvironmentsGetIamPolicyCall 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 the operation documentation 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 + 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 information. +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.environments.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesEnvironmentsGetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.environments.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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.environments.list": + +type ProjectsLocationsLakesEnvironmentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists environments under the given 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)} + 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 information. +func (c *ProjectsLocationsLakesEnvironmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesEnvironmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesEnvironmentsListCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesEnvironmentsListCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments") + 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.lakes.environments.list" call. +// Exactly one of *GoogleCloudDataplexV1ListEnvironmentsResponse or +// error will be non-nil. 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 googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleCloudDataplexV1ListEnvironmentsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists environments under the given lake.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.environments.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter request.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields for the result.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/environments", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListEnvironmentsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesEnvironmentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEnvironmentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.environments.patch": + +type ProjectsLocationsLakesEnvironmentsPatchCall struct { + s *Service + name string + googleclouddataplexv1environment *GoogleCloudDataplexV1Environment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update the environment resource. +// +// - name: Output only. The relative resource name of the environment, +// of the form: +// projects/{project_id}/locations/{location_id}/lakes/{lake_id}/enviro +// nment/{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 +} + +// 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesEnvironmentsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesEnvironmentsPatchCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1environment) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.environments.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesEnvironmentsPatchCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update the environment resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.lakes.environments.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The relative resource name of the environment, of the form: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1Environment" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.environments.setIamPolicy": + +type ProjectsLocationsLakesEnvironmentsSetIamPolicyCall 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 the operation documentation 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.environments.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesEnvironmentsSetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.environments.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.environments.testIamPermissions": + +type ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall 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 the operation documentation 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 information. +func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.environments.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesEnvironmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.environments.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.environments.sessions.list": + +type ProjectsLocationsLakesEnvironmentsSessionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists session resources in an environment. +// +// - parent: The resource name of the parent environment: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/en +// vironment/{environment_id}. +func (r *ProjectsLocationsLakesEnvironmentsSessionsService) List(parent string) *ProjectsLocationsLakesEnvironmentsSessionsListCall { + c := &ProjectsLocationsLakesEnvironmentsSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + 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 information. +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesEnvironmentsSessionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesEnvironmentsSessionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesEnvironmentsSessionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions") + 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.lakes.environments.sessions.list" call. +// Exactly one of *GoogleCloudDataplexV1ListSessionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleCloudDataplexV1ListSessionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists session resources in an environment.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/environments/{environmentsId}/sessions", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.environments.sessions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/sessions", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListSessionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListSessionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.tasks.create": + +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_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 +} + +// TaskId sets the optional parameter "taskId": Required. Task +// identifier. +func (c *ProjectsLocationsLakesTasksCreateCall) TaskId(taskId string) *ProjectsLocationsLakesTasksCreateCall { + c.urlParams_.Set("taskId", taskId) + 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 { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesTasksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesTasksCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1task) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tasks") + 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.lakes.tasks.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesTasksCreateCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a task resource within a lake.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.tasks.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "taskId": { + // "description": "Required. Task identifier.", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/tasks", + // "request": { + // "$ref": "GoogleCloudDataplexV1Task" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.tasks.delete": + +type ProjectsLocationsLakesTasksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete the task resource. +// +// - name: The resource name of the task: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id} +// /task/{task_id}`. +func (r *ProjectsLocationsLakesTasksService) Delete(name string) *ProjectsLocationsLakesTasksDeleteCall { + c := &ProjectsLocationsLakesTasksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksDeleteCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.tasks.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesTasksDeleteCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Delete the task resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.lakes.tasks.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /task/{task_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.tasks.get": + +type ProjectsLocationsLakesTasksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get task resource. +// +// - name: The resource name of the task: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id} +// /tasks/{tasks_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 information. +func (c *ProjectsLocationsLakesTasksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesTasksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksGetCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksGetCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.tasks.get" call. +// Exactly one of *GoogleCloudDataplexV1Task or error will be non-nil. +// 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) { + 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, &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, err + } + ret := &GoogleCloudDataplexV1Task{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get task resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.tasks.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /tasks/{tasks_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1Task" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.tasks.getIamPolicy": + +type ProjectsLocationsLakesTasksGetIamPolicyCall 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 the operation documentation 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 + 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 information. +func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.tasks.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesTasksGetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.tasks.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.tasks.list": + +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 +} + +// 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) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesTasksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesTasksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksListCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksListCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tasks") + 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.lakes.tasks.list" call. +// Exactly one of *GoogleCloudDataplexV1ListTasksResponse or error will +// be non-nil. 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) { + 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, &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, err + } + ret := &GoogleCloudDataplexV1ListTasksResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists tasks under the given lake.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.tasks.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter request.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields for the result.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/tasks", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListTasksResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesTasksListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListTasksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.tasks.patch": + +type ProjectsLocationsLakesTasksPatchCall struct { + s *Service + name string + googleclouddataplexv1task *GoogleCloudDataplexV1Task + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update the task 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)} + 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksPatchCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1task) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.tasks.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesTasksPatchCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update the task resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.lakes.tasks.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The relative resource name of the task, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ tasks/{task_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1Task" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.tasks.setIamPolicy": + +type ProjectsLocationsLakesTasksSetIamPolicyCall 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 the operation documentation 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 information. +func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.tasks.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesTasksSetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.tasks.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.tasks.testIamPermissions": + +type ProjectsLocationsLakesTasksTestIamPermissionsCall 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 the operation documentation 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 + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.tasks.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesTasksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.tasks.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.tasks.jobs.cancel": + +type ProjectsLocationsLakesTasksJobsCancelCall struct { + s *Service + name string + googleclouddataplexv1canceljobrequest *GoogleCloudDataplexV1CancelJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// 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/{task_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 information. +func (c *ProjectsLocationsLakesTasksJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksJobsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksJobsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksJobsCancelCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1canceljobrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.tasks.jobs.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsLakesTasksJobsCancelCall) 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, &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, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Cancel jobs running for the task resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}/jobs/{jobsId}:cancel", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.tasks.jobs.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /task/{task_id}/job/{job_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "GoogleCloudDataplexV1CancelJobRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.tasks.jobs.get": + +type ProjectsLocationsLakesTasksJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get job resource. +// +// - name: The resource name of the job: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id} +// /tasks/{task_id}/jobs/{job_id}. +func (r *ProjectsLocationsLakesTasksJobsService) Get(name string) *ProjectsLocationsLakesTasksJobsGetCall { + c := &ProjectsLocationsLakesTasksJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesTasksJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksJobsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesTasksJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksJobsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksJobsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesTasksJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.tasks.jobs.get" call. +// Exactly one of *GoogleCloudDataplexV1Job or error will be non-nil. +// 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) { + 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, &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, err + } + ret := &GoogleCloudDataplexV1Job{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get job resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}/jobs/{jobsId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.tasks.jobs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /tasks/{task_id}/jobs/{job_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1Job" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.tasks.jobs.list": + +type ProjectsLocationsLakesTasksJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Jobs under the given task. +// +// - parent: The resource name of the parent environment: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ta +// sks/{task_id}. +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 information. +func (c *ProjectsLocationsLakesTasksJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesTasksJobsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesTasksJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesTasksJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesTasksJobsListCall) Context(ctx context.Context) *ProjectsLocationsLakesTasksJobsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesTasksJobsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesTasksJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs") + 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.lakes.tasks.jobs.list" call. +// Exactly one of *GoogleCloudDataplexV1ListJobsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *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 *ProjectsLocationsLakesTasksJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListJobsResponse, 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, &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, err + } + ret := &GoogleCloudDataplexV1ListJobsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Jobs under the given task.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/tasks/{tasksId}/jobs", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.tasks.jobs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/jobs", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListJobsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesTasksJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.zones.create": + +type ProjectsLocationsLakesZonesCreateCall struct { + s *Service + parent string + googleclouddataplexv1zone *GoogleCloudDataplexV1Zone + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a zone resource within a lake. +// +// - 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1zone) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/zones") + 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.lakes.zones.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesCreateCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a zone resource within a lake.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.zones.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // }, + // "zoneId": { + // "description": "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\")", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/zones", + // "request": { + // "$ref": "GoogleCloudDataplexV1Zone" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.delete": + +type ProjectsLocationsLakesZonesDeleteCall struct { + s *Service + name string + 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. +// +// - name: The resource name of the zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id} +// /zones/{zone_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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesDeleteCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesDeleteCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a zone resource. All assets within a zone must be deleted before the zone can be deleted.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.lakes.zones.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.get": + +type ProjectsLocationsLakesZonesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a zone resource. +// +// - name: The resource name of the zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id} +// /zones/{zone_id}. +func (r *ProjectsLocationsLakesZonesService) Get(name string) *ProjectsLocationsLakesZonesGetCall { + c := &ProjectsLocationsLakesZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesZonesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesGetCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.get" call. +// Exactly one of *GoogleCloudDataplexV1Zone or error will be non-nil. +// 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 +// 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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleCloudDataplexV1Zone{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a zone resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1Zone" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.getIamPolicy": + +type ProjectsLocationsLakesZonesGetIamPolicyCall 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 the operation documentation 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 information. +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesGetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.list": + +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 +} + +// 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 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)) + 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) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesZonesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesListCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/zones") + 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.lakes.zones.list" call. +// Exactly one of *GoogleCloudDataplexV1ListZonesResponse or error will +// be non-nil. 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 googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleCloudDataplexV1ListZonesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists zone resources in a lake.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter request.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields for the result.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/zones", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListZonesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesZonesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListZonesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.zones.patch": + +type ProjectsLocationsLakesZonesPatchCall struct { + s *Service + name string + googleclouddataplexv1zone *GoogleCloudDataplexV1Zone + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a zone resource. +// +// - name: Output only. The relative resource name of the zone, of the +// form: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_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 +} + +// 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesPatchCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1zone) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesPatchCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a zone resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.lakes.zones.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The relative resource name of the zone, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1Zone" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.setIamPolicy": + +type ProjectsLocationsLakesZonesSetIamPolicyCall 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 the operation documentation 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesSetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.zones.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.testIamPermissions": + +type ProjectsLocationsLakesZonesTestIamPermissionsCall 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 the operation documentation 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 information. +func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.zones.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.actions.list": + +type ProjectsLocationsLakesZonesActionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists action resources in a zone. +// +// - parent: The resource name of the parent zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_id}. +func (r *ProjectsLocationsLakesZonesActionsService) List(parent string) *ProjectsLocationsLakesZonesActionsListCall { + c := &ProjectsLocationsLakesZonesActionsListCall{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 *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 information. +func (c *ProjectsLocationsLakesZonesActionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesActionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesActionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesActionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesActionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesActionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesActionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesActionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/actions") + 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.lakes.zones.actions.list" call. +// Exactly one of *GoogleCloudDataplexV1ListActionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleCloudDataplexV1ListActionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists action resources in a zone.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/actions", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.actions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/actions", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListActionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesZonesActionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListActionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.zones.assets.create": + +type ProjectsLocationsLakesZonesAssetsCreateCall struct { + s *Service + parent string + googleclouddataplexv1asset *GoogleCloudDataplexV1Asset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an asset resource. +// +// - parent: The resource name of the parent zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id} +// /zones/{zone_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 +} + +// 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 +} + +// 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 information. +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1asset) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assets") + 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.lakes.zones.assets.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesAssetsCreateCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an asset resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.zones.assets.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "assetId": { + // "description": "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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/assets", + // "request": { + // "$ref": "GoogleCloudDataplexV1Asset" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.assets.delete": + +type ProjectsLocationsLakesZonesAssetsDeleteCall struct { + s *Service + name string + 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. +// +// - name: The resource name of the asset: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id} +// /zones/{zone_id}/assets/{asset_id}. +func (r *ProjectsLocationsLakesZonesAssetsService) Delete(name string) *ProjectsLocationsLakesZonesAssetsDeleteCall { + c := &ProjectsLocationsLakesZonesAssetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.assets.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an asset resource. The referenced storage resource is detached (default) or deleted based on the associated Lifecycle policy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.lakes.zones.assets.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}/assets/{asset_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.assets.get": + +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/{zone_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 information. +func (c *ProjectsLocationsLakesZonesAssetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesAssetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesAssetsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.assets.get" call. +// Exactly one of *GoogleCloudDataplexV1Asset or error will be non-nil. +// 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) { + 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, &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, err + } + ret := &GoogleCloudDataplexV1Asset{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an asset resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.assets.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}/assets/{asset_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1Asset" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.assets.getIamPolicy": + +type ProjectsLocationsLakesZonesAssetsGetIamPolicyCall 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 the operation documentation 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 +} + +// 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 information. +func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.assets.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesAssetsGetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.assets.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 the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.assets.list": + +type ProjectsLocationsLakesZonesAssetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// 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/{zone_id}`. +func (r *ProjectsLocationsLakesZonesAssetsService) List(parent string) *ProjectsLocationsLakesZonesAssetsListCall { + c := &ProjectsLocationsLakesZonesAssetsListCall{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 1000 will be coerced to 1000. +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 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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesZonesAssetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesAssetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesAssetsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesAssetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesAssetsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assets") + 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.lakes.zones.assets.list" call. +// Exactly one of *GoogleCloudDataplexV1ListAssetsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *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 *ProjectsLocationsLakesZonesAssetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListAssetsResponse, 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, &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, err + } + ret := &GoogleCloudDataplexV1ListAssetsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists asset resources in a zone.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.assets.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter request.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Order by fields for the result.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/assets", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListAssetsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesZonesAssetsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListAssetsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.zones.assets.patch": + +type ProjectsLocationsLakesZonesAssetsPatchCall struct { + s *Service + name string + googleclouddataplexv1asset *GoogleCloudDataplexV1Asset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an asset resource. +// +// - name: Output only. The relative resource name of the asset, of the +// form: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_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) + 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 { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1asset) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.assets.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesAssetsPatchCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an asset resource.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}", + // "httpMethod": "PATCH", + // "id": "dataplex.projects.locations.lakes.zones.assets.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The relative resource name of the asset, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1Asset" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.assets.setIamPolicy": + +type ProjectsLocationsLakesZonesAssetsSetIamPolicyCall 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 the operation documentation 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.assets.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesAssetsSetIamPolicyCall) 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, &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, err + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.zones.assets.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.assets.testIamPermissions": + +type ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall 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 the operation documentation 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 information. +func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.assets.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsLakesZonesAssetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.zones.assets.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.assets.actions.list": + +type ProjectsLocationsLakesZonesAssetsActionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists action resources in an asset. +// +// - parent: The resource name of the parent asset: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_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 +} + +// 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 { + 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 { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesAssetsActionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesAssetsActionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesAssetsActionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/actions") + 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.lakes.zones.assets.actions.list" call. +// Exactly one of *GoogleCloudDataplexV1ListActionsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *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 *ProjectsLocationsLakesZonesAssetsActionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListActionsResponse, 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, &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, err + } + ret := &GoogleCloudDataplexV1ListActionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists action resources in an asset.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/assets/{assetsId}/actions", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.assets.actions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/actions", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListActionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListActionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.zones.entities.create": + +type ProjectsLocationsLakesZonesEntitiesCreateCall struct { + s *Service + parent string + googleclouddataplexv1entity *GoogleCloudDataplexV1Entity + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a metadata entity. +// +// - parent: The resource name of the parent zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_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 *ProjectsLocationsLakesZonesEntitiesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesEntitiesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesEntitiesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entity) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entities") + 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.lakes.zones.entities.create" call. +// Exactly one of *GoogleCloudDataplexV1Entity or error will be non-nil. +// 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) { + 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, &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, err + } + ret := &GoogleCloudDataplexV1Entity{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create a metadata entity.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.zones.entities.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/entities", + // "request": { + // "$ref": "GoogleCloudDataplexV1Entity" + // }, + // "response": { + // "$ref": "GoogleCloudDataplexV1Entity" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.entities.delete": + +type ProjectsLocationsLakesZonesEntitiesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a metadata entity. +// +// - name: The resource name of the entity: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_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 partition if it was previously retrieved. +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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.entities.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsLakesZonesEntitiesDeleteCall) 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, &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, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Delete a metadata entity.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.lakes.zones.entities.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Required. The etag associated with the partition if it was previously retrieved.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The resource name of the entity: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.entities.get": + +type ProjectsLocationsLakesZonesEntitiesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a metadata entity. +// +// - name: The resource name of the entity: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_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 information. +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesEntitiesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.entities.get" call. +// Exactly one of *GoogleCloudDataplexV1Entity or error will be non-nil. +// 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) { + 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, &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, err + } + ret := &GoogleCloudDataplexV1Entity{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get a metadata entity.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.entities.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the entity: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Optional. Used to select the subset of entity information to return. Defaults to BASIC.", + // "enum": [ + // "ENTITY_VIEW_UNSPECIFIED", + // "BASIC", + // "SCHEMA", + // "FULL" + // ], + // "enumDescriptions": [ + // "The API will default to the BASIC view.", + // "Minimal view that does not include the schema.", + // "Include basic information and schema.", + // "Include everything. Currently, this is the same as the SCHEMA view." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1Entity" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.entities.list": + +type ProjectsLocationsLakesZonesEntitiesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List metadata entities in a zone. +// +// - parent: The resource name of the parent zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_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. The API will +// default to the FULL view. +// "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 information. +func (c *ProjectsLocationsLakesZonesEntitiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesEntitiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesEntitiesListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesEntitiesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesEntitiesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entities") + 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.lakes.zones.entities.list" call. +// Exactly one of *GoogleCloudDataplexV1ListEntitiesResponse or error +// will be non-nil. 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 googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleCloudDataplexV1ListEntitiesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List metadata entities in a zone.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.entities.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. 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”", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "view": { + // "description": "Required. Specify the entity view to make a partial list request.", + // "enum": [ + // "ENTITY_VIEW_UNSPECIFIED", + // "TABLES", + // "FILESETS" + // ], + // "enumDescriptions": [ + // "The default unset value. The API will default to the FULL view.", + // "Only list table entities.", + // "Only list fileset entities." + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/entities", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListEntitiesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesZonesEntitiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntitiesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.lakes.zones.entities.update": + +type ProjectsLocationsLakesZonesEntitiesUpdateCall struct { + s *Service + name string + googleclouddataplexv1entity *GoogleCloudDataplexV1Entity + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// 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}/zo +// nes/{zone_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 *ProjectsLocationsLakesZonesEntitiesUpdateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsLakesZonesEntitiesUpdateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesEntitiesUpdateCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entity) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", 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.entities.update" call. +// Exactly one of *GoogleCloudDataplexV1Entity or error will be non-nil. +// 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 *ProjectsLocationsLakesZonesEntitiesUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entity, 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, &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, err + } + ret := &GoogleCloudDataplexV1Entity{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update a metadata entity. Only supports full resource update.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}", + // "httpMethod": "PUT", + // "id": "dataplex.projects.locations.lakes.zones.entities.update", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of the entity, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudDataplexV1Entity" + // }, + // "response": { + // "$ref": "GoogleCloudDataplexV1Entity" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.entities.partitions.create": + +type ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall struct { + s *Service + parent string + googleclouddataplexv1partition *GoogleCloudDataplexV1Partition + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a metadata partition. +// +// - parent: The resource name of the parent zone: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_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 +} + +// 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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1partition) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/partitions") + 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.lakes.zones.entities.partitions.create" call. +// Exactly one of *GoogleCloudDataplexV1Partition or error will be +// non-nil. 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) { + 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, &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, err + } + ret := &GoogleCloudDataplexV1Partition{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create a metadata partition.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}/partitions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.lakes.zones.entities.partitions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. Only validate the request, but do not perform mutations. The default is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/partitions", + // "request": { + // "$ref": "GoogleCloudDataplexV1Partition" + // }, + // "response": { + // "$ref": "GoogleCloudDataplexV1Partition" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.entities.partitions.delete": + +type ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a metadata partition. +// +// - name: The resource name of the partition. format: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_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 +} + +// Etag sets the optional parameter "etag": The etag associated with the +// partition if it was previously retrieved. +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 information. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.entities.partitions.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsDeleteCall) 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, &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, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Delete a metadata partition.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}/partitions/{partitionsId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.lakes.zones.entities.partitions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. The etag associated with the partition if it was previously retrieved.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The resource name of the partition. format: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_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.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.entities.partitions.get": + +type ProjectsLocationsLakesZonesEntitiesPartitionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a metadata partition of an entity. +// +// - name: The resource name of the partition: +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_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 information. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lakes.zones.entities.partitions.get" call. +// Exactly one of *GoogleCloudDataplexV1Partition or error will be +// non-nil. 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 *ProjectsLocationsLakesZonesEntitiesPartitionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Partition, 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, &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, err + } + ret := &GoogleCloudDataplexV1Partition{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get a metadata partition of an entity.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}/partitions/{partitionsId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.entities.partitions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the partition: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_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.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudDataplexV1Partition" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.lakes.zones.entities.partitions.list": + +type ProjectsLocationsLakesZonesEntitiesPartitionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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}/zo +// nes/{zone_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 vslue pair expression. The filter +// expression supports: logical 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 +} + +// 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 +} + +// 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 information. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Context(ctx context.Context) *ProjectsLocationsLakesZonesEntitiesPartitionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/partitions") + 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.lakes.zones.entities.partitions.list" call. +// Exactly one of *GoogleCloudDataplexV1ListPartitionsResponse or error +// will be non-nil. 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 googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +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 { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleCloudDataplexV1ListPartitionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List metadata partitions of an entity.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lakes/{lakesId}/zones/{zonesId}/entities/{entitiesId}/partitions", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.lakes.zones.entities.partitions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter the partitions returned to the caller using a key vslue pair expression. The filter expression supports: logical operators: AND, OR comparison operators: \u003c, \u003e, \u003e=, \u003c= ,=, != 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 \u003c value1 OR key2 \u003e 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.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. 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.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the parent entity: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/partitions", + // "response": { + // "$ref": "GoogleCloudDataplexV1ListPartitionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLakesZonesEntitiesPartitionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListPartitionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dataplex.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns google.rpc.Code.UNIMPLEMENTED. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// Code.CANCELLED. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "GoogleLongrunningCancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns google.rpc.Code.UNIMPLEMENTED. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "dataplex.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) 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, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// UNIMPLEMENTED.NOTE: the name binding allows API services to override +// the binding to use different resource name schemes, such as +// users/*/operations. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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, &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, err + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/displayvideo/v1/displayvideo-api.json b/displayvideo/v1/displayvideo-api.json index 8fdb8da7e01..c72f1e165d2 100644 --- a/displayvideo/v1/displayvideo-api.json +++ b/displayvideo/v1/displayvideo-api.json @@ -7730,7 +7730,7 @@ } } }, - "revision": "20220203", + "revision": "20220211", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -8072,7 +8072,7 @@ "id": "AgeRangeAssignedTargetingOptionDetails", "properties": { "ageRange": { - "description": "Output only. The age range of an audience. We only support targeting a continuous age range of an audience. Thus, the age range represented in this field can be 1) targeted solely, or, 2) part of a larger continuous age range. The reach of a continuous age range targeting can be expanded by also targeting an audience of an unknown age.", + "description": "The age range of an audience. We only support targeting a continuous age range of an audience. Thus, the age range represented in this field can be 1) targeted solely, or, 2) part of a larger continuous age range. The reach of a continuous age range targeting can be expanded by also targeting an audience of an unknown age. Output only in v1. Required in v2.", "enum": [ "AGE_RANGE_UNSPECIFIED", "AGE_RANGE_18_24", @@ -8093,7 +8093,6 @@ "The age range of the audience is 65 and up.", "The age range of the audience is unknown." ], - "readOnly": true, "type": "string" }, "targetingOptionId": { @@ -8720,7 +8719,7 @@ "id": "AudioContentTypeAssignedTargetingOptionDetails", "properties": { "audioContentType": { - "description": "Output only. The audio content type.", + "description": "The audio content type. Output only in v1. Required in v2.", "enum": [ "AUDIO_CONTENT_TYPE_UNSPECIFIED", "AUDIO_CONTENT_TYPE_UNKNOWN", @@ -8735,7 +8734,6 @@ "The audio content type is broadcast.", "The audio content type is podcast." ], - "readOnly": true, "type": "string" }, "targetingOptionId": { @@ -9972,7 +9970,7 @@ "type": "string" }, "contentInstreamPosition": { - "description": "Output only. The content instream position for video or audio ads.", + "description": "The content instream position for video or audio ads. Output only in v1. Required in v2.", "enum": [ "CONTENT_INSTREAM_POSITION_UNSPECIFIED", "CONTENT_INSTREAM_POSITION_PRE_ROLL", @@ -9987,7 +9985,6 @@ "Ads that play at the end of streaming content.", "Ads instream position is unknown." ], - "readOnly": true, "type": "string" }, "targetingOptionId": { @@ -10045,7 +10042,7 @@ "type": "string" }, "contentOutstreamPosition": { - "description": "Output only. The content outstream position.", + "description": "The content outstream position. Output only in v1. Required in v2.", "enum": [ "CONTENT_OUTSTREAM_POSITION_UNSPECIFIED", "CONTENT_OUTSTREAM_POSITION_UNKNOWN", @@ -10062,7 +10059,6 @@ "Ads that appear in a scrollable stream of content. A feed is typically editorial (e.g. a list of articles or news) or listings (e.g. a list of products or services).", "Ads shown before or between content loads." ], - "readOnly": true, "type": "string" }, "targetingOptionId": { @@ -11192,7 +11188,7 @@ "id": "DeviceTypeAssignedTargetingOptionDetails", "properties": { "deviceType": { - "description": "Output only. The display name of the device type.", + "description": "The display name of the device type. Output only in v1. Required in v2.", "enum": [ "DEVICE_TYPE_UNSPECIFIED", "DEVICE_TYPE_COMPUTER", @@ -11207,7 +11203,6 @@ "The device type is smart phone..", "The device type is tablet." ], - "readOnly": true, "type": "string" }, "targetingOptionId": { @@ -11709,7 +11704,7 @@ "id": "EnvironmentAssignedTargetingOptionDetails", "properties": { "environment": { - "description": "Output only. The serving environment.", + "description": "The serving environment. Output only in v1. Required in v2.", "enum": [ "ENVIRONMENT_UNSPECIFIED", "ENVIRONMENT_WEB_OPTIMIZED", @@ -11722,7 +11717,6 @@ "Target inventory displayed in browsers. This includes inventory that was not designed for the device but viewed on it, such as websites optimized for desktop but viewed on a mobile device. ENVIRONMENT_WEB_OPTIMIZED should be targeted prior to the addition of this targeting option.", "Target inventory displayed in apps." ], - "readOnly": true, "type": "string" }, "targetingOptionId": { @@ -12643,7 +12637,7 @@ "id": "GenderAssignedTargetingOptionDetails", "properties": { "gender": { - "description": "Output only. The gender of the audience.", + "description": "The gender of the audience. Output only in v1. Required in v2.", "enum": [ "GENDER_UNSPECIFIED", "GENDER_MALE", @@ -12656,7 +12650,6 @@ "The audience gender is female.", "The audience gender is unknown." ], - "readOnly": true, "type": "string" }, "targetingOptionId": { @@ -15148,7 +15141,7 @@ "id": "NativeContentPositionAssignedTargetingOptionDetails", "properties": { "contentPosition": { - "description": "Output only. The content position.", + "description": "The content position. Output only in v1. Required in v2.", "enum": [ "NATIVE_CONTENT_POSITION_UNSPECIFIED", "NATIVE_CONTENT_POSITION_UNKNOWN", @@ -15165,7 +15158,6 @@ "Native content position is peripheral, i.e., ads appear outside of core content on pages, such as the right- or left-hand side of the page.", "Native content position is recommendation, i.e., ads appear in sections for recommended content." ], - "readOnly": true, "type": "string" }, "targetingOptionId": { @@ -15323,7 +15315,7 @@ "id": "OmidAssignedTargetingOptionDetails", "properties": { "omid": { - "description": "Output only. The type of Open Measurement enabled inventory.", + "description": "The type of Open Measurement enabled inventory. Output only in v1. Required in v2.", "enum": [ "OMID_UNSPECIFIED", "OMID_FOR_MOBILE_DISPLAY_ADS" @@ -15332,7 +15324,6 @@ "Default value when omid targeting is not specified in this version.", "Open Measurement enabled mobile display inventory." ], - "readOnly": true, "type": "string" }, "targetingOptionId": { @@ -16584,7 +16575,7 @@ "type": "string" }, "sensitiveCategory": { - "description": "Output only. An enum for the DV360 Sensitive category content classifier.", + "description": "An enum for the DV360 Sensitive category content classifier. Output only in v1. Required in v2.", "enum": [ "SENSITIVE_CATEGORY_UNSPECIFIED", "SENSITIVE_CATEGORY_ADULT", @@ -16625,7 +16616,6 @@ "Issues that evoke strong, opposing views and spark debate. These include issues that are controversial in most countries and markets (such as abortion), as well as those that are controversial in specific countries and markets (such as immigration reform in the United States).", "Content which may be considered shocking or disturbing, such as violent news stories, stunts, or toilet humor." ], - "readOnly": true, "type": "string" } }, @@ -17333,7 +17323,7 @@ "type": "string" }, "videoPlayerSize": { - "description": "Output only. The video player size.", + "description": "The video player size. Output only in v1. Required in v2.", "enum": [ "VIDEO_PLAYER_SIZE_UNSPECIFIED", "VIDEO_PLAYER_SIZE_SMALL", @@ -17348,7 +17338,6 @@ "The dimensions of the video player are 1280×720 or greater (desktop), or over 90% of the screen covered (mobile).", "The dimensions of the video player are unknown." ], - "readOnly": true, "type": "string" } }, @@ -17389,7 +17378,7 @@ "type": "string" }, "viewability": { - "description": "Output only. The predicted viewability percentage.", + "description": "The predicted viewability percentage. Output only in v1. Required in v2.", "enum": [ "VIEWABILITY_UNSPECIFIED", "VIEWABILITY_10_PERCENT_OR_MORE", @@ -17414,7 +17403,6 @@ "Bid only on impressions that are at least 80% likely to be viewable.", "Bid only on impressions that are at least 90% likely to be viewable." ], - "readOnly": true, "type": "string" } }, diff --git a/displayvideo/v1/displayvideo-gen.go b/displayvideo/v1/displayvideo-gen.go index 5842f09ab82..63e1b80a1c4 100644 --- a/displayvideo/v1/displayvideo-gen.go +++ b/displayvideo/v1/displayvideo-gen.go @@ -1172,12 +1172,12 @@ func (s *AdvertiserTargetingConfig) MarshalJSON() ([]byte, error) { // AssignedTargetingOption when targeting_type is // `TARGETING_TYPE_AGE_RANGE`. type AgeRangeAssignedTargetingOptionDetails struct { - // AgeRange: Output only. The age range of an audience. We only support - // targeting a continuous age range of an audience. Thus, the age range - // represented in this field can be 1) targeted solely, or, 2) part of a - // larger continuous age range. The reach of a continuous age range - // targeting can be expanded by also targeting an audience of an unknown - // age. + // AgeRange: The age range of an audience. We only support targeting a + // continuous age range of an audience. Thus, the age range represented + // in this field can be 1) targeted solely, or, 2) part of a larger + // continuous age range. The reach of a continuous age range targeting + // can be expanded by also targeting an audience of an unknown age. + // Output only in v1. Required in v2. // // Possible values: // "AGE_RANGE_UNSPECIFIED" - Default value when age range is not @@ -2174,7 +2174,8 @@ func (s *AudienceGroupAssignedTargetingOptionDetails) MarshalJSON() ([]byte, err // is not supported. Remove all audio content type targeting options to // achieve this effect. type AudioContentTypeAssignedTargetingOptionDetails struct { - // AudioContentType: Output only. The audio content type. + // AudioContentType: The audio content type. Output only in v1. Required + // in v2. // // Possible values: // "AUDIO_CONTENT_TYPE_UNSPECIFIED" - Audio content type is not @@ -4400,8 +4401,8 @@ type ContentInstreamPositionAssignedTargetingOptionDetails struct { // audio content. AdType string `json:"adType,omitempty"` - // ContentInstreamPosition: Output only. The content instream position - // for video or audio ads. + // ContentInstreamPosition: The content instream position for video or + // audio ads. Output only in v1. Required in v2. // // Possible values: // "CONTENT_INSTREAM_POSITION_UNSPECIFIED" - Content instream position @@ -4514,8 +4515,8 @@ type ContentOutstreamPositionAssignedTargetingOptionDetails struct { // audio content. AdType string `json:"adType,omitempty"` - // ContentOutstreamPosition: Output only. The content outstream - // position. + // ContentOutstreamPosition: The content outstream position. Output only + // in v1. Required in v2. // // Possible values: // "CONTENT_OUTSTREAM_POSITION_UNSPECIFIED" - Content outstream @@ -6155,7 +6156,8 @@ func (s *DeviceMakeModelTargetingOptionDetails) MarshalJSON() ([]byte, error) { // AssignedTargetingOption when targeting_type is // `TARGETING_TYPE_DEVICE_TYPE`. type DeviceTypeAssignedTargetingOptionDetails struct { - // DeviceType: Output only. The display name of the device type. + // DeviceType: The display name of the device type. Output only in v1. + // Required in v2. // // Possible values: // "DEVICE_TYPE_UNSPECIFIED" - Default value when device type is not @@ -6843,7 +6845,8 @@ type Empty struct { // of an AssignedTargetingOption when targeting_type is // `TARGETING_TYPE_ENVIRONMENT`. type EnvironmentAssignedTargetingOptionDetails struct { - // Environment: Output only. The serving environment. + // Environment: The serving environment. Output only in v1. Required in + // v2. // // Possible values: // "ENVIRONMENT_UNSPECIFIED" - Default value when environment is not @@ -7826,7 +7829,8 @@ func (s *FrequencyCap) MarshalJSON() ([]byte, error) { // AssignedTargetingOption when targeting_type is // `TARTGETING_TYPE_GENDER`. type GenderAssignedTargetingOptionDetails struct { - // Gender: Output only. The gender of the audience. + // Gender: The gender of the audience. Output only in v1. Required in + // v2. // // Possible values: // "GENDER_UNSPECIFIED" - Default value when gender is not specified @@ -11541,7 +11545,8 @@ func (s *Money) MarshalJSON() ([]byte, error) { // Explicitly targeting all options is not supported. Remove all native // content position targeting options to achieve this effect. type NativeContentPositionAssignedTargetingOptionDetails struct { - // ContentPosition: Output only. The content position. + // ContentPosition: The content position. Output only in v1. Required in + // v2. // // Possible values: // "NATIVE_CONTENT_POSITION_UNSPECIFIED" - Native content position is @@ -11839,7 +11844,8 @@ func (s *ObaIcon) MarshalJSON() ([]byte, error) { // details field of an AssignedTargetingOption when targeting_type is // `TARGETING_TYPE_OMID`. type OmidAssignedTargetingOptionDetails struct { - // Omid: Output only. The type of Open Measurement enabled inventory. + // Omid: The type of Open Measurement enabled inventory. Output only in + // v1. Required in v2. // // Possible values: // "OMID_UNSPECIFIED" - Default value when omid targeting is not @@ -13837,8 +13843,8 @@ type SensitiveCategoryAssignedTargetingOptionDetails struct { // be EXCLUDED. ExcludedTargetingOptionId string `json:"excludedTargetingOptionId,omitempty"` - // SensitiveCategory: Output only. An enum for the DV360 Sensitive - // category content classifier. + // SensitiveCategory: An enum for the DV360 Sensitive category content + // classifier. Output only in v1. Required in v2. // // Possible values: // "SENSITIVE_CATEGORY_UNSPECIFIED" - This enum is only a placeholder @@ -14976,7 +14982,8 @@ type VideoPlayerSizeAssignedTargetingOptionDetails struct { // targeting_type is `TARGETING_TYPE_VIDEO_PLAYER_SIZE`. TargetingOptionId string `json:"targetingOptionId,omitempty"` - // VideoPlayerSize: Output only. The video player size. + // VideoPlayerSize: The video player size. Output only in v1. Required + // in v2. // // Possible values: // "VIDEO_PLAYER_SIZE_UNSPECIFIED" - Video player size is not @@ -15076,7 +15083,8 @@ type ViewabilityAssignedTargetingOptionDetails struct { // for targeting the `VIEWABILITY_10_PERCENT_OR_MORE` option). TargetingOptionId string `json:"targetingOptionId,omitempty"` - // Viewability: Output only. The predicted viewability percentage. + // Viewability: The predicted viewability percentage. Output only in v1. + // Required in v2. // // Possible values: // "VIEWABILITY_UNSPECIFIED" - Default value when viewability is not diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 645d8117d13..04b476b5904 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1029,7 +1029,7 @@ } } }, - "revision": "20220205", + "revision": "20220212", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1358,6 +1358,49 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata": { + "description": "The metadata proto of ResyncDataset method.", + "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + }, + "newlyAddedDocuments": { + "description": "Returns the newly added document Cloud Storage prefix if the documents are founded in Cloud Storage while not in Document Service storage.", + "items": { + "$ref": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument": { + "description": "The proto for updated document in resync pipeline.", + "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument", + "properties": { + "destinationPrefix": { + "description": "The prefix of cloud storage, identifies the destination document which should be updated by resync pipeline.", + "type": "string" + }, + "sourcePrefix": { + "description": "The prefix of cloud storage, identifies the original document which should be updated by resync pipeline.", + "type": "string" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "The final status of the documents which should be updated by resync pipeline." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse": { + "description": "The response proto of ResyncDataset method.", + "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudDocumentaiUiv1beta3RevisionReference": { "description": "The revision reference specifies which revision on the document to read.", "id": "GoogleCloudDocumentaiUiv1beta3RevisionReference", @@ -2032,6 +2075,13 @@ "$ref": "GoogleCloudDocumentaiV1DocumentProvenance", "description": "The history of this page." }, + "symbols": { + "description": "A list of visually detected symbols on the page.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentPageSymbol" + }, + "type": "array" + }, "tables": { "description": "A list of visually detected tables on the page.", "items": { @@ -2158,7 +2208,7 @@ "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -2365,6 +2415,24 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1DocumentPageSymbol": { + "description": "A detected symbol.", + "id": "GoogleCloudDocumentaiV1DocumentPageSymbol", + "properties": { + "detectedLanguages": { + "description": "A list of detected languages together with confidence.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentPageDetectedLanguage" + }, + "type": "array" + }, + "layout": { + "$ref": "GoogleCloudDocumentaiV1DocumentPageLayout", + "description": "Layout for Symbol." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1DocumentPageTable": { "description": "A table representation similar to HTML table structure.", "id": "GoogleCloudDocumentaiV1DocumentPageTable", @@ -2714,7 +2782,7 @@ "id": "GoogleCloudDocumentaiV1DocumentTextAnchor", "properties": { "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments.", + "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", "type": "string" }, "textSegments": { @@ -3612,6 +3680,13 @@ "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", "description": "The history of this page." }, + "symbols": { + "description": "A list of visually detected symbols on the page.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageSymbol" + }, + "type": "array" + }, "tables": { "description": "A list of visually detected tables on the page.", "items": { @@ -3738,7 +3813,7 @@ "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -3945,6 +4020,24 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta1DocumentPageSymbol": { + "description": "A detected symbol.", + "id": "GoogleCloudDocumentaiV1beta1DocumentPageSymbol", + "properties": { + "detectedLanguages": { + "description": "A list of detected languages together with confidence.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" + }, + "type": "array" + }, + "layout": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", + "description": "Layout for Symbol." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta1DocumentPageTable": { "description": "A table representation similar to HTML table structure.", "id": "GoogleCloudDocumentaiV1beta1DocumentPageTable", @@ -4294,7 +4387,7 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", "properties": { "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments.", + "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", "type": "string" }, "textSegments": { @@ -4800,6 +4893,13 @@ "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", "description": "The history of this page." }, + "symbols": { + "description": "A list of visually detected symbols on the page.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageSymbol" + }, + "type": "array" + }, "tables": { "description": "A list of visually detected tables on the page.", "items": { @@ -4926,7 +5026,7 @@ "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -5133,6 +5233,24 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta2DocumentPageSymbol": { + "description": "A detected symbol.", + "id": "GoogleCloudDocumentaiV1beta2DocumentPageSymbol", + "properties": { + "detectedLanguages": { + "description": "A list of detected languages together with confidence.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" + }, + "type": "array" + }, + "layout": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", + "description": "Layout for Symbol." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta2DocumentPageTable": { "description": "A table representation similar to HTML table structure.", "id": "GoogleCloudDocumentaiV1beta2DocumentPageTable", @@ -5482,7 +5600,7 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", "properties": { "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments.", + "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", "type": "string" }, "textSegments": { diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index 1c4cc035d25..213f29e45e6 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -931,6 +931,85 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportSt type GoogleCloudDocumentaiUiv1beta3ImportDocumentsResponse struct { } +// GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata: The metadata +// proto of ResyncDataset method. +type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata struct { + // CommonMetadata: The basic metadata of the long running operation. + CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + + // NewlyAddedDocuments: Returns the newly added document Cloud Storage + // prefix if the documents are founded in Cloud Storage while not in + // Document Service storage. + NewlyAddedDocuments []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument `json:"newlyAddedDocuments,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommonMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument: +// The proto for updated document in resync pipeline. +type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument struct { + // DestinationPrefix: The prefix of cloud storage, identifies the + // destination document which should be updated by resync pipeline. + DestinationPrefix string `json:"destinationPrefix,omitempty"` + + // SourcePrefix: The prefix of cloud storage, identifies the original + // document which should be updated by resync pipeline. + SourcePrefix string `json:"sourcePrefix,omitempty"` + + // Status: The final status of the documents which should be updated by + // resync pipeline. + Status *GoogleRpcStatus `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestinationPrefix") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestinationPrefix") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse: The response +// proto of ResyncDataset method. +type GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse struct { +} + // GoogleCloudDocumentaiUiv1beta3RevisionReference: The revision // reference specifies which revision on the document to read. type GoogleCloudDocumentaiUiv1beta3RevisionReference struct { @@ -2026,6 +2105,9 @@ type GoogleCloudDocumentaiV1DocumentPage struct { // Provenance: The history of this page. Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` + // Symbols: A list of visually detected symbols on the page. + Symbols []*GoogleCloudDocumentaiV1DocumentPageSymbol `json:"symbols,omitempty"` + // Tables: A list of visually detected tables on the page. Tables []*GoogleCloudDocumentaiV1DocumentPageTable `json:"tables,omitempty"` @@ -2211,7 +2293,7 @@ type GoogleCloudDocumentaiV1DocumentPageDetectedLanguage struct { // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -2580,6 +2662,39 @@ func (s *GoogleCloudDocumentaiV1DocumentPageParagraph) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1DocumentPageSymbol: A detected symbol. +type GoogleCloudDocumentaiV1DocumentPageSymbol struct { + // DetectedLanguages: A list of detected languages together with + // confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + + // Layout: Layout for Symbol. + Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedLanguages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentPageSymbol) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentPageSymbol + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1DocumentPageTable: A table representation // similar to HTML table structure. type GoogleCloudDocumentaiV1DocumentPageTable struct { @@ -3114,7 +3229,8 @@ func (s *GoogleCloudDocumentaiV1DocumentStyleFontSize) UnmarshalJSON(data []byte // into the Document.text. type GoogleCloudDocumentaiV1DocumentTextAnchor struct { // Content: Contains the content of the text span so that users do not - // have to look it up in the text_segments. + // have to look it up in the text_segments. It is always populated for + // formFields. Content string `json:"content,omitempty"` // TextSegments: The text segments from the Document.text. @@ -4631,6 +4747,9 @@ type GoogleCloudDocumentaiV1beta1DocumentPage struct { // Provenance: The history of this page. Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` + // Symbols: A list of visually detected symbols on the page. + Symbols []*GoogleCloudDocumentaiV1beta1DocumentPageSymbol `json:"symbols,omitempty"` + // Tables: A list of visually detected tables on the page. Tables []*GoogleCloudDocumentaiV1beta1DocumentPageTable `json:"tables,omitempty"` @@ -4816,7 +4935,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -5186,6 +5305,39 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageParagraph) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta1DocumentPageSymbol: A detected symbol. +type GoogleCloudDocumentaiV1beta1DocumentPageSymbol struct { + // DetectedLanguages: A list of detected languages together with + // confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + + // Layout: Layout for Symbol. + Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedLanguages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageSymbol) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageSymbol + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta1DocumentPageTable: A table representation // similar to HTML table structure. type GoogleCloudDocumentaiV1beta1DocumentPageTable struct { @@ -5721,7 +5873,8 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) UnmarshalJSON(data [ // indexing into the Document.text. type GoogleCloudDocumentaiV1beta1DocumentTextAnchor struct { // Content: Contains the content of the text span so that users do not - // have to look it up in the text_segments. + // have to look it up in the text_segments. It is always populated for + // formFields. Content string `json:"content,omitempty"` // TextSegments: The text segments from the Document.text. @@ -6565,6 +6718,9 @@ type GoogleCloudDocumentaiV1beta2DocumentPage struct { // Provenance: The history of this page. Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` + // Symbols: A list of visually detected symbols on the page. + Symbols []*GoogleCloudDocumentaiV1beta2DocumentPageSymbol `json:"symbols,omitempty"` + // Tables: A list of visually detected tables on the page. Tables []*GoogleCloudDocumentaiV1beta2DocumentPageTable `json:"tables,omitempty"` @@ -6750,7 +6906,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -7120,6 +7276,39 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageParagraph) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta2DocumentPageSymbol: A detected symbol. +type GoogleCloudDocumentaiV1beta2DocumentPageSymbol struct { + // DetectedLanguages: A list of detected languages together with + // confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + + // Layout: Layout for Symbol. + Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedLanguages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageSymbol) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageSymbol + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta2DocumentPageTable: A table representation // similar to HTML table structure. type GoogleCloudDocumentaiV1beta2DocumentPageTable struct { @@ -7655,7 +7844,8 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentStyleFontSize) UnmarshalJSON(data [ // indexing into the Document.text. type GoogleCloudDocumentaiV1beta2DocumentTextAnchor struct { // Content: Contains the content of the text span so that users do not - // have to look it up in the text_segments. + // have to look it up in the text_segments. It is always populated for + // formFields. Content string `json:"content,omitempty"` // TextSegments: The text segments from the Document.text. diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index 0914b3ce9ac..9efd5c9b718 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20220205", + "revision": "20220212", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -621,6 +621,49 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata": { + "description": "The metadata proto of ResyncDataset method.", + "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + }, + "newlyAddedDocuments": { + "description": "Returns the newly added document Cloud Storage prefix if the documents are founded in Cloud Storage while not in Document Service storage.", + "items": { + "$ref": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument": { + "description": "The proto for updated document in resync pipeline.", + "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument", + "properties": { + "destinationPrefix": { + "description": "The prefix of cloud storage, identifies the destination document which should be updated by resync pipeline.", + "type": "string" + }, + "sourcePrefix": { + "description": "The prefix of cloud storage, identifies the original document which should be updated by resync pipeline.", + "type": "string" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "The final status of the documents which should be updated by resync pipeline." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse": { + "description": "The response proto of ResyncDataset method.", + "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudDocumentaiUiv1beta3RevisionReference": { "description": "The revision reference specifies which revision on the document to read.", "id": "GoogleCloudDocumentaiUiv1beta3RevisionReference", @@ -1407,6 +1450,13 @@ "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", "description": "The history of this page." }, + "symbols": { + "description": "A list of visually detected symbols on the page.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageSymbol" + }, + "type": "array" + }, "tables": { "description": "A list of visually detected tables on the page.", "items": { @@ -1533,7 +1583,7 @@ "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -1740,6 +1790,24 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta1DocumentPageSymbol": { + "description": "A detected symbol.", + "id": "GoogleCloudDocumentaiV1beta1DocumentPageSymbol", + "properties": { + "detectedLanguages": { + "description": "A list of detected languages together with confidence.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" + }, + "type": "array" + }, + "layout": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", + "description": "Layout for Symbol." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta1DocumentPageTable": { "description": "A table representation similar to HTML table structure.", "id": "GoogleCloudDocumentaiV1beta1DocumentPageTable", @@ -2089,7 +2157,7 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", "properties": { "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments.", + "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", "type": "string" }, "textSegments": { @@ -2620,6 +2688,13 @@ "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", "description": "The history of this page." }, + "symbols": { + "description": "A list of visually detected symbols on the page.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageSymbol" + }, + "type": "array" + }, "tables": { "description": "A list of visually detected tables on the page.", "items": { @@ -2746,7 +2821,7 @@ "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -2953,6 +3028,24 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta2DocumentPageSymbol": { + "description": "A detected symbol.", + "id": "GoogleCloudDocumentaiV1beta2DocumentPageSymbol", + "properties": { + "detectedLanguages": { + "description": "A list of detected languages together with confidence.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" + }, + "type": "array" + }, + "layout": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", + "description": "Layout for Symbol." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta2DocumentPageTable": { "description": "A table representation similar to HTML table structure.", "id": "GoogleCloudDocumentaiV1beta2DocumentPageTable", @@ -3302,7 +3395,7 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", "properties": { "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments.", + "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", "type": "string" }, "textSegments": { @@ -3385,7 +3478,7 @@ "type": "array" }, "modelVersion": { - "description": "Model version of the form extraction system. Default is \"builtin/stable\". Specify \"builtin/latest\" for the latest model. For custom form models, specify: “custom/{model_name}\". Model name format is \"bucket_name/path/to/modeldir\" corresponding to \"gs://bucket_name/path/to/modeldir\" where annotated examples are stored.", + "description": "Model version of the form extraction system. Default is \"builtin/stable\". Specify \"builtin/latest\" for the latest model. For custom form models, specify: \"custom/{model_name}\". Model name format is \"bucket_name/path/to/modeldir\" corresponding to \"gs://bucket_name/path/to/modeldir\" where annotated examples are stored.", "type": "string" } }, diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index 90485c7b6c8..2d2cb0ba85a 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -859,6 +859,85 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportSt type GoogleCloudDocumentaiUiv1beta3ImportDocumentsResponse struct { } +// GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata: The metadata +// proto of ResyncDataset method. +type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata struct { + // CommonMetadata: The basic metadata of the long running operation. + CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + + // NewlyAddedDocuments: Returns the newly added document Cloud Storage + // prefix if the documents are founded in Cloud Storage while not in + // Document Service storage. + NewlyAddedDocuments []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument `json:"newlyAddedDocuments,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommonMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument: +// The proto for updated document in resync pipeline. +type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument struct { + // DestinationPrefix: The prefix of cloud storage, identifies the + // destination document which should be updated by resync pipeline. + DestinationPrefix string `json:"destinationPrefix,omitempty"` + + // SourcePrefix: The prefix of cloud storage, identifies the original + // document which should be updated by resync pipeline. + SourcePrefix string `json:"sourcePrefix,omitempty"` + + // Status: The final status of the documents which should be updated by + // resync pipeline. + Status *GoogleRpcStatus `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestinationPrefix") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestinationPrefix") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse: The response +// proto of ResyncDataset method. +type GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse struct { +} + // GoogleCloudDocumentaiUiv1beta3RevisionReference: The revision // reference specifies which revision on the document to read. type GoogleCloudDocumentaiUiv1beta3RevisionReference struct { @@ -2148,6 +2227,9 @@ type GoogleCloudDocumentaiV1beta1DocumentPage struct { // Provenance: The history of this page. Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` + // Symbols: A list of visually detected symbols on the page. + Symbols []*GoogleCloudDocumentaiV1beta1DocumentPageSymbol `json:"symbols,omitempty"` + // Tables: A list of visually detected tables on the page. Tables []*GoogleCloudDocumentaiV1beta1DocumentPageTable `json:"tables,omitempty"` @@ -2333,7 +2415,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -2703,6 +2785,39 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageParagraph) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta1DocumentPageSymbol: A detected symbol. +type GoogleCloudDocumentaiV1beta1DocumentPageSymbol struct { + // DetectedLanguages: A list of detected languages together with + // confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + + // Layout: Layout for Symbol. + Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedLanguages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageSymbol) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageSymbol + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta1DocumentPageTable: A table representation // similar to HTML table structure. type GoogleCloudDocumentaiV1beta1DocumentPageTable struct { @@ -3238,7 +3353,8 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) UnmarshalJSON(data [ // indexing into the Document.text. type GoogleCloudDocumentaiV1beta1DocumentTextAnchor struct { // Content: Contains the content of the text span so that users do not - // have to look it up in the text_segments. + // have to look it up in the text_segments. It is always populated for + // formFields. Content string `json:"content,omitempty"` // TextSegments: The text segments from the Document.text. @@ -4146,6 +4262,9 @@ type GoogleCloudDocumentaiV1beta2DocumentPage struct { // Provenance: The history of this page. Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` + // Symbols: A list of visually detected symbols on the page. + Symbols []*GoogleCloudDocumentaiV1beta2DocumentPageSymbol `json:"symbols,omitempty"` + // Tables: A list of visually detected tables on the page. Tables []*GoogleCloudDocumentaiV1beta2DocumentPageTable `json:"tables,omitempty"` @@ -4331,7 +4450,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -4701,6 +4820,39 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageParagraph) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta2DocumentPageSymbol: A detected symbol. +type GoogleCloudDocumentaiV1beta2DocumentPageSymbol struct { + // DetectedLanguages: A list of detected languages together with + // confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + + // Layout: Layout for Symbol. + Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedLanguages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageSymbol) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageSymbol + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta2DocumentPageTable: A table representation // similar to HTML table structure. type GoogleCloudDocumentaiV1beta2DocumentPageTable struct { @@ -5236,7 +5388,8 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentStyleFontSize) UnmarshalJSON(data [ // indexing into the Document.text. type GoogleCloudDocumentaiV1beta2DocumentTextAnchor struct { // Content: Contains the content of the text span so that users do not - // have to look it up in the text_segments. + // have to look it up in the text_segments. It is always populated for + // formFields. Content string `json:"content,omitempty"` // TextSegments: The text segments from the Document.text. @@ -5384,8 +5537,8 @@ type GoogleCloudDocumentaiV1beta2FormExtractionParams struct { // ModelVersion: Model version of the form extraction system. Default is // "builtin/stable". Specify "builtin/latest" for the latest model. For - // custom form models, specify: “custom/{model_name}". Model name - // format is "bucket_name/path/to/modeldir" corresponding to + // custom form models, specify: "custom/{model_name}". Model name format + // is "bucket_name/path/to/modeldir" corresponding to // "gs://bucket_name/path/to/modeldir" where annotated examples are // stored. ModelVersion string `json:"modelVersion,omitempty"` diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index 6c9656f63c2..d0cfc27ed33 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -796,7 +796,7 @@ } } }, - "revision": "20220205", + "revision": "20220212", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1125,6 +1125,49 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata": { + "description": "The metadata proto of ResyncDataset method.", + "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + }, + "newlyAddedDocuments": { + "description": "Returns the newly added document Cloud Storage prefix if the documents are founded in Cloud Storage while not in Document Service storage.", + "items": { + "$ref": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument": { + "description": "The proto for updated document in resync pipeline.", + "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument", + "properties": { + "destinationPrefix": { + "description": "The prefix of cloud storage, identifies the destination document which should be updated by resync pipeline.", + "type": "string" + }, + "sourcePrefix": { + "description": "The prefix of cloud storage, identifies the original document which should be updated by resync pipeline.", + "type": "string" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "The final status of the documents which should be updated by resync pipeline." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse": { + "description": "The response proto of ResyncDataset method.", + "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudDocumentaiUiv1beta3RevisionReference": { "description": "The revision reference specifies which revision on the document to read.", "id": "GoogleCloudDocumentaiUiv1beta3RevisionReference", @@ -1911,6 +1954,13 @@ "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", "description": "The history of this page." }, + "symbols": { + "description": "A list of visually detected symbols on the page.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageSymbol" + }, + "type": "array" + }, "tables": { "description": "A list of visually detected tables on the page.", "items": { @@ -2037,7 +2087,7 @@ "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -2244,6 +2294,24 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta1DocumentPageSymbol": { + "description": "A detected symbol.", + "id": "GoogleCloudDocumentaiV1beta1DocumentPageSymbol", + "properties": { + "detectedLanguages": { + "description": "A list of detected languages together with confidence.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" + }, + "type": "array" + }, + "layout": { + "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", + "description": "Layout for Symbol." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta1DocumentPageTable": { "description": "A table representation similar to HTML table structure.", "id": "GoogleCloudDocumentaiV1beta1DocumentPageTable", @@ -2593,7 +2661,7 @@ "id": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", "properties": { "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments.", + "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", "type": "string" }, "textSegments": { @@ -3099,6 +3167,13 @@ "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", "description": "The history of this page." }, + "symbols": { + "description": "A list of visually detected symbols on the page.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageSymbol" + }, + "type": "array" + }, "tables": { "description": "A list of visually detected tables on the page.", "items": { @@ -3225,7 +3300,7 @@ "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -3432,6 +3507,24 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta2DocumentPageSymbol": { + "description": "A detected symbol.", + "id": "GoogleCloudDocumentaiV1beta2DocumentPageSymbol", + "properties": { + "detectedLanguages": { + "description": "A list of detected languages together with confidence.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" + }, + "type": "array" + }, + "layout": { + "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", + "description": "Layout for Symbol." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta2DocumentPageTable": { "description": "A table representation similar to HTML table structure.", "id": "GoogleCloudDocumentaiV1beta2DocumentPageTable", @@ -3781,7 +3874,7 @@ "id": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", "properties": { "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments.", + "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", "type": "string" }, "textSegments": { @@ -4540,6 +4633,13 @@ "$ref": "GoogleCloudDocumentaiV1beta3DocumentProvenance", "description": "The history of this page." }, + "symbols": { + "description": "A list of visually detected symbols on the page.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentPageSymbol" + }, + "type": "array" + }, "tables": { "description": "A list of visually detected tables on the page.", "items": { @@ -4666,7 +4766,7 @@ "type": "number" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", "type": "string" } }, @@ -4873,6 +4973,24 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3DocumentPageSymbol": { + "description": "A detected symbol.", + "id": "GoogleCloudDocumentaiV1beta3DocumentPageSymbol", + "properties": { + "detectedLanguages": { + "description": "A list of detected languages together with confidence.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage" + }, + "type": "array" + }, + "layout": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentPageLayout", + "description": "Layout for Symbol." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3DocumentPageTable": { "description": "A table representation similar to HTML table structure.", "id": "GoogleCloudDocumentaiV1beta3DocumentPageTable", @@ -5222,7 +5340,7 @@ "id": "GoogleCloudDocumentaiV1beta3DocumentTextAnchor", "properties": { "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments.", + "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", "type": "string" }, "textSegments": { diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index ff445614d65..3dff8829526 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -859,6 +859,85 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportSt type GoogleCloudDocumentaiUiv1beta3ImportDocumentsResponse struct { } +// GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata: The metadata +// proto of ResyncDataset method. +type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata struct { + // CommonMetadata: The basic metadata of the long running operation. + CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + + // NewlyAddedDocuments: Returns the newly added document Cloud Storage + // prefix if the documents are founded in Cloud Storage while not in + // Document Service storage. + NewlyAddedDocuments []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument `json:"newlyAddedDocuments,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CommonMetadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommonMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument: +// The proto for updated document in resync pipeline. +type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument struct { + // DestinationPrefix: The prefix of cloud storage, identifies the + // destination document which should be updated by resync pipeline. + DestinationPrefix string `json:"destinationPrefix,omitempty"` + + // SourcePrefix: The prefix of cloud storage, identifies the original + // document which should be updated by resync pipeline. + SourcePrefix string `json:"sourcePrefix,omitempty"` + + // Status: The final status of the documents which should be updated by + // resync pipeline. + Status *GoogleRpcStatus `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestinationPrefix") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestinationPrefix") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse: The response +// proto of ResyncDataset method. +type GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse struct { +} + // GoogleCloudDocumentaiUiv1beta3RevisionReference: The revision // reference specifies which revision on the document to read. type GoogleCloudDocumentaiUiv1beta3RevisionReference struct { @@ -2148,6 +2227,9 @@ type GoogleCloudDocumentaiV1beta1DocumentPage struct { // Provenance: The history of this page. Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` + // Symbols: A list of visually detected symbols on the page. + Symbols []*GoogleCloudDocumentaiV1beta1DocumentPageSymbol `json:"symbols,omitempty"` + // Tables: A list of visually detected tables on the page. Tables []*GoogleCloudDocumentaiV1beta1DocumentPageTable `json:"tables,omitempty"` @@ -2333,7 +2415,7 @@ type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -2703,6 +2785,39 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageParagraph) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta1DocumentPageSymbol: A detected symbol. +type GoogleCloudDocumentaiV1beta1DocumentPageSymbol struct { + // DetectedLanguages: A list of detected languages together with + // confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + + // Layout: Layout for Symbol. + Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedLanguages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageSymbol) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageSymbol + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta1DocumentPageTable: A table representation // similar to HTML table structure. type GoogleCloudDocumentaiV1beta1DocumentPageTable struct { @@ -3238,7 +3353,8 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) UnmarshalJSON(data [ // indexing into the Document.text. type GoogleCloudDocumentaiV1beta1DocumentTextAnchor struct { // Content: Contains the content of the text span so that users do not - // have to look it up in the text_segments. + // have to look it up in the text_segments. It is always populated for + // formFields. Content string `json:"content,omitempty"` // TextSegments: The text segments from the Document.text. @@ -4082,6 +4198,9 @@ type GoogleCloudDocumentaiV1beta2DocumentPage struct { // Provenance: The history of this page. Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` + // Symbols: A list of visually detected symbols on the page. + Symbols []*GoogleCloudDocumentaiV1beta2DocumentPageSymbol `json:"symbols,omitempty"` + // Tables: A list of visually detected tables on the page. Tables []*GoogleCloudDocumentaiV1beta2DocumentPageTable `json:"tables,omitempty"` @@ -4267,7 +4386,7 @@ type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -4637,6 +4756,39 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageParagraph) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta2DocumentPageSymbol: A detected symbol. +type GoogleCloudDocumentaiV1beta2DocumentPageSymbol struct { + // DetectedLanguages: A list of detected languages together with + // confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + + // Layout: Layout for Symbol. + Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedLanguages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageSymbol) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageSymbol + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta2DocumentPageTable: A table representation // similar to HTML table structure. type GoogleCloudDocumentaiV1beta2DocumentPageTable struct { @@ -5172,7 +5324,8 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentStyleFontSize) UnmarshalJSON(data [ // indexing into the Document.text. type GoogleCloudDocumentaiV1beta2DocumentTextAnchor struct { // Content: Contains the content of the text span so that users do not - // have to look it up in the text_segments. + // have to look it up in the text_segments. It is always populated for + // formFields. Content string `json:"content,omitempty"` // TextSegments: The text segments from the Document.text. @@ -6442,6 +6595,9 @@ type GoogleCloudDocumentaiV1beta3DocumentPage struct { // Provenance: The history of this page. Provenance *GoogleCloudDocumentaiV1beta3DocumentProvenance `json:"provenance,omitempty"` + // Symbols: A list of visually detected symbols on the page. + Symbols []*GoogleCloudDocumentaiV1beta3DocumentPageSymbol `json:"symbols,omitempty"` + // Tables: A list of visually detected tables on the page. Tables []*GoogleCloudDocumentaiV1beta3DocumentPageTable `json:"tables,omitempty"` @@ -6627,7 +6783,7 @@ type GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage struct { // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. LanguageCode string `json:"languageCode,omitempty"` // ForceSendFields is a list of field names (e.g. "Confidence") to @@ -6997,6 +7153,39 @@ func (s *GoogleCloudDocumentaiV1beta3DocumentPageParagraph) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3DocumentPageSymbol: A detected symbol. +type GoogleCloudDocumentaiV1beta3DocumentPageSymbol struct { + // DetectedLanguages: A list of detected languages together with + // confidence. + DetectedLanguages []*GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` + + // Layout: Layout for Symbol. + Layout *GoogleCloudDocumentaiV1beta3DocumentPageLayout `json:"layout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetectedLanguages") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetectedLanguages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3DocumentPageSymbol) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentPageSymbol + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3DocumentPageTable: A table representation // similar to HTML table structure. type GoogleCloudDocumentaiV1beta3DocumentPageTable struct { @@ -7532,7 +7721,8 @@ func (s *GoogleCloudDocumentaiV1beta3DocumentStyleFontSize) UnmarshalJSON(data [ // indexing into the Document.text. type GoogleCloudDocumentaiV1beta3DocumentTextAnchor struct { // Content: Contains the content of the text span so that users do not - // have to look it up in the text_segments. + // have to look it up in the text_segments. It is always populated for + // formFields. Content string `json:"content,omitempty"` // TextSegments: The text segments from the Document.text. diff --git a/mybusinessbusinesscalls/v1/mybusinessbusinesscalls-api.json b/mybusinessbusinesscalls/v1/mybusinessbusinesscalls-api.json new file mode 100644 index 00000000000..074170b2b59 --- /dev/null +++ b/mybusinessbusinesscalls/v1/mybusinessbusinesscalls-api.json @@ -0,0 +1,398 @@ +{ + "basePath": "", + "baseUrl": "https://mybusinessbusinesscalls.googleapis.com/", + "batchPath": "batch", + "canonicalName": "My Business Business Calls", + "description": "The My Business Business Calls API manages business calls information of a location on Google.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/my-business/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "mybusinessbusinesscalls:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://mybusinessbusinesscalls.mtls.googleapis.com/", + "name": "mybusinessbusinesscalls", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "locations": { + "methods": { + "getBusinesscallssettings": { + "description": "Returns the Business calls settings resource for the given location.", + "flatPath": "v1/locations/{locationsId}/businesscallssettings", + "httpMethod": "GET", + "id": "mybusinessbusinesscalls.locations.getBusinesscallssettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The BusinessCallsSettings to get. The `name` field is used to identify the business call settings to get. Format: locations/{location_id}/businesscallssettings.", + "location": "path", + "pattern": "^locations/[^/]+/businesscallssettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "BusinessCallsSettings" + } + }, + "updateBusinesscallssettings": { + "description": "Updates the Business call settings for the specified location.", + "flatPath": "v1/locations/{locationsId}/businesscallssettings", + "httpMethod": "PATCH", + "id": "mybusinessbusinesscalls.locations.updateBusinesscallssettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the calls settings. Format: locations/{location}/businesscallssettings", + "location": "path", + "pattern": "^locations/[^/]+/businesscallssettings$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "BusinessCallsSettings" + }, + "response": { + "$ref": "BusinessCallsSettings" + } + } + }, + "resources": { + "businesscallsinsights": { + "methods": { + "list": { + "description": "Returns insights for Business calls for a location.", + "flatPath": "v1/locations/{locationsId}/businesscallsinsights", + "httpMethod": "GET", + "id": "mybusinessbusinesscalls.locations.businesscallsinsights.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter constraining the calls insights to return. The response includes only entries that match the filter. If the MetricType is not provided, AGGREGATE_COUNT is returned. If no end_date is provided, the last date for which data is available is used. If no start_date is provided, we will default to the first date for which data is available, which is currently 6 months. If start_date is before the date when data is available, data is returned starting from the date when it is available. At this time we support following filters. 1. start_date=\"DATE\" where date is in YYYY-MM-DD format. 2. end_date=\"DATE\" where date is in YYYY-MM-DD format. 3. metric_type=XYZ where XYZ is a valid MetricType. 4. Conjunctions(AND) of all of the above. e.g., \"start_date=2021-08-01 AND end_date=2021-08-10 AND metric_type=AGGREGATE_COUNT\" The AGGREGATE_COUNT metric_type ignores the DD part of the date.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of BusinessCallsInsights to return. If unspecified, at most 20 will be returned. Some of the metric_types(e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the page_size is ignored.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListBusinessCallsInsights` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBusinessCallsInsights` must match the call that provided the page token. Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the pake_token is ignored.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent location to fetch calls insights for. Format: locations/{location_id}", + "location": "path", + "pattern": "^locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/businesscallsinsights", + "response": { + "$ref": "ListBusinessCallsInsightsResponse" + } + } + } + } + } + } + }, + "revision": "20220212", + "rootUrl": "https://mybusinessbusinesscalls.googleapis.com/", + "schemas": { + "AggregateMetrics": { + "description": "Metrics aggregated over the input time range.", + "id": "AggregateMetrics", + "properties": { + "answeredCallsCount": { + "description": "Total count of answered calls.", + "format": "int32", + "type": "integer" + }, + "endDate": { + "$ref": "Date", + "description": "End date for this metric." + }, + "hourlyMetrics": { + "description": "A list of metrics by hour of day.", + "items": { + "$ref": "HourlyMetrics" + }, + "type": "array" + }, + "missedCallsCount": { + "description": "Total count of missed calls.", + "format": "int32", + "type": "integer" + }, + "startDate": { + "$ref": "Date", + "description": "Date for this metric. If metric is monthly, only year and month are used." + }, + "weekdayMetrics": { + "description": "A list of metrics by day of week.", + "items": { + "$ref": "WeekDayMetrics" + }, + "type": "array" + } + }, + "type": "object" + }, + "BusinessCallsInsights": { + "description": "Insights for calls made to a location.", + "id": "BusinessCallsInsights", + "properties": { + "aggregateMetrics": { + "$ref": "AggregateMetrics", + "description": "Metric for the time range based on start_date and end_date." + }, + "metricType": { + "description": "The metric for which the value applies.", + "enum": [ + "METRIC_TYPE_UNSPECIFIED", + "AGGREGATE_COUNT" + ], + "enumDescriptions": [ + "Type of metric is unspecified.", + "The metrics provided are counts aggregated over the input time_range." + ], + "type": "string" + }, + "name": { + "description": "Required. The resource name of the calls insights. Format: locations/{location}/businesscallsinsights", + "type": "string" + } + }, + "type": "object" + }, + "BusinessCallsSettings": { + "description": "Business calls settings for a location.", + "id": "BusinessCallsSettings", + "properties": { + "callsState": { + "description": "Required. The state of this location's enrollment in Business calls.", + "enum": [ + "CALLS_STATE_UNSPECIFIED", + "ENABLED", + "DISABLED" + ], + "enumDescriptions": [ + "Unspecified.", + "Business calls is enabled for the location.", + "Business calls is disabled for the location." + ], + "type": "string" + }, + "consentTime": { + "description": "Input only. Time when the end user provided consent to the API user to enable business calls.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the calls settings. Format: locations/{location}/businesscallssettings", + "type": "string" + } + }, + "type": "object" + }, + "Date": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day, with a zero year (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "Date", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "HourlyMetrics": { + "description": "Metrics for an hour.", + "id": "HourlyMetrics", + "properties": { + "hour": { + "description": "Hour of the day. Allowed values are 0-23.", + "format": "int32", + "type": "integer" + }, + "missedCallsCount": { + "description": "Total count of missed calls for this hour.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ListBusinessCallsInsightsResponse": { + "description": "Response message for ListBusinessCallsInsights.", + "id": "ListBusinessCallsInsightsResponse", + "properties": { + "businessCallsInsights": { + "description": "A collection of business calls insights for the location.", + "items": { + "$ref": "BusinessCallsInsights" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the next_page_token will be empty.", + "type": "string" + } + }, + "type": "object" + }, + "WeekDayMetrics": { + "description": "Metrics for a week day.", + "id": "WeekDayMetrics", + "properties": { + "day": { + "description": "Day of the week. Allowed values are Sunday - Saturday.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "missedCallsCount": { + "description": "Total count of missed calls for this hour.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "My Business Business Calls API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/mybusinessbusinesscalls/v1/mybusinessbusinesscalls-gen.go b/mybusinessbusinesscalls/v1/mybusinessbusinesscalls-gen.go new file mode 100644 index 00000000000..3d557052bef --- /dev/null +++ b/mybusinessbusinesscalls/v1/mybusinessbusinesscalls-gen.go @@ -0,0 +1,962 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package mybusinessbusinesscalls provides access to the My Business Business Calls API. +// +// For product documentation, see: https://developers.google.com/my-business/ +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/mybusinessbusinesscalls/v1" +// ... +// ctx := context.Background() +// mybusinessbusinesscallsService, err := mybusinessbusinesscalls.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// mybusinessbusinesscallsService, err := mybusinessbusinesscalls.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// mybusinessbusinesscallsService, err := mybusinessbusinesscalls.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package mybusinessbusinesscalls // import "google.golang.org/api/mybusinessbusinesscalls/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "mybusinessbusinesscalls:v1" +const apiName = "mybusinessbusinesscalls" +const apiVersion = "v1" +const basePath = "https://mybusinessbusinesscalls.googleapis.com/" +const mtlsBasePath = "https://mybusinessbusinesscalls.mtls.googleapis.com/" + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Locations = NewLocationsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Locations *LocationsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewLocationsService(s *Service) *LocationsService { + rs := &LocationsService{s: s} + rs.Businesscallsinsights = NewLocationsBusinesscallsinsightsService(s) + return rs +} + +type LocationsService struct { + s *Service + + Businesscallsinsights *LocationsBusinesscallsinsightsService +} + +func NewLocationsBusinesscallsinsightsService(s *Service) *LocationsBusinesscallsinsightsService { + rs := &LocationsBusinesscallsinsightsService{s: s} + return rs +} + +type LocationsBusinesscallsinsightsService struct { + s *Service +} + +// AggregateMetrics: Metrics aggregated over the input time range. +type AggregateMetrics struct { + // AnsweredCallsCount: Total count of answered calls. + AnsweredCallsCount int64 `json:"answeredCallsCount,omitempty"` + + // EndDate: End date for this metric. + EndDate *Date `json:"endDate,omitempty"` + + // HourlyMetrics: A list of metrics by hour of day. + HourlyMetrics []*HourlyMetrics `json:"hourlyMetrics,omitempty"` + + // MissedCallsCount: Total count of missed calls. + MissedCallsCount int64 `json:"missedCallsCount,omitempty"` + + // StartDate: Date for this metric. If metric is monthly, only year and + // month are used. + StartDate *Date `json:"startDate,omitempty"` + + // WeekdayMetrics: A list of metrics by day of week. + WeekdayMetrics []*WeekDayMetrics `json:"weekdayMetrics,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnsweredCallsCount") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnsweredCallsCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AggregateMetrics) MarshalJSON() ([]byte, error) { + type NoMethod AggregateMetrics + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BusinessCallsInsights: Insights for calls made to a location. +type BusinessCallsInsights struct { + // AggregateMetrics: Metric for the time range based on start_date and + // end_date. + AggregateMetrics *AggregateMetrics `json:"aggregateMetrics,omitempty"` + + // MetricType: The metric for which the value applies. + // + // Possible values: + // "METRIC_TYPE_UNSPECIFIED" - Type of metric is unspecified. + // "AGGREGATE_COUNT" - The metrics provided are counts aggregated over + // the input time_range. + MetricType string `json:"metricType,omitempty"` + + // Name: Required. The resource name of the calls insights. Format: + // locations/{location}/businesscallsinsights + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregateMetrics") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregateMetrics") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BusinessCallsInsights) MarshalJSON() ([]byte, error) { + type NoMethod BusinessCallsInsights + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BusinessCallsSettings: Business calls settings for a location. +type BusinessCallsSettings struct { + // CallsState: Required. The state of this location's enrollment in + // Business calls. + // + // Possible values: + // "CALLS_STATE_UNSPECIFIED" - Unspecified. + // "ENABLED" - Business calls is enabled for the location. + // "DISABLED" - Business calls is disabled for the location. + CallsState string `json:"callsState,omitempty"` + + // ConsentTime: Input only. Time when the end user provided consent to + // the API user to enable business calls. + ConsentTime string `json:"consentTime,omitempty"` + + // Name: Required. The resource name of the calls settings. Format: + // locations/{location}/businesscallssettings + 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. "CallsState") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CallsState") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BusinessCallsSettings) MarshalJSON() ([]byte, error) { + type NoMethod BusinessCallsSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Date: Represents a whole or partial calendar date, such as a +// birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values * A month and day, with a +// zero year (e.g., an anniversary) * A year on its own, with a zero +// month and a zero day * A year and month, with a zero day (e.g., a +// credit card expiration date) Related types: * google.type.TimeOfDay * +// google.type.DateTime * google.protobuf.Timestamp +type Date struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Date) MarshalJSON() ([]byte, error) { + type NoMethod Date + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HourlyMetrics: Metrics for an hour. +type HourlyMetrics struct { + // Hour: Hour of the day. Allowed values are 0-23. + Hour int64 `json:"hour,omitempty"` + + // MissedCallsCount: Total count of missed calls for this hour. + MissedCallsCount int64 `json:"missedCallsCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Hour") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Hour") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HourlyMetrics) MarshalJSON() ([]byte, error) { + type NoMethod HourlyMetrics + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListBusinessCallsInsightsResponse: Response message for +// ListBusinessCallsInsights. +type ListBusinessCallsInsightsResponse struct { + // BusinessCallsInsights: A collection of business calls insights for + // the location. + BusinessCallsInsights []*BusinessCallsInsights `json:"businessCallsInsights,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. Some of the metric_types (e.g, AGGREGATE_COUNT) returns a + // single page. For these metrics, the next_page_token will be empty. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "BusinessCallsInsights") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BusinessCallsInsights") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListBusinessCallsInsightsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBusinessCallsInsightsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WeekDayMetrics: Metrics for a week day. +type WeekDayMetrics struct { + // Day: Day of the week. Allowed values are Sunday - Saturday. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + + // MissedCallsCount: Total count of missed calls for this hour. + MissedCallsCount int64 `json:"missedCallsCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WeekDayMetrics) MarshalJSON() ([]byte, error) { + type NoMethod WeekDayMetrics + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "mybusinessbusinesscalls.locations.getBusinesscallssettings": + +type LocationsGetBusinesscallssettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetBusinesscallssettings: Returns the Business calls settings +// resource for the given location. +// +// - name: The BusinessCallsSettings to get. The `name` field is used to +// identify the business call settings to get. Format: +// locations/{location_id}/businesscallssettings. +func (r *LocationsService) GetBusinesscallssettings(name string) *LocationsGetBusinesscallssettingsCall { + c := &LocationsGetBusinesscallssettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsGetBusinesscallssettingsCall) Fields(s ...googleapi.Field) *LocationsGetBusinesscallssettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *LocationsGetBusinesscallssettingsCall) IfNoneMatch(entityTag string) *LocationsGetBusinesscallssettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsGetBusinesscallssettingsCall) Context(ctx context.Context) *LocationsGetBusinesscallssettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsGetBusinesscallssettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsGetBusinesscallssettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "mybusinessbusinesscalls.locations.getBusinesscallssettings" call. +// Exactly one of *BusinessCallsSettings or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BusinessCallsSettings.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *LocationsGetBusinesscallssettingsCall) Do(opts ...googleapi.CallOption) (*BusinessCallsSettings, 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, &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, err + } + ret := &BusinessCallsSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the Business calls settings resource for the given location.", + // "flatPath": "v1/locations/{locationsId}/businesscallssettings", + // "httpMethod": "GET", + // "id": "mybusinessbusinesscalls.locations.getBusinesscallssettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The BusinessCallsSettings to get. The `name` field is used to identify the business call settings to get. Format: locations/{location_id}/businesscallssettings.", + // "location": "path", + // "pattern": "^locations/[^/]+/businesscallssettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "BusinessCallsSettings" + // } + // } + +} + +// method id "mybusinessbusinesscalls.locations.updateBusinesscallssettings": + +type LocationsUpdateBusinesscallssettingsCall struct { + s *Service + name string + businesscallssettings *BusinessCallsSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateBusinesscallssettings: Updates the Business call settings for +// the specified location. +// +// - name: The resource name of the calls settings. Format: +// locations/{location}/businesscallssettings. +func (r *LocationsService) UpdateBusinesscallssettings(name string, businesscallssettings *BusinessCallsSettings) *LocationsUpdateBusinesscallssettingsCall { + c := &LocationsUpdateBusinesscallssettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.businesscallssettings = businesscallssettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to update. +func (c *LocationsUpdateBusinesscallssettingsCall) UpdateMask(updateMask string) *LocationsUpdateBusinesscallssettingsCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsUpdateBusinesscallssettingsCall) Fields(s ...googleapi.Field) *LocationsUpdateBusinesscallssettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsUpdateBusinesscallssettingsCall) Context(ctx context.Context) *LocationsUpdateBusinesscallssettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsUpdateBusinesscallssettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsUpdateBusinesscallssettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.businesscallssettings) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "mybusinessbusinesscalls.locations.updateBusinesscallssettings" call. +// Exactly one of *BusinessCallsSettings or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BusinessCallsSettings.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *LocationsUpdateBusinesscallssettingsCall) Do(opts ...googleapi.CallOption) (*BusinessCallsSettings, 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, &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, err + } + ret := &BusinessCallsSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the Business call settings for the specified location.", + // "flatPath": "v1/locations/{locationsId}/businesscallssettings", + // "httpMethod": "PATCH", + // "id": "mybusinessbusinesscalls.locations.updateBusinesscallssettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the calls settings. Format: locations/{location}/businesscallssettings", + // "location": "path", + // "pattern": "^locations/[^/]+/businesscallssettings$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "BusinessCallsSettings" + // }, + // "response": { + // "$ref": "BusinessCallsSettings" + // } + // } + +} + +// method id "mybusinessbusinesscalls.locations.businesscallsinsights.list": + +type LocationsBusinesscallsinsightsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns insights for Business calls for a location. +// +// - parent: The parent location to fetch calls insights for. Format: +// locations/{location_id}. +func (r *LocationsBusinesscallsinsightsService) List(parent string) *LocationsBusinesscallsinsightsListCall { + c := &LocationsBusinesscallsinsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter constraining +// the calls insights to return. The response includes only entries that +// match the filter. If the MetricType is not provided, AGGREGATE_COUNT +// is returned. If no end_date is provided, the last date for which data +// is available is used. If no start_date is provided, we will default +// to the first date for which data is available, which is currently 6 +// months. If start_date is before the date when data is available, data +// is returned starting from the date when it is available. At this time +// we support following filters. 1. start_date="DATE" where date is in +// YYYY-MM-DD format. 2. end_date="DATE" where date is in YYYY-MM-DD +// format. 3. metric_type=XYZ where XYZ is a valid MetricType. 4. +// Conjunctions(AND) of all of the above. e.g., "start_date=2021-08-01 +// AND end_date=2021-08-10 AND metric_type=AGGREGATE_COUNT" The +// AGGREGATE_COUNT metric_type ignores the DD part of the date. +func (c *LocationsBusinesscallsinsightsListCall) Filter(filter string) *LocationsBusinesscallsinsightsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of BusinessCallsInsights to return. If unspecified, at most 20 will +// be returned. Some of the metric_types(e.g, AGGREGATE_COUNT) returns a +// single page. For these metrics, the page_size is ignored. +func (c *LocationsBusinesscallsinsightsListCall) PageSize(pageSize int64) *LocationsBusinesscallsinsightsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListBusinessCallsInsights` call. Provide +// this to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListBusinessCallsInsights` must match the +// call that provided the page token. Some of the metric_types (e.g, +// AGGREGATE_COUNT) returns a single page. For these metrics, the +// pake_token is ignored. +func (c *LocationsBusinesscallsinsightsListCall) PageToken(pageToken string) *LocationsBusinesscallsinsightsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsBusinesscallsinsightsListCall) Fields(s ...googleapi.Field) *LocationsBusinesscallsinsightsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *LocationsBusinesscallsinsightsListCall) IfNoneMatch(entityTag string) *LocationsBusinesscallsinsightsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsBusinesscallsinsightsListCall) Context(ctx context.Context) *LocationsBusinesscallsinsightsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsBusinesscallsinsightsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsBusinesscallsinsightsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/businesscallsinsights") + 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 "mybusinessbusinesscalls.locations.businesscallsinsights.list" call. +// Exactly one of *ListBusinessCallsInsightsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListBusinessCallsInsightsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *LocationsBusinesscallsinsightsListCall) Do(opts ...googleapi.CallOption) (*ListBusinessCallsInsightsResponse, 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, &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, err + } + ret := &ListBusinessCallsInsightsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns insights for Business calls for a location.", + // "flatPath": "v1/locations/{locationsId}/businesscallsinsights", + // "httpMethod": "GET", + // "id": "mybusinessbusinesscalls.locations.businesscallsinsights.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. A filter constraining the calls insights to return. The response includes only entries that match the filter. If the MetricType is not provided, AGGREGATE_COUNT is returned. If no end_date is provided, the last date for which data is available is used. If no start_date is provided, we will default to the first date for which data is available, which is currently 6 months. If start_date is before the date when data is available, data is returned starting from the date when it is available. At this time we support following filters. 1. start_date=\"DATE\" where date is in YYYY-MM-DD format. 2. end_date=\"DATE\" where date is in YYYY-MM-DD format. 3. metric_type=XYZ where XYZ is a valid MetricType. 4. Conjunctions(AND) of all of the above. e.g., \"start_date=2021-08-01 AND end_date=2021-08-10 AND metric_type=AGGREGATE_COUNT\" The AGGREGATE_COUNT metric_type ignores the DD part of the date.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of BusinessCallsInsights to return. If unspecified, at most 20 will be returned. Some of the metric_types(e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the page_size is ignored.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListBusinessCallsInsights` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBusinessCallsInsights` must match the call that provided the page token. Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the pake_token is ignored.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent location to fetch calls insights for. Format: locations/{location_id}", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/businesscallsinsights", + // "response": { + // "$ref": "ListBusinessCallsInsightsResponse" + // } + // } + +} + +// 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 *LocationsBusinesscallsinsightsListCall) Pages(ctx context.Context, f func(*ListBusinessCallsInsightsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index 538f1d5c432..71bfc1383a4 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -938,7 +938,7 @@ } } }, - "revision": "20220125", + "revision": "20220210", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1127,7 +1127,7 @@ "type": "object" }, "Hub": { - "description": "A hub is a collection of spokes. A single hub can contain spokes from multiple regions. However, all of a hub's spokes must be associated with resources that reside in the same VPC network.", + "description": "A hub is a collection of spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the data transfer feature, the resources associated with those spokes must all reside in the same VPC network. Spokes that do not use data transfer can be associated with any VPC network in your project.", "id": "Hub", "properties": { "createTime": { @@ -1208,7 +1208,7 @@ "type": "object" }, "LinkedRouterApplianceInstances": { - "description": "A collection of router appliance instances. If you have multiple router appliance instances connected to the same site, they should all be attached to the same spoke.", + "description": "A collection of router appliance instances. If you configure multiple router appliance instances to receive data from the same set of sites outside of Google Cloud, we recommend that you associate those instances with the same spoke.", "id": "LinkedRouterApplianceInstances", "properties": { "instances": { diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 68aa5929a94..4a1cefc362e 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -609,8 +609,10 @@ func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { } // Hub: A hub is a collection of spokes. A single hub can contain spokes -// from multiple regions. However, all of a hub's spokes must be -// associated with resources that reside in the same VPC network. +// from multiple regions. However, if any of a hub's spokes use the data +// transfer feature, the resources associated with those spokes must all +// reside in the same VPC network. Spokes that do not use data transfer +// can be associated with any VPC network in your project. type Hub struct { // CreateTime: Output only. The time the hub was created. CreateTime string `json:"createTime,omitempty"` @@ -719,8 +721,9 @@ func (s *LinkedInterconnectAttachments) MarshalJSON() ([]byte, error) { } // LinkedRouterApplianceInstances: A collection of router appliance -// instances. If you have multiple router appliance instances connected -// to the same site, they should all be attached to the same spoke. +// instances. If you configure multiple router appliance instances to +// receive data from the same set of sites outside of Google Cloud, we +// recommend that you associate those instances with the same spoke. type LinkedRouterApplianceInstances struct { // Instances: The list of router appliance instances. Instances []*RouterApplianceInstance `json:"instances,omitempty"` diff --git a/notebooks/v1/notebooks-api.json b/notebooks/v1/notebooks-api.json index 62a6a41356d..ca2444e0283 100644 --- a/notebooks/v1/notebooks-api.json +++ b/notebooks/v1/notebooks-api.json @@ -1743,7 +1743,7 @@ } } }, - "revision": "20220125", + "revision": "20220205", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1966,6 +1966,13 @@ "description": "The definition of an Event for a managed / semi-managed notebook instance.", "id": "Event", "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Event details. This field is used to pass event information.", + "type": "object" + }, "reportTime": { "description": "Event report time.", "format": "google-datetime", @@ -1975,11 +1982,15 @@ "description": "Event type.", "enum": [ "EVENT_TYPE_UNSPECIFIED", - "IDLE" + "IDLE", + "HEARTBEAT", + "HEALTH" ], "enumDescriptions": [ "Event is not specified.", - "The instance / runtime is idle" + "The instance / runtime is idle", + "The instance / runtime is available. This event indicates that instance / runtime underlying compute is operational.", + "The instance / runtime health is available. This event indicates that instance / runtime health information." ], "type": "string" } @@ -2262,6 +2273,11 @@ "readOnly": true, "type": "string" }, + "creator": { + "description": "Output only. Email address of entity that sent original CreateInstance request.", + "readOnly": true, + "type": "string" + }, "customGpuDriverPath": { "description": "Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.", "type": "string" @@ -2993,13 +3009,13 @@ "type": "object" }, "ResetInstanceRequest": { - "description": "Request for reseting a notebook instance", + "description": "Request for resetting a notebook instance", "id": "ResetInstanceRequest", "properties": {}, "type": "object" }, "ResetRuntimeRequest": { - "description": "Request for reseting a Managed Notebook Runtime.", + "description": "Request for resetting a Managed Notebook Runtime.", "id": "ResetRuntimeRequest", "properties": {}, "type": "object" @@ -3034,12 +3050,16 @@ "enum": [ "HEALTH_STATE_UNSPECIFIED", "HEALTHY", - "UNHEALTHY" + "UNHEALTHY", + "AGENT_NOT_INSTALLED", + "AGENT_NOT_RUNNING" ], "enumDescriptions": [ "The runtime substate is unknown.", "The runtime is known to be in an healthy state (for example, critical daemons are running) Applies to ACTIVE state.", - "The runtime is known to be in an unhealthy state (for example, critical daemons are not running) Applies to ACTIVE state." + "The runtime is known to be in an unhealthy state (for example, critical daemons are not running) Applies to ACTIVE state.", + "The runtime has not installed health monitoring agent. Applies to ACTIVE state.", + "The runtime health monitoring agent is not running. Applies to ACTIVE state." ], "readOnly": true, "type": "string" @@ -3150,11 +3170,13 @@ "description": "The type of access mode this instance.", "enum": [ "RUNTIME_ACCESS_TYPE_UNSPECIFIED", - "SINGLE_USER" + "SINGLE_USER", + "SERVICE_ACCOUNT" ], "enumDescriptions": [ "Unspecified access.", - "Single user login." + "Single user login.", + "Service Account mode. In Service Account mode, Runtime creator will specify a SA that exists in the consumer project. Using Runtime Service Account field. Users accessing the Runtime need ActAs (Service Account User) permission." ], "type": "string" }, @@ -3254,6 +3276,11 @@ "postStartupScript": { "description": "Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (`gs://path-to-file/file-name`).", "type": "string" + }, + "upgradeable": { + "description": "Output only. Bool indicating whether an newer image is available in an image family.", + "readOnly": true, + "type": "boolean" } }, "type": "object" @@ -3853,6 +3880,10 @@ ], "type": "string" }, + "reservedIpRange": { + "description": "Optional. Reserved IP Range name is used for VPC Peering. The subnetwork allocation will use the range *name* if it's assigned. Example: managed-notebooks-range-c PEERING_RANGE_NAME_3=managed-notebooks-range-c gcloud compute addresses create $PEERING_RANGE_NAME_3 \\ --global \\ --prefix-length=24 \\ --description=\"Google Cloud Managed Notebooks Range 24 c\" \\ --network=$NETWORK \\ --addresses=192.168.0.0 \\ --purpose=VPC_PEERING Field value will be: `managed-notebooks-range-c`", + "type": "string" + }, "shieldedInstanceConfig": { "$ref": "RuntimeShieldedInstanceConfig", "description": "Optional. Shielded VM Instance configuration settings." diff --git a/notebooks/v1/notebooks-gen.go b/notebooks/v1/notebooks-gen.go index 1fcd4e68243..0cf2c289f8e 100644 --- a/notebooks/v1/notebooks-gen.go +++ b/notebooks/v1/notebooks-gen.go @@ -50,6 +50,7 @@ import ( "strings" googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" gensupport "google.golang.org/api/internal/gensupport" option "google.golang.org/api/option" internaloption "google.golang.org/api/option/internaloption" @@ -615,6 +616,10 @@ func (s *Environment) MarshalJSON() ([]byte, error) { // Event: The definition of an Event for a managed / semi-managed // notebook instance. type Event struct { + // Details: Optional. Event details. This field is used to pass event + // information. + Details map[string]string `json:"details,omitempty"` + // ReportTime: Event report time. ReportTime string `json:"reportTime,omitempty"` @@ -623,9 +628,13 @@ type Event struct { // Possible values: // "EVENT_TYPE_UNSPECIFIED" - Event is not specified. // "IDLE" - The instance / runtime is idle + // "HEARTBEAT" - The instance / runtime is available. This event + // indicates that instance / runtime underlying compute is operational. + // "HEALTH" - The instance / runtime health is available. This event + // indicates that instance / runtime health information. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReportTime") to + // ForceSendFields is a list of field names (e.g. "Details") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -633,7 +642,7 @@ type Event struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReportTime") to include in + // NullFields is a list of field names (e.g. "Details") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1031,6 +1040,10 @@ type Instance struct { // CreateTime: Output only. Instance creation time. CreateTime string `json:"createTime,omitempty"` + // Creator: Output only. Email address of entity that sent original + // CreateInstance request. + Creator string `json:"creator,omitempty"` + // CustomGpuDriverPath: Specify a custom Cloud Storage path where the // GPU driver is stored. If not specified, we'll automatically choose // from official GPU drivers. @@ -2156,11 +2169,12 @@ func (s *ReservationAffinity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResetInstanceRequest: Request for reseting a notebook instance +// ResetInstanceRequest: Request for resetting a notebook instance type ResetInstanceRequest struct { } -// ResetRuntimeRequest: Request for reseting a Managed Notebook Runtime. +// ResetRuntimeRequest: Request for resetting a Managed Notebook +// Runtime. type ResetRuntimeRequest struct { } @@ -2210,6 +2224,10 @@ type Runtime struct { // example, critical daemons are running) Applies to ACTIVE state. // "UNHEALTHY" - The runtime is known to be in an unhealthy state (for // example, critical daemons are not running) Applies to ACTIVE state. + // "AGENT_NOT_INSTALLED" - The runtime has not installed health + // monitoring agent. Applies to ACTIVE state. + // "AGENT_NOT_RUNNING" - The runtime health monitoring agent is not + // running. Applies to ACTIVE state. HealthState string `json:"healthState,omitempty"` // Metrics: Output only. Contains Runtime daemon metrics such as Service @@ -2337,6 +2355,10 @@ type RuntimeAccessConfig struct { // Possible values: // "RUNTIME_ACCESS_TYPE_UNSPECIFIED" - Unspecified access. // "SINGLE_USER" - Single user login. + // "SERVICE_ACCOUNT" - Service Account mode. In Service Account mode, + // Runtime creator will specify a SA that exists in the consumer + // project. Using Runtime Service Account field. Users accessing the + // Runtime need ActAs (Service Account User) permission. AccessType string `json:"accessType,omitempty"` // ProxyUri: Output only. The proxy endpoint that is used to access the @@ -2525,6 +2547,10 @@ type RuntimeSoftwareConfig struct { // Cloud Storage path (`gs://path-to-file/file-name`). PostStartupScript string `json:"postStartupScript,omitempty"` + // Upgradeable: Output only. Bool indicating whether an newer image is + // available in an image family. + Upgradeable bool `json:"upgradeable,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomGpuDriverPath") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3452,6 +3478,17 @@ type VirtualMachineConfig struct { // "GVNIC" - GVNIC NicType string `json:"nicType,omitempty"` + // ReservedIpRange: Optional. Reserved IP Range name is used for VPC + // Peering. The subnetwork allocation will use the range *name* if it's + // assigned. Example: managed-notebooks-range-c + // PEERING_RANGE_NAME_3=managed-notebooks-range-c gcloud compute + // addresses create $PEERING_RANGE_NAME_3 \ --global \ + // --prefix-length=24 \ --description="Google Cloud Managed Notebooks + // Range 24 c" \ --network=$NETWORK \ --addresses=192.168.0.0 \ + // --purpose=VPC_PEERING Field value will be: + // `managed-notebooks-range-c` + ReservedIpRange string `json:"reservedIpRange,omitempty"` + // ShieldedInstanceConfig: Optional. Shielded VM Instance configuration // settings. ShieldedInstanceConfig *RuntimeShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` @@ -3594,7 +3631,7 @@ func (c *ProjectsLocationsGetCall) Header() http.Header { func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -3766,7 +3803,7 @@ func (c *ProjectsLocationsListCall) Header() http.Header { func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -3950,7 +3987,7 @@ func (c *ProjectsLocationsEnvironmentsCreateCall) Header() http.Header { func (c *ProjectsLocationsEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -4097,7 +4134,7 @@ func (c *ProjectsLocationsEnvironmentsDeleteCall) Header() http.Header { func (c *ProjectsLocationsEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -4242,7 +4279,7 @@ func (c *ProjectsLocationsEnvironmentsGetCall) Header() http.Header { func (c *ProjectsLocationsEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -4403,7 +4440,7 @@ func (c *ProjectsLocationsEnvironmentsListCall) Header() http.Header { func (c *ProjectsLocationsEnvironmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -4579,7 +4616,7 @@ func (c *ProjectsLocationsExecutionsCreateCall) Header() http.Header { func (c *ProjectsLocationsExecutionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -4726,7 +4763,7 @@ func (c *ProjectsLocationsExecutionsDeleteCall) Header() http.Header { func (c *ProjectsLocationsExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -4871,7 +4908,7 @@ func (c *ProjectsLocationsExecutionsGetCall) Header() http.Header { func (c *ProjectsLocationsExecutionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -5046,7 +5083,7 @@ func (c *ProjectsLocationsExecutionsListCall) Header() http.Header { func (c *ProjectsLocationsExecutionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -5232,7 +5269,7 @@ func (c *ProjectsLocationsInstancesCreateCall) Header() http.Header { func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -5378,7 +5415,7 @@ func (c *ProjectsLocationsInstancesDeleteCall) Header() http.Header { func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -5522,7 +5559,7 @@ func (c *ProjectsLocationsInstancesGetCall) Header() http.Header { func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -5690,7 +5727,7 @@ func (c *ProjectsLocationsInstancesGetIamPolicyCall) Header() http.Header { func (c *ProjectsLocationsInstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -5843,7 +5880,7 @@ func (c *ProjectsLocationsInstancesGetInstanceHealthCall) Header() http.Header { func (c *ProjectsLocationsInstancesGetInstanceHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -6005,7 +6042,7 @@ func (c *ProjectsLocationsInstancesIsUpgradeableCall) Header() http.Header { func (c *ProjectsLocationsInstancesIsUpgradeableCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -6185,7 +6222,7 @@ func (c *ProjectsLocationsInstancesListCall) Header() http.Header { func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -6358,7 +6395,7 @@ func (c *ProjectsLocationsInstancesRegisterCall) Header() http.Header { func (c *ProjectsLocationsInstancesRegisterCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -6504,7 +6541,7 @@ func (c *ProjectsLocationsInstancesReportCall) Header() http.Header { func (c *ProjectsLocationsInstancesReportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -6647,7 +6684,7 @@ func (c *ProjectsLocationsInstancesResetCall) Header() http.Header { func (c *ProjectsLocationsInstancesResetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -6790,7 +6827,7 @@ func (c *ProjectsLocationsInstancesRollbackCall) Header() http.Header { func (c *ProjectsLocationsInstancesRollbackCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -6933,7 +6970,7 @@ func (c *ProjectsLocationsInstancesSetAcceleratorCall) Header() http.Header { func (c *ProjectsLocationsInstancesSetAcceleratorCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -7079,7 +7116,7 @@ func (c *ProjectsLocationsInstancesSetIamPolicyCall) Header() http.Header { func (c *ProjectsLocationsInstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -7222,7 +7259,7 @@ func (c *ProjectsLocationsInstancesSetLabelsCall) Header() http.Header { func (c *ProjectsLocationsInstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -7365,7 +7402,7 @@ func (c *ProjectsLocationsInstancesSetMachineTypeCall) Header() http.Header { func (c *ProjectsLocationsInstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -7508,7 +7545,7 @@ func (c *ProjectsLocationsInstancesStartCall) Header() http.Header { func (c *ProjectsLocationsInstancesStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -7651,7 +7688,7 @@ func (c *ProjectsLocationsInstancesStopCall) Header() http.Header { func (c *ProjectsLocationsInstancesStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -7800,7 +7837,7 @@ func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Header() http.Header func (c *ProjectsLocationsInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -7943,7 +7980,7 @@ func (c *ProjectsLocationsInstancesUpdateConfigCall) Header() http.Header { func (c *ProjectsLocationsInstancesUpdateConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -8086,7 +8123,7 @@ func (c *ProjectsLocationsInstancesUpdateMetadataItemsCall) Header() http.Header func (c *ProjectsLocationsInstancesUpdateMetadataItemsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -8231,7 +8268,7 @@ func (c *ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall) Header() ht func (c *ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -8374,7 +8411,7 @@ func (c *ProjectsLocationsInstancesUpgradeCall) Header() http.Header { func (c *ProjectsLocationsInstancesUpgradeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -8518,7 +8555,7 @@ func (c *ProjectsLocationsInstancesUpgradeInternalCall) Header() http.Header { func (c *ProjectsLocationsInstancesUpgradeInternalCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -8669,7 +8706,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -8812,7 +8849,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -8957,7 +8994,7 @@ func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -9133,7 +9170,7 @@ func (c *ProjectsLocationsOperationsListCall) Header() http.Header { func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -9314,7 +9351,7 @@ func (c *ProjectsLocationsRuntimesCreateCall) Header() http.Header { func (c *ProjectsLocationsRuntimesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -9460,7 +9497,7 @@ func (c *ProjectsLocationsRuntimesDeleteCall) Header() http.Header { func (c *ProjectsLocationsRuntimesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -9605,7 +9642,7 @@ func (c *ProjectsLocationsRuntimesGetCall) Header() http.Header { func (c *ProjectsLocationsRuntimesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -9773,7 +9810,7 @@ func (c *ProjectsLocationsRuntimesGetIamPolicyCall) Header() http.Header { func (c *ProjectsLocationsRuntimesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -9940,7 +9977,7 @@ func (c *ProjectsLocationsRuntimesListCall) Header() http.Header { func (c *ProjectsLocationsRuntimesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -10110,7 +10147,7 @@ func (c *ProjectsLocationsRuntimesReportEventCall) Header() http.Header { func (c *ProjectsLocationsRuntimesReportEventCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -10253,7 +10290,7 @@ func (c *ProjectsLocationsRuntimesResetCall) Header() http.Header { func (c *ProjectsLocationsRuntimesResetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -10399,7 +10436,7 @@ func (c *ProjectsLocationsRuntimesSetIamPolicyCall) Header() http.Header { func (c *ProjectsLocationsRuntimesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -10545,7 +10582,7 @@ func (c *ProjectsLocationsRuntimesStartCall) Header() http.Header { func (c *ProjectsLocationsRuntimesStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -10691,7 +10728,7 @@ func (c *ProjectsLocationsRuntimesStopCall) Header() http.Header { func (c *ProjectsLocationsRuntimesStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -10834,7 +10871,7 @@ func (c *ProjectsLocationsRuntimesSwitchCall) Header() http.Header { func (c *ProjectsLocationsRuntimesSwitchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -10983,7 +11020,7 @@ func (c *ProjectsLocationsRuntimesTestIamPermissionsCall) Header() http.Header { func (c *ProjectsLocationsRuntimesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -11133,7 +11170,7 @@ func (c *ProjectsLocationsSchedulesCreateCall) Header() http.Header { func (c *ProjectsLocationsSchedulesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -11279,7 +11316,7 @@ func (c *ProjectsLocationsSchedulesDeleteCall) Header() http.Header { func (c *ProjectsLocationsSchedulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -11423,7 +11460,7 @@ func (c *ProjectsLocationsSchedulesGetCall) Header() http.Header { func (c *ProjectsLocationsSchedulesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -11598,7 +11635,7 @@ func (c *ProjectsLocationsSchedulesListCall) Header() http.Header { func (c *ProjectsLocationsSchedulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } @@ -11779,7 +11816,7 @@ func (c *ProjectsLocationsSchedulesTriggerCall) Header() http.Header { func (c *ProjectsLocationsSchedulesTriggerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20220203") + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index b388a2d9bb5..b8dc76c27eb 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -2587,7 +2587,7 @@ } } }, - "revision": "20220127", + "revision": "20220210", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2803,6 +2803,10 @@ "$ref": "Reference" }, "type": "array" + }, + "upstreamFixAvailable": { + "description": "Whether upstream fix is available for the CVE.", + "type": "boolean" } }, "type": "object" @@ -4015,7 +4019,8 @@ "CREATE_OR_MODIFY_SYSTEM_PROCESS", "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", - "EXPLOIT_PUBLIC_FACING_APPLICATION" + "EXPLOIT_PUBLIC_FACING_APPLICATION", + "MODIFY_AUTHENTICATION_PROCESS" ], "enumDescriptions": [ "Unspecified value.", @@ -4045,7 +4050,8 @@ "T1543", "T1539", "T1578", - "T1190" + "T1190", + "T1556" ], "type": "string" }, @@ -4120,7 +4126,8 @@ "CREATE_OR_MODIFY_SYSTEM_PROCESS", "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", - "EXPLOIT_PUBLIC_FACING_APPLICATION" + "EXPLOIT_PUBLIC_FACING_APPLICATION", + "MODIFY_AUTHENTICATION_PROCESS" ], "enumDescriptions": [ "Unspecified value.", @@ -4150,7 +4157,8 @@ "T1543", "T1539", "T1578", - "T1190" + "T1190", + "T1556" ], "type": "string" }, diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index f2734799b5c..67b3b3e68bb 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -801,6 +801,9 @@ type Cve struct { // https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 References []*Reference `json:"references,omitempty"` + // UpstreamFixAvailable: Whether upstream fix is available for the CVE. + UpstreamFixAvailable bool `json:"upstreamFixAvailable,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cvssv3") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2827,6 +2830,7 @@ type MitreAttack struct { // "STEAL_WEB_SESSION_COOKIE" - T1539 // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 + // "MODIFY_AUTHENTICATION_PROCESS" - T1556 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -2887,6 +2891,7 @@ type MitreAttack struct { // "STEAL_WEB_SESSION_COOKIE" - T1539 // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 + // "MODIFY_AUTHENTICATION_PROCESS" - T1556 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index c6e0b92138e..bce71bbd0c5 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20220127", + "revision": "20220210", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -1088,6 +1088,10 @@ "$ref": "Reference" }, "type": "array" + }, + "upstreamFixAvailable": { + "description": "Whether upstream fix is available for the CVE.", + "type": "boolean" } }, "type": "object" @@ -2287,7 +2291,8 @@ "CREATE_OR_MODIFY_SYSTEM_PROCESS", "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", - "EXPLOIT_PUBLIC_FACING_APPLICATION" + "EXPLOIT_PUBLIC_FACING_APPLICATION", + "MODIFY_AUTHENTICATION_PROCESS" ], "enumDescriptions": [ "Unspecified value.", @@ -2317,7 +2322,8 @@ "T1543", "T1539", "T1578", - "T1190" + "T1190", + "T1556" ], "type": "string" }, @@ -2392,7 +2398,8 @@ "CREATE_OR_MODIFY_SYSTEM_PROCESS", "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", - "EXPLOIT_PUBLIC_FACING_APPLICATION" + "EXPLOIT_PUBLIC_FACING_APPLICATION", + "MODIFY_AUTHENTICATION_PROCESS" ], "enumDescriptions": [ "Unspecified value.", @@ -2422,7 +2429,8 @@ "T1543", "T1539", "T1578", - "T1190" + "T1190", + "T1556" ], "type": "string" }, diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index 4a9b01a73e7..b754ee831a1 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -528,6 +528,9 @@ type Cve struct { // https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 References []*Reference `json:"references,omitempty"` + // UpstreamFixAvailable: Whether upstream fix is available for the CVE. + UpstreamFixAvailable bool `json:"upstreamFixAvailable,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cvssv3") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2460,6 +2463,7 @@ type MitreAttack struct { // "STEAL_WEB_SESSION_COOKIE" - T1539 // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 + // "MODIFY_AUTHENTICATION_PROCESS" - T1556 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -2520,6 +2524,7 @@ type MitreAttack struct { // "STEAL_WEB_SESSION_COOKIE" - T1539 // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 + // "MODIFY_AUTHENTICATION_PROCESS" - T1556 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index f3f850b025c..778ee7f7076 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1592,7 +1592,7 @@ } } }, - "revision": "20220127", + "revision": "20220210", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -1720,6 +1720,10 @@ "$ref": "Reference" }, "type": "array" + }, + "upstreamFixAvailable": { + "description": "Whether upstream fix is available for the CVE.", + "type": "boolean" } }, "type": "object" @@ -2612,7 +2616,8 @@ "CREATE_OR_MODIFY_SYSTEM_PROCESS", "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", - "EXPLOIT_PUBLIC_FACING_APPLICATION" + "EXPLOIT_PUBLIC_FACING_APPLICATION", + "MODIFY_AUTHENTICATION_PROCESS" ], "enumDescriptions": [ "Unspecified value.", @@ -2642,7 +2647,8 @@ "T1543", "T1539", "T1578", - "T1190" + "T1190", + "T1556" ], "type": "string" }, @@ -2717,7 +2723,8 @@ "CREATE_OR_MODIFY_SYSTEM_PROCESS", "STEAL_WEB_SESSION_COOKIE", "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", - "EXPLOIT_PUBLIC_FACING_APPLICATION" + "EXPLOIT_PUBLIC_FACING_APPLICATION", + "MODIFY_AUTHENTICATION_PROCESS" ], "enumDescriptions": [ "Unspecified value.", @@ -2747,7 +2754,8 @@ "T1543", "T1539", "T1578", - "T1190" + "T1190", + "T1556" ], "type": "string" }, diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 157705f26c3..0896df08892 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -554,6 +554,9 @@ type Cve struct { // https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 References []*Reference `json:"references,omitempty"` + // UpstreamFixAvailable: Whether upstream fix is available for the CVE. + UpstreamFixAvailable bool `json:"upstreamFixAvailable,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cvssv3") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1829,6 +1832,7 @@ type MitreAttack struct { // "STEAL_WEB_SESSION_COOKIE" - T1539 // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 + // "MODIFY_AUTHENTICATION_PROCESS" - T1556 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -1889,6 +1893,7 @@ type MitreAttack struct { // "STEAL_WEB_SESSION_COOKIE" - T1539 // "MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE" - T1578 // "EXPLOIT_PUBLIC_FACING_APPLICATION" - T1190 + // "MODIFY_AUTHENTICATION_PROCESS" - T1556 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields.