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

com.huawei.openstack4j.openstack.senlin.domain.SenlinClusterPolicy Maven / Gradle / Ivy

/*******************************************************************************
 * 	Copyright 2016 ContainX and OpenStack4j                                          
 * 	                                                                                 
 * 	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.huawei.openstack4j.openstack.senlin.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.huawei.openstack4j.model.senlin.ClusterPolicy;
import com.huawei.openstack4j.openstack.common.ListResult;

import java.util.List;

/**
 * This is a model of a senlinCluster_policy. It uses Jackson annotations for
 * (de)serialization into JSON format
 * 
 * @author lion
 * 
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonRootName("cluster_policy")
public class SenlinClusterPolicy implements ClusterPolicy {
	private static final long serialVersionUID = 5451213592273429432L;

	@JsonProperty("cluster_id")
	private String clusterID;
	@JsonProperty("cluster_name")
	private String clusterName;
	@JsonProperty("enabled")
	private Boolean enabled;
	@JsonProperty("id")
	private String id;
	@JsonProperty("policy_id")
	private String policyID;
	@JsonProperty("policy_name")
	private String policyName;
	@JsonProperty("policy_type")
	private String policyType;

	@Override
	public String getId() {
		return id;
	}

	@Override
	public String getPolicyType() {
		return policyType;
	}

	@Override
	public String getClusterID() {
		return clusterID;
	}

	@Override
	public String getClusterName() {
		return clusterName;
	}

	@Override
	public Boolean getEnabled() {
		return enabled;
	}

	@Override
	public String getPolicyID() {
		return policyID;
	}

	@Override
	public String getPolicyName() {
		return policyName;
	}

	@Override
	public String toString() {
		return "SenlinClusterPolicy{" +
				"cluster_id='" + clusterID + '\'' +
				", cluster_name='" + clusterName + '\'' +
				", enabled='" + enabled + '\'' +
				", id='" + id + '\'' +
				", policy_id='" + policyID + '\'' +
				", policy_name='" + policyName + '\'' +
				", policy_type='" + policyType + '\'' +
				'}';
	}

	/**
	 * An inner class for representing lists of senlinCluster_policy
	 * 
	 * @author lion
	 * 
	 */
	public static class ClusterPolicy extends ListResult {
		private static final long serialVersionUID = 600661296207420793L;
		
		@JsonProperty("cluster_policies")
		private List list;

		protected List value() {
			return list;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy