| 1 | // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none" |
| 2 | // @generated from file svc/product/v1/service.proto (package svc.product.v1, syntax proto3) |
| 3 | /* eslint-disable */ |
| 4 | // @ts-nocheck |
| 5 | |
| 6 | import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; |
| 7 | import { Message, proto3 } from "@bufbuild/protobuf"; |
| 8 | import { Cursor } from "../../../types/v1/cursor_pb"; |
| 9 | import { Product, Product_Scope } from "../../../types/v1/product_pb"; |
| 10 | import { Price } from "../../../types/v1/price_pb"; |
| 11 | |
| 12 | /** |
| 13 | * @generated from message svc.product.v1.ListProductRequest |
| 14 | */ |
| 15 | export class ListProductRequest extends Message<ListProductRequest> { |
| 16 | /** |
| 17 | * @generated from field: types.v1.Cursor cursor = 1; |
| 18 | */ |
| 19 | cursor?: Cursor; |
| 20 | |
| 21 | /** |
| 22 | * @generated from field: int32 limit = 2; |
| 23 | */ |
| 24 | limit = 0; |
| 25 | |
| 26 | /** |
| 27 | * @generated from field: string category = 3; |
| 28 | */ |
| 29 | category = ""; |
| 30 | |
| 31 | /** |
| 32 | * filters |
| 33 | * |
| 34 | * @generated from field: optional types.v1.Product.Scope scope = 400; |
| 35 | */ |
| 36 | scope?: Product_Scope; |
| 37 | |
| 38 | constructor(data?: PartialMessage<ListProductRequest>) { |
| 39 | super(); |
| 40 | proto3.util.initPartial(data, this); |
| 41 | } |
| 42 | |
| 43 | static readonly runtime: typeof proto3 = proto3; |
| 44 | static readonly typeName = "svc.product.v1.ListProductRequest"; |
| 45 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 46 | { no: 1, name: "cursor", kind: "message", T: Cursor }, |
| 47 | { no: 2, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, |
| 48 | { no: 3, name: "category", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 49 | { no: 400, name: "scope", kind: "enum", T: proto3.getEnumType(Product_Scope), opt: true }, |
| 50 | ]); |
| 51 | |
| 52 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListProductRequest { |
| 53 | return new ListProductRequest().fromBinary(bytes, options); |
| 54 | } |
| 55 | |
| 56 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListProductRequest { |
| 57 | return new ListProductRequest().fromJson(jsonValue, options); |
| 58 | } |
| 59 | |
| 60 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListProductRequest { |
| 61 | return new ListProductRequest().fromJsonString(jsonString, options); |
| 62 | } |
| 63 | |
| 64 | static equals(a: ListProductRequest | PlainMessage<ListProductRequest> | undefined, b: ListProductRequest | PlainMessage<ListProductRequest> | undefined): boolean { |
| 65 | return proto3.util.equals(ListProductRequest, a, b); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * @generated from message svc.product.v1.ListProductResponse |
| 71 | */ |
| 72 | export class ListProductResponse extends Message<ListProductResponse> { |
| 73 | /** |
| 74 | * @generated from field: types.v1.Cursor next = 1; |
| 75 | */ |
| 76 | next?: Cursor; |
| 77 | |
| 78 | /** |
| 79 | * @generated from field: repeated svc.product.v1.ListProductResponse.ListItem items = 2; |
| 80 | */ |
| 81 | items: ListProductResponse_ListItem[] = []; |
| 82 | |
| 83 | /** |
| 84 | * @generated from field: types.v1.Product default_product = 3; |
| 85 | */ |
| 86 | defaultProduct?: Product; |
| 87 | |
| 88 | constructor(data?: PartialMessage<ListProductResponse>) { |
| 89 | super(); |
| 90 | proto3.util.initPartial(data, this); |
| 91 | } |
| 92 | |
| 93 | static readonly runtime: typeof proto3 = proto3; |
| 94 | static readonly typeName = "svc.product.v1.ListProductResponse"; |
| 95 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 96 | { no: 1, name: "next", kind: "message", T: Cursor }, |
| 97 | { no: 2, name: "items", kind: "message", T: ListProductResponse_ListItem, repeated: true }, |
| 98 | { no: 3, name: "default_product", kind: "message", T: Product }, |
| 99 | ]); |
| 100 | |
| 101 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListProductResponse { |
| 102 | return new ListProductResponse().fromBinary(bytes, options); |
| 103 | } |
| 104 | |
| 105 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListProductResponse { |
| 106 | return new ListProductResponse().fromJson(jsonValue, options); |
| 107 | } |
| 108 | |
| 109 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListProductResponse { |
| 110 | return new ListProductResponse().fromJsonString(jsonString, options); |
| 111 | } |
| 112 | |
| 113 | static equals(a: ListProductResponse | PlainMessage<ListProductResponse> | undefined, b: ListProductResponse | PlainMessage<ListProductResponse> | undefined): boolean { |
| 114 | return proto3.util.equals(ListProductResponse, a, b); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * @generated from message svc.product.v1.ListProductResponse.ListItem |
| 120 | */ |
| 121 | export class ListProductResponse_ListItem extends Message<ListProductResponse_ListItem> { |
| 122 | /** |
| 123 | * @generated from field: types.v1.Product product = 1; |
| 124 | */ |
| 125 | product?: Product; |
| 126 | |
| 127 | /** |
| 128 | * @generated from field: repeated types.v1.Price prices = 2; |
| 129 | */ |
| 130 | prices: Price[] = []; |
| 131 | |
| 132 | constructor(data?: PartialMessage<ListProductResponse_ListItem>) { |
| 133 | super(); |
| 134 | proto3.util.initPartial(data, this); |
| 135 | } |
| 136 | |
| 137 | static readonly runtime: typeof proto3 = proto3; |
| 138 | static readonly typeName = "svc.product.v1.ListProductResponse.ListItem"; |
| 139 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 140 | { no: 1, name: "product", kind: "message", T: Product }, |
| 141 | { no: 2, name: "prices", kind: "message", T: Price, repeated: true }, |
| 142 | ]); |
| 143 | |
| 144 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListProductResponse_ListItem { |
| 145 | return new ListProductResponse_ListItem().fromBinary(bytes, options); |
| 146 | } |
| 147 | |
| 148 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListProductResponse_ListItem { |
| 149 | return new ListProductResponse_ListItem().fromJson(jsonValue, options); |
| 150 | } |
| 151 | |
| 152 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListProductResponse_ListItem { |
| 153 | return new ListProductResponse_ListItem().fromJsonString(jsonString, options); |
| 154 | } |
| 155 | |
| 156 | static equals(a: ListProductResponse_ListItem | PlainMessage<ListProductResponse_ListItem> | undefined, b: ListProductResponse_ListItem | PlainMessage<ListProductResponse_ListItem> | undefined): boolean { |
| 157 | return proto3.util.equals(ListProductResponse_ListItem, a, b); |
| 158 | } |
| 159 | } |
| 160 |