aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kevi...@apache.org
Subject [2/8] git commit: Generate thrift wrappers in the build process.
Date Wed, 04 Dec 2013 20:12:11 GMT
Generate thrift wrappers in the build process.


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/87047365
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/87047365
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/87047365

Branch: refs/heads/master
Commit: 87047365bbf6619677051c8b8485d1e93614fbba
Parents: a2d7ee7
Author: Bill Farner <bill@twitter.com>
Authored: Tue Nov 26 12:56:29 2013 -0800
Committer: Bill Farner <bill@twitter.com>
Committed: Tue Nov 26 12:56:29 2013 -0800

----------------------------------------------------------------------
 build.gradle                                    |  19 +-
 .../storage/entities/IAssignedTask.java         | 161 -------
 .../scheduler/storage/entities/IConstraint.java | 122 -----
 .../storage/entities/IExecutorConfig.java       | 118 -----
 .../scheduler/storage/entities/IIdentity.java   | 118 -----
 .../storage/entities/IJobConfiguration.java     | 159 -------
 .../scheduler/storage/entities/IJobKey.java     | 126 -----
 .../storage/entities/ILimitConstraint.java      | 110 -----
 .../scheduler/storage/entities/ILock.java       | 146 ------
 .../scheduler/storage/entities/ILockKey.java    | 110 -----
 .../scheduler/storage/entities/IPackage.java    | 126 -----
 .../scheduler/storage/entities/IQuota.java      | 126 -----
 .../storage/entities/IScheduledTask.java        | 151 ------
 .../scheduler/storage/entities/ITaskConfig.java | 270 -----------
 .../storage/entities/ITaskConstraint.java       | 114 -----
 .../scheduler/storage/entities/ITaskEvent.java  | 131 -----
 .../storage/entities/IValueConstraint.java      | 124 -----
 .../aurora/tools/java/organize_imports.py       | 130 +++++
 .../aurora/tools/java/thrift_wrapper_codegen.py | 475 +++++++++++++++++++
 19 files changed, 621 insertions(+), 2215 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 6ba6da9..44d6cbf 100644
--- a/build.gradle
+++ b/build.gradle
@@ -81,7 +81,8 @@ sourceSets {
 dependencies {
   compile 'aopalliance:aopalliance:1.0'
   compile 'com.google.code.findbugs:jsr305:1.3.9'
-  compile 'com.google.guava:guava:14.0.1'
+  def guavaDep = 'com.google.guava:guava:14.0.1'
+  compile guavaDep
   compile 'com.google.inject:guice:3.0'
   compile 'com.google.protobuf:protobuf-java:2.4.1'
   def jerseyRev = '1.12'
@@ -142,6 +143,7 @@ dependencies {
   compile 'com.twitter.common:zookeeper-testing:0.0.37'
   testCompile 'junit:junit:4.10'
 
+  generatedCompile guavaDep
   generatedCompile thriftLib
 
   checkstyle 'com.puppycrawl.tools:checkstyle:5.6'
@@ -176,11 +178,21 @@ task generateSources(dependsOn: 'bootstrapThrift') {
         args = ['--gen', 'java:hashcode', '-o', outputDir, file]
       }
     }
+    ['JobConfiguration', 'Lock', 'ScheduledTask', 'Quota'].each {
+      def structName = it
+      exec {
+        executable = 'python'
+        args = ['src/main/python/twitter/aurora/tools/java/thrift_wrapper_codegen.py',
+                'src/main/thrift/com/twitter/aurora/gen/api.thrift',
+                structName,
+                "$generatedDir/gen-java"]
+      }
+    }
   }
 }
 
 compileGeneratedJava {
-  dependsOn(generateSources)
+  dependsOn generateSources
 }
 
 compileJava.source sourceSets.main.java
@@ -195,7 +207,8 @@ idea {
    module {
     iml {
       beforeMerged { module ->
-        module.sourceFolders.add(new org.gradle.plugins.ide.idea.model.Path('file://$MODULE_DIR$/dist/generated-src/gen-java'))
+        module.sourceFolders.add(new org.gradle.plugins.ide.idea.model.Path(
+            'file://$MODULE_DIR$/dist/generated-src/gen-java'))
       }
       whenMerged { module ->
         // TODO(zmanji): Find a way to remove the `dist` directory instead of

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/IAssignedTask.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IAssignedTask.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/IAssignedTask.java
deleted file mode 100644
index c73d128..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IAssignedTask.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import java.util.Map;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.AssignedTask;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class IAssignedTask {
-  private final AssignedTask wrapped;
-  private final ITaskConfig task;
-  private final ImmutableMap<String, Integer> assignedPorts;
-
-  private IAssignedTask(AssignedTask wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-    this.task = !wrapped.isSetTask()
-        ? null
-        : ITaskConfig.buildNoCopy(wrapped.getTask());
-    this.assignedPorts = !wrapped.isSetAssignedPorts()
-        ? ImmutableMap.<String, Integer>of()
-        : ImmutableMap.copyOf(wrapped.getAssignedPorts());
-  }
-
-  static IAssignedTask buildNoCopy(AssignedTask wrapped) {
-    return new IAssignedTask(wrapped);
-  }
-
-  public static IAssignedTask build(AssignedTask wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<IAssignedTask, AssignedTask> TO_BUILDER =
-      new Function<IAssignedTask, AssignedTask>() {
-        @Override
-        public AssignedTask apply(IAssignedTask input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<AssignedTask, IAssignedTask> FROM_BUILDER =
-      new Function<AssignedTask, IAssignedTask>() {
-        @Override
-        public IAssignedTask apply(AssignedTask input) {
-          return new IAssignedTask(input);
-        }
-      };
-
-  public static ImmutableList<AssignedTask> toBuildersList(Iterable<IAssignedTask> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<IAssignedTask> listFromBuilders(Iterable<AssignedTask> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<AssignedTask> toBuildersSet(Iterable<IAssignedTask> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<IAssignedTask> setFromBuilders(Iterable<AssignedTask> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public AssignedTask newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetTaskId() {
-    return wrapped.isSetTaskId();
-  }
-
-  public String getTaskId() {
-    return wrapped.getTaskId();
-  }
-
-  public boolean isSetSlaveId() {
-    return wrapped.isSetSlaveId();
-  }
-
-  public String getSlaveId() {
-    return wrapped.getSlaveId();
-  }
-
-  public boolean isSetSlaveHost() {
-    return wrapped.isSetSlaveHost();
-  }
-
-  public String getSlaveHost() {
-    return wrapped.getSlaveHost();
-  }
-
-  public boolean isSetTask() {
-    return wrapped.isSetTask();
-  }
-
-  public ITaskConfig getTask() {
-    return task;
-  }
-
-  public boolean isSetAssignedPorts() {
-    return wrapped.isSetAssignedPorts();
-  }
-
-  public Map<String, Integer> getAssignedPorts() {
-    return assignedPorts;
-  }
-
-  public boolean isSetInstanceId() {
-    return wrapped.isSetInstanceId();
-  }
-
-  public int getInstanceId() {
-    return wrapped.getInstanceId();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof IAssignedTask)) {
-      return false;
-    }
-    IAssignedTask other = (IAssignedTask) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/IConstraint.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IConstraint.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/IConstraint.java
deleted file mode 100644
index 8a4101d..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IConstraint.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.Constraint;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class IConstraint {
-  private final Constraint wrapped;
-  private final ITaskConstraint constraint;
-
-  private IConstraint(Constraint wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-    this.constraint = !wrapped.isSetConstraint()
-        ? null
-        : ITaskConstraint.buildNoCopy(wrapped.getConstraint());
-  }
-
-  static IConstraint buildNoCopy(Constraint wrapped) {
-    return new IConstraint(wrapped);
-  }
-
-  public static IConstraint build(Constraint wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<IConstraint, Constraint> TO_BUILDER =
-      new Function<IConstraint, Constraint>() {
-        @Override
-        public Constraint apply(IConstraint input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<Constraint, IConstraint> FROM_BUILDER =
-      new Function<Constraint, IConstraint>() {
-        @Override
-        public IConstraint apply(Constraint input) {
-          return new IConstraint(input);
-        }
-      };
-
-  public static ImmutableList<Constraint> toBuildersList(Iterable<IConstraint> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<IConstraint> listFromBuilders(Iterable<Constraint> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<Constraint> toBuildersSet(Iterable<IConstraint> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<IConstraint> setFromBuilders(Iterable<Constraint> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public Constraint newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetName() {
-    return wrapped.isSetName();
-  }
-
-  public String getName() {
-    return wrapped.getName();
-  }
-
-  public boolean isSetConstraint() {
-    return wrapped.isSetConstraint();
-  }
-
-  public ITaskConstraint getConstraint() {
-    return constraint;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof IConstraint)) {
-      return false;
-    }
-    IConstraint other = (IConstraint) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/IExecutorConfig.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IExecutorConfig.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/IExecutorConfig.java
deleted file mode 100644
index e7e6de0..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IExecutorConfig.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.ExecutorConfig;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class IExecutorConfig {
-  private final ExecutorConfig wrapped;
-
-  private IExecutorConfig(ExecutorConfig wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-  }
-
-  static IExecutorConfig buildNoCopy(ExecutorConfig wrapped) {
-    return new IExecutorConfig(wrapped);
-  }
-
-  public static IExecutorConfig build(ExecutorConfig wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<IExecutorConfig, ExecutorConfig> TO_BUILDER =
-      new Function<IExecutorConfig, ExecutorConfig>() {
-        @Override
-        public ExecutorConfig apply(IExecutorConfig input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<ExecutorConfig, IExecutorConfig> FROM_BUILDER =
-      new Function<ExecutorConfig, IExecutorConfig>() {
-        @Override
-        public IExecutorConfig apply(ExecutorConfig input) {
-          return new IExecutorConfig(input);
-        }
-      };
-
-  public static ImmutableList<ExecutorConfig> toBuildersList(Iterable<IExecutorConfig> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<IExecutorConfig> listFromBuilders(Iterable<ExecutorConfig> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<ExecutorConfig> toBuildersSet(Iterable<IExecutorConfig> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<IExecutorConfig> setFromBuilders(Iterable<ExecutorConfig> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public ExecutorConfig newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetName() {
-    return wrapped.isSetName();
-  }
-
-  public String getName() {
-    return wrapped.getName();
-  }
-
-  public boolean isSetData() {
-    return wrapped.isSetData();
-  }
-
-  public String getData() {
-    return wrapped.getData();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof IExecutorConfig)) {
-      return false;
-    }
-    IExecutorConfig other = (IExecutorConfig) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/IIdentity.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IIdentity.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/IIdentity.java
deleted file mode 100644
index 5e33ff3..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IIdentity.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.Identity;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class IIdentity {
-  private final Identity wrapped;
-
-  private IIdentity(Identity wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-  }
-
-  static IIdentity buildNoCopy(Identity wrapped) {
-    return new IIdentity(wrapped);
-  }
-
-  public static IIdentity build(Identity wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<IIdentity, Identity> TO_BUILDER =
-      new Function<IIdentity, Identity>() {
-        @Override
-        public Identity apply(IIdentity input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<Identity, IIdentity> FROM_BUILDER =
-      new Function<Identity, IIdentity>() {
-        @Override
-        public IIdentity apply(Identity input) {
-          return new IIdentity(input);
-        }
-      };
-
-  public static ImmutableList<Identity> toBuildersList(Iterable<IIdentity> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<IIdentity> listFromBuilders(Iterable<Identity> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<Identity> toBuildersSet(Iterable<IIdentity> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<IIdentity> setFromBuilders(Iterable<Identity> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public Identity newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetRole() {
-    return wrapped.isSetRole();
-  }
-
-  public String getRole() {
-    return wrapped.getRole();
-  }
-
-  public boolean isSetUser() {
-    return wrapped.isSetUser();
-  }
-
-  public String getUser() {
-    return wrapped.getUser();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof IIdentity)) {
-      return false;
-    }
-    IIdentity other = (IIdentity) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/IJobConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IJobConfiguration.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/IJobConfiguration.java
deleted file mode 100644
index f698645..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IJobConfiguration.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.CronCollisionPolicy;
-import com.twitter.aurora.gen.JobConfiguration;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class IJobConfiguration {
-  private final JobConfiguration wrapped;
-  private final IJobKey key;
-  private final IIdentity owner;
-  private final ITaskConfig taskConfig;
-
-  private IJobConfiguration(JobConfiguration wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-    this.key = !wrapped.isSetKey()
-        ? null
-        : IJobKey.buildNoCopy(wrapped.getKey());
-    this.owner = !wrapped.isSetOwner()
-        ? null
-        : IIdentity.buildNoCopy(wrapped.getOwner());
-    this.taskConfig = !wrapped.isSetTaskConfig()
-        ? null
-        : ITaskConfig.buildNoCopy(wrapped.getTaskConfig());
-  }
-
-  static IJobConfiguration buildNoCopy(JobConfiguration wrapped) {
-    return new IJobConfiguration(wrapped);
-  }
-
-  public static IJobConfiguration build(JobConfiguration wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<IJobConfiguration, JobConfiguration> TO_BUILDER =
-      new Function<IJobConfiguration, JobConfiguration>() {
-        @Override
-        public JobConfiguration apply(IJobConfiguration input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<JobConfiguration, IJobConfiguration> FROM_BUILDER =
-      new Function<JobConfiguration, IJobConfiguration>() {
-        @Override
-        public IJobConfiguration apply(JobConfiguration input) {
-          return new IJobConfiguration(input);
-        }
-      };
-
-  public static ImmutableList<JobConfiguration> toBuildersList(Iterable<IJobConfiguration> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<IJobConfiguration> listFromBuilders(Iterable<JobConfiguration> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<JobConfiguration> toBuildersSet(Iterable<IJobConfiguration> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<IJobConfiguration> setFromBuilders(Iterable<JobConfiguration> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public JobConfiguration newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetKey() {
-    return wrapped.isSetKey();
-  }
-
-  public IJobKey getKey() {
-    return key;
-  }
-
-  public boolean isSetOwner() {
-    return wrapped.isSetOwner();
-  }
-
-  public IIdentity getOwner() {
-    return owner;
-  }
-
-  public boolean isSetCronSchedule() {
-    return wrapped.isSetCronSchedule();
-  }
-
-  public String getCronSchedule() {
-    return wrapped.getCronSchedule();
-  }
-
-  public CronCollisionPolicy getCronCollisionPolicy() {
-    return wrapped.getCronCollisionPolicy();
-  }
-
-  public boolean isSetTaskConfig() {
-    return wrapped.isSetTaskConfig();
-  }
-
-  public ITaskConfig getTaskConfig() {
-    return taskConfig;
-  }
-
-  public boolean isSetInstanceCount() {
-    return wrapped.isSetInstanceCount();
-  }
-
-  public int getInstanceCount() {
-    return wrapped.getInstanceCount();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof IJobConfiguration)) {
-      return false;
-    }
-    IJobConfiguration other = (IJobConfiguration) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/IJobKey.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IJobKey.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/IJobKey.java
deleted file mode 100644
index ff08d75..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IJobKey.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.JobKey;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class IJobKey {
-  private final JobKey wrapped;
-
-  private IJobKey(JobKey wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-  }
-
-  static IJobKey buildNoCopy(JobKey wrapped) {
-    return new IJobKey(wrapped);
-  }
-
-  public static IJobKey build(JobKey wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<IJobKey, JobKey> TO_BUILDER =
-      new Function<IJobKey, JobKey>() {
-        @Override
-        public JobKey apply(IJobKey input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<JobKey, IJobKey> FROM_BUILDER =
-      new Function<JobKey, IJobKey>() {
-        @Override
-        public IJobKey apply(JobKey input) {
-          return new IJobKey(input);
-        }
-      };
-
-  public static ImmutableList<JobKey> toBuildersList(Iterable<IJobKey> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<IJobKey> listFromBuilders(Iterable<JobKey> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<JobKey> toBuildersSet(Iterable<IJobKey> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<IJobKey> setFromBuilders(Iterable<JobKey> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public JobKey newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetRole() {
-    return wrapped.isSetRole();
-  }
-
-  public String getRole() {
-    return wrapped.getRole();
-  }
-
-  public boolean isSetEnvironment() {
-    return wrapped.isSetEnvironment();
-  }
-
-  public String getEnvironment() {
-    return wrapped.getEnvironment();
-  }
-
-  public boolean isSetName() {
-    return wrapped.isSetName();
-  }
-
-  public String getName() {
-    return wrapped.getName();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof IJobKey)) {
-      return false;
-    }
-    IJobKey other = (IJobKey) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILimitConstraint.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILimitConstraint.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILimitConstraint.java
deleted file mode 100644
index 2843794..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILimitConstraint.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.LimitConstraint;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class ILimitConstraint {
-  private final LimitConstraint wrapped;
-
-  private ILimitConstraint(LimitConstraint wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-  }
-
-  static ILimitConstraint buildNoCopy(LimitConstraint wrapped) {
-    return new ILimitConstraint(wrapped);
-  }
-
-  public static ILimitConstraint build(LimitConstraint wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<ILimitConstraint, LimitConstraint> TO_BUILDER =
-      new Function<ILimitConstraint, LimitConstraint>() {
-        @Override
-        public LimitConstraint apply(ILimitConstraint input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<LimitConstraint, ILimitConstraint> FROM_BUILDER =
-      new Function<LimitConstraint, ILimitConstraint>() {
-        @Override
-        public ILimitConstraint apply(LimitConstraint input) {
-          return new ILimitConstraint(input);
-        }
-      };
-
-  public static ImmutableList<LimitConstraint> toBuildersList(Iterable<ILimitConstraint> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<ILimitConstraint> listFromBuilders(Iterable<LimitConstraint> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<LimitConstraint> toBuildersSet(Iterable<ILimitConstraint> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<ILimitConstraint> setFromBuilders(Iterable<LimitConstraint> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public LimitConstraint newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetLimit() {
-    return wrapped.isSetLimit();
-  }
-
-  public int getLimit() {
-    return wrapped.getLimit();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof ILimitConstraint)) {
-      return false;
-    }
-    ILimitConstraint other = (ILimitConstraint) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILock.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILock.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILock.java
deleted file mode 100644
index 829458f..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILock.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.Lock;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class ILock {
-  private final Lock wrapped;
-  private final ILockKey key;
-
-  private ILock(Lock wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-    this.key = !wrapped.isSetKey()
-        ? null
-        : ILockKey.buildNoCopy(wrapped.getKey());
-  }
-
-  static ILock buildNoCopy(Lock wrapped) {
-    return new ILock(wrapped);
-  }
-
-  public static ILock build(Lock wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<ILock, Lock> TO_BUILDER =
-      new Function<ILock, Lock>() {
-        @Override
-        public Lock apply(ILock input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<Lock, ILock> FROM_BUILDER =
-      new Function<Lock, ILock>() {
-        @Override
-        public ILock apply(Lock input) {
-          return new ILock(input);
-        }
-      };
-
-  public static ImmutableList<Lock> toBuildersList(Iterable<ILock> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<ILock> listFromBuilders(Iterable<Lock> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<Lock> toBuildersSet(Iterable<ILock> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<ILock> setFromBuilders(Iterable<Lock> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public Lock newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetKey() {
-    return wrapped.isSetKey();
-  }
-
-  public ILockKey getKey() {
-    return key;
-  }
-
-  public boolean isSetToken() {
-    return wrapped.isSetToken();
-  }
-
-  public String getToken() {
-    return wrapped.getToken();
-  }
-
-  public boolean isSetUser() {
-    return wrapped.isSetUser();
-  }
-
-  public String getUser() {
-    return wrapped.getUser();
-  }
-
-  public boolean isSetTimestampMs() {
-    return wrapped.isSetTimestampMs();
-  }
-
-  public long getTimestampMs() {
-    return wrapped.getTimestampMs();
-  }
-
-  public boolean isSetMessage() {
-    return wrapped.isSetMessage();
-  }
-
-  public String getMessage() {
-    return wrapped.getMessage();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof ILock)) {
-      return false;
-    }
-    ILock other = (ILock) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILockKey.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILockKey.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILockKey.java
deleted file mode 100644
index 2abc745..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ILockKey.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.LockKey;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class ILockKey {
-  private final LockKey wrapped;
-
-  private ILockKey(LockKey wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-  }
-
-  static ILockKey buildNoCopy(LockKey wrapped) {
-    return new ILockKey(wrapped);
-  }
-
-  public static ILockKey build(LockKey wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<ILockKey, LockKey> TO_BUILDER =
-      new Function<ILockKey, LockKey>() {
-        @Override
-        public LockKey apply(ILockKey input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<LockKey, ILockKey> FROM_BUILDER =
-      new Function<LockKey, ILockKey>() {
-        @Override
-        public ILockKey apply(LockKey input) {
-          return new ILockKey(input);
-        }
-      };
-
-  public static ImmutableList<LockKey> toBuildersList(Iterable<ILockKey> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<ILockKey> listFromBuilders(Iterable<LockKey> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<LockKey> toBuildersSet(Iterable<ILockKey> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<ILockKey> setFromBuilders(Iterable<LockKey> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public LockKey newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public LockKey._Fields getSetField() {
-    return wrapped.getSetField();
-  }
-
-  public IJobKey getJob() {
-    return IJobKey.build(wrapped.getJob());
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof ILockKey)) {
-      return false;
-    }
-    ILockKey other = (ILockKey) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/IPackage.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IPackage.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/IPackage.java
deleted file mode 100644
index 70b2b25..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IPackage.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.Package;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class IPackage {
-  private final Package wrapped;
-
-  private IPackage(Package wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-  }
-
-  static IPackage buildNoCopy(Package wrapped) {
-    return new IPackage(wrapped);
-  }
-
-  public static IPackage build(Package wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<IPackage, Package> TO_BUILDER =
-      new Function<IPackage, Package>() {
-        @Override
-        public Package apply(IPackage input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<Package, IPackage> FROM_BUILDER =
-      new Function<Package, IPackage>() {
-        @Override
-        public IPackage apply(Package input) {
-          return new IPackage(input);
-        }
-      };
-
-  public static ImmutableList<Package> toBuildersList(Iterable<IPackage> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<IPackage> listFromBuilders(Iterable<Package> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<Package> toBuildersSet(Iterable<IPackage> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<IPackage> setFromBuilders(Iterable<Package> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public Package newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetRole() {
-    return wrapped.isSetRole();
-  }
-
-  public String getRole() {
-    return wrapped.getRole();
-  }
-
-  public boolean isSetName() {
-    return wrapped.isSetName();
-  }
-
-  public String getName() {
-    return wrapped.getName();
-  }
-
-  public boolean isSetVersion() {
-    return wrapped.isSetVersion();
-  }
-
-  public int getVersion() {
-    return wrapped.getVersion();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof IPackage)) {
-      return false;
-    }
-    IPackage other = (IPackage) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/IQuota.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IQuota.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/IQuota.java
deleted file mode 100644
index 349cdde..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IQuota.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.Quota;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class IQuota {
-  private final Quota wrapped;
-
-  private IQuota(Quota wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-  }
-
-  static IQuota buildNoCopy(Quota wrapped) {
-    return new IQuota(wrapped);
-  }
-
-  public static IQuota build(Quota wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<IQuota, Quota> TO_BUILDER =
-      new Function<IQuota, Quota>() {
-        @Override
-        public Quota apply(IQuota input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<Quota, IQuota> FROM_BUILDER =
-      new Function<Quota, IQuota>() {
-        @Override
-        public IQuota apply(Quota input) {
-          return new IQuota(input);
-        }
-      };
-
-  public static ImmutableList<Quota> toBuildersList(Iterable<IQuota> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<IQuota> listFromBuilders(Iterable<Quota> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<Quota> toBuildersSet(Iterable<IQuota> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<IQuota> setFromBuilders(Iterable<Quota> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public Quota newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetNumCpus() {
-    return wrapped.isSetNumCpus();
-  }
-
-  public double getNumCpus() {
-    return wrapped.getNumCpus();
-  }
-
-  public boolean isSetRamMb() {
-    return wrapped.isSetRamMb();
-  }
-
-  public long getRamMb() {
-    return wrapped.getRamMb();
-  }
-
-  public boolean isSetDiskMb() {
-    return wrapped.isSetDiskMb();
-  }
-
-  public long getDiskMb() {
-    return wrapped.getDiskMb();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof IQuota)) {
-      return false;
-    }
-    IQuota other = (IQuota) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/IScheduledTask.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IScheduledTask.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/IScheduledTask.java
deleted file mode 100644
index ec58a40..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IScheduledTask.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import java.util.List;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.ScheduleStatus;
-import com.twitter.aurora.gen.ScheduledTask;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class IScheduledTask {
-  private final ScheduledTask wrapped;
-  private final IAssignedTask assignedTask;
-  private final ImmutableList<ITaskEvent> taskEvents;
-
-  private IScheduledTask(ScheduledTask wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-    this.assignedTask = !wrapped.isSetAssignedTask()
-        ? null
-        : IAssignedTask.buildNoCopy(wrapped.getAssignedTask());
-    this.taskEvents = !wrapped.isSetTaskEvents()
-        ? ImmutableList.<ITaskEvent>of()
-        : FluentIterable.from(wrapped.getTaskEvents())
-              .transform(ITaskEvent.FROM_BUILDER)
-              .toList();
-  }
-
-  static IScheduledTask buildNoCopy(ScheduledTask wrapped) {
-    return new IScheduledTask(wrapped);
-  }
-
-  public static IScheduledTask build(ScheduledTask wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<IScheduledTask, ScheduledTask> TO_BUILDER =
-      new Function<IScheduledTask, ScheduledTask>() {
-        @Override
-        public ScheduledTask apply(IScheduledTask input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<ScheduledTask, IScheduledTask> FROM_BUILDER =
-      new Function<ScheduledTask, IScheduledTask>() {
-        @Override
-        public IScheduledTask apply(ScheduledTask input) {
-          return new IScheduledTask(input);
-        }
-      };
-
-  public static ImmutableList<ScheduledTask> toBuildersList(Iterable<IScheduledTask> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<IScheduledTask> listFromBuilders(Iterable<ScheduledTask> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<ScheduledTask> toBuildersSet(Iterable<IScheduledTask> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<IScheduledTask> setFromBuilders(Iterable<ScheduledTask> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public ScheduledTask newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetAssignedTask() {
-    return wrapped.isSetAssignedTask();
-  }
-
-  public IAssignedTask getAssignedTask() {
-    return assignedTask;
-  }
-
-  public ScheduleStatus getStatus() {
-    return wrapped.getStatus();
-  }
-
-  public boolean isSetFailureCount() {
-    return wrapped.isSetFailureCount();
-  }
-
-  public int getFailureCount() {
-    return wrapped.getFailureCount();
-  }
-
-  public boolean isSetTaskEvents() {
-    return wrapped.isSetTaskEvents();
-  }
-
-  public List<ITaskEvent> getTaskEvents() {
-    return taskEvents;
-  }
-
-  public boolean isSetAncestorId() {
-    return wrapped.isSetAncestorId();
-  }
-
-  public String getAncestorId() {
-    return wrapped.getAncestorId();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof IScheduledTask)) {
-      return false;
-    }
-    IScheduledTask other = (IScheduledTask) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskConfig.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskConfig.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskConfig.java
deleted file mode 100644
index 7fa223d..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskConfig.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import java.util.Map;
-import java.util.Set;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.TaskConfig;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class ITaskConfig {
-  private final TaskConfig wrapped;
-  private final IIdentity owner;
-  private final ImmutableSet<IConstraint> constraints;
-  private final ImmutableSet<String> requestedPorts;
-  private final ImmutableMap<String, String> taskLinks;
-  private final ImmutableSet<IPackage> packages;
-  private final IExecutorConfig executorConfig;
-
-  private ITaskConfig(TaskConfig wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-    this.owner = !wrapped.isSetOwner()
-        ? null
-        : IIdentity.buildNoCopy(wrapped.getOwner());
-    this.constraints = !wrapped.isSetConstraints()
-        ? ImmutableSet.<IConstraint>of()
-        : FluentIterable.from(wrapped.getConstraints())
-              .transform(IConstraint.FROM_BUILDER)
-              .toSet();
-    this.requestedPorts = !wrapped.isSetRequestedPorts()
-        ? ImmutableSet.<String>of()
-        : ImmutableSet.copyOf(wrapped.getRequestedPorts());
-    this.taskLinks = !wrapped.isSetTaskLinks()
-        ? ImmutableMap.<String, String>of()
-        : ImmutableMap.copyOf(wrapped.getTaskLinks());
-    this.packages = !wrapped.isSetPackages()
-        ? ImmutableSet.<IPackage>of()
-        : FluentIterable.from(wrapped.getPackages())
-              .transform(IPackage.FROM_BUILDER)
-              .toSet();
-    this.executorConfig = !wrapped.isSetExecutorConfig()
-        ? null
-        : IExecutorConfig.buildNoCopy(wrapped.getExecutorConfig());
-  }
-
-  static ITaskConfig buildNoCopy(TaskConfig wrapped) {
-    return new ITaskConfig(wrapped);
-  }
-
-  public static ITaskConfig build(TaskConfig wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<ITaskConfig, TaskConfig> TO_BUILDER =
-      new Function<ITaskConfig, TaskConfig>() {
-        @Override
-        public TaskConfig apply(ITaskConfig input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<TaskConfig, ITaskConfig> FROM_BUILDER =
-      new Function<TaskConfig, ITaskConfig>() {
-        @Override
-        public ITaskConfig apply(TaskConfig input) {
-          return new ITaskConfig(input);
-        }
-      };
-
-  public static ImmutableList<TaskConfig> toBuildersList(Iterable<ITaskConfig> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<ITaskConfig> listFromBuilders(Iterable<TaskConfig> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<TaskConfig> toBuildersSet(Iterable<ITaskConfig> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<ITaskConfig> setFromBuilders(Iterable<TaskConfig> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public TaskConfig newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetOwner() {
-    return wrapped.isSetOwner();
-  }
-
-  public IIdentity getOwner() {
-    return owner;
-  }
-
-  public boolean isSetEnvironment() {
-    return wrapped.isSetEnvironment();
-  }
-
-  public String getEnvironment() {
-    return wrapped.getEnvironment();
-  }
-
-  public boolean isSetJobName() {
-    return wrapped.isSetJobName();
-  }
-
-  public String getJobName() {
-    return wrapped.getJobName();
-  }
-
-  public boolean isSetIsService() {
-    return wrapped.isSetIsService();
-  }
-
-  public boolean isIsService() {
-    return wrapped.isIsService();
-  }
-
-  public boolean isSetNumCpus() {
-    return wrapped.isSetNumCpus();
-  }
-
-  public double getNumCpus() {
-    return wrapped.getNumCpus();
-  }
-
-  public boolean isSetRamMb() {
-    return wrapped.isSetRamMb();
-  }
-
-  public long getRamMb() {
-    return wrapped.getRamMb();
-  }
-
-  public boolean isSetDiskMb() {
-    return wrapped.isSetDiskMb();
-  }
-
-  public long getDiskMb() {
-    return wrapped.getDiskMb();
-  }
-
-  public boolean isSetPriority() {
-    return wrapped.isSetPriority();
-  }
-
-  public int getPriority() {
-    return wrapped.getPriority();
-  }
-
-  public boolean isSetMaxTaskFailures() {
-    return wrapped.isSetMaxTaskFailures();
-  }
-
-  public int getMaxTaskFailures() {
-    return wrapped.getMaxTaskFailures();
-  }
-
-  public boolean isSetInstanceIdDEPRECATED() {
-    return wrapped.isSetInstanceIdDEPRECATED();
-  }
-
-  public int getInstanceIdDEPRECATED() {
-    return wrapped.getInstanceIdDEPRECATED();
-  }
-
-  public boolean isSetProduction() {
-    return wrapped.isSetProduction();
-  }
-
-  public boolean isProduction() {
-    return wrapped.isProduction();
-  }
-
-  public boolean isSetConstraints() {
-    return wrapped.isSetConstraints();
-  }
-
-  public Set<IConstraint> getConstraints() {
-    return constraints;
-  }
-
-  public boolean isSetRequestedPorts() {
-    return wrapped.isSetRequestedPorts();
-  }
-
-  public Set<String> getRequestedPorts() {
-    return requestedPorts;
-  }
-
-  public boolean isSetTaskLinks() {
-    return wrapped.isSetTaskLinks();
-  }
-
-  public Map<String, String> getTaskLinks() {
-    return taskLinks;
-  }
-
-  public boolean isSetContactEmail() {
-    return wrapped.isSetContactEmail();
-  }
-
-  public String getContactEmail() {
-    return wrapped.getContactEmail();
-  }
-
-  public boolean isSetPackages() {
-    return wrapped.isSetPackages();
-  }
-
-  public Set<IPackage> getPackages() {
-    return packages;
-  }
-
-  public boolean isSetExecutorConfig() {
-    return wrapped.isSetExecutorConfig();
-  }
-
-  public IExecutorConfig getExecutorConfig() {
-    return executorConfig;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof ITaskConfig)) {
-      return false;
-    }
-    ITaskConfig other = (ITaskConfig) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskConstraint.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskConstraint.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskConstraint.java
deleted file mode 100644
index 9807008..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskConstraint.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.TaskConstraint;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class ITaskConstraint {
-  private final TaskConstraint wrapped;
-
-  private ITaskConstraint(TaskConstraint wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-  }
-
-  static ITaskConstraint buildNoCopy(TaskConstraint wrapped) {
-    return new ITaskConstraint(wrapped);
-  }
-
-  public static ITaskConstraint build(TaskConstraint wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<ITaskConstraint, TaskConstraint> TO_BUILDER =
-      new Function<ITaskConstraint, TaskConstraint>() {
-        @Override
-        public TaskConstraint apply(ITaskConstraint input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<TaskConstraint, ITaskConstraint> FROM_BUILDER =
-      new Function<TaskConstraint, ITaskConstraint>() {
-        @Override
-        public ITaskConstraint apply(TaskConstraint input) {
-          return new ITaskConstraint(input);
-        }
-      };
-
-  public static ImmutableList<TaskConstraint> toBuildersList(Iterable<ITaskConstraint> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<ITaskConstraint> listFromBuilders(Iterable<TaskConstraint> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<TaskConstraint> toBuildersSet(Iterable<ITaskConstraint> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<ITaskConstraint> setFromBuilders(Iterable<TaskConstraint> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public TaskConstraint newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public TaskConstraint._Fields getSetField() {
-    return wrapped.getSetField();
-  }
-
-  public IValueConstraint getValue() {
-    return IValueConstraint.build(wrapped.getValue());
-  }
-
-  public ILimitConstraint getLimit() {
-    return ILimitConstraint.build(wrapped.getLimit());
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof ITaskConstraint)) {
-      return false;
-    }
-    ITaskConstraint other = (ITaskConstraint) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskEvent.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskEvent.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskEvent.java
deleted file mode 100644
index 5e1de07..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/ITaskEvent.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.ScheduleStatus;
-import com.twitter.aurora.gen.TaskEvent;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class ITaskEvent {
-  private final TaskEvent wrapped;
-
-  private ITaskEvent(TaskEvent wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-  }
-
-  static ITaskEvent buildNoCopy(TaskEvent wrapped) {
-    return new ITaskEvent(wrapped);
-  }
-
-  public static ITaskEvent build(TaskEvent wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<ITaskEvent, TaskEvent> TO_BUILDER =
-      new Function<ITaskEvent, TaskEvent>() {
-        @Override
-        public TaskEvent apply(ITaskEvent input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<TaskEvent, ITaskEvent> FROM_BUILDER =
-      new Function<TaskEvent, ITaskEvent>() {
-        @Override
-        public ITaskEvent apply(TaskEvent input) {
-          return new ITaskEvent(input);
-        }
-      };
-
-  public static ImmutableList<TaskEvent> toBuildersList(Iterable<ITaskEvent> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<ITaskEvent> listFromBuilders(Iterable<TaskEvent> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<TaskEvent> toBuildersSet(Iterable<ITaskEvent> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<ITaskEvent> setFromBuilders(Iterable<TaskEvent> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public TaskEvent newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetTimestamp() {
-    return wrapped.isSetTimestamp();
-  }
-
-  public long getTimestamp() {
-    return wrapped.getTimestamp();
-  }
-
-  public ScheduleStatus getStatus() {
-    return wrapped.getStatus();
-  }
-
-  public boolean isSetMessage() {
-    return wrapped.isSetMessage();
-  }
-
-  public String getMessage() {
-    return wrapped.getMessage();
-  }
-
-  public boolean isSetScheduler() {
-    return wrapped.isSetScheduler();
-  }
-
-  public String getScheduler() {
-    return wrapped.getScheduler();
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof ITaskEvent)) {
-      return false;
-    }
-    ITaskEvent other = (ITaskEvent) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/java/com/twitter/aurora/scheduler/storage/entities/IValueConstraint.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IValueConstraint.java b/src/main/java/com/twitter/aurora/scheduler/storage/entities/IValueConstraint.java
deleted file mode 100644
index d380770..0000000
--- a/src/main/java/com/twitter/aurora/scheduler/storage/entities/IValueConstraint.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed 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.
- */
-package com.twitter.aurora.scheduler.storage.entities;
-
-import java.util.Set;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-import com.twitter.aurora.gen.ValueConstraint;
-
-/**
- * An immutable wrapper class.
- * <p>
- * This code is auto-generated, and should not be directly modified.
- * <p>
- * Yes, you're right, it shouldn't be checked in.  We'll get there, I promise.
- */
-public final class IValueConstraint {
-  private final ValueConstraint wrapped;
-  private final ImmutableSet<String> values;
-
-  private IValueConstraint(ValueConstraint wrapped) {
-    this.wrapped = Preconditions.checkNotNull(wrapped);
-    this.values = !wrapped.isSetValues()
-        ? ImmutableSet.<String>of()
-        : ImmutableSet.copyOf(wrapped.getValues());
-  }
-
-  static IValueConstraint buildNoCopy(ValueConstraint wrapped) {
-    return new IValueConstraint(wrapped);
-  }
-
-  public static IValueConstraint build(ValueConstraint wrapped) {
-    return buildNoCopy(wrapped.deepCopy());
-  }
-
-  public static final Function<IValueConstraint, ValueConstraint> TO_BUILDER =
-      new Function<IValueConstraint, ValueConstraint>() {
-        @Override
-        public ValueConstraint apply(IValueConstraint input) {
-          return input.newBuilder();
-        }
-      };
-
-  public static final Function<ValueConstraint, IValueConstraint> FROM_BUILDER =
-      new Function<ValueConstraint, IValueConstraint>() {
-        @Override
-        public IValueConstraint apply(ValueConstraint input) {
-          return new IValueConstraint(input);
-        }
-      };
-
-  public static ImmutableList<ValueConstraint> toBuildersList(Iterable<IValueConstraint> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toList();
-  }
-
-  public static ImmutableList<IValueConstraint> listFromBuilders(Iterable<ValueConstraint> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toList();
-  }
-
-  public static ImmutableSet<ValueConstraint> toBuildersSet(Iterable<IValueConstraint> w) {
-    return FluentIterable.from(w).transform(TO_BUILDER).toSet();
-  }
-
-  public static ImmutableSet<IValueConstraint> setFromBuilders(Iterable<ValueConstraint> b) {
-    return FluentIterable.from(b).transform(FROM_BUILDER).toSet();
-  }
-
-  public ValueConstraint newBuilder() {
-    return wrapped.deepCopy();
-  }
-
-  public boolean isSetNegated() {
-    return wrapped.isSetNegated();
-  }
-
-  public boolean isNegated() {
-    return wrapped.isNegated();
-  }
-
-  public boolean isSetValues() {
-    return wrapped.isSetValues();
-  }
-
-  public Set<String> getValues() {
-    return values;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof IValueConstraint)) {
-      return false;
-    }
-    IValueConstraint other = (IValueConstraint) o;
-    return wrapped.equals(other.wrapped);
-  }
-
-  @Override
-  public int hashCode() {
-    return wrapped.hashCode();
-  }
-
-  @Override
-  public String toString() {
-    return wrapped.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/87047365/src/main/python/twitter/aurora/tools/java/organize_imports.py
----------------------------------------------------------------------
diff --git a/src/main/python/twitter/aurora/tools/java/organize_imports.py b/src/main/python/twitter/aurora/tools/java/organize_imports.py
new file mode 100644
index 0000000..48a0821
--- /dev/null
+++ b/src/main/python/twitter/aurora/tools/java/organize_imports.py
@@ -0,0 +1,130 @@
+#!/bin/env python
+'''
+Organizes a java source file's import statements in a way that pleases Twitter's checkstyle
+configuration.
+This expects exactly one argument: the name of the file to modify with preferred import
+ordering.
+'''
+
+from __future__ import print_function
+
+import re
+import sys
+from collections import defaultdict
+
+
+IMPORT_RE = re.compile('import(?: static)? (.*);')
+def get_group(import_statement):
+  matcher = IMPORT_RE.match(import_statement)
+  assert matcher, 'Could not parse import statement: %s' % import_statement
+  class_name = matcher.group(1)
+  if class_name.startswith('com.twitter'):
+    group = 'com.twitter'
+  else:
+    group = class_name.split('.')[0]
+  return group
+
+
+def index_by_group(import_statements):
+  groups = defaultdict(list)
+  for line in import_statements:
+    groups[get_group(line)].append(line)
+  return groups
+
+
+IMPORT_CLASS_RE = re.compile(
+    'import(?: static)? (?P<outer>[^A-Z]*[A-Z]\w+)(?:\.(?P<inners>[\w][^;]*))?')
+def get_all_group_lines(import_groups):
+  if not import_groups:
+    return []
+
+  def get_group_lines(group):
+    def comparator(x, y):
+      # These shenanigans are used to properly order imports for inner classes.
+      # So we get ordering like:
+      # import com.foo.Bar;
+      # import com.foo.Bar.Baz;
+      # (this is not lexicographical, so normal sort won't suffice)
+      x_m = IMPORT_CLASS_RE.match(x)
+      y_m = IMPORT_CLASS_RE.match(y)
+      if x_m.group('outer') == y_m.group('outer'):
+        return cmp(x_m.group('inners'), y_m.group('inners'))
+      else:
+        return cmp(x, y)
+    lines = sorted(import_groups[group], comparator)
+    lines.append('')
+    return lines 
+
+  all_lines = []
+  explicit_groups = ['java', 'javax', 'scala', 'com', 'net', 'org', 'com.twitter']
+  for group in explicit_groups:
+    if group in import_groups:
+      all_lines += get_group_lines(group)
+
+  # Gather remaining groups.
+  remaining_groups = sorted(set(import_groups.keys()) - set(explicit_groups))
+  for group in remaining_groups:
+    all_lines += get_group_lines(group)
+  return all_lines
+
+
+if len(sys.argv) != 2:
+  print('usage: %s FILE' % sys.argv[0])
+  sys.exit(1)
+
+BEFORE_IMPORTS = 'before_imports'
+IMPORTS = 'imports'
+STATIC_IMPORTS = 'static_imports'
+AFTER_IMPORTS = 'after_imports'
+
+print('Organizing imports in %s' % sys.argv[1])
+lines_before_imports = []
+import_lines = []
+static_import_lines = []
+lines_after_imports = []
+with open(sys.argv[1], 'r') as f:
+  position = BEFORE_IMPORTS
+  for line in f:
+    line = line.rstrip()
+    if position == BEFORE_IMPORTS:
+      if line.startswith('import'):
+        position = IMPORTS
+      else:
+        lines_before_imports.append(line)
+    if position == IMPORTS:
+      if line.startswith('import static'):
+        position = STATIC_IMPORTS
+      elif line.startswith('import'):
+        import_lines.append(line)
+      elif line.strip():
+        position = AFTER_IMPORTS
+    if position == STATIC_IMPORTS:
+      if line.startswith('import static'):
+        static_import_lines.append(line)
+      elif line.strip():
+        position = AFTER_IMPORTS
+    if position == AFTER_IMPORTS:
+      lines_after_imports.append(line)
+
+import_groups = index_by_group(import_lines)
+static_import_groups = index_by_group(static_import_lines)
+
+def ensure_line_padding(lines):
+  if lines and lines[-1] != '':
+    lines.append('')
+  return lines
+
+file_lines = lines_before_imports
+if import_groups:
+  ensure_line_padding(file_lines)
+  file_lines += get_all_group_lines(import_groups)
+if static_import_groups:
+  ensure_line_padding(file_lines)
+  file_lines += get_all_group_lines(static_import_groups)
+if lines_after_imports:
+  ensure_line_padding(file_lines)
+  file_lines += lines_after_imports
+
+with open(sys.argv[1], 'w') as f:
+  for line in file_lines:
+    print(line, file=f)


Mime
View raw message