// @generated by protoc-gen-es v1.10.1 with parameter "target=ts" // @generated from file usage/v1/activity.proto (package usage.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3, protoInt64, Struct, Timestamp } from "@bufbuild/protobuf"; import { PaginatedQuery, PaginatedResponse } from "../../common/v1/query_pb.js"; /** * @generated from enum usage.v1.UsageMetricType */ export enum UsageMetricType { /** * @generated from enum value: USAGE_METRIC_UNDEFINED = 0; */ USAGE_METRIC_UNDEFINED = 0, /** * @generated from enum value: USAGE_METRIC_JOB_CREATED = 1; */ USAGE_METRIC_JOB_CREATED = 1, /** * @generated from enum value: USAGE_METRIC_PREFLIGHT = 2; */ USAGE_METRIC_PREFLIGHT = 2, /** * @generated from enum value: USAGE_METRIC_STORAGE_KB = 3; */ USAGE_METRIC_STORAGE_KB = 3, /** * @generated from enum value: USAGE_METRIC_TASK_API = 4; */ USAGE_METRIC_TASK_API = 4, /** * @generated from enum value: USAGE_METRIC_FILE_COLLECTION_CREATED = 5; */ USAGE_METRIC_FILE_COLLECTION_CREATED = 5, } // Retrieve enum metadata with: proto3.getEnumType(UsageMetricType) proto3.util.setEnumType(UsageMetricType, "usage.v1.UsageMetricType", [ { no: 0, name: "USAGE_METRIC_UNDEFINED" }, { no: 1, name: "USAGE_METRIC_JOB_CREATED" }, { no: 2, name: "USAGE_METRIC_PREFLIGHT" }, { no: 3, name: "USAGE_METRIC_STORAGE_KB" }, { no: 4, name: "USAGE_METRIC_TASK_API" }, { no: 5, name: "USAGE_METRIC_FILE_COLLECTION_CREATED" }, ]); /** * @generated from enum usage.v1.MetricTypeSubCategory */ export enum MetricTypeSubCategory { /** * @generated from enum value: METRIC_TYPE_SUB_CATEGORY_UNKNOWN = 0; */ UNKNOWN = 0, /** * @generated from enum value: METRIC_TYPE_SUB_CATEGORY_FIXUP = 1; */ FIXUP = 1, /** * @generated from enum value: METRIC_TYPE_SUB_CATEGORY_TASK_API = 2; */ TASK_API = 2, } // Retrieve enum metadata with: proto3.getEnumType(MetricTypeSubCategory) proto3.util.setEnumType(MetricTypeSubCategory, "usage.v1.MetricTypeSubCategory", [ { no: 0, name: "METRIC_TYPE_SUB_CATEGORY_UNKNOWN" }, { no: 1, name: "METRIC_TYPE_SUB_CATEGORY_FIXUP" }, { no: 2, name: "METRIC_TYPE_SUB_CATEGORY_TASK_API" }, ]); /** * @generated from message usage.v1.Task */ export class Task extends Message { /** * @generated from field: int64 id = 1; */ id = protoInt64.zero; /** * @generated from field: google.protobuf.Timestamp created_at = 2; */ createdAt?: Timestamp; /** * @generated from field: google.protobuf.Timestamp updated_at = 3; */ updatedAt?: Timestamp; /** * @generated from field: uint64 activity_log_id = 4; */ activityLogId = protoInt64.zero; /** * @generated from field: string server_cpu = 5; */ serverCpu = ""; /** * @generated from field: string server_mem = 6; */ serverMem = ""; /** * @generated from field: int64 process_time_ms = 7; */ processTimeMs = protoInt64.zero; /** * @generated from field: int64 idle_time_ms = 8; */ idleTimeMs = protoInt64.zero; /** * @generated from field: string task_type = 9; */ taskType = ""; /** * @generated from field: int32 order = 10; */ order = 0; /** * @generated from field: google.protobuf.Struct meta = 11; */ meta?: Struct; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "usage.v1.Task"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "id", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, { no: 2, name: "created_at", kind: "message", T: Timestamp }, { no: 3, name: "updated_at", kind: "message", T: Timestamp }, { no: 4, name: "activity_log_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, { no: 5, name: "server_cpu", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 6, name: "server_mem", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 7, name: "process_time_ms", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, { no: 8, name: "idle_time_ms", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, { no: 9, name: "task_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 10, name: "order", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, { no: 11, name: "meta", kind: "message", T: Struct }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Task { return new Task().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): Task { return new Task().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): Task { return new Task().fromJsonString(jsonString, options); } static equals(a: Task | PlainMessage | undefined, b: Task | PlainMessage | undefined): boolean { return proto3.util.equals(Task, a, b); } } /** * @generated from message usage.v1.ActivityLog */ export class ActivityLog extends Message { /** * @generated from field: int64 id = 1; */ id = protoInt64.zero; /** * @generated from field: google.protobuf.Timestamp created_at = 2; */ createdAt?: Timestamp; /** * @generated from field: google.protobuf.Timestamp updated_at = 3; */ updatedAt?: Timestamp; /** * @generated from field: google.protobuf.Timestamp timestamp = 4; */ timestamp?: Timestamp; /** * @generated from field: usage.v1.UsageMetricType metric_type = 5; */ metricType = UsageMetricType.USAGE_METRIC_UNDEFINED; /** * @generated from field: int64 metric_value = 6; */ metricValue = protoInt64.zero; /** * @generated from field: int64 artworker_id = 7; */ artworkerId = protoInt64.zero; /** * @generated from field: usage.v1.MetricTypeSubCategory metric_type_sub_category = 8; */ metricTypeSubCategory = MetricTypeSubCategory.UNKNOWN; /** * @generated from field: optional string object_id = 9; */ objectId?: string; /** * @generated from field: repeated usage.v1.Task tasks = 10; */ tasks: Task[] = []; /** * @generated from field: google.protobuf.Struct meta = 11; */ meta?: Struct; /** * @generated from field: string idempotency_key = 12; */ idempotencyKey = ""; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "usage.v1.ActivityLog"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "id", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, { no: 2, name: "created_at", kind: "message", T: Timestamp }, { no: 3, name: "updated_at", kind: "message", T: Timestamp }, { no: 4, name: "timestamp", kind: "message", T: Timestamp }, { no: 5, name: "metric_type", kind: "enum", T: proto3.getEnumType(UsageMetricType) }, { no: 6, name: "metric_value", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, { no: 7, name: "artworker_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, { no: 8, name: "metric_type_sub_category", kind: "enum", T: proto3.getEnumType(MetricTypeSubCategory) }, { no: 9, name: "object_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, { no: 10, name: "tasks", kind: "message", T: Task, repeated: true }, { no: 11, name: "meta", kind: "message", T: Struct }, { no: 12, name: "idempotency_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): ActivityLog { return new ActivityLog().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): ActivityLog { return new ActivityLog().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): ActivityLog { return new ActivityLog().fromJsonString(jsonString, options); } static equals(a: ActivityLog | PlainMessage | undefined, b: ActivityLog | PlainMessage | undefined): boolean { return proto3.util.equals(ActivityLog, a, b); } } /** * @generated from message usage.v1.FindActivityLogItemsRequest */ export class FindActivityLogItemsRequest extends Message { /** * @generated from field: common.v1.PaginatedQuery query = 1; */ query?: PaginatedQuery; /** * @generated from field: usage.v1.UsageMetricType metric_type = 2; */ metricType = UsageMetricType.USAGE_METRIC_UNDEFINED; /** * @generated from field: usage.v1.MetricTypeSubCategory metric_type_sub_category = 3; */ metricTypeSubCategory = MetricTypeSubCategory.UNKNOWN; /** * @generated from field: google.protobuf.Timestamp start_date = 4; */ startDate?: Timestamp; /** * @generated from field: google.protobuf.Timestamp end_date = 5; */ endDate?: Timestamp; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "usage.v1.FindActivityLogItemsRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "query", kind: "message", T: PaginatedQuery }, { no: 2, name: "metric_type", kind: "enum", T: proto3.getEnumType(UsageMetricType) }, { no: 3, name: "metric_type_sub_category", kind: "enum", T: proto3.getEnumType(MetricTypeSubCategory) }, { no: 4, name: "start_date", kind: "message", T: Timestamp }, { no: 5, name: "end_date", kind: "message", T: Timestamp }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): FindActivityLogItemsRequest { return new FindActivityLogItemsRequest().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): FindActivityLogItemsRequest { return new FindActivityLogItemsRequest().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): FindActivityLogItemsRequest { return new FindActivityLogItemsRequest().fromJsonString(jsonString, options); } static equals(a: FindActivityLogItemsRequest | PlainMessage | undefined, b: FindActivityLogItemsRequest | PlainMessage | undefined): boolean { return proto3.util.equals(FindActivityLogItemsRequest, a, b); } } /** * @generated from message usage.v1.FindActivityLogItemsResponse */ export class FindActivityLogItemsResponse extends Message { /** * @generated from field: repeated usage.v1.ActivityLog data = 1; */ data: ActivityLog[] = []; /** * @generated from field: common.v1.PaginatedResponse pagination = 2; */ pagination?: PaginatedResponse; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "usage.v1.FindActivityLogItemsResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "data", kind: "message", T: ActivityLog, repeated: true }, { no: 2, name: "pagination", kind: "message", T: PaginatedResponse }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): FindActivityLogItemsResponse { return new FindActivityLogItemsResponse().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): FindActivityLogItemsResponse { return new FindActivityLogItemsResponse().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): FindActivityLogItemsResponse { return new FindActivityLogItemsResponse().fromJsonString(jsonString, options); } static equals(a: FindActivityLogItemsResponse | PlainMessage | undefined, b: FindActivityLogItemsResponse | PlainMessage | undefined): boolean { return proto3.util.equals(FindActivityLogItemsResponse, a, b); } } /** * @generated from message usage.v1.GetUsageRequest */ export class GetUsageRequest extends Message { /** * @generated from field: google.protobuf.Timestamp start_date = 1; */ startDate?: Timestamp; /** * @generated from field: google.protobuf.Timestamp end_date = 2; */ endDate?: Timestamp; /** * @generated from field: usage.v1.UsageMetricType metric_type = 3; */ metricType = UsageMetricType.USAGE_METRIC_UNDEFINED; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "usage.v1.GetUsageRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "start_date", kind: "message", T: Timestamp }, { no: 2, name: "end_date", kind: "message", T: Timestamp }, { no: 3, name: "metric_type", kind: "enum", T: proto3.getEnumType(UsageMetricType) }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetUsageRequest { return new GetUsageRequest().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): GetUsageRequest { return new GetUsageRequest().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): GetUsageRequest { return new GetUsageRequest().fromJsonString(jsonString, options); } static equals(a: GetUsageRequest | PlainMessage | undefined, b: GetUsageRequest | PlainMessage | undefined): boolean { return proto3.util.equals(GetUsageRequest, a, b); } } /** * @generated from message usage.v1.GetUsageResponse */ export class GetUsageResponse extends Message { /** * @generated from field: int32 usage = 1; */ usage = 0; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "usage.v1.GetUsageResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "usage", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetUsageResponse { return new GetUsageResponse().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): GetUsageResponse { return new GetUsageResponse().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): GetUsageResponse { return new GetUsageResponse().fromJsonString(jsonString, options); } static equals(a: GetUsageResponse | PlainMessage | undefined, b: GetUsageResponse | PlainMessage | undefined): boolean { return proto3.util.equals(GetUsageResponse, a, b); } }