/*******************************************************************************
 * Copyright 2017 julien@squidsolutions.com
 *
 * 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.squid.kraken.v4.model;

import java.beans.Expression;
import java.util.ArrayList;
import java.util.List;

import com.google.gson.annotations.SerializedName;

import io.swagger.annotations.ApiModelProperty;

/**
 * Attribute
 */

public class Attribute extends VersionedBase  {
	@SerializedName("id")
	private AttributePK id = null;

	@SerializedName("accessRights")
	private List<AccessRight> accessRights = new ArrayList<AccessRight>();

	@SerializedName("description")
	private String description = null;

	@SerializedName("expression")
	private Expression expression = null;

	@SerializedName("oid")
	private String oid = null;

	@SerializedName("objectType")
	private String objectType = null;

	@SerializedName("name")
	private String name = null;

	public Attribute id(AttributePK id) {
		this.id = id;
		return this;
	}

	/**
	 * The object Composite Id (Primary Key)
	 * @return id
	 **/
	@ApiModelProperty(example = "null", value = "The object Composite Id (Primary Key)")
	public AttributePK getId() {
		return id;
	}

	public void setId(AttributePK id) {
		this.id = id;
	}

	public Attribute accessRights(List<AccessRight> accessRights) {
		this.accessRights = accessRights;
		return this;
	}

	public Attribute addAccessRightsItem(AccessRight accessRightsItem) {
		this.accessRights.add(accessRightsItem);
		return this;
	}

	/**
	 * The ACL for this object
	 * @return accessRights
	 **/
	@ApiModelProperty(example = "null", value = "The ACL for this object")
	public List<AccessRight> getAccessRights() {
		return accessRights;
	}

	public void setAccessRights(List<AccessRight> accessRights) {
		this.accessRights = accessRights;
	}

	public Attribute description(String description) {
		this.description = description;
		return this;
	}

	/**
	 * Get description
	 * @return description
	 **/
	@ApiModelProperty(example = "null", value = "")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Attribute expression(Expression expression) {
		this.expression = expression;
		return this;
	}

	/**
	 * Get expression
	 * @return expression
	 **/
	@ApiModelProperty(example = "null", value = "")
	public Expression getExpression() {
		return expression;
	}

	public void setExpression(Expression expression) {
		this.expression = expression;
	}

	/**
	 * The Object Id
	 * @return oid
	 **/
	@ApiModelProperty(example = "null", value = "The Object Id")
	public String getOid() {
		return oid;
	}

	/**
	 * Get objectType
	 * @return objectType
	 **/
	@ApiModelProperty(example = "null", value = "")
	public String getObjectType() {
		return objectType;
	}

	public Attribute name(String name) {
		this.name = name;
		return this;
	}

	/**
	 * Get name
	 * @return name
	 **/
	@ApiModelProperty(example = "null", value = "")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}


@@ -798,38 +798,8 @@
 l;%0A%0A
-import java.beans.Expression;%0A
 impo
@@ -822,16 +822,16 @@
 ayList;%0A
+
 import j
@@ -1014,17 +1014,16 @@
 nedBase 
- 
 %7B%0A%09@Seri
@@ -1614,16 +1614,21 @@
 ry Key)%0A
+%09 * %0A
 %09 * @ret
@@ -2115,16 +2115,21 @@
  object%0A
+%09 * %0A
 %09 * @ret
@@ -2525,24 +2525,29 @@
 description%0A
+%09 * %0A
 %09 * @return 
@@ -2886,24 +2886,29 @@
  expression%0A
+%09 * %0A
 %09 * @return 
@@ -3146,16 +3146,21 @@
 ject Id%0A
+%09 * %0A
 %09 * @ret
@@ -3303,16 +3303,21 @@
 ectType%0A
+%09 * %0A
 %09 * @ret
@@ -3539,16 +3539,21 @@
 et name%0A
+%09 * %0A
 %09 * @ret
@@ -3722,11 +3722,10 @@
 me;%0A%09%7D%0A%0A
+
 %7D%0A
-%0A

Fix another Jackson issue