blob: f7850b65fe3e25547f1aa364d235aee3121ffa61 [file] [log] [blame]
/*
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds 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.jclouds.vcloud.director.v1_5.domain;
import java.net.URI;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "RoleReference")
public class RoleReference extends Reference {
public static Builder<?> builder() {
return new ConcreteBuilder();
}
@Override
public Builder<?> toBuilder() {
return builder().fromRoleReference(this);
}
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
}
public static class Builder<B extends Builder<B>> extends Reference.Builder<B> {
@Override
public RoleReference build() {
return new RoleReference(this);
}
protected B fromRoleReference(RoleReference in) {
return fromReference(in);
}
}
public RoleReference(Builder<?> builder) {
super(builder);
}
public RoleReference(URI href, String name, String type) {
super(href, name, type);
}
protected RoleReference() {
// For JAXB
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
RoleReference that = RoleReference.class.cast(o);
return super.equals(that);
}
// NOTE hashcode inherited from Reference
}