import * as jspb from 'google-protobuf'

import * as google_protobuf_empty_pb from 'google-protobuf/google/protobuf/empty_pb'; // proto import: "google/protobuf/empty.proto"
import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto"
import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; // proto import: "google/protobuf/wrappers.proto"
import * as annotations_pb from './annotations_pb'; // proto import: "annotations.proto"
import * as threads_pb from './threads_pb'; // proto import: "threads.proto"


export class Discussion extends jspb.Message {
  getDiscussionId(): number;
  setDiscussionId(value: number): Discussion;

  getSlug(): string;
  setSlug(value: string): Discussion;

  getCreated(): google_protobuf_timestamp_pb.Timestamp | undefined;
  setCreated(value?: google_protobuf_timestamp_pb.Timestamp): Discussion;
  hasCreated(): boolean;
  clearCreated(): Discussion;

  getCreatorUserId(): number;
  setCreatorUserId(value: number): Discussion;

  getOwnerCommunityId(): number;
  setOwnerCommunityId(value: number): Discussion;

  getOwnerGroupId(): number;
  setOwnerGroupId(value: number): Discussion;

  getOwnerTitle(): string;
  setOwnerTitle(value: string): Discussion;

  getTitle(): string;
  setTitle(value: string): Discussion;

  getContent(): string;
  setContent(value: string): Discussion;

  getThread(): threads_pb.Thread | undefined;
  setThread(value?: threads_pb.Thread): Discussion;
  hasThread(): boolean;
  clearThread(): Discussion;

  getCanModerate(): boolean;
  setCanModerate(value: boolean): Discussion;

  getCanEdit(): boolean;
  setCanEdit(value: boolean): Discussion;

  getDeleted(): boolean;
  setDeleted(value: boolean): Discussion;

  getLastEdited(): google_protobuf_timestamp_pb.Timestamp | undefined;
  setLastEdited(value?: google_protobuf_timestamp_pb.Timestamp): Discussion;
  hasLastEdited(): boolean;
  clearLastEdited(): Discussion;

  getOwnerCase(): Discussion.OwnerCase;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): Discussion.AsObject;
  static toObject(includeInstance: boolean, msg: Discussion): Discussion.AsObject;
  static serializeBinaryToWriter(message: Discussion, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): Discussion;
  static deserializeBinaryFromReader(message: Discussion, reader: jspb.BinaryReader): Discussion;
}

export namespace Discussion {
  export type AsObject = {
    discussionId: number,
    slug: string,
    created?: google_protobuf_timestamp_pb.Timestamp.AsObject,
    creatorUserId: number,
    ownerCommunityId: number,
    ownerGroupId: number,
    ownerTitle: string,
    title: string,
    content: string,
    thread?: threads_pb.Thread.AsObject,
    canModerate: boolean,
    canEdit: boolean,
    deleted: boolean,
    lastEdited?: google_protobuf_timestamp_pb.Timestamp.AsObject,
  }

  export enum OwnerCase { 
    OWNER_NOT_SET = 0,
    OWNER_COMMUNITY_ID = 5,
    OWNER_GROUP_ID = 6,
  }
}

export class CreateDiscussionReq extends jspb.Message {
  getTitle(): string;
  setTitle(value: string): CreateDiscussionReq;

  getContent(): string;
  setContent(value: string): CreateDiscussionReq;

  getOwnerCommunityId(): number;
  setOwnerCommunityId(value: number): CreateDiscussionReq;

  getOwnerGroupId(): number;
  setOwnerGroupId(value: number): CreateDiscussionReq;

  getOwnerCase(): CreateDiscussionReq.OwnerCase;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): CreateDiscussionReq.AsObject;
  static toObject(includeInstance: boolean, msg: CreateDiscussionReq): CreateDiscussionReq.AsObject;
  static serializeBinaryToWriter(message: CreateDiscussionReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): CreateDiscussionReq;
  static deserializeBinaryFromReader(message: CreateDiscussionReq, reader: jspb.BinaryReader): CreateDiscussionReq;
}

export namespace CreateDiscussionReq {
  export type AsObject = {
    title: string,
    content: string,
    ownerCommunityId: number,
    ownerGroupId: number,
  }

  export enum OwnerCase { 
    OWNER_NOT_SET = 0,
    OWNER_COMMUNITY_ID = 3,
    OWNER_GROUP_ID = 4,
  }
}

export class GetDiscussionReq extends jspb.Message {
  getDiscussionId(): number;
  setDiscussionId(value: number): GetDiscussionReq;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): GetDiscussionReq.AsObject;
  static toObject(includeInstance: boolean, msg: GetDiscussionReq): GetDiscussionReq.AsObject;
  static serializeBinaryToWriter(message: GetDiscussionReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): GetDiscussionReq;
  static deserializeBinaryFromReader(message: GetDiscussionReq, reader: jspb.BinaryReader): GetDiscussionReq;
}

export namespace GetDiscussionReq {
  export type AsObject = {
    discussionId: number,
  }
}

export class ListMyCommunitiesDiscussionsReq extends jspb.Message {
  getPageSize(): number;
  setPageSize(value: number): ListMyCommunitiesDiscussionsReq;

  getPageToken(): string;
  setPageToken(value: string): ListMyCommunitiesDiscussionsReq;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): ListMyCommunitiesDiscussionsReq.AsObject;
  static toObject(includeInstance: boolean, msg: ListMyCommunitiesDiscussionsReq): ListMyCommunitiesDiscussionsReq.AsObject;
  static serializeBinaryToWriter(message: ListMyCommunitiesDiscussionsReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): ListMyCommunitiesDiscussionsReq;
  static deserializeBinaryFromReader(message: ListMyCommunitiesDiscussionsReq, reader: jspb.BinaryReader): ListMyCommunitiesDiscussionsReq;
}

export namespace ListMyCommunitiesDiscussionsReq {
  export type AsObject = {
    pageSize: number,
    pageToken: string,
  }
}

export class ListMyCommunitiesDiscussionsRes extends jspb.Message {
  getDiscussionsList(): Array<Discussion>;
  setDiscussionsList(value: Array<Discussion>): ListMyCommunitiesDiscussionsRes;
  clearDiscussionsList(): ListMyCommunitiesDiscussionsRes;
  addDiscussions(value?: Discussion, index?: number): Discussion;

  getNextPageToken(): string;
  setNextPageToken(value: string): ListMyCommunitiesDiscussionsRes;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): ListMyCommunitiesDiscussionsRes.AsObject;
  static toObject(includeInstance: boolean, msg: ListMyCommunitiesDiscussionsRes): ListMyCommunitiesDiscussionsRes.AsObject;
  static serializeBinaryToWriter(message: ListMyCommunitiesDiscussionsRes, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): ListMyCommunitiesDiscussionsRes;
  static deserializeBinaryFromReader(message: ListMyCommunitiesDiscussionsRes, reader: jspb.BinaryReader): ListMyCommunitiesDiscussionsRes;
}

export namespace ListMyCommunitiesDiscussionsRes {
  export type AsObject = {
    discussionsList: Array<Discussion.AsObject>,
    nextPageToken: string,
  }
}

export class UpdateDiscussionReq extends jspb.Message {
  getDiscussionId(): number;
  setDiscussionId(value: number): UpdateDiscussionReq;

  getTitle(): google_protobuf_wrappers_pb.StringValue | undefined;
  setTitle(value?: google_protobuf_wrappers_pb.StringValue): UpdateDiscussionReq;
  hasTitle(): boolean;
  clearTitle(): UpdateDiscussionReq;

  getContent(): google_protobuf_wrappers_pb.StringValue | undefined;
  setContent(value?: google_protobuf_wrappers_pb.StringValue): UpdateDiscussionReq;
  hasContent(): boolean;
  clearContent(): UpdateDiscussionReq;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): UpdateDiscussionReq.AsObject;
  static toObject(includeInstance: boolean, msg: UpdateDiscussionReq): UpdateDiscussionReq.AsObject;
  static serializeBinaryToWriter(message: UpdateDiscussionReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): UpdateDiscussionReq;
  static deserializeBinaryFromReader(message: UpdateDiscussionReq, reader: jspb.BinaryReader): UpdateDiscussionReq;
}

export namespace UpdateDiscussionReq {
  export type AsObject = {
    discussionId: number,
    title?: google_protobuf_wrappers_pb.StringValue.AsObject,
    content?: google_protobuf_wrappers_pb.StringValue.AsObject,
  }
}

export class DeleteDiscussionReq extends jspb.Message {
  getDiscussionId(): number;
  setDiscussionId(value: number): DeleteDiscussionReq;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): DeleteDiscussionReq.AsObject;
  static toObject(includeInstance: boolean, msg: DeleteDiscussionReq): DeleteDiscussionReq.AsObject;
  static serializeBinaryToWriter(message: DeleteDiscussionReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): DeleteDiscussionReq;
  static deserializeBinaryFromReader(message: DeleteDiscussionReq, reader: jspb.BinaryReader): DeleteDiscussionReq;
}

export namespace DeleteDiscussionReq {
  export type AsObject = {
    discussionId: number,
  }
}

