com.oneops.infoblox.model.host.Host Maven / Gradle / Ivy
package com.oneops.infoblox.model.host;
import com.google.auto.value.AutoValue;
import com.squareup.moshi.Json;
import com.squareup.moshi.JsonAdapter;
import com.squareup.moshi.Moshi;
import java.util.List;
import javax.annotation.Nullable;
/**
* DNS Host record.
*
* Note: There is no such thing as a Host record in the actual DNS specification. Host records
* are generally a logical construct in DDI (DNS, DHCP, and IPAM) solutions like Infoblox and
* others. They comprise various DNS record types (A, AAAA, PTR, CNAME, etc) and other metadata
* associated with a "host".
*
* @author Suresh G
* @see Host record and A record
*/
@AutoValue
public abstract class Host {
@Json(name = "_ref")
public abstract String ref();
@Json(name = "ipv4addrs")
public abstract List ipv4Addrs();
public abstract String name();
@Nullable
public abstract String view();
@Nullable
public abstract List aliases();
public static Host create(
String ref, List ipv4Addrs, String name, String view, List aliases) {
return new AutoValue_Host(ref, ipv4Addrs, name, view, aliases);
}
public static JsonAdapter jsonAdapter(Moshi moshi) {
return new AutoValue_Host.MoshiJsonAdapter(moshi);
}
}