Skip to content

Commit

Permalink
fix: Generate JavaScript Code from plugin-pb (#46)
Browse files Browse the repository at this point in the history
This PR was created by a scheduled workflow to regenerate the JavaScript code from `plugin-pb`.
  • Loading branch information
cq-bot authored Mar 25, 2024
1 parent 162842f commit d189960
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions protos/plugin/v3/plugin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ message Init {
message Request {
bytes spec = 1; // Internal plugin-specific spec
bool no_connection = 2; // A flag to indicate plugins should skip establishing a connection
string invocation_id = 3; // unique execution_id that will identify the invocation (sync, migrate etc)
}
message Response {}
}
Expand Down
23 changes: 23 additions & 0 deletions protos/plugin/v3/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ export namespace cloudquery.plugin.v3 {
constructor(data?: any[] | {
spec?: Uint8Array;
no_connection?: boolean;
invocation_id?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
Expand All @@ -522,6 +523,9 @@ export namespace cloudquery.plugin.v3 {
if ("no_connection" in data && data.no_connection != undefined) {
this.no_connection = data.no_connection;
}
if ("invocation_id" in data && data.invocation_id != undefined) {
this.invocation_id = data.invocation_id;
}
}
}
get spec() {
Expand All @@ -536,9 +540,16 @@ export namespace cloudquery.plugin.v3 {
set no_connection(value: boolean) {
pb_1.Message.setField(this, 2, value);
}
get invocation_id() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
set invocation_id(value: string) {
pb_1.Message.setField(this, 3, value);
}
static fromObject(data: {
spec?: Uint8Array;
no_connection?: boolean;
invocation_id?: string;
}): Request {
const message = new Request({});
if (data.spec != null) {
Expand All @@ -547,19 +558,26 @@ export namespace cloudquery.plugin.v3 {
if (data.no_connection != null) {
message.no_connection = data.no_connection;
}
if (data.invocation_id != null) {
message.invocation_id = data.invocation_id;
}
return message;
}
toObject() {
const data: {
spec?: Uint8Array;
no_connection?: boolean;
invocation_id?: string;
} = {};
if (this.spec != null) {
data.spec = this.spec;
}
if (this.no_connection != null) {
data.no_connection = this.no_connection;
}
if (this.invocation_id != null) {
data.invocation_id = this.invocation_id;
}
return data;
}
serialize(): Uint8Array;
Expand All @@ -570,6 +588,8 @@ export namespace cloudquery.plugin.v3 {
writer.writeBytes(1, this.spec);
if (this.no_connection != false)
writer.writeBool(2, this.no_connection);
if (this.invocation_id.length)
writer.writeString(3, this.invocation_id);
if (!w)
return writer.getResultBuffer();
}
Expand All @@ -585,6 +605,9 @@ export namespace cloudquery.plugin.v3 {
case 2:
message.no_connection = reader.readBool();
break;
case 3:
message.invocation_id = reader.readString();
break;
default: reader.skipField();
}
}
Expand Down

0 comments on commit d189960

Please sign in to comment.