Serialize() {
        const buf = new util_1.default.Writer();
        // Name (string)
        {
            bytes_1.WriteVarChar(buf, this.name, 8);
        }
        // Type (byte)
        {
            bytes_1.write(buf, this.type, 'byte');
        }
        // LEI (string)
        {
            bytes_1.WriteFixedChar(buf, this.lei, 20);
        }
        // AddressIncluded (bool)
        {
            bytes_1.write(buf, this.address_included, 'bool');
        }
        // UnitNumber (string)
        if (this.address_included) {
            bytes_1.WriteVarChar(buf, this.unit_number, 8);
        }
        // BuildingNumber (string)
        if (this.address_included) {
            bytes_1.WriteVarChar(buf, this.building_number, 8);
        }
        // Street (string)
        if (this.address_included) {
            bytes_1.WriteVarChar(buf, this.street, 16);
        }
        // SuburbCity (string)
        if (this.address_included) {
            bytes_1.WriteVarChar(buf, this.suburb_city, 8);
        }
        // TerritoryStateProvinceCode (string)
        if (this.address_included) {
            bytes_1.WriteFixedChar(buf, this.territory_state_province_code, 5);
        }
        // CountryCode (string)
        if (this.address_included) {
            bytes_1.WriteFixedChar(buf, this.country_code, 3);
        }
        // PostalZIPCode (string)
        if (this.address_included) {
            bytes_1.WriteFixedChar(buf, this.postal_zip_code, 12);
        }
        // EmailAddress (string)
        {
            bytes_1.WriteVarChar(buf, this.email_address, 8);
        }
        // PhoneNumber (string)
        {
            bytes_1.WriteVarChar(buf, this.phone_number, 8);
        }
        // Administration ([]Administrator)
        {
            if (!this.administration)
                this.administration = [];
            bytes_1.WriteVariableSize(buf, this.administration.length, 8, 8);
            this.administration.forEach(value => {
                buf.write(value.Serialize());
            });
        }
        // Management ([]Manager)
        {
            if (!this.management)
                this.management = [];
            bytes_1.WriteVariableSize(buf, this.management.length, 8, 8);
            this.management.forEach(value => {
                buf.write(value.Serialize());
            });
        }
        return buf.buf;
    }
// Serialize returns the byte representation of the message.
Serialize returns the byte representation of the message.
Serialize returns the byte representation of the message .
Serialize() {
        const buf = new util_1.default.Writer();
        {
            bytes_1.WriteVarChar(buf, this.name, 8);
        }
        {
            bytes_1.write(buf, this.type, 'byte');
        }
        {
            bytes_1.WriteFixedChar(buf, this.lei, 20);
        }
        {
            bytes_1.write(buf, this.address_included, 'bool');
        }
        if (this.address_included) {
            bytes_1.WriteVarChar(buf, this.unit_number, 8);
        }
        if (this.address_included) {
            bytes_1.WriteVarChar(buf, this.building_number, 8);
        }
        if (this.address_included) {
            bytes_1.WriteVarChar(buf, this.street, 16);
        }
        if (this.address_included) {
            bytes_1.WriteVarChar(buf, this.suburb_city, 8);
        }
        if (this.address_included) {
            bytes_1.WriteFixedChar(buf, this.territory_state_province_code, 5);
        }
        if (this.address_included) {
            bytes_1.WriteFixedChar(buf, this.country_code, 3);
        }
        if (this.address_included) {
            bytes_1.WriteFixedChar(buf, this.postal_zip_code, 12);
        }
        {
            bytes_1.WriteVarChar(buf, this.email_address, 8);
        }
        {
            bytes_1.WriteVarChar(buf, this.phone_number, 8);
        }
        {
            if (!this.administration)
                this.administration = [];
            bytes_1.WriteVariableSize(buf, this.administration.length, 8, 8);
            this.administration.forEach(value => {
                buf.write(value.Serialize());
            });
        }
        {
            if (!this.management)
                this.management = [];
            bytes_1.WriteVariableSize(buf, this.management.length, 8, 8);
            this.management.forEach(value => {
                buf.write(value.Serialize());
            });
        }
        return buf.buf;
    }
Serialize ( ) { const buf = new util_1 . default . Writer ( ) ; { bytes_1 . WriteVarChar ( buf , this . name , 8 ) ; } { bytes_1 . write ( buf , this . type , 'byte' ) ; } { bytes_1 . WriteFixedChar ( buf , this . lei , 20 ) ; } { bytes_1 . write ( buf , this . address_included , 'bool' ) ; } if ( this . address_included ) { bytes_1 . WriteVarChar ( buf , this . unit_number , 8 ) ; } if ( this . address_included ) { bytes_1 . WriteVarChar ( buf , this . building_number , 8 ) ; } if ( this . address_included ) { bytes_1 . WriteVarChar ( buf , this . street , 16 ) ; } if ( this . address_included ) { bytes_1 . WriteVarChar ( buf , this . suburb_city , 8 ) ; } if ( this . address_included ) { bytes_1 . WriteFixedChar ( buf , this . territory_state_province_code , 5 ) ; } if ( this . address_included ) { bytes_1 . WriteFixedChar ( buf , this . country_code , 3 ) ; } if ( this . address_included ) { bytes_1 . WriteFixedChar ( buf , this . postal_zip_code , 12 ) ; } { bytes_1 . WriteVarChar ( buf , this . email_address , 8 ) ; } { bytes_1 . WriteVarChar ( buf , this . phone_number , 8 ) ; } { if ( ! this . administration ) this . administration = [ ] ; bytes_1 . WriteVariableSize ( buf , this . administration . length , 8 , 8 ) ; this . administration . forEach ( value => { buf . write ( value . Serialize ( ) ) ; } ) ; } { if ( ! this . management ) this . management = [ ] ; bytes_1 . WriteVariableSize ( buf , this . management . length , 8 , 8 ) ; this . management . forEach ( value => { buf . write ( value . Serialize ( ) ) ; } ) ; } return buf . buf ; }
Serialize returns the byte representation of the message.
Serialize returns the byte representation of the message .
// Name (string) // Type (byte) // LEI (string) // AddressIncluded (bool) // UnitNumber (string) // BuildingNumber (string) // Street (string) // SuburbCity (string) // TerritoryStateProvinceCode (string) // CountryCode (string) // PostalZIPCode (string) // EmailAddress (string) // PhoneNumber (string) // Administration ([]Administrator) // Management ([]Manager)