// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none"
// @generated from file svc/user/v1/service.proto (package svc.user.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
import { User } from "../../../types/v1/user_pb";
import { Organization } from "../../../types/v1/organization_pb";
import { Cursor } from "../../../types/v1/cursor_pb";

/**
 * @generated from message svc.user.v1.WhoamiRequest
 */
export class WhoamiRequest extends Message<WhoamiRequest> {
  constructor(data?: PartialMessage<WhoamiRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.WhoamiRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WhoamiRequest {
    return new WhoamiRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WhoamiRequest {
    return new WhoamiRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WhoamiRequest {
    return new WhoamiRequest().fromJsonString(jsonString, options);
  }

  static equals(a: WhoamiRequest | PlainMessage<WhoamiRequest> | undefined, b: WhoamiRequest | PlainMessage<WhoamiRequest> | undefined): boolean {
    return proto3.util.equals(WhoamiRequest, a, b);
  }
}

/**
 * @generated from message svc.user.v1.WhoamiResponse
 */
export class WhoamiResponse extends Message<WhoamiResponse> {
  /**
   * @generated from field: types.v1.User user = 1;
   */
  user?: User;

  /**
   * @generated from field: types.v1.Organization current_organization = 2;
   */
  currentOrganization?: Organization;

  /**
   * @generated from field: types.v1.Organization default_organization = 3;
   */
  defaultOrganization?: Organization;

  constructor(data?: PartialMessage<WhoamiResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.WhoamiResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "user", kind: "message", T: User },
    { no: 2, name: "current_organization", kind: "message", T: Organization },
    { no: 3, name: "default_organization", kind: "message", T: Organization },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WhoamiResponse {
    return new WhoamiResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WhoamiResponse {
    return new WhoamiResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WhoamiResponse {
    return new WhoamiResponse().fromJsonString(jsonString, options);
  }

  static equals(a: WhoamiResponse | PlainMessage<WhoamiResponse> | undefined, b: WhoamiResponse | PlainMessage<WhoamiResponse> | undefined): boolean {
    return proto3.util.equals(WhoamiResponse, a, b);
  }
}

/**
 * @generated from message svc.user.v1.GetLogoutURLRequest
 */
export class GetLogoutURLRequest extends Message<GetLogoutURLRequest> {
  /**
   * @generated from field: string return_to = 1;
   */
  returnTo = "";

  constructor(data?: PartialMessage<GetLogoutURLRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.GetLogoutURLRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "return_to", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetLogoutURLRequest {
    return new GetLogoutURLRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetLogoutURLRequest {
    return new GetLogoutURLRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetLogoutURLRequest {
    return new GetLogoutURLRequest().fromJsonString(jsonString, options);
  }

  static equals(a: GetLogoutURLRequest | PlainMessage<GetLogoutURLRequest> | undefined, b: GetLogoutURLRequest | PlainMessage<GetLogoutURLRequest> | undefined): boolean {
    return proto3.util.equals(GetLogoutURLRequest, a, b);
  }
}

/**
 * @generated from message svc.user.v1.GetLogoutURLResponse
 */
export class GetLogoutURLResponse extends Message<GetLogoutURLResponse> {
  /**
   * @generated from field: string logout_url = 1;
   */
  logoutUrl = "";

  constructor(data?: PartialMessage<GetLogoutURLResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.GetLogoutURLResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "logout_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetLogoutURLResponse {
    return new GetLogoutURLResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetLogoutURLResponse {
    return new GetLogoutURLResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetLogoutURLResponse {
    return new GetLogoutURLResponse().fromJsonString(jsonString, options);
  }

  static equals(a: GetLogoutURLResponse | PlainMessage<GetLogoutURLResponse> | undefined, b: GetLogoutURLResponse | PlainMessage<GetLogoutURLResponse> | undefined): boolean {
    return proto3.util.equals(GetLogoutURLResponse, a, b);
  }
}

/**
 * @generated from message svc.user.v1.RefreshUserTokenRequest
 */
export class RefreshUserTokenRequest extends Message<RefreshUserTokenRequest> {
  constructor(data?: PartialMessage<RefreshUserTokenRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.RefreshUserTokenRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RefreshUserTokenRequest {
    return new RefreshUserTokenRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RefreshUserTokenRequest {
    return new RefreshUserTokenRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RefreshUserTokenRequest {
    return new RefreshUserTokenRequest().fromJsonString(jsonString, options);
  }

  static equals(a: RefreshUserTokenRequest | PlainMessage<RefreshUserTokenRequest> | undefined, b: RefreshUserTokenRequest | PlainMessage<RefreshUserTokenRequest> | undefined): boolean {
    return proto3.util.equals(RefreshUserTokenRequest, a, b);
  }
}

/**
 * @generated from message svc.user.v1.RefreshUserTokenResponse
 */
export class RefreshUserTokenResponse extends Message<RefreshUserTokenResponse> {
  /**
   * @generated from field: string token = 1;
   */
  token = "";

  /**
   * @generated from field: google.protobuf.Timestamp refresh_at = 2;
   */
  refreshAt?: Timestamp;

  /**
   * @generated from field: google.protobuf.Timestamp expires_at = 3;
   */
  expiresAt?: Timestamp;

  constructor(data?: PartialMessage<RefreshUserTokenResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.RefreshUserTokenResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "refresh_at", kind: "message", T: Timestamp },
    { no: 3, name: "expires_at", kind: "message", T: Timestamp },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RefreshUserTokenResponse {
    return new RefreshUserTokenResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RefreshUserTokenResponse {
    return new RefreshUserTokenResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RefreshUserTokenResponse {
    return new RefreshUserTokenResponse().fromJsonString(jsonString, options);
  }

  static equals(a: RefreshUserTokenResponse | PlainMessage<RefreshUserTokenResponse> | undefined, b: RefreshUserTokenResponse | PlainMessage<RefreshUserTokenResponse> | undefined): boolean {
    return proto3.util.equals(RefreshUserTokenResponse, a, b);
  }
}

/**
 * @generated from message svc.user.v1.UpdateUserRequest
 */
export class UpdateUserRequest extends Message<UpdateUserRequest> {
  /**
   * @generated from field: optional string first_name = 1;
   */
  firstName?: string;

  /**
   * @generated from field: optional string last_name = 2;
   */
  lastName?: string;

  constructor(data?: PartialMessage<UpdateUserRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.UpdateUserRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "first_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
    { no: 2, name: "last_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateUserRequest {
    return new UpdateUserRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateUserRequest {
    return new UpdateUserRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateUserRequest {
    return new UpdateUserRequest().fromJsonString(jsonString, options);
  }

  static equals(a: UpdateUserRequest | PlainMessage<UpdateUserRequest> | undefined, b: UpdateUserRequest | PlainMessage<UpdateUserRequest> | undefined): boolean {
    return proto3.util.equals(UpdateUserRequest, a, b);
  }
}

/**
 * @generated from message svc.user.v1.UpdateUserResponse
 */
export class UpdateUserResponse extends Message<UpdateUserResponse> {
  /**
   * @generated from field: types.v1.User user = 1;
   */
  user?: User;

  constructor(data?: PartialMessage<UpdateUserResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.UpdateUserResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "user", kind: "message", T: User },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateUserResponse {
    return new UpdateUserResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateUserResponse {
    return new UpdateUserResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateUserResponse {
    return new UpdateUserResponse().fromJsonString(jsonString, options);
  }

  static equals(a: UpdateUserResponse | PlainMessage<UpdateUserResponse> | undefined, b: UpdateUserResponse | PlainMessage<UpdateUserResponse> | undefined): boolean {
    return proto3.util.equals(UpdateUserResponse, a, b);
  }
}

/**
 * @generated from message svc.user.v1.CreateOrganizationRequest
 */
export class CreateOrganizationRequest extends Message<CreateOrganizationRequest> {
  /**
   * @generated from field: string name = 1;
   */
  name = "";

  constructor(data?: PartialMessage<CreateOrganizationRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.CreateOrganizationRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateOrganizationRequest {
    return new CreateOrganizationRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateOrganizationRequest {
    return new CreateOrganizationRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateOrganizationRequest {
    return new CreateOrganizationRequest().fromJsonString(jsonString, options);
  }

  static equals(a: CreateOrganizationRequest | PlainMessage<CreateOrganizationRequest> | undefined, b: CreateOrganizationRequest | PlainMessage<CreateOrganizationRequest> | undefined): boolean {
    return proto3.util.equals(CreateOrganizationRequest, a, b);
  }
}

/**
 * @generated from message svc.user.v1.CreateOrganizationResponse
 */
export class CreateOrganizationResponse extends Message<CreateOrganizationResponse> {
  /**
   * @generated from field: types.v1.Organization organization = 1;
   */
  organization?: Organization;

  constructor(data?: PartialMessage<CreateOrganizationResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.CreateOrganizationResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "organization", kind: "message", T: Organization },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateOrganizationResponse {
    return new CreateOrganizationResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateOrganizationResponse {
    return new CreateOrganizationResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateOrganizationResponse {
    return new CreateOrganizationResponse().fromJsonString(jsonString, options);
  }

  static equals(a: CreateOrganizationResponse | PlainMessage<CreateOrganizationResponse> | undefined, b: CreateOrganizationResponse | PlainMessage<CreateOrganizationResponse> | undefined): boolean {
    return proto3.util.equals(CreateOrganizationResponse, a, b);
  }
}

/**
 * @generated from message svc.user.v1.ListOrganizationRequest
 */
export class ListOrganizationRequest extends Message<ListOrganizationRequest> {
  /**
   * @generated from field: types.v1.Cursor cursor = 1;
   */
  cursor?: Cursor;

  /**
   * @generated from field: int32 limit = 2;
   */
  limit = 0;

  constructor(data?: PartialMessage<ListOrganizationRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.ListOrganizationRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "cursor", kind: "message", T: Cursor },
    { no: 2, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListOrganizationRequest {
    return new ListOrganizationRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListOrganizationRequest {
    return new ListOrganizationRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListOrganizationRequest {
    return new ListOrganizationRequest().fromJsonString(jsonString, options);
  }

  static equals(a: ListOrganizationRequest | PlainMessage<ListOrganizationRequest> | undefined, b: ListOrganizationRequest | PlainMessage<ListOrganizationRequest> | undefined): boolean {
    return proto3.util.equals(ListOrganizationRequest, a, b);
  }
}

/**
 * @generated from message svc.user.v1.ListOrganizationResponse
 */
export class ListOrganizationResponse extends Message<ListOrganizationResponse> {
  /**
   * @generated from field: types.v1.Cursor next = 1;
   */
  next?: Cursor;

  /**
   * @generated from field: repeated svc.user.v1.ListOrganizationResponse.ListItem items = 2;
   */
  items: ListOrganizationResponse_ListItem[] = [];

  /**
   * @generated from field: types.v1.Organization default_organization = 3;
   */
  defaultOrganization?: Organization;

  constructor(data?: PartialMessage<ListOrganizationResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.ListOrganizationResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "next", kind: "message", T: Cursor },
    { no: 2, name: "items", kind: "message", T: ListOrganizationResponse_ListItem, repeated: true },
    { no: 3, name: "default_organization", kind: "message", T: Organization },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListOrganizationResponse {
    return new ListOrganizationResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListOrganizationResponse {
    return new ListOrganizationResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListOrganizationResponse {
    return new ListOrganizationResponse().fromJsonString(jsonString, options);
  }

  static equals(a: ListOrganizationResponse | PlainMessage<ListOrganizationResponse> | undefined, b: ListOrganizationResponse | PlainMessage<ListOrganizationResponse> | undefined): boolean {
    return proto3.util.equals(ListOrganizationResponse, a, b);
  }
}

/**
 * @generated from message svc.user.v1.ListOrganizationResponse.ListItem
 */
export class ListOrganizationResponse_ListItem extends Message<ListOrganizationResponse_ListItem> {
  /**
   * @generated from field: types.v1.Organization organization = 1;
   */
  organization?: Organization;

  constructor(data?: PartialMessage<ListOrganizationResponse_ListItem>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "svc.user.v1.ListOrganizationResponse.ListItem";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "organization", kind: "message", T: Organization },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListOrganizationResponse_ListItem {
    return new ListOrganizationResponse_ListItem().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListOrganizationResponse_ListItem {
    return new ListOrganizationResponse_ListItem().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListOrganizationResponse_ListItem {
    return new ListOrganizationResponse_ListItem().fromJsonString(jsonString, options);
  }

  static equals(a: ListOrganizationResponse_ListItem | PlainMessage<ListOrganizationResponse_ListItem> | undefined, b: ListOrganizationResponse_ListItem | PlainMessage<ListOrganizationResponse_ListItem> | undefined): boolean {
    return proto3.util.equals(ListOrganizationResponse_ListItem, a, b);
  }
}

