-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bring in redpanda.api.common.v1alpha1
- Loading branch information
Showing
24 changed files
with
1,930 additions
and
523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
// @generated by protoc-gen-es v1.6.0 with parameter "target=ts,import_extension=,js_import_style=legacy_commonjs" | ||
// @generated from file redpanda/api/common/v1alpha1/common.proto (package redpanda.api.common.v1alpha1, syntax proto3) | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
|
||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
import { Any, Message, proto3 } from "@bufbuild/protobuf"; | ||
import { Code } from "../../../../google/rpc/code_pb"; | ||
|
||
/** | ||
* @generated from enum redpanda.api.common.v1alpha1.Reason | ||
*/ | ||
export enum Reason { | ||
/** | ||
* @generated from enum value: REASON_UNSPECIFIED = 0; | ||
*/ | ||
UNSPECIFIED = 0, | ||
|
||
/** | ||
* The specified resource could not be found. | ||
* | ||
* @generated from enum value: REASON_RESOURCE_NOT_FOUND = 1; | ||
*/ | ||
RESOURCE_NOT_FOUND = 1, | ||
|
||
/** | ||
* The input provided with the request is invalid. | ||
* | ||
* @generated from enum value: REASON_INVALID_INPUT = 2; | ||
*/ | ||
INVALID_INPUT = 2, | ||
|
||
/** | ||
* Authentication token is missing. | ||
* | ||
* @generated from enum value: REASON_NO_AUTHENTICATION_TOKEN = 3; | ||
*/ | ||
NO_AUTHENTICATION_TOKEN = 3, | ||
|
||
/** | ||
* The authentication token provided has expired. | ||
* | ||
* @generated from enum value: REASON_AUTHENTICATION_TOKEN_EXPIRED = 4; | ||
*/ | ||
AUTHENTICATION_TOKEN_EXPIRED = 4, | ||
|
||
/** | ||
* The authentication token provided is invalid. | ||
* | ||
* @generated from enum value: REASON_AUTHENTICATION_TOKEN_INVALID = 5; | ||
*/ | ||
AUTHENTICATION_TOKEN_INVALID = 5, | ||
|
||
/** | ||
* The user does not have the necessary permissions. | ||
* | ||
* @generated from enum value: REASON_PERMISSION_DENIED = 6; | ||
*/ | ||
PERMISSION_DENIED = 6, | ||
|
||
/** | ||
* The request cannot be completed due to server error. | ||
* | ||
* @generated from enum value: REASON_SERVER_ERROR = 7; | ||
*/ | ||
SERVER_ERROR = 7, | ||
|
||
/** | ||
* The request rate is too high. | ||
* | ||
* @generated from enum value: REASON_TOO_MANY_REQUESTS = 8; | ||
*/ | ||
TOO_MANY_REQUESTS = 8, | ||
|
||
/** | ||
* The request timed out. | ||
* | ||
* @generated from enum value: REASON_TIMEOUT = 9; | ||
*/ | ||
TIMEOUT = 9, | ||
|
||
/** | ||
* The feature is not configured. | ||
* | ||
* @generated from enum value: REASON_FEATURE_NOT_CONFIGURED = 10; | ||
*/ | ||
FEATURE_NOT_CONFIGURED = 10, | ||
|
||
/** | ||
* The feature is not supported in the requested environment. | ||
* | ||
* @generated from enum value: REASON_FEATURE_NOT_SUPPORTED = 11; | ||
*/ | ||
FEATURE_NOT_SUPPORTED = 11, | ||
} | ||
// Retrieve enum metadata with: proto3.getEnumType(Reason) | ||
proto3.util.setEnumType(Reason, "redpanda.api.common.v1alpha1.Reason", [ | ||
{ no: 0, name: "REASON_UNSPECIFIED" }, | ||
{ no: 1, name: "REASON_RESOURCE_NOT_FOUND" }, | ||
{ no: 2, name: "REASON_INVALID_INPUT" }, | ||
{ no: 3, name: "REASON_NO_AUTHENTICATION_TOKEN" }, | ||
{ no: 4, name: "REASON_AUTHENTICATION_TOKEN_EXPIRED" }, | ||
{ no: 5, name: "REASON_AUTHENTICATION_TOKEN_INVALID" }, | ||
{ no: 6, name: "REASON_PERMISSION_DENIED" }, | ||
{ no: 7, name: "REASON_SERVER_ERROR" }, | ||
{ no: 8, name: "REASON_TOO_MANY_REQUESTS" }, | ||
{ no: 9, name: "REASON_TIMEOUT" }, | ||
{ no: 10, name: "REASON_FEATURE_NOT_CONFIGURED" }, | ||
{ no: 11, name: "REASON_FEATURE_NOT_SUPPORTED" }, | ||
]); | ||
|
||
/** | ||
* Modified variant of google.rpc.Status, that uses enum instead of int32 for | ||
* code, so it's nicer in REST. | ||
* 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). | ||
* | ||
* @generated from message redpanda.api.common.v1alpha1.ErrorStatus | ||
*/ | ||
export class ErrorStatus extends Message<ErrorStatus> { | ||
/** | ||
* The status code, which should be an enum value of | ||
* [google.rpc.Code][google.rpc.Code]. | ||
* | ||
* @generated from field: google.rpc.Code code = 1; | ||
*/ | ||
code = Code.OK; | ||
|
||
/** | ||
* 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][google.rpc.Status.details] field, or localized | ||
* by the client. | ||
* | ||
* @generated from field: string message = 2; | ||
*/ | ||
message = ""; | ||
|
||
/** | ||
* A list of messages that carry the error details. There is a common set of | ||
* message types for APIs to use. | ||
* | ||
* @generated from field: repeated google.protobuf.Any details = 3; | ||
*/ | ||
details: Any[] = []; | ||
|
||
constructor(data?: PartialMessage<ErrorStatus>) { | ||
super(); | ||
proto3.util.initPartial(data, this); | ||
} | ||
|
||
static readonly runtime: typeof proto3 = proto3; | ||
static readonly typeName = "redpanda.api.common.v1alpha1.ErrorStatus"; | ||
static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "code", kind: "enum", T: proto3.getEnumType(Code) }, | ||
{ no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
{ no: 3, name: "details", kind: "message", T: Any, repeated: true }, | ||
]); | ||
|
||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ErrorStatus { | ||
return new ErrorStatus().fromBinary(bytes, options); | ||
} | ||
|
||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ErrorStatus { | ||
return new ErrorStatus().fromJson(jsonValue, options); | ||
} | ||
|
||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ErrorStatus { | ||
return new ErrorStatus().fromJsonString(jsonString, options); | ||
} | ||
|
||
static equals(a: ErrorStatus | PlainMessage<ErrorStatus> | undefined, b: ErrorStatus | PlainMessage<ErrorStatus> | undefined): boolean { | ||
return proto3.util.equals(ErrorStatus, a, b); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// @generated by protoc-gen-es v1.6.0 with parameter "target=ts,import_extension=,js_import_style=legacy_commonjs" | ||
// @generated from file redpanda/api/common/v1alpha1/money.proto (package redpanda.api.common.v1alpha1, syntax proto3) | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
|
||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
import { Message, proto3 } from "@bufbuild/protobuf"; | ||
|
||
/** | ||
* @generated from enum redpanda.api.common.v1alpha1.Currency | ||
*/ | ||
export enum Currency { | ||
/** | ||
* @generated from enum value: CURRENCY_UNSPECIFIED = 0; | ||
*/ | ||
UNSPECIFIED = 0, | ||
|
||
/** | ||
* @generated from enum value: CURRENCY_CURRENCY_USD_CENTS = 1; | ||
*/ | ||
CURRENCY_USD_CENTS = 1, | ||
} | ||
// Retrieve enum metadata with: proto3.getEnumType(Currency) | ||
proto3.util.setEnumType(Currency, "redpanda.api.common.v1alpha1.Currency", [ | ||
{ no: 0, name: "CURRENCY_UNSPECIFIED" }, | ||
{ no: 1, name: "CURRENCY_CURRENCY_USD_CENTS" }, | ||
]); | ||
|
||
/** | ||
* @generated from message redpanda.api.common.v1alpha1.Money | ||
*/ | ||
export class Money extends Message<Money> { | ||
/** | ||
* Amount is a decimal number. | ||
* Examples: | ||
* 10 | ||
* 10.15 | ||
* | ||
* @generated from field: string amount = 1; | ||
*/ | ||
amount = ""; | ||
|
||
/** | ||
* @generated from field: redpanda.api.common.v1alpha1.Currency currency = 2; | ||
*/ | ||
currency = Currency.UNSPECIFIED; | ||
|
||
constructor(data?: PartialMessage<Money>) { | ||
super(); | ||
proto3.util.initPartial(data, this); | ||
} | ||
|
||
static readonly runtime: typeof proto3 = proto3; | ||
static readonly typeName = "redpanda.api.common.v1alpha1.Money"; | ||
static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "amount", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
{ no: 2, name: "currency", kind: "enum", T: proto3.getEnumType(Currency) }, | ||
]); | ||
|
||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Money { | ||
return new Money().fromBinary(bytes, options); | ||
} | ||
|
||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Money { | ||
return new Money().fromJson(jsonValue, options); | ||
} | ||
|
||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Money { | ||
return new Money().fromJsonString(jsonString, options); | ||
} | ||
|
||
static equals(a: Money | PlainMessage<Money> | undefined, b: Money | PlainMessage<Money> | undefined): boolean { | ||
return proto3.util.equals(Money, a, b); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.