// Generated by the protocol buffer compiler.  DO NOT EDIT!
// Source file swift-descriptor.proto

import Foundation

public extension Google.Protobuf{}

public func == (lhs: Google.Protobuf.SwiftFileOptions, rhs: Google.Protobuf.SwiftFileOptions) -> Bool {
  if (lhs === rhs) {
    return true
  }
  var fieldCheck:Bool = (lhs.hashValue == rhs.hashValue)
  fieldCheck = fieldCheck && (lhs.hasClassPrefix == rhs.hasClassPrefix) && (!lhs.hasClassPrefix || lhs.classPrefix == rhs.classPrefix)
  fieldCheck = fieldCheck && (lhs.hasEntitiesAccessControl == rhs.hasEntitiesAccessControl) && (!lhs.hasEntitiesAccessControl || lhs.entitiesAccessControl == rhs.entitiesAccessControl)
  fieldCheck = fieldCheck && (lhs.hasCompileForFramework == rhs.hasCompileForFramework) && (!lhs.hasCompileForFramework || lhs.compileForFramework == rhs.compileForFramework)
  fieldCheck = (fieldCheck && (lhs.unknownFields == rhs.unknownFields))
  return fieldCheck
}

public var SwiftDescriptorRootswiftFileOptions:ConcreateExtensionField {
   get {
       return Google.Protobuf.SwiftDescriptorRoot.sharedInstance.SwiftDescriptorRootswiftFileOptionsStatic
   }
}
public extension Google.Protobuf {
  public struct SwiftDescriptorRoot {
    public static var sharedInstance : SwiftDescriptorRoot {
     struct Static {
         static let instance : SwiftDescriptorRoot = SwiftDescriptorRoot()
     }
     return Static.instance
    }
    var SwiftDescriptorRootswiftFileOptionsStatic:ConcreateExtensionField
    public var extensionRegistry:ExtensionRegistry

    init() {
      SwiftDescriptorRootswiftFileOptionsStatic = ConcreateExtensionField(type:ExtensionType.ExtensionTypeMessage, extendedClass:Google.Protobuf.FileOptions.self, fieldNumber: 5092014, defaultValue:Google.Protobuf.SwiftFileOptions(), messageOrGroupClass:Google.Protobuf.SwiftFileOptions.self, isRepeated:false, isPacked:false, isMessageSetWireFormat:false)
      extensionRegistry = ExtensionRegistry()
      registerAllExtensions(extensionRegistry)
      Google.Protobuf.DescriptorRoot.sharedInstance.registerAllExtensions(extensionRegistry)
    }
    public func registerAllExtensions(registry:ExtensionRegistry) {
      registry.addExtension(SwiftDescriptorRootswiftFileOptionsStatic)
    }
    public static func swiftFileOptions() -> ConcreateExtensionField {
         return SwiftDescriptorRoot.sharedInstance.SwiftDescriptorRootswiftFileOptionsStatic
    }
  }



  //Enum type declaration start 

  public enum AccessControl:Int32 {
    case InternalEntities = 0
    case PublicEntities = 1

  }

  //Enum type declaration end 

  final public class SwiftFileOptions : GeneratedMessage, GeneratedMessageProtocol {
    public private(set) var hasClassPrefix:Bool = false
    public private(set) var classPrefix:String = ""

    public private(set) var entitiesAccessControl:Google.Protobuf.AccessControl = Google.Protobuf.AccessControl.InternalEntities
    public private(set) var hasEntitiesAccessControl:Bool = false
    public private(set) var hasCompileForFramework:Bool = false
    public private(set) var compileForFramework:Bool = true

    required public init() {
         super.init()
    }
    override public func isInitialized() -> Bool {
     return true
    }
    override public func writeToCodedOutputStream(output:CodedOutputStream) throws {
      if hasClassPrefix {
        try output.writeString(1, value:classPrefix)
      }
      if hasEntitiesAccessControl {
        try output.writeEnum(2, value:entitiesAccessControl.rawValue)
      }
      if hasCompileForFramework {
        try output.writeBool(3, value:compileForFramework)
      }
      try unknownFields.writeToCodedOutputStream(output)
    }
    override public func serializedSize() -> Int32 {
      var serialize_size:Int32 = memoizedSerializedSize
      if serialize_size != -1 {
       return serialize_size
      }

      serialize_size = 0
      if hasClassPrefix {
        serialize_size += classPrefix.computeStringSize(1)
      }
      if (hasEntitiesAccessControl) {
        serialize_size += entitiesAccessControl.rawValue.computeEnumSize(2)
      }
      if hasCompileForFramework {
        serialize_size += compileForFramework.computeBoolSize(3)
      }
      serialize_size += unknownFields.serializedSize()
      memoizedSerializedSize = serialize_size
      return serialize_size
    }
    public class func parseArrayDelimitedFromInputStream(input:NSInputStream) throws -> Array<Google.Protobuf.SwiftFileOptions> {
      var mergedArray = Array<Google.Protobuf.SwiftFileOptions>()
      while let value = try parseFromDelimitedFromInputStream(input) {
        mergedArray += [value]
      }
      return mergedArray
    }
    public class func parseFromDelimitedFromInputStream(input:NSInputStream) throws -> Google.Protobuf.SwiftFileOptions? {
      return try Google.Protobuf.SwiftFileOptions.Builder().mergeDelimitedFromInputStream(input)?.build()
    }
    public class func parseFromData(data:NSData) throws -> Google.Protobuf.SwiftFileOptions {
      return try Google.Protobuf.SwiftFileOptions.Builder().mergeFromData(data, extensionRegistry:Google.Protobuf.SwiftDescriptorRoot.sharedInstance.extensionRegistry).build()
    }
    public class func parseFromData(data:NSData, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.SwiftFileOptions {
      return try Google.Protobuf.SwiftFileOptions.Builder().mergeFromData(data, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFromInputStream(input:NSInputStream) throws -> Google.Protobuf.SwiftFileOptions {
      return try Google.Protobuf.SwiftFileOptions.Builder().mergeFromInputStream(input).build()
    }
    public class func parseFromInputStream(input:NSInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.SwiftFileOptions {
      return try Google.Protobuf.SwiftFileOptions.Builder().mergeFromInputStream(input, extensionRegistry:extensionRegistry).build()
    }
    public class func parseFromCodedInputStream(input:CodedInputStream) throws -> Google.Protobuf.SwiftFileOptions {
      return try Google.Protobuf.SwiftFileOptions.Builder().mergeFromCodedInputStream(input).build()
    }
    public class func parseFromCodedInputStream(input:CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.SwiftFileOptions {
      return try Google.Protobuf.SwiftFileOptions.Builder().mergeFromCodedInputStream(input, extensionRegistry:extensionRegistry).build()
    }
    public class func getBuilder() -> Google.Protobuf.SwiftFileOptions.Builder {
      return Google.Protobuf.SwiftFileOptions.classBuilder() as! Google.Protobuf.SwiftFileOptions.Builder
    }
    public func getBuilder() -> Google.Protobuf.SwiftFileOptions.Builder {
      return classBuilder() as! Google.Protobuf.SwiftFileOptions.Builder
    }
    public override class func classBuilder() -> MessageBuilder {
      return Google.Protobuf.SwiftFileOptions.Builder()
    }
    public override func classBuilder() -> MessageBuilder {
      return Google.Protobuf.SwiftFileOptions.Builder()
    }
    public func toBuilder() throws -> Google.Protobuf.SwiftFileOptions.Builder {
      return try Google.Protobuf.SwiftFileOptions.builderWithPrototype(self)
    }
    public class func builderWithPrototype(prototype:Google.Protobuf.SwiftFileOptions) throws -> Google.Protobuf.SwiftFileOptions.Builder {
      return try Google.Protobuf.SwiftFileOptions.Builder().mergeFrom(prototype)
    }
    override public func writeDescriptionTo(inout output:String, indent:String) throws {
      if hasClassPrefix {
        output += "\(indent) classPrefix: \(classPrefix) \n"
      }
      if (hasEntitiesAccessControl) {
        output += "\(indent) entitiesAccessControl: \(entitiesAccessControl.rawValue)\n"
      }
      if hasCompileForFramework {
        output += "\(indent) compileForFramework: \(compileForFramework) \n"
      }
      unknownFields.writeDescriptionTo(&output, indent:indent)
    }
    override public var hashValue:Int {
        get {
            var hashCode:Int = 7
            if hasClassPrefix {
               hashCode = (hashCode &* 31) &+ classPrefix.hashValue
            }
            if hasEntitiesAccessControl {
               hashCode = (hashCode &* 31) &+ Int(entitiesAccessControl.rawValue)
            }
            if hasCompileForFramework {
               hashCode = (hashCode &* 31) &+ compileForFramework.hashValue
            }
            hashCode = (hashCode &* 31) &+  unknownFields.hashValue
            return hashCode
        }
    }


    //Meta information declaration start

    override public class func className() -> String {
        return "Google.Protobuf.SwiftFileOptions"
    }
    override public func className() -> String {
        return "Google.Protobuf.SwiftFileOptions"
    }
    override public func classMetaType() -> GeneratedMessage.Type {
        return Google.Protobuf.SwiftFileOptions.self
    }
    //Meta information declaration end

    final public class Builder : GeneratedMessageBuilder {
      private var builderResult:Google.Protobuf.SwiftFileOptions = Google.Protobuf.SwiftFileOptions()
      public func getMessage() -> Google.Protobuf.SwiftFileOptions {
          return builderResult
      }

      required override public init () {
         super.init()
      }
      public var hasClassPrefix:Bool {
           get {
                return builderResult.hasClassPrefix
           }
      }
      public var classPrefix:String {
           get {
                return builderResult.classPrefix
           }
           set (value) {
               builderResult.hasClassPrefix = true
               builderResult.classPrefix = value
           }
      }
      public func setClassPrefix(value:String) -> Google.Protobuf.SwiftFileOptions.Builder {
        self.classPrefix = value
        return self
      }
      public func clearClassPrefix() -> Google.Protobuf.SwiftFileOptions.Builder{
           builderResult.hasClassPrefix = false
           builderResult.classPrefix = ""
           return self
      }
        public var hasEntitiesAccessControl:Bool{
            get {
                return builderResult.hasEntitiesAccessControl
            }
        }
        public var entitiesAccessControl:Google.Protobuf.AccessControl {
            get {
                return builderResult.entitiesAccessControl
            }
            set (value) {
                builderResult.hasEntitiesAccessControl = true
                builderResult.entitiesAccessControl = value
            }
        }
        public func setEntitiesAccessControl(value:Google.Protobuf.AccessControl) -> Google.Protobuf.SwiftFileOptions.Builder {
          self.entitiesAccessControl = value
          return self
        }
        public func clearEntitiesAccessControl() -> Google.Protobuf.SwiftFileOptions.Builder {
           builderResult.hasEntitiesAccessControl = false
           builderResult.entitiesAccessControl = .InternalEntities
           return self
        }
      public var hasCompileForFramework:Bool {
           get {
                return builderResult.hasCompileForFramework
           }
      }
      public var compileForFramework:Bool {
           get {
                return builderResult.compileForFramework
           }
           set (value) {
               builderResult.hasCompileForFramework = true
               builderResult.compileForFramework = value
           }
      }
      public func setCompileForFramework(value:Bool) -> Google.Protobuf.SwiftFileOptions.Builder {
        self.compileForFramework = value
        return self
      }
      public func clearCompileForFramework() -> Google.Protobuf.SwiftFileOptions.Builder{
           builderResult.hasCompileForFramework = false
           builderResult.compileForFramework = true
           return self
      }
      override public var internalGetResult:GeneratedMessage {
           get {
              return builderResult
           }
      }
      public override func clear() -> Google.Protobuf.SwiftFileOptions.Builder {
        builderResult = Google.Protobuf.SwiftFileOptions()
        return self
      }
      public override func clone() throws -> Google.Protobuf.SwiftFileOptions.Builder {
        return try Google.Protobuf.SwiftFileOptions.builderWithPrototype(builderResult)
      }
      public override func build() throws -> Google.Protobuf.SwiftFileOptions {
           try checkInitialized()
           return buildPartial()
      }
      public func buildPartial() -> Google.Protobuf.SwiftFileOptions {
        let returnMe:Google.Protobuf.SwiftFileOptions = builderResult
        return returnMe
      }
      public func mergeFrom(other:Google.Protobuf.SwiftFileOptions) throws -> Google.Protobuf.SwiftFileOptions.Builder {
        if other == Google.Protobuf.SwiftFileOptions() {
         return self
        }
        if other.hasClassPrefix {
             classPrefix = other.classPrefix
        }
        if other.hasEntitiesAccessControl {
             entitiesAccessControl = other.entitiesAccessControl
        }
        if other.hasCompileForFramework {
             compileForFramework = other.compileForFramework
        }
        try mergeUnknownFields(other.unknownFields)
        return self
      }
      public override func mergeFromCodedInputStream(input:CodedInputStream) throws -> Google.Protobuf.SwiftFileOptions.Builder {
           return try mergeFromCodedInputStream(input, extensionRegistry:ExtensionRegistry())
      }
      public override func mergeFromCodedInputStream(input:CodedInputStream, extensionRegistry:ExtensionRegistry) throws -> Google.Protobuf.SwiftFileOptions.Builder {
        let unknownFieldsBuilder:UnknownFieldSet.Builder = try UnknownFieldSet.builderWithUnknownFields(self.unknownFields)
        while (true) {
          let tag = try input.readTag()
          switch tag {
          case 0: 
            self.unknownFields = try unknownFieldsBuilder.build()
            return self

          case 10 :
            classPrefix = try input.readString()

          case 16 :
            let valueIntentitiesAccessControl = try input.readEnum()
            if let enumsentitiesAccessControl = Google.Protobuf.AccessControl(rawValue:valueIntentitiesAccessControl){
                 entitiesAccessControl = enumsentitiesAccessControl
            } else {
                 try unknownFieldsBuilder.mergeVarintField(2, value:Int64(valueIntentitiesAccessControl))
            }

          case 24 :
            compileForFramework = try input.readBool()

          default:
            if (!(try parseUnknownField(input,unknownFields:unknownFieldsBuilder, extensionRegistry:extensionRegistry, tag:tag))) {
               unknownFields = try unknownFieldsBuilder.build()
               return self
            }
          }
        }
      }
    }

  }

}

// @@protoc_insertion_point(global_scope)
