From 2f0ca2e8744485661f12bb38c87f9b394e13fad7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Wed, 4 Sep 2024 01:35:48 +0000 Subject: [PATCH] feat(dataform): update the API #### dataform:v1beta1 The following keys were added: - resources.projects.resources.locations.methods.getConfig.description - resources.projects.resources.locations.methods.getConfig.flatPath - resources.projects.resources.locations.methods.getConfig.httpMethod - resources.projects.resources.locations.methods.getConfig.id - resources.projects.resources.locations.methods.getConfig.parameterOrder - resources.projects.resources.locations.methods.getConfig.parameters.name.description - resources.projects.resources.locations.methods.getConfig.parameters.name.location - resources.projects.resources.locations.methods.getConfig.parameters.name.pattern - resources.projects.resources.locations.methods.getConfig.parameters.name.required - resources.projects.resources.locations.methods.getConfig.parameters.name.type - resources.projects.resources.locations.methods.getConfig.path - resources.projects.resources.locations.methods.getConfig.response.$ref - resources.projects.resources.locations.methods.getConfig.scopes - resources.projects.resources.locations.methods.updateConfig.description - resources.projects.resources.locations.methods.updateConfig.flatPath - resources.projects.resources.locations.methods.updateConfig.httpMethod - resources.projects.resources.locations.methods.updateConfig.id - resources.projects.resources.locations.methods.updateConfig.parameterOrder - resources.projects.resources.locations.methods.updateConfig.parameters.name.description - resources.projects.resources.locations.methods.updateConfig.parameters.name.location - resources.projects.resources.locations.methods.updateConfig.parameters.name.pattern - resources.projects.resources.locations.methods.updateConfig.parameters.name.required - resources.projects.resources.locations.methods.updateConfig.parameters.name.type - resources.projects.resources.locations.methods.updateConfig.parameters.updateMask.description - resources.projects.resources.locations.methods.updateConfig.parameters.updateMask.format - resources.projects.resources.locations.methods.updateConfig.parameters.updateMask.location - resources.projects.resources.locations.methods.updateConfig.parameters.updateMask.type - resources.projects.resources.locations.methods.updateConfig.path - resources.projects.resources.locations.methods.updateConfig.request.$ref - resources.projects.resources.locations.methods.updateConfig.response.$ref - resources.projects.resources.locations.methods.updateConfig.scopes - schemas.CompilationResultAction.properties.dataPreparation.$ref - schemas.CompilationResultAction.properties.dataPreparation.description - schemas.Config.description - schemas.Config.id - schemas.Config.properties.defaultKmsKeyName.description - schemas.Config.properties.defaultKmsKeyName.type - schemas.Config.properties.name.description - schemas.Config.properties.name.type - schemas.Config.type - schemas.DataPreparation.description - schemas.DataPreparation.id - schemas.DataPreparation.properties.contents.description - schemas.DataPreparation.properties.contents.format - schemas.DataPreparation.properties.contents.type - schemas.DataPreparation.properties.dependencyTargets.description - schemas.DataPreparation.properties.dependencyTargets.items.$ref - schemas.DataPreparation.properties.dependencyTargets.type - schemas.DataPreparation.properties.disabled.description - schemas.DataPreparation.properties.disabled.type - schemas.DataPreparation.properties.tags.description - schemas.DataPreparation.properties.tags.items.type - schemas.DataPreparation.properties.tags.type - schemas.DataPreparation.type --- discovery/dataform-v1beta1.json | 110 ++++++++++++++- src/apis/dataform/v1beta1.ts | 231 ++++++++++++++++++++++++++++++++ 2 files changed, 340 insertions(+), 1 deletion(-) diff --git a/discovery/dataform-v1beta1.json b/discovery/dataform-v1beta1.json index c6fc8070c4..1f2a452e1f 100644 --- a/discovery/dataform-v1beta1.json +++ b/discovery/dataform-v1beta1.json @@ -133,6 +133,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getConfig": { + "description": "Get default config for a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/config", + "httpMethod": "GET", + "id": "dataform.projects.locations.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The config name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Config" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists information about the supported locations for this service.", "flatPath": "v1beta1/projects/{projectsId}/locations", @@ -173,6 +198,40 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateConfig": { + "description": "Update default config for a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/config", + "httpMethod": "PATCH", + "id": "dataform.projects.locations.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The config name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Specifies the fields to be updated in the config.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "Config" + }, + "response": { + "$ref": "Config" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -2236,7 +2295,7 @@ } } }, - "revision": "20240629", + "revision": "20240824", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "Assertion": { @@ -2596,6 +2655,10 @@ "$ref": "Target", "description": "The action's identifier if the project had been compiled without any overrides configured. Unique within the compilation result." }, + "dataPreparation": { + "$ref": "DataPreparation", + "description": "The data preparation executed by this action." + }, "declaration": { "$ref": "Declaration", "description": "The declaration declared by this action." @@ -2646,6 +2709,21 @@ }, "type": "object" }, + "Config": { + "description": "Config for all repositories in a given project and location.", + "id": "Config", + "properties": { + "defaultKmsKeyName": { + "description": "Optional. The default KMS key that is used if no encryption key is provided when a repository is created.", + "type": "string" + }, + "name": { + "description": "Identifier. The config name.", + "type": "string" + } + }, + "type": "object" + }, "DataEncryptionState": { "description": "Describes encryption state of a resource.", "id": "DataEncryptionState", @@ -2657,6 +2735,36 @@ }, "type": "object" }, + "DataPreparation": { + "description": "Defines a compiled Data Preparation entity", + "id": "DataPreparation", + "properties": { + "contents": { + "description": "The data preparation definition, stored as a binary encoded proto.", + "format": "byte", + "type": "string" + }, + "dependencyTargets": { + "description": "A list of actions that this action depends on.", + "items": { + "$ref": "Target" + }, + "type": "array" + }, + "disabled": { + "description": "Whether this action is disabled (i.e. should not be run).", + "type": "boolean" + }, + "tags": { + "description": "Arbitrary, user-defined tags on this action.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Declaration": { "description": "Represents a relation which is not managed by Dataform but which may be referenced by Dataform actions.", "id": "Declaration", diff --git a/src/apis/dataform/v1beta1.ts b/src/apis/dataform/v1beta1.ts index f19b6be436..74e7b1f1bc 100644 --- a/src/apis/dataform/v1beta1.ts +++ b/src/apis/dataform/v1beta1.ts @@ -410,6 +410,10 @@ export namespace dataform_v1beta1 { * The action's identifier if the project had been compiled without any overrides configured. Unique within the compilation result. */ canonicalTarget?: Schema$Target; + /** + * The data preparation executed by this action. + */ + dataPreparation?: Schema$DataPreparation; /** * The declaration declared by this action. */ @@ -444,6 +448,19 @@ export namespace dataform_v1beta1 { */ tokenStatus?: string | null; } + /** + * Config for all repositories in a given project and location. + */ + export interface Schema$Config { + /** + * Optional. The default KMS key that is used if no encryption key is provided when a repository is created. + */ + defaultKmsKeyName?: string | null; + /** + * Identifier. The config name. + */ + name?: string | null; + } /** * Describes encryption state of a resource. */ @@ -453,6 +470,27 @@ export namespace dataform_v1beta1 { */ kmsKeyVersionName?: string | null; } + /** + * Defines a compiled Data Preparation entity + */ + export interface Schema$DataPreparation { + /** + * The data preparation definition, stored as a binary encoded proto. + */ + contents?: string | null; + /** + * A list of actions that this action depends on. + */ + dependencyTargets?: Schema$Target[]; + /** + * Whether this action is disabled (i.e. should not be run). + */ + disabled?: boolean | null; + /** + * Arbitrary, user-defined tags on this action. + */ + tags?: string[] | null; + } /** * Represents a relation which is not managed by Dataform but which may be referenced by Dataform actions. */ @@ -1701,6 +1739,91 @@ export namespace dataform_v1beta1 { } } + /** + * Get default config for a given project and location. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getConfig( + params: Params$Resource$Projects$Locations$Getconfig, + options: StreamMethodOptions + ): GaxiosPromise; + getConfig( + params?: Params$Resource$Projects$Locations$Getconfig, + options?: MethodOptions + ): GaxiosPromise; + getConfig( + params: Params$Resource$Projects$Locations$Getconfig, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getConfig( + params: Params$Resource$Projects$Locations$Getconfig, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getConfig( + params: Params$Resource$Projects$Locations$Getconfig, + callback: BodyResponseCallback + ): void; + getConfig(callback: BodyResponseCallback): void; + getConfig( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Getconfig + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Getconfig; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Getconfig; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataform.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + apiVersion: '', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Lists information about the supported locations for this service. * @@ -1793,6 +1916,91 @@ export namespace dataform_v1beta1 { return createAPIRequest(parameters); } } + + /** + * Update default config for a given project and location. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + updateConfig( + params: Params$Resource$Projects$Locations$Updateconfig, + options: StreamMethodOptions + ): GaxiosPromise; + updateConfig( + params?: Params$Resource$Projects$Locations$Updateconfig, + options?: MethodOptions + ): GaxiosPromise; + updateConfig( + params: Params$Resource$Projects$Locations$Updateconfig, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateConfig( + params: Params$Resource$Projects$Locations$Updateconfig, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateConfig( + params: Params$Resource$Projects$Locations$Updateconfig, + callback: BodyResponseCallback + ): void; + updateConfig(callback: BodyResponseCallback): void; + updateConfig( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Updateconfig + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Updateconfig; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Updateconfig; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dataform.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + apiVersion: '', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Projects$Locations$Get @@ -1802,6 +2010,13 @@ export namespace dataform_v1beta1 { */ name?: string; } + export interface Params$Resource$Projects$Locations$Getconfig + extends StandardParameters { + /** + * Required. The config name. + */ + name?: string; + } export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** @@ -1821,6 +2036,22 @@ export namespace dataform_v1beta1 { */ pageToken?: string; } + export interface Params$Resource$Projects$Locations$Updateconfig + extends StandardParameters { + /** + * Identifier. The config name. + */ + name?: string; + /** + * Optional. Specifies the fields to be updated in the config. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Config; + } export class Resource$Projects$Locations$Collections { context: APIRequestContext;