com.gooddata.md.AttributeElements Maven / Gradle / Ivy
/*
* Copyright (C) 2007-2015, GoodData(R) Corporation. All rights reserved.
*/
package com.gooddata.md;
import static org.apache.commons.lang.Validate.notNull;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import org.springframework.web.util.UriTemplate;
import java.util.List;
/**
* Represents elements of attribute
*/
@JsonTypeName("attributeElements")
@JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME)
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
class AttributeElements {
static final String URI = Obj.OBJ_URI + "/elements";
static final UriTemplate TEMPLATE = new UriTemplate(URI);
private final List elements;
@JsonCreator
AttributeElements(@JsonProperty("elements") List elements) {
notNull(elements, "elements");
this.elements = elements;
}
public List getElements() {
return elements;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
AttributeElements that = (AttributeElements) o;
return !(elements != null ? !elements.equals(that.elements) : that.elements != null);
}
@Override
public int hashCode() {
return elements != null ? elements.hashCode() : 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy