All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.digitalocean.inputs.DnsRecordState Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing DigitalOcean cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.digitalocean.inputs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.digitalocean.enums.RecordType;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class DnsRecordState extends com.pulumi.resources.ResourceArgs {
public static final DnsRecordState Empty = new DnsRecordState();
/**
* The domain to add the record to.
*
*/
@Import(name="domain")
private @Nullable Output domain;
/**
* @return The domain to add the record to.
*
*/
public Optional> domain() {
return Optional.ofNullable(this.domain);
}
/**
* The flags of the record. Only valid when type is `CAA`. Must be between 0 and 255.
*
*/
@Import(name="flags")
private @Nullable Output flags;
/**
* @return The flags of the record. Only valid when type is `CAA`. Must be between 0 and 255.
*
*/
public Optional> flags() {
return Optional.ofNullable(this.flags);
}
/**
* The FQDN of the record
*
*/
@Import(name="fqdn")
private @Nullable Output fqdn;
/**
* @return The FQDN of the record
*
*/
public Optional> fqdn() {
return Optional.ofNullable(this.fqdn);
}
/**
* The hostname of the record. Use `{@literal @}` for records on domain's name itself.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return The hostname of the record. Use `{@literal @}` for records on domain's name itself.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535.
*
*/
@Import(name="port")
private @Nullable Output port;
/**
* @return The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535.
*
*/
public Optional> port() {
return Optional.ofNullable(this.port);
}
/**
* The priority of the record. Only valid when type is `MX` or `SRV`. Must be between 0 and 65535.
*
*/
@Import(name="priority")
private @Nullable Output priority;
/**
* @return The priority of the record. Only valid when type is `MX` or `SRV`. Must be between 0 and 65535.
*
*/
public Optional> priority() {
return Optional.ofNullable(this.priority);
}
/**
* The tag of the record. Only valid when type is `CAA`. Must be one of `issue`, `issuewild`, or `iodef`.
*
*/
@Import(name="tag")
private @Nullable Output tag;
/**
* @return The tag of the record. Only valid when type is `CAA`. Must be one of `issue`, `issuewild`, or `iodef`.
*
*/
public Optional> tag() {
return Optional.ofNullable(this.tag);
}
/**
* The time to live for the record, in seconds. Must be at least 0. Defaults to 1800.
*
*/
@Import(name="ttl")
private @Nullable Output ttl;
/**
* @return The time to live for the record, in seconds. Must be at least 0. Defaults to 1800.
*
*/
public Optional> ttl() {
return Optional.ofNullable(this.ttl);
}
/**
* The type of record. Must be one of `A`, `AAAA`, `CAA`, `CNAME`, `MX`, `NS`, `TXT`, or `SRV`.
*
*/
@Import(name="type")
private @Nullable Output> type;
/**
* @return The type of record. Must be one of `A`, `AAAA`, `CAA`, `CNAME`, `MX`, `NS`, `TXT`, or `SRV`.
*
*/
public Optional>> type() {
return Optional.ofNullable(this.type);
}
/**
* The value of the record.
*
*/
@Import(name="value")
private @Nullable Output value;
/**
* @return The value of the record.
*
*/
public Optional> value() {
return Optional.ofNullable(this.value);
}
/**
* The weight of the record. Only valid when type is `SRV`. Must be between 0 and 65535.
*
*/
@Import(name="weight")
private @Nullable Output weight;
/**
* @return The weight of the record. Only valid when type is `SRV`. Must be between 0 and 65535.
*
*/
public Optional> weight() {
return Optional.ofNullable(this.weight);
}
private DnsRecordState() {}
private DnsRecordState(DnsRecordState $) {
this.domain = $.domain;
this.flags = $.flags;
this.fqdn = $.fqdn;
this.name = $.name;
this.port = $.port;
this.priority = $.priority;
this.tag = $.tag;
this.ttl = $.ttl;
this.type = $.type;
this.value = $.value;
this.weight = $.weight;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(DnsRecordState defaults) {
return new Builder(defaults);
}
public static final class Builder {
private DnsRecordState $;
public Builder() {
$ = new DnsRecordState();
}
public Builder(DnsRecordState defaults) {
$ = new DnsRecordState(Objects.requireNonNull(defaults));
}
/**
* @param domain The domain to add the record to.
*
* @return builder
*
*/
public Builder domain(@Nullable Output domain) {
$.domain = domain;
return this;
}
/**
* @param domain The domain to add the record to.
*
* @return builder
*
*/
public Builder domain(String domain) {
return domain(Output.of(domain));
}
/**
* @param flags The flags of the record. Only valid when type is `CAA`. Must be between 0 and 255.
*
* @return builder
*
*/
public Builder flags(@Nullable Output flags) {
$.flags = flags;
return this;
}
/**
* @param flags The flags of the record. Only valid when type is `CAA`. Must be between 0 and 255.
*
* @return builder
*
*/
public Builder flags(Integer flags) {
return flags(Output.of(flags));
}
/**
* @param fqdn The FQDN of the record
*
* @return builder
*
*/
public Builder fqdn(@Nullable Output fqdn) {
$.fqdn = fqdn;
return this;
}
/**
* @param fqdn The FQDN of the record
*
* @return builder
*
*/
public Builder fqdn(String fqdn) {
return fqdn(Output.of(fqdn));
}
/**
* @param name The hostname of the record. Use `{@literal @}` for records on domain's name itself.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name The hostname of the record. Use `{@literal @}` for records on domain's name itself.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param port The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535.
*
* @return builder
*
*/
public Builder port(@Nullable Output port) {
$.port = port;
return this;
}
/**
* @param port The port of the record. Only valid when type is `SRV`. Must be between 1 and 65535.
*
* @return builder
*
*/
public Builder port(Integer port) {
return port(Output.of(port));
}
/**
* @param priority The priority of the record. Only valid when type is `MX` or `SRV`. Must be between 0 and 65535.
*
* @return builder
*
*/
public Builder priority(@Nullable Output priority) {
$.priority = priority;
return this;
}
/**
* @param priority The priority of the record. Only valid when type is `MX` or `SRV`. Must be between 0 and 65535.
*
* @return builder
*
*/
public Builder priority(Integer priority) {
return priority(Output.of(priority));
}
/**
* @param tag The tag of the record. Only valid when type is `CAA`. Must be one of `issue`, `issuewild`, or `iodef`.
*
* @return builder
*
*/
public Builder tag(@Nullable Output tag) {
$.tag = tag;
return this;
}
/**
* @param tag The tag of the record. Only valid when type is `CAA`. Must be one of `issue`, `issuewild`, or `iodef`.
*
* @return builder
*
*/
public Builder tag(String tag) {
return tag(Output.of(tag));
}
/**
* @param ttl The time to live for the record, in seconds. Must be at least 0. Defaults to 1800.
*
* @return builder
*
*/
public Builder ttl(@Nullable Output ttl) {
$.ttl = ttl;
return this;
}
/**
* @param ttl The time to live for the record, in seconds. Must be at least 0. Defaults to 1800.
*
* @return builder
*
*/
public Builder ttl(Integer ttl) {
return ttl(Output.of(ttl));
}
/**
* @param type The type of record. Must be one of `A`, `AAAA`, `CAA`, `CNAME`, `MX`, `NS`, `TXT`, or `SRV`.
*
* @return builder
*
*/
public Builder type(@Nullable Output> type) {
$.type = type;
return this;
}
/**
* @param type The type of record. Must be one of `A`, `AAAA`, `CAA`, `CNAME`, `MX`, `NS`, `TXT`, or `SRV`.
*
* @return builder
*
*/
public Builder type(Either type) {
return type(Output.of(type));
}
/**
* @param type The type of record. Must be one of `A`, `AAAA`, `CAA`, `CNAME`, `MX`, `NS`, `TXT`, or `SRV`.
*
* @return builder
*
*/
public Builder type(String type) {
return type(Either.ofLeft(type));
}
/**
* @param type The type of record. Must be one of `A`, `AAAA`, `CAA`, `CNAME`, `MX`, `NS`, `TXT`, or `SRV`.
*
* @return builder
*
*/
public Builder type(RecordType type) {
return type(Either.ofRight(type));
}
/**
* @param value The value of the record.
*
* @return builder
*
*/
public Builder value(@Nullable Output value) {
$.value = value;
return this;
}
/**
* @param value The value of the record.
*
* @return builder
*
*/
public Builder value(String value) {
return value(Output.of(value));
}
/**
* @param weight The weight of the record. Only valid when type is `SRV`. Must be between 0 and 65535.
*
* @return builder
*
*/
public Builder weight(@Nullable Output weight) {
$.weight = weight;
return this;
}
/**
* @param weight The weight of the record. Only valid when type is `SRV`. Must be between 0 and 65535.
*
* @return builder
*
*/
public Builder weight(Integer weight) {
return weight(Output.of(weight));
}
public DnsRecordState build() {
return $;
}
}
}