All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.protostream.sampledomain.User$___Marshaller_f6e41fa3053ee608105deb6954a65a49eb691c761c5d0ac3ee28716f7c2d465e Maven / Gradle / Ivy

/*
 Generated by org.infinispan.protostream.annotations.impl.processor.MarshallerSourceCodeGenerator
 for class org.infinispan.protostream.sampledomain.User
*/

package org.infinispan.protostream.sampledomain;

import org.infinispan.protostream.sampledomain.User;

/**
 * WARNING: Generated code! Do not edit!
 */
@javax.annotation.processing.Generated(
   value = "org.infinispan.protostream.annotations.impl.processor.AutoProtoSchemaBuilderAnnotationProcessor",
   comments = "Please do not edit this file!"
)
@SuppressWarnings("all")
public final class User$___Marshaller_f6e41fa3053ee608105deb6954a65a49eb691c761c5d0ac3ee28716f7c2d465e extends org.infinispan.protostream.annotations.impl.GeneratedMarshallerBase implements org.infinispan.protostream.ProtobufTagMarshaller {

   private org.infinispan.protostream.impl.BaseMarshallerDelegate __md$6;

   private org.infinispan.protostream.impl.EnumMarshallerDelegate __md$8e;

   @Override
   public Class getJavaClass() { return org.infinispan.protostream.sampledomain.User.class; }

   @Override
   public String getTypeName() { return "sample_bank_account.User"; }

   @Override
   public org.infinispan.protostream.sampledomain.User read(org.infinispan.protostream.ProtobufTagMarshaller.ReadContext $1) throws java.io.IOException {
      final org.infinispan.protostream.TagReader $in = $1.getReader();
      final org.infinispan.protostream.sampledomain.User o = new org.infinispan.protostream.sampledomain.User();
      long __bits$0 = 0;
      java.util.HashSet __c$2 = new java.util.HashSet();
      java.util.ArrayList __c$6 = new java.util.ArrayList();
      boolean done = false;
      while (!done) {
         final int tag = $in.readTag();
         switch (tag) {
            case 0: {
               done = true;
               break;
            }
            case (1 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_VARINT): {
               int __v$1 = $in.readInt32();
               o.setId(__v$1);
               __bits$0 |= 1L;
               break;
            }
            case (2 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_VARINT): {
               java.lang.Integer __v$2 = java.lang.Integer.valueOf($in.readInt32());
               __c$2.add(__v$2);
               break;
            }
            case (3 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               java.lang.String __v$3 = $in.readString();
               o.setName(__v$3);
               break;
            }
            case (4 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               java.lang.String __v$4 = $in.readString();
               o.setSurname(__v$4);
               break;
            }
            case (5 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               java.lang.String __v$5 = $in.readString();
               o.setSalutation(__v$5);
               break;
            }
            case (6 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               if (__md$6 == null) __md$6 = ((org.infinispan.protostream.impl.SerializationContextImpl) $1.getSerializationContext()).getMarshallerDelegate(org.infinispan.protostream.sampledomain.Address.class);
               int length = $in.readUInt32();
               int oldLimit = $in.pushLimit(length);
               org.infinispan.protostream.sampledomain.Address __v$6 = (org.infinispan.protostream.sampledomain.Address) readMessage(__md$6, $1);
               $in.checkLastTagWas(0);
               $in.popLimit(oldLimit);
               __c$6.add(__v$6);
               break;
            }
            case (7 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_VARINT): {
               java.lang.Integer __v$7 = java.lang.Integer.valueOf($in.readInt32());
               o.setAge(__v$7);
               break;
            }
            case (8 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_VARINT): {
               if (__md$8e == null) __md$8e = (org.infinispan.protostream.impl.EnumMarshallerDelegate)((org.infinispan.protostream.impl.SerializationContextImpl) $1.getSerializationContext()).getMarshallerDelegate(org.infinispan.protostream.sampledomain.User.Gender.class);
               int enumVal = $in.readEnum();
               org.infinispan.protostream.sampledomain.User.Gender __v$8 = (org.infinispan.protostream.sampledomain.User.Gender) __md$8e.getMarshaller().decode(enumVal);
               if (__v$8 == null) {
               } else {
                  o.setGender(__v$8);
               }
               break;
            }
            case (9 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               java.lang.String __v$9 = $in.readString();
               o.setNotes(__v$9);
               break;
            }
            case (10 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_FIXED64): {
               java.time.Instant __v$10 = java.time.Instant.ofEpochMilli($in.readFixed64());
               o.setCreationDate(__v$10);
               break;
            }
            case (11 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_FIXED64): {
               java.time.Instant __v$11 = java.time.Instant.ofEpochMilli($in.readFixed64());
               o.setPasswordExpirationDate(__v$11);
               break;
            }
            default: {
               if (!$in.skipField(tag)) done = true;
            }
         }
      }
      if ((__bits$0 & 1L) == 0) {
         o.setId(0);
      }
      o.setAccountIds(__c$2);

      o.setAddresses(__c$6);

      return o;
   }

   @Override
   public void write(org.infinispan.protostream.ProtobufTagMarshaller.WriteContext $1, org.infinispan.protostream.sampledomain.User $2) throws java.io.IOException {
      org.infinispan.protostream.impl.TagWriterImpl $out = (org.infinispan.protostream.impl.TagWriterImpl) $1.getWriter();
      final org.infinispan.protostream.sampledomain.User o = (org.infinispan.protostream.sampledomain.User) $2;
      {
         final int __v$1 = o.getId();
         $out.writeInt32(1, __v$1);
      }
      {
         final java.util.Collection __c$2 = o.getAccountIds();
         if (__c$2 != null) 
            for (java.util.Iterator it = __c$2.iterator(); it.hasNext(); ) {
               final java.lang.Integer __v$2 = it.next();
               $out.writeInt32(2, __v$2.intValue());
            }
      }
      {
         final java.lang.String __v$3 = o.getName();
         if (__v$3 != null) $out.writeString(3, __v$3);
      }
      {
         final java.lang.String __v$4 = o.getSurname();
         if (__v$4 != null) $out.writeString(4, __v$4);
      }
      {
         final java.lang.String __v$5 = o.getSalutation();
         if (__v$5 != null) $out.writeString(5, __v$5);
      }
      {
         final java.util.Collection __c$6 = o.getAddresses();
         if (__c$6 != null) 
            for (java.util.Iterator it = __c$6.iterator(); it.hasNext(); ) {
               final org.infinispan.protostream.sampledomain.Address __v$6 = it.next();
               {
                  if (__md$6 == null) __md$6 = ((org.infinispan.protostream.impl.SerializationContextImpl) $1.getSerializationContext()).getMarshallerDelegate(org.infinispan.protostream.sampledomain.Address.class);
                  writeNestedMessage(__md$6, $out, 6, __v$6);
               }
            }
      }
      {
         final java.lang.Integer __v$7 = o.getAge();
         if (__v$7 != null) $out.writeInt32(7, __v$7.intValue());
      }
      {
         final org.infinispan.protostream.sampledomain.User.Gender __v$8 = (org.infinispan.protostream.sampledomain.User.Gender) o.getGender();
         if (__v$8 != null) {
            if (__md$8e == null) __md$8e = (org.infinispan.protostream.impl.EnumMarshallerDelegate)((org.infinispan.protostream.impl.SerializationContextImpl) $1.getSerializationContext()).getMarshallerDelegate(org.infinispan.protostream.sampledomain.User.Gender.class);
            $out.writeEnum(8, __md$8e.getMarshaller().encode(__v$8));
         }
      }
      {
         final java.lang.String __v$9 = o.getNotes();
         if (__v$9 != null) $out.writeString(9, __v$9);
      }
      {
         final java.time.Instant __v$10 = o.getCreationDate();
         if (__v$10 != null) $out.writeFixed64(10, __v$10.toEpochMilli());
      }
      {
         final java.time.Instant __v$11 = o.getPasswordExpirationDate();
         if (__v$11 != null) $out.writeFixed64(11, __v$11.toEpochMilli());
      }
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy