// Path: common/src/main/java/org/apache/hms/common/entity/RestSource.java
// @XmlRootElement
// @XmlAccessorType(XmlAccessType.FIELD) 
// @XmlType(name="", propOrder = {})
// public abstract class RestSource {
// 
// }
// 
// Path: common/src/main/java/org/apache/hms/common/entity/cluster/MachineState.java
// @XmlRootElement
// @XmlAccessorType(XmlAccessType.FIELD)
// public static class StateEntry {
//   private static final int PRIME = 16777619;
//     
//   @XmlElement
//   @XmlJavaTypeAdapter(StateTypeAdapter.class)
//   protected StateType type;
//   @XmlElement
//   protected String name;
//   @XmlElement
//   @XmlJavaTypeAdapter(StatusAdapter.class)
//   protected Status status;
//     
//   public StateEntry(){
//   }
//     
//   public StateEntry(StateType type, String name, Status status) {
//     this.type = type;
//     this.name = name;
//     this.status = status;
//   }
//     
//   public StateType getType() {
//     return type;
//   }
//     
//   public String getName() {
//     return name;
//   }
//     
//   public Status getStatus() {
//     return status;
//   }
//     
//   public void setType(StateType type) {
//     this.type = type;
//   }
//     
//   public void setName(String name) {
//     this.name = name;
//   }
//     
//   public void setStatus(Status status) {
//     this.status = status;
//   }
//     
//   static boolean isEqual(Object a, Object b) {
//     return a == null ? b == null : a.equals(b);
//   }
// 
//   @Override
//   public boolean equals(Object obj) {
//     if (obj == this) {
//       return true;
//     }
//     if (obj instanceof StateEntry) {
//       StateEntry that = (StateEntry) obj;
//       return this.type == that.type
//           && isEqual(this.name, that.name);
//     }
//     return false;
//   }
//     
//   @Override
//   public int hashCode() {
//     int result = 1;
//     result = PRIME * result + ((type == null) ? 0 : type.hashCode());
//     result = PRIME * result + ((name == null) ? 0 : name.hashCode());
//     return result;
//   }
//     
//   public String toString() {
//     StringBuilder sb = new StringBuilder();
//     sb.append("(");
//     sb.append(type);
//     sb.append(":");
//     sb.append(name);
//     sb.append(":");
//     sb.append(status);
//     sb.append(")");
//     return sb.toString();
//   }
// }
// 
// Path: common/src/main/java/org/apache/hms/common/entity/manifest/Role.java
// public class Role extends RestSource {
//   @XmlAttribute
//   public String name;
//   @XmlElement(name="package")
//   private PackageInfo[] packages;
//   @XmlElement(name="host")
//   private String[] hosts;
//   
//   public String getName() {
//     return this.name;
//   }
//   
//   public PackageInfo[] getPackages() {
//     return this.packages;
//   }
//   
//   public String[] getHosts() {
//     return this.hosts;
//   }
//   
//   public void setName(String name) {
//     this.name = name;
//   }
//   
//   public void setPackages(PackageInfo[] packages) {
//     this.packages = packages;
//   }
//   
//   public void setHosts(String[] hosts) {
//     this.hosts = hosts;
//   }
// }


import org.apache.hms.common.entity.manifest.Role;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.hms.common.entity.RestSource;
import org.apache.hms.common.entity.cluster.MachineState.StateEntry;
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.hms.common.entity.action;




/**
 * Defines the list of states that a action depends on.
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD) 
@XmlType(name="", propOrder = {})
public class ActionDependency extends RestSource {
    @XmlElement
    protected List<String> hosts;
    @XmlElement
    protected List<StateEntry> states;
    @XmlElement
    protected Set<String> roles;
    
    public ActionDependency(){
    }
    
    public ActionDependency(Set<String> roles, List<StateEntry> states) {
      this.roles = roles;
// Path: common/src/main/java/org/apache/hms/common/entity/RestSource.java
// @XmlRootElement
// @XmlAccessorType(XmlAccessType.FIELD) 
// @XmlType(name="", propOrder = {})
// public abstract class RestSource {
// 
// }
// 
// Path: common/src/main/java/org/apache/hms/common/entity/cluster/MachineState.java
// @XmlRootElement
// @XmlAccessorType(XmlAccessType.FIELD)
// public static class StateEntry {
//   private static final int PRIME = 16777619;
//     
//   @XmlElement
//   @XmlJavaTypeAdapter(StateTypeAdapter.class)
//   protected StateType type;
//   @XmlElement
//   protected String name;
//   @XmlElement
//   @XmlJavaTypeAdapter(StatusAdapter.class)
//   protected Status status;
//     
//   public StateEntry(){
//   }
//     
//   public StateEntry(StateType type, String name, Status status) {
//     this.type = type;
//     this.name = name;
//     this.status = status;
//   }
//     
//   public StateType getType() {
//     return type;
//   }
//     
//   public String getName() {
//     return name;
//   }
//     
//   public Status getStatus() {
//     return status;
//   }
//     
//   public void setType(StateType type) {
//     this.type = type;
//   }
//     
//   public void setName(String name) {
//     this.name = name;
//   }
//     
//   public void setStatus(Status status) {
//     this.status = status;
//   }
//     
//   static boolean isEqual(Object a, Object b) {
//     return a == null ? b == null : a.equals(b);
//   }
// 
//   @Override
//   public boolean equals(Object obj) {
//     if (obj == this) {
//       return true;
//     }
//     if (obj instanceof StateEntry) {
//       StateEntry that = (StateEntry) obj;
//       return this.type == that.type
//           && isEqual(this.name, that.name);
//     }
//     return false;
//   }
//     
//   @Override
//   public int hashCode() {
//     int result = 1;
//     result = PRIME * result + ((type == null) ? 0 : type.hashCode());
//     result = PRIME * result + ((name == null) ? 0 : name.hashCode());
//     return result;
//   }
//     
//   public String toString() {
//     StringBuilder sb = new StringBuilder();
//     sb.append("(");
//     sb.append(type);
//     sb.append(":");
//     sb.append(name);
//     sb.append(":");
//     sb.append(status);
//     sb.append(")");
//     return sb.toString();
//   }
// }
// 
// Path: common/src/main/java/org/apache/hms/common/entity/manifest/Role.java
// public class Role extends RestSource {
//   @XmlAttribute
//   public String name;
//   @XmlElement(name="package")
//   private PackageInfo[] packages;
//   @XmlElement(name="host")
//   private String[] hosts;
//   
//   public String getName() {
//     return this.name;
//   }
//   
//   public PackageInfo[] getPackages() {
//     return this.packages;
//   }
//   
//   public String[] getHosts() {
//     return this.hosts;
//   }
//   
//   public void setName(String name) {
//     this.name = name;
//   }
//   
//   public void setPackages(PackageInfo[] packages) {
//     this.packages = packages;
//   }
//   
//   public void setHosts(String[] hosts) {
//     this.hosts = hosts;
//   }
// }


// Path: common/src/main/java/org/apache/hms/common/entity/action/ActionDependency.java
import org.apache.hms.common.entity.manifest.Role;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.hms.common.entity.RestSource;
import org.apache.hms.common.entity.cluster.MachineState.StateEntry;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.hms.common.entity.action;




/**
 * Defines the list of states that a action depends on.
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD) 
@XmlType(name="", propOrder = {})
public class ActionDependency extends RestSource {
    @XmlElement
    protected List<String> hosts;
    @XmlElement
    protected List<StateEntry> states;
    @XmlElement
    protected Set<String> roles;
    
    public ActionDependency(){
    }
    
    public ActionDependency(Set<String> roles, List<StateEntry> states) {
      this.roles = roles;
      this.states = states;