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

org.openstack4j.openstack.gbp.domain.GbpExternalPolicy Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package org.openstack4j.openstack.gbp.domain;

import java.util.List;

import org.openstack4j.model.gbp.ExternalPolicy;
import org.openstack4j.openstack.common.ListResult;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.google.common.base.Objects;
/**
 * Model implementation for External Policy
 * 
 * @author vinod borole
 */
@JsonRootName("external_policy")
public class GbpExternalPolicy implements ExternalPolicy{
    private static final long serialVersionUID = 1L;
    private String name;
    private String description;
    @JsonProperty("tenant_id")
    private String tenantId;
    private String id;
    @JsonProperty("consumed_policy_rule_sets")
    private List consumedPolicyRuleSets;
    @JsonProperty("provided_policy_rule_sets")
    private List providedPolicyRuleSets;
    @JsonProperty("external_segments")
    private List externalSegments;
    private Boolean shared;
    
    /**
     * {@inheritDoc}
     */
    @Override 
    public String getTenantId() {
        return tenantId;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void setTenantId(String tenantId) {
        this.tenantId=tenantId;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getName() {
        return name;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void setName(String name) {
        this.name=name;
    }

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

    /**
     * {@inheritDoc}
     */
    @Override
    public void setId(String id) {
        this.id=id;
    }
    
    /**
     * {@inheritDoc}
     */
    @Override
    public List getConsumedPolicyRuleSets() {
        return consumedPolicyRuleSets;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List getProvidedPolicyRuleSets() {
        return providedPolicyRuleSets;
    }


    /**
     * {@inheritDoc}
     */
    @Override
    public List getExternalSegments() {
        return externalSegments;
    }


    /**
     * {@inheritDoc}
     */
    @Override
    public String getDescription() {
        return description;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean isShared() {
        return this.shared == null ? false : shared;
    }


    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return Objects.toStringHelper(this).omitNullValues().add("name", name).add("tenantId", tenantId).add("externalSegments", externalSegments).add("id", id).add("description", description).add("shared", shared).add("consumedPolicyRuleSets", consumedPolicyRuleSets).add("providedPolicyRuleSets", providedPolicyRuleSets).toString();
    }
    
    public static class ExternalPolicies extends ListResult {

        private static final long serialVersionUID = 1L;

        @JsonProperty("external_policies")
        private List externalPolicys;

        @Override
        protected List value() {
            return externalPolicys;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy