// @generated by protoc-gen-es v1.7.2 with parameter "target=ts"
// @generated from file flyteidl/admin/notification.proto (package flyteidl.admin, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";

/**
 * Represents the Email object that is sent to a publisher/subscriber
 * to forward the notification.
 * Note: This is internal to Admin and doesn't need to be exposed to other components.
 *
 * @generated from message flyteidl.admin.EmailMessage
 */
export class EmailMessage extends Message<EmailMessage> {
  /**
   * The list of email addresses to receive an email with the content populated in the other fields.
   * Currently, each email recipient will receive its own email.
   * This populates the TO field.
   *
   * @generated from field: repeated string recipients_email = 1;
   */
  recipientsEmail: string[] = [];

  /**
   * The email of the sender.
   * This populates the FROM field.
   *
   * @generated from field: string sender_email = 2;
   */
  senderEmail = "";

  /**
   * The content of the subject line.
   * This populates the SUBJECT field.
   *
   * @generated from field: string subject_line = 3;
   */
  subjectLine = "";

  /**
   * The content of the email body.
   * This populates the BODY field.
   *
   * @generated from field: string body = 4;
   */
  body = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.admin.EmailMessage";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "recipients_email", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 2, name: "sender_email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "subject_line", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

