/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by http://code.google.com/p/protostuff/ ... DO NOT EDIT! // Generated from protobuf package org.apache.drill.common.types; public final class SchemaTypeProtos { public static final class MajorType { public static final org.apache.drill.common.types.SchemaTypeProtos.MajorType.MessageSchema WRITE = new org.apache.drill.common.types.SchemaTypeProtos.MajorType.MessageSchema(); public static final org.apache.drill.common.types.SchemaTypeProtos.MajorType.BuilderSchema MERGE = new org.apache.drill.common.types.SchemaTypeProtos.MajorType.BuilderSchema(); public static class MessageSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.common.types.TypeProtos.MajorType> { public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.common.types.TypeProtos.MajorType message) throws java.io.IOException { if(message.hasMinorType()) output.writeEnum(1, message.getMinorType().getNumber(), false); if(message.hasMode()) output.writeEnum(2, message.getMode().getNumber(), false); if(message.hasWidth()) output.writeInt32(3, message.getWidth(), false); if(message.hasPrecision()) output.writeInt32(4, message.getPrecision(), false); if(message.hasScale()) output.writeInt32(5, message.getScale(), false); if(message.hasTimeZone()) output.writeInt32(6, message.getTimeZone(), false); for(org.apache.drill.common.types.TypeProtos.MinorType subType : message.getSubTypeList()) output.writeEnum(7, subType.getNumber(), true); } public boolean isInitialized(org.apache.drill.common.types.TypeProtos.MajorType message) { return message.isInitialized(); } public java.lang.String getFieldName(int number) { return org.apache.drill.common.types.SchemaTypeProtos.MajorType.getFieldName(number); } public int getFieldNumber(java.lang.String name) { return org.apache.drill.common.types.SchemaTypeProtos.MajorType.getFieldNumber(name); } public java.lang.Class<org.apache.drill.common.types.TypeProtos.MajorType> typeClass() { return org.apache.drill.common.types.TypeProtos.MajorType.class; } public java.lang.String messageName() { return org.apache.drill.common.types.TypeProtos.MajorType.class.getSimpleName(); } public java.lang.String messageFullName() { return org.apache.drill.common.types.TypeProtos.MajorType.class.getName(); } //unused public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.common.types.TypeProtos.MajorType message) throws java.io.IOException {} public org.apache.drill.common.types.TypeProtos.MajorType newMessage() { return null; } } public static class BuilderSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.common.types.TypeProtos.MajorType.Builder> { public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.common.types.TypeProtos.MajorType.Builder builder) throws java.io.IOException { for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this)) { switch(number) { case 0: return; case 1: builder.setMinorType(org.apache.drill.common.types.TypeProtos.MinorType.valueOf(input.readEnum())); break; case 2: builder.setMode(org.apache.drill.common.types.TypeProtos.DataMode.valueOf(input.readEnum())); break; case 3: builder.setWidth(input.readInt32()); break; case 4: builder.setPrecision(input.readInt32()); break; case 5: builder.setScale(input.readInt32()); break; case 6: builder.setTimeZone(input.readInt32()); break; case 7: builder.addSubType(org.apache.drill.common.types.TypeProtos.MinorType.valueOf(input.readEnum())); break; default: input.handleUnknownField(number, this); } } } public boolean isInitialized(org.apache.drill.common.types.TypeProtos.MajorType.Builder builder) { return builder.isInitialized(); } public org.apache.drill.common.types.TypeProtos.MajorType.Builder newMessage() { return org.apache.drill.common.types.TypeProtos.MajorType.newBuilder(); } public java.lang.String getFieldName(int number) { return org.apache.drill.common.types.SchemaTypeProtos.MajorType.getFieldName(number); } public int getFieldNumber(java.lang.String name) { return org.apache.drill.common.types.SchemaTypeProtos.MajorType.getFieldNumber(name); } public java.lang.Class<org.apache.drill.common.types.TypeProtos.MajorType.Builder> typeClass() { return org.apache.drill.common.types.TypeProtos.MajorType.Builder.class; } public java.lang.String messageName() { return org.apache.drill.common.types.TypeProtos.MajorType.class.getSimpleName(); } public java.lang.String messageFullName() { return org.apache.drill.common.types.TypeProtos.MajorType.class.getName(); } //unused public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.common.types.TypeProtos.MajorType.Builder builder) throws java.io.IOException {} } public static java.lang.String getFieldName(int number) { switch(number) { case 1: return "minorType"; case 2: return "mode"; case 3: return "width"; case 4: return "precision"; case 5: return "scale"; case 6: return "timeZone"; case 7: return "subType"; default: return null; } } public static int getFieldNumber(java.lang.String name) { java.lang.Integer number = fieldMap.get(name); return number == null ? 0 : number.intValue(); } private static final java.util.HashMap<java.lang.String,java.lang.Integer> fieldMap = new java.util.HashMap<java.lang.String,java.lang.Integer>(); static { fieldMap.put("minorType", 1); fieldMap.put("mode", 2); fieldMap.put("width", 3); fieldMap.put("precision", 4); fieldMap.put("scale", 5); fieldMap.put("timeZone", 6); fieldMap.put("subType", 7); } } }