/**
 * Generated by the protoc-gen-ts.  DO NOT EDIT!
 * compiler version: 5.29.3
 * source: proto/specs.proto
 * git: https://github.com/thesayyn/protoc-gen-ts */
import * as pb_1 from "google-protobuf";
export namespace rssalchemy {
    export class Specs extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            url?: string;
            selector_post?: string;
            selector_title?: string;
            selector_link?: string;
            selector_description?: string;
            selector_author?: string;
            selector_created?: string;
            selector_content?: string;
            selector_enclosure?: string;
            cache_lifetime?: string;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("url" in data && data.url != undefined) {
                    this.url = data.url;
                }
                if ("selector_post" in data && data.selector_post != undefined) {
                    this.selector_post = data.selector_post;
                }
                if ("selector_title" in data && data.selector_title != undefined) {
                    this.selector_title = data.selector_title;
                }
                if ("selector_link" in data && data.selector_link != undefined) {
                    this.selector_link = data.selector_link;
                }
                if ("selector_description" in data && data.selector_description != undefined) {
                    this.selector_description = data.selector_description;
                }
                if ("selector_author" in data && data.selector_author != undefined) {
                    this.selector_author = data.selector_author;
                }
                if ("selector_created" in data && data.selector_created != undefined) {
                    this.selector_created = data.selector_created;
                }
                if ("selector_content" in data && data.selector_content != undefined) {
                    this.selector_content = data.selector_content;
                }
                if ("selector_enclosure" in data && data.selector_enclosure != undefined) {
                    this.selector_enclosure = data.selector_enclosure;
                }
                if ("cache_lifetime" in data && data.cache_lifetime != undefined) {
                    this.cache_lifetime = data.cache_lifetime;
                }
            }
        }
        get url() {
            return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
        }
        set url(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        get selector_post() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set selector_post(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get selector_title() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set selector_title(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get selector_link() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set selector_link(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get selector_description() {
            return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
        }
        set selector_description(value: string) {
            pb_1.Message.setField(this, 5, value);
        }
        get selector_author() {
            return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
        }
        set selector_author(value: string) {
            pb_1.Message.setField(this, 6, value);
        }
        get selector_created() {
            return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
        }
        set selector_created(value: string) {
            pb_1.Message.setField(this, 7, value);
        }
        get selector_content() {
            return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
        }
        set selector_content(value: string) {
            pb_1.Message.setField(this, 8, value);
        }
        get selector_enclosure() {
            return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
        }
        set selector_enclosure(value: string) {
            pb_1.Message.setField(this, 9, value);
        }
        get cache_lifetime() {
            return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
        }
        set cache_lifetime(value: string) {
            pb_1.Message.setField(this, 10, value);
        }
        static fromObject(data: {
            url?: string;
            selector_post?: string;
            selector_title?: string;
            selector_link?: string;
            selector_description?: string;
            selector_author?: string;
            selector_created?: string;
            selector_content?: string;
            selector_enclosure?: string;
            cache_lifetime?: string;
        }): Specs {
            const message = new Specs({});
            if (data.url != null) {
                message.url = data.url;
            }
            if (data.selector_post != null) {
                message.selector_post = data.selector_post;
            }
            if (data.selector_title != null) {
                message.selector_title = data.selector_title;
            }
            if (data.selector_link != null) {
                message.selector_link = data.selector_link;
            }
            if (data.selector_description != null) {
                message.selector_description = data.selector_description;
            }
            if (data.selector_author != null) {
                message.selector_author = data.selector_author;
            }
            if (data.selector_created != null) {
                message.selector_created = data.selector_created;
            }
            if (data.selector_content != null) {
                message.selector_content = data.selector_content;
            }
            if (data.selector_enclosure != null) {
                message.selector_enclosure = data.selector_enclosure;
            }
            if (data.cache_lifetime != null) {
                message.cache_lifetime = data.cache_lifetime;
            }
            return message;
        }
        toObject() {
            const data: {
                url?: string;
                selector_post?: string;
                selector_title?: string;
                selector_link?: string;
                selector_description?: string;
                selector_author?: string;
                selector_created?: string;
                selector_content?: string;
                selector_enclosure?: string;
                cache_lifetime?: string;
            } = {};
            if (this.url != null) {
                data.url = this.url;
            }
            if (this.selector_post != null) {
                data.selector_post = this.selector_post;
            }
            if (this.selector_title != null) {
                data.selector_title = this.selector_title;
            }
            if (this.selector_link != null) {
                data.selector_link = this.selector_link;
            }
            if (this.selector_description != null) {
                data.selector_description = this.selector_description;
            }
            if (this.selector_author != null) {
                data.selector_author = this.selector_author;
            }
            if (this.selector_created != null) {
                data.selector_created = this.selector_created;
            }
            if (this.selector_content != null) {
                data.selector_content = this.selector_content;
            }
            if (this.selector_enclosure != null) {
                data.selector_enclosure = this.selector_enclosure;
            }
            if (this.cache_lifetime != null) {
                data.cache_lifetime = this.cache_lifetime;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.url.length)
                writer.writeString(1, this.url);
            if (this.selector_post.length)
                writer.writeString(2, this.selector_post);
            if (this.selector_title.length)
                writer.writeString(3, this.selector_title);
            if (this.selector_link.length)
                writer.writeString(4, this.selector_link);
            if (this.selector_description.length)
                writer.writeString(5, this.selector_description);
            if (this.selector_author.length)
                writer.writeString(6, this.selector_author);
            if (this.selector_created.length)
                writer.writeString(7, this.selector_created);
            if (this.selector_content.length)
                writer.writeString(8, this.selector_content);
            if (this.selector_enclosure.length)
                writer.writeString(9, this.selector_enclosure);
            if (this.cache_lifetime.length)
                writer.writeString(10, this.cache_lifetime);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Specs {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Specs();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.url = reader.readString();
                        break;
                    case 2:
                        message.selector_post = reader.readString();
                        break;
                    case 3:
                        message.selector_title = reader.readString();
                        break;
                    case 4:
                        message.selector_link = reader.readString();
                        break;
                    case 5:
                        message.selector_description = reader.readString();
                        break;
                    case 6:
                        message.selector_author = reader.readString();
                        break;
                    case 7:
                        message.selector_created = reader.readString();
                        break;
                    case 8:
                        message.selector_content = reader.readString();
                        break;
                    case 9:
                        message.selector_enclosure = reader.readString();
                        break;
                    case 10:
                        message.cache_lifetime = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): Specs {
            return Specs.deserialize(bytes);
        }
    }
}
