Skip to content

Commit

Permalink
feat(dataform): update the API
Browse files Browse the repository at this point in the history
#### dataform:v1beta1

The following keys were added:
- schemas.CommitRepositoryChangesResponse.description
- schemas.CommitRepositoryChangesResponse.id
- schemas.CommitRepositoryChangesResponse.properties.commitSha.description
- schemas.CommitRepositoryChangesResponse.properties.commitSha.type
- schemas.CommitRepositoryChangesResponse.type
- schemas.CompilationResult.properties.dataEncryptionState.$ref
- schemas.CompilationResult.properties.dataEncryptionState.description
- schemas.CompilationResult.properties.dataEncryptionState.readOnly
- schemas.DataEncryptionState.description
- schemas.DataEncryptionState.id
- schemas.DataEncryptionState.properties.kmsKeyVersionName.description
- schemas.DataEncryptionState.properties.kmsKeyVersionName.type
- schemas.DataEncryptionState.type
- schemas.Repository.properties.dataEncryptionState.$ref
- schemas.Repository.properties.dataEncryptionState.description
- schemas.Repository.properties.dataEncryptionState.readOnly
- schemas.Repository.properties.kmsKeyName.description
- schemas.Repository.properties.kmsKeyName.type
- schemas.WorkflowInvocation.properties.dataEncryptionState.$ref
- schemas.WorkflowInvocation.properties.dataEncryptionState.description
- schemas.WorkflowInvocation.properties.dataEncryptionState.readOnly
- schemas.Workspace.properties.dataEncryptionState.$ref
- schemas.Workspace.properties.dataEncryptionState.description
- schemas.Workspace.properties.dataEncryptionState.readOnly

The following keys were changed:
- resources.projects.resources.locations.resources.repositories.methods.commit.response.$ref
  • Loading branch information
yoshi-automation authored and sofisl committed May 7, 2024
1 parent 4e10242 commit 8f3478b
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 13 deletions.
50 changes: 48 additions & 2 deletions discovery/dataform-v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
"$ref": "CommitRepositoryChangesRequest"
},
"response": {
"$ref": "Empty"
"$ref": "CommitRepositoryChangesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
Expand Down Expand Up @@ -2108,7 +2108,7 @@
}
}
},
"revision": "20240420",
"revision": "20240427",
"rootUrl": "https://dataform.googleapis.com/",
"schemas": {
"Assertion": {
Expand Down Expand Up @@ -2339,6 +2339,17 @@
},
"type": "object"
},
"CommitRepositoryChangesResponse": {
"description": "`CommitRepositoryChanges` response message.",
"id": "CommitRepositoryChangesResponse",
"properties": {
"commitSha": {
"description": "The commit SHA of the current commit.",
"type": "string"
}
},
"type": "object"
},
"CommitWorkspaceChangesRequest": {
"description": "`CommitWorkspaceChanges` request message.",
"id": "CommitWorkspaceChangesRequest",
Expand Down Expand Up @@ -2404,6 +2415,11 @@
"readOnly": true,
"type": "array"
},
"dataEncryptionState": {
"$ref": "DataEncryptionState",
"description": "Output only. Only set if the repository has a KMS Key.",
"readOnly": true
},
"dataformCoreVersion": {
"description": "Output only. The version of `@dataform/core` that was used for compilation.",
"readOnly": true,
Expand Down Expand Up @@ -2496,6 +2512,17 @@
},
"type": "object"
},
"DataEncryptionState": {
"description": "Describes encryption state of a resource.",
"id": "DataEncryptionState",
"properties": {
"kmsKeyVersionName": {
"description": "The KMS key version name with which data of a resource is encrypted.",
"type": "string"
}
},
"type": "object"
},
"Declaration": {
"description": "Represents a relation which is not managed by Dataform but which may be referenced by Dataform actions.",
"id": "Declaration",
Expand Down Expand Up @@ -3557,6 +3584,11 @@
"readOnly": true,
"type": "string"
},
"dataEncryptionState": {
"$ref": "DataEncryptionState",
"description": "Output only. A data encryption state of a Git repository if this Repository is protected by a KMS key.",
"readOnly": true
},
"displayName": {
"description": "Optional. The repository's user-friendly name.",
"type": "string"
Expand All @@ -3565,6 +3597,10 @@
"$ref": "GitRemoteSettings",
"description": "Optional. If set, configures this repository to be linked to a Git remote."
},
"kmsKeyName": {
"description": "Optional. The reference to a KMS encryption key. If provided, it will be used to encrypt user data in the repository and all child resources. It is not possible to add or update the encryption key after the repository is created. Example: `projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKeys/[key]`",
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
Expand Down Expand Up @@ -3858,6 +3894,11 @@
"description": "Immutable. The name of the compilation result to use for this invocation. Must be in the format `projects/*/locations/*/repositories/*/compilationResults/*`.",
"type": "string"
},
"dataEncryptionState": {
"$ref": "DataEncryptionState",
"description": "Output only. Only set if the repository has a KMS Key.",
"readOnly": true
},
"invocationConfig": {
"$ref": "InvocationConfig",
"description": "Immutable. If left unset, a default InvocationConfig will be used."
Expand Down Expand Up @@ -3969,6 +4010,11 @@
"description": "Represents a Dataform Git workspace.",
"id": "Workspace",
"properties": {
"dataEncryptionState": {
"$ref": "DataEncryptionState",
"description": "Output only. A data encryption state of a Git repository if this Workspace is protected by a KMS key.",
"readOnly": true
},
"name": {
"description": "Identifier. The workspace's name.",
"type": "string"
Expand Down
69 changes: 58 additions & 11 deletions src/apis/dataform/v1beta1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,15 @@ export namespace dataform_v1beta1 {
*/
requiredHeadCommitSha?: string | null;
}
/**
* `CommitRepositoryChanges` response message.
*/
export interface Schema$CommitRepositoryChangesResponse {
/**
* The commit SHA of the current commit.
*/
commitSha?: string | null;
}
/**
* `CommitWorkspaceChanges` request message.
*/
Expand Down Expand Up @@ -356,6 +365,10 @@ export namespace dataform_v1beta1 {
* Output only. Errors encountered during project compilation.
*/
compilationErrors?: Schema$CompilationError[];
/**
* Output only. Only set if the repository has a KMS Key.
*/
dataEncryptionState?: Schema$DataEncryptionState;
/**
* Output only. The version of `@dataform/core` that was used for compilation.
*/
Expand Down Expand Up @@ -427,6 +440,15 @@ export namespace dataform_v1beta1 {
*/
tokenStatus?: string | null;
}
/**
* Describes encryption state of a resource.
*/
export interface Schema$DataEncryptionState {
/**
* The KMS key version name with which data of a resource is encrypted.
*/
kmsKeyVersionName?: string | null;
}
/**
* Represents a relation which is not managed by Dataform but which may be referenced by Dataform actions.
*/
Expand Down Expand Up @@ -1202,6 +1224,10 @@ export namespace dataform_v1beta1 {
* Output only. The timestamp of when the repository was created.
*/
createTime?: string | null;
/**
* Output only. A data encryption state of a Git repository if this Repository is protected by a KMS key.
*/
dataEncryptionState?: Schema$DataEncryptionState;
/**
* Optional. The repository's user-friendly name.
*/
Expand All @@ -1210,6 +1236,10 @@ export namespace dataform_v1beta1 {
* Optional. If set, configures this repository to be linked to a Git remote.
*/
gitRemoteSettings?: Schema$GitRemoteSettings;
/**
* Optional. The reference to a KMS encryption key. If provided, it will be used to encrypt user data in the repository and all child resources. It is not possible to add or update the encryption key after the repository is created. Example: `projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKeys/[key]`
*/
kmsKeyName?: string | null;
/**
* Optional. Repository user labels.
*/
Expand Down Expand Up @@ -1432,6 +1462,10 @@ export namespace dataform_v1beta1 {
* Immutable. The name of the compilation result to use for this invocation. Must be in the format `projects/x/locations/x/repositories/x/compilationResults/x`.
*/
compilationResult?: string | null;
/**
* Output only. Only set if the repository has a KMS Key.
*/
dataEncryptionState?: Schema$DataEncryptionState;
/**
* Immutable. If left unset, a default InvocationConfig will be used.
*/
Expand Down Expand Up @@ -1494,6 +1528,10 @@ export namespace dataform_v1beta1 {
* Represents a Dataform Git workspace.
*/
export interface Schema$Workspace {
/**
* Output only. A data encryption state of a Git repository if this Workspace is protected by a KMS key.
*/
dataEncryptionState?: Schema$DataEncryptionState;
/**
* Identifier. The workspace's name.
*/
Expand Down Expand Up @@ -2134,36 +2172,43 @@ export namespace dataform_v1beta1 {
commit(
params?: Params$Resource$Projects$Locations$Repositories$Commit,
options?: MethodOptions
): GaxiosPromise<Schema$Empty>;
): GaxiosPromise<Schema$CommitRepositoryChangesResponse>;
commit(
params: Params$Resource$Projects$Locations$Repositories$Commit,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
commit(
params: Params$Resource$Projects$Locations$Repositories$Commit,
options: MethodOptions | BodyResponseCallback<Schema$Empty>,
callback: BodyResponseCallback<Schema$Empty>
options:
| MethodOptions
| BodyResponseCallback<Schema$CommitRepositoryChangesResponse>,
callback: BodyResponseCallback<Schema$CommitRepositoryChangesResponse>
): void;
commit(
params: Params$Resource$Projects$Locations$Repositories$Commit,
callback: BodyResponseCallback<Schema$Empty>
callback: BodyResponseCallback<Schema$CommitRepositoryChangesResponse>
): void;
commit(
callback: BodyResponseCallback<Schema$CommitRepositoryChangesResponse>
): void;
commit(callback: BodyResponseCallback<Schema$Empty>): void;
commit(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Repositories$Commit
| BodyResponseCallback<Schema$Empty>
| BodyResponseCallback<Schema$CommitRepositoryChangesResponse>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Empty>
| BodyResponseCallback<Schema$CommitRepositoryChangesResponse>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Empty>
| BodyResponseCallback<Schema$CommitRepositoryChangesResponse>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
):
| void
| GaxiosPromise<Schema$CommitRepositoryChangesResponse>
| GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Locations$Repositories$Commit;
let options = (optionsOrCallback || {}) as MethodOptions;
Expand Down Expand Up @@ -2198,12 +2243,14 @@ export namespace dataform_v1beta1 {
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Empty>(
createAPIRequest<Schema$CommitRepositoryChangesResponse>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Empty>(parameters);
return createAPIRequest<Schema$CommitRepositoryChangesResponse>(
parameters
);
}
}

Expand Down

0 comments on commit 8f3478b

Please sign in to comment.