// GENERATED by tools/gen — DO NOT EDIT.
///|
// The selected constructor supplies the tag even when the source declares it
// optional on a referenced payload.
fn encode_inferred_tag(value : Json, key : String, tag : String) -> Json {
guard value is @json.Json::Object(fields) else {
abort("tagged payload must encode as an object")
}
let fields = fields.copy()
fields[key] = @json.Json::Json(tag)
@json.Json::object(fields)
}
///|
fn[T : @json.FromJson] required_field(
obj : Map[String, Json],
key : String,
path : @json.JsonPath,
) -> T raise @json.JsonDecodeError {
let field_path = path.add_key(key)
match obj.get(key) {
Option::None =>
raise @json.JsonDecodeError::JsonDecodeError(
(field_path, "required だが欠落: " + field_path.to_string()),
)
Option::Some(value) => @json.from_json(value, path=field_path)
}
}
///|
fn[T] nullable_presence(value : T?) -> @sdkjson.Presence[T] {
match value {
Option::Some(value) => @sdkjson.Presence::Value(value)
Option::None => @sdkjson.Presence::Null
}
}
///|
fn[T : @json.FromJson] decode_nullable_field(
obj : Map[String, Json],
key : String,
path : @json.JsonPath,
) -> T? raise @json.JsonDecodeError {
let raw : Json = required_field(obj, key, path)
match raw {
@json.Json::Null => Option::None
value => Option::Some(@json.from_json(value, path=path.add_key(key)))
}
}
///|
///
/// Settings for the DNS record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordSettings {
ipv4_only : Bool?
ipv6_only : Bool?
}
///|
pub extend DnsRecordSettings with Eq::{equal, not_equal}
///|
pub extend DnsRecordSettings with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordSettings with omitted optional fields absent.
pub fn DnsRecordSettings::new(
ipv4_only? : Bool,
ipv6_only? : Bool,
) -> DnsRecordSettings {
{ ipv4_only, ipv6_only, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordSettings with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordSettings with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("ipv4_only", self.ipv4_only)
.opt("ipv6_only", self.ipv6_only)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordSettings with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordSettings with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
ipv4_only: @sdkjson.opt_field(obj, "ipv4_only", path),
ipv6_only: @sdkjson.opt_field(obj, "ipv6_only", path),
}
}
///|
///
/// Generated representation of AAAARecord.
#derive(Eq, @debug.Debug)
pub(all) struct AAAARecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
private_routing : Bool?
type_ : String?
}
///|
pub extend AAAARecord with Eq::{equal, not_equal}
///|
pub extend AAAARecord with @debug.Debug::{to_repr}
///|
///
/// Creates a AAAARecord with omitted optional fields absent.
pub fn AAAARecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
private_routing? : Bool,
type_? : String,
) -> AAAARecord {
{
comment,
name,
proxied,
settings,
tags,
ttl,
content,
private_routing,
type_,
}
}
///|
///
/// Encodes this value as JSON.
pub extend AAAARecord with ToJson::{to_json}
///|
pub impl ToJson for AAAARecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("private_routing", self.private_routing)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend AAAARecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for AAAARecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
private_routing: @sdkjson.opt_field(obj, "private_routing", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of ARecord.
#derive(Eq, @debug.Debug)
pub(all) struct ARecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
private_routing : Bool?
type_ : String?
}
///|
pub extend ARecord with Eq::{equal, not_equal}
///|
pub extend ARecord with @debug.Debug::{to_repr}
///|
///
/// Creates a ARecord with omitted optional fields absent.
pub fn ARecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
private_routing? : Bool,
type_? : String,
) -> ARecord {
{
comment,
name,
proxied,
settings,
tags,
ttl,
content,
private_routing,
type_,
}
}
///|
///
/// Encodes this value as JSON.
pub extend ARecord with ToJson::{to_json}
///|
pub impl ToJson for ARecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("private_routing", self.private_routing)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend ARecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ARecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
private_routing: @sdkjson.opt_field(obj, "private_routing", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a CAA record.
#derive(Eq, @debug.Debug)
pub(all) struct CAARecordData {
flags : Int32?
tag : String?
value : String?
}
///|
pub extend CAARecordData with Eq::{equal, not_equal}
///|
pub extend CAARecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a CAARecordData with omitted optional fields absent.
pub fn CAARecordData::new(
flags? : Int32,
tag? : String,
value? : String,
) -> CAARecordData {
{ flags, tag, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend CAARecordData with ToJson::{to_json}
///|
pub impl ToJson for CAARecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("flags", self.flags)
.opt("tag", self.tag)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend CAARecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for CAARecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
flags: @sdkjson.opt_field(obj, "flags", path),
tag: @sdkjson.opt_field(obj, "tag", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Generated representation of CAARecord.
#derive(Eq, @debug.Debug)
pub(all) struct CAARecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : CAARecordData?
type_ : String?
}
///|
pub extend CAARecord with Eq::{equal, not_equal}
///|
pub extend CAARecord with @debug.Debug::{to_repr}
///|
///
/// Creates a CAARecord with omitted optional fields absent.
pub fn CAARecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : CAARecordData,
type_? : String,
) -> CAARecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend CAARecord with ToJson::{to_json}
///|
pub impl ToJson for CAARecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend CAARecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for CAARecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a CERT record.
#derive(Eq, @debug.Debug)
pub(all) struct CERTRecordData {
algorithm : Int32?
certificate : String?
key_tag : Int32?
type_ : Int32?
}
///|
pub extend CERTRecordData with Eq::{equal, not_equal}
///|
pub extend CERTRecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a CERTRecordData with omitted optional fields absent.
pub fn CERTRecordData::new(
algorithm? : Int32,
certificate? : String,
key_tag? : Int32,
type_? : Int32,
) -> CERTRecordData {
{ algorithm, certificate, key_tag, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend CERTRecordData with ToJson::{to_json}
///|
pub impl ToJson for CERTRecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("certificate", self.certificate)
.opt("key_tag", self.key_tag)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend CERTRecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for CERTRecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
certificate: @sdkjson.opt_field(obj, "certificate", path),
key_tag: @sdkjson.opt_field(obj, "key_tag", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of CERTRecord.
#derive(Eq, @debug.Debug)
pub(all) struct CERTRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : CERTRecordData?
type_ : String?
}
///|
pub extend CERTRecord with Eq::{equal, not_equal}
///|
pub extend CERTRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a CERTRecord with omitted optional fields absent.
pub fn CERTRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : CERTRecordData,
type_? : String,
) -> CERTRecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend CERTRecord with ToJson::{to_json}
///|
pub impl ToJson for CERTRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend CERTRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for CERTRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of CNAMERecordSettings.
#derive(Eq, @debug.Debug)
pub(all) struct CNAMERecordSettings {
flatten_cname : Bool?
}
///|
pub extend CNAMERecordSettings with Eq::{equal, not_equal}
///|
pub extend CNAMERecordSettings with @debug.Debug::{to_repr}
///|
///
/// Creates a CNAMERecordSettings with omitted optional fields absent.
pub fn CNAMERecordSettings::new(flatten_cname? : Bool) -> CNAMERecordSettings {
{ flatten_cname, }
}
///|
///
/// Encodes this value as JSON.
pub extend CNAMERecordSettings with ToJson::{to_json}
///|
pub impl ToJson for CNAMERecordSettings with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("flatten_cname", self.flatten_cname).build()
}
///|
///
/// Decodes this value from JSON.
pub extend CNAMERecordSettings with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for CNAMERecordSettings with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{ flatten_cname: @sdkjson.opt_field(obj, "flatten_cname", path), }
}
///|
///
/// Generated representation of CNAMERecord.
#derive(Eq, @debug.Debug)
pub(all) struct CNAMERecord {
comment : String?
name : String?
proxied : Bool?
settings : CNAMERecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
}
///|
pub extend CNAMERecord with Eq::{equal, not_equal}
///|
pub extend CNAMERecord with @debug.Debug::{to_repr}
///|
///
/// Creates a CNAMERecord with omitted optional fields absent.
pub fn CNAMERecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : CNAMERecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> CNAMERecord {
{ comment, name, proxied, settings, tags, ttl, content, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend CNAMERecord with ToJson::{to_json}
///|
pub impl ToJson for CNAMERecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend CNAMERecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for CNAMERecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a DNSKEY record.
#derive(Eq, @debug.Debug)
pub(all) struct DNSKEYRecordData {
algorithm : Int32?
flags : Int32?
protocol : Int32?
public_key : String?
}
///|
pub extend DNSKEYRecordData with Eq::{equal, not_equal}
///|
pub extend DNSKEYRecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a DNSKEYRecordData with omitted optional fields absent.
pub fn DNSKEYRecordData::new(
algorithm? : Int32,
flags? : Int32,
protocol? : Int32,
public_key? : String,
) -> DNSKEYRecordData {
{ algorithm, flags, protocol, public_key, }
}
///|
///
/// Encodes this value as JSON.
pub extend DNSKEYRecordData with ToJson::{to_json}
///|
pub impl ToJson for DNSKEYRecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("flags", self.flags)
.opt("protocol", self.protocol)
.opt("public_key", self.public_key)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DNSKEYRecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DNSKEYRecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
flags: @sdkjson.opt_field(obj, "flags", path),
protocol: @sdkjson.opt_field(obj, "protocol", path),
public_key: @sdkjson.opt_field(obj, "public_key", path),
}
}
///|
///
/// Generated representation of DNSKEYRecord.
#derive(Eq, @debug.Debug)
pub(all) struct DNSKEYRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : DNSKEYRecordData?
type_ : String?
}
///|
pub extend DNSKEYRecord with Eq::{equal, not_equal}
///|
pub extend DNSKEYRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a DNSKEYRecord with omitted optional fields absent.
pub fn DNSKEYRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : DNSKEYRecordData,
type_? : String,
) -> DNSKEYRecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend DNSKEYRecord with ToJson::{to_json}
///|
pub impl ToJson for DNSKEYRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DNSKEYRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DNSKEYRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a DS record.
#derive(Eq, @debug.Debug)
pub(all) struct DSRecordData {
algorithm : Int32?
digest : String?
digest_type : Int32?
key_tag : Int32?
}
///|
pub extend DSRecordData with Eq::{equal, not_equal}
///|
pub extend DSRecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a DSRecordData with omitted optional fields absent.
pub fn DSRecordData::new(
algorithm? : Int32,
digest? : String,
digest_type? : Int32,
key_tag? : Int32,
) -> DSRecordData {
{ algorithm, digest, digest_type, key_tag, }
}
///|
///
/// Encodes this value as JSON.
pub extend DSRecordData with ToJson::{to_json}
///|
pub impl ToJson for DSRecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("digest", self.digest)
.opt("digest_type", self.digest_type)
.opt("key_tag", self.key_tag)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DSRecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DSRecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
digest: @sdkjson.opt_field(obj, "digest", path),
digest_type: @sdkjson.opt_field(obj, "digest_type", path),
key_tag: @sdkjson.opt_field(obj, "key_tag", path),
}
}
///|
///
/// Generated representation of DSRecord.
#derive(Eq, @debug.Debug)
pub(all) struct DSRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : DSRecordData?
type_ : String?
}
///|
pub extend DSRecord with Eq::{equal, not_equal}
///|
pub extend DSRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a DSRecord with omitted optional fields absent.
pub fn DSRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : DSRecordData,
type_? : String,
) -> DSRecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend DSRecord with ToJson::{to_json}
///|
pub impl ToJson for DSRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DSRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DSRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a HTTPS record.
#derive(Eq, @debug.Debug)
pub(all) struct HTTPSRecordData {
priority : Int32?
target : String?
value : String?
}
///|
pub extend HTTPSRecordData with Eq::{equal, not_equal}
///|
pub extend HTTPSRecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a HTTPSRecordData with omitted optional fields absent.
pub fn HTTPSRecordData::new(
priority? : Int32,
target? : String,
value? : String,
) -> HTTPSRecordData {
{ priority, target, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend HTTPSRecordData with ToJson::{to_json}
///|
pub impl ToJson for HTTPSRecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("priority", self.priority)
.opt("target", self.target)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend HTTPSRecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for HTTPSRecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Generated representation of HTTPSRecord.
#derive(Eq, @debug.Debug)
pub(all) struct HTTPSRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : HTTPSRecordData?
type_ : String?
}
///|
pub extend HTTPSRecord with Eq::{equal, not_equal}
///|
pub extend HTTPSRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a HTTPSRecord with omitted optional fields absent.
pub fn HTTPSRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : HTTPSRecordData,
type_? : String,
) -> HTTPSRecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend HTTPSRecord with ToJson::{to_json}
///|
pub impl ToJson for HTTPSRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend HTTPSRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for HTTPSRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Latitude direction.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum LOCRecordDataLatDirection {
N
S
Unknown(String)
}
///|
pub extend LOCRecordDataLatDirection with Eq::{equal, not_equal}
///|
pub extend LOCRecordDataLatDirection with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend LOCRecordDataLatDirection with ToJson::{to_json}
///|
pub impl ToJson for LOCRecordDataLatDirection with fn to_json(self) {
let raw = match self {
LOCRecordDataLatDirection::N => "N"
LOCRecordDataLatDirection::S => "S"
LOCRecordDataLatDirection::Unknown(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend LOCRecordDataLatDirection with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for LOCRecordDataLatDirection with fn from_json(
value,
path,
) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"N" => Option::Some(LOCRecordDataLatDirection::N)
"S" => Option::Some(LOCRecordDataLatDirection::S)
_ => Option::None
}
},
raw => LOCRecordDataLatDirection::Unknown(raw),
)
}
///|
///
/// Longitude direction.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum LOCRecordDataLongDirection {
E
W
Unknown(String)
}
///|
pub extend LOCRecordDataLongDirection with Eq::{equal, not_equal}
///|
pub extend LOCRecordDataLongDirection with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend LOCRecordDataLongDirection with ToJson::{to_json}
///|
pub impl ToJson for LOCRecordDataLongDirection with fn to_json(self) {
let raw = match self {
LOCRecordDataLongDirection::E => "E"
LOCRecordDataLongDirection::W => "W"
LOCRecordDataLongDirection::Unknown(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend LOCRecordDataLongDirection with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for LOCRecordDataLongDirection with fn from_json(
value,
path,
) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"E" => Option::Some(LOCRecordDataLongDirection::E)
"W" => Option::Some(LOCRecordDataLongDirection::W)
_ => Option::None
}
},
raw => LOCRecordDataLongDirection::Unknown(raw),
)
}
///|
///
/// Components of a LOC record.
#derive(Eq, @debug.Debug)
pub(all) struct LOCRecordData {
altitude : Double?
lat_degrees : Int32?
lat_direction : LOCRecordDataLatDirection?
lat_minutes : Int32?
lat_seconds : Double?
long_degrees : Int32?
long_direction : LOCRecordDataLongDirection?
long_minutes : Int32?
long_seconds : Double?
precision_horz : Double?
precision_vert : Double?
size : Double?
}
///|
pub extend LOCRecordData with Eq::{equal, not_equal}
///|
pub extend LOCRecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a LOCRecordData with omitted optional fields absent.
pub fn LOCRecordData::new(
altitude? : Double,
lat_degrees? : Int32,
lat_direction? : LOCRecordDataLatDirection,
lat_minutes? : Int32,
lat_seconds? : Double,
long_degrees? : Int32,
long_direction? : LOCRecordDataLongDirection,
long_minutes? : Int32,
long_seconds? : Double,
precision_horz? : Double,
precision_vert? : Double,
size? : Double,
) -> LOCRecordData {
{
altitude,
lat_degrees,
lat_direction,
lat_minutes,
lat_seconds,
long_degrees,
long_direction,
long_minutes,
long_seconds,
precision_horz,
precision_vert,
size,
}
}
///|
///
/// Encodes this value as JSON.
pub extend LOCRecordData with ToJson::{to_json}
///|
pub impl ToJson for LOCRecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("altitude", self.altitude)
.opt("lat_degrees", self.lat_degrees)
.opt("lat_direction", self.lat_direction)
.opt("lat_minutes", self.lat_minutes)
.opt("lat_seconds", self.lat_seconds)
.opt("long_degrees", self.long_degrees)
.opt("long_direction", self.long_direction)
.opt("long_minutes", self.long_minutes)
.opt("long_seconds", self.long_seconds)
.opt("precision_horz", self.precision_horz)
.opt("precision_vert", self.precision_vert)
.opt("size", self.size)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend LOCRecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for LOCRecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
altitude: @sdkjson.opt_field(obj, "altitude", path),
lat_degrees: @sdkjson.opt_field(obj, "lat_degrees", path),
lat_direction: @sdkjson.opt_field(obj, "lat_direction", path),
lat_minutes: @sdkjson.opt_field(obj, "lat_minutes", path),
lat_seconds: @sdkjson.opt_field(obj, "lat_seconds", path),
long_degrees: @sdkjson.opt_field(obj, "long_degrees", path),
long_direction: @sdkjson.opt_field(obj, "long_direction", path),
long_minutes: @sdkjson.opt_field(obj, "long_minutes", path),
long_seconds: @sdkjson.opt_field(obj, "long_seconds", path),
precision_horz: @sdkjson.opt_field(obj, "precision_horz", path),
precision_vert: @sdkjson.opt_field(obj, "precision_vert", path),
size: @sdkjson.opt_field(obj, "size", path),
}
}
///|
///
/// Generated representation of LOCRecord.
#derive(Eq, @debug.Debug)
pub(all) struct LOCRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : LOCRecordData?
type_ : String?
}
///|
pub extend LOCRecord with Eq::{equal, not_equal}
///|
pub extend LOCRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a LOCRecord with omitted optional fields absent.
pub fn LOCRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : LOCRecordData,
type_? : String,
) -> LOCRecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend LOCRecord with ToJson::{to_json}
///|
pub impl ToJson for LOCRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend LOCRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for LOCRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of MXRecord.
#derive(Eq, @debug.Debug)
pub(all) struct MXRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
priority : Int32?
type_ : String?
}
///|
pub extend MXRecord with Eq::{equal, not_equal}
///|
pub extend MXRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a MXRecord with omitted optional fields absent.
pub fn MXRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
priority? : Int32,
type_? : String,
) -> MXRecord {
{ comment, name, proxied, settings, tags, ttl, content, priority, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend MXRecord with ToJson::{to_json}
///|
pub impl ToJson for MXRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("priority", self.priority)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend MXRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for MXRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
priority: @sdkjson.opt_field(obj, "priority", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a NAPTR record.
#derive(Eq, @debug.Debug)
pub(all) struct NAPTRRecordData {
flags : String?
order : Int32?
preference : Int32?
regex : String?
replacement : String?
service : String?
}
///|
pub extend NAPTRRecordData with Eq::{equal, not_equal}
///|
pub extend NAPTRRecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a NAPTRRecordData with omitted optional fields absent.
pub fn NAPTRRecordData::new(
flags? : String,
order? : Int32,
preference? : Int32,
regex? : String,
replacement? : String,
service? : String,
) -> NAPTRRecordData {
{ flags, order, preference, regex, replacement, service, }
}
///|
///
/// Encodes this value as JSON.
pub extend NAPTRRecordData with ToJson::{to_json}
///|
pub impl ToJson for NAPTRRecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("flags", self.flags)
.opt("order", self.order)
.opt("preference", self.preference)
.opt("regex", self.regex)
.opt("replacement", self.replacement)
.opt("service", self.service)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend NAPTRRecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for NAPTRRecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
flags: @sdkjson.opt_field(obj, "flags", path),
order: @sdkjson.opt_field(obj, "order", path),
preference: @sdkjson.opt_field(obj, "preference", path),
regex: @sdkjson.opt_field(obj, "regex", path),
replacement: @sdkjson.opt_field(obj, "replacement", path),
service: @sdkjson.opt_field(obj, "service", path),
}
}
///|
///
/// Generated representation of NAPTRRecord.
#derive(Eq, @debug.Debug)
pub(all) struct NAPTRRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : NAPTRRecordData?
type_ : String?
}
///|
pub extend NAPTRRecord with Eq::{equal, not_equal}
///|
pub extend NAPTRRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a NAPTRRecord with omitted optional fields absent.
pub fn NAPTRRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : NAPTRRecordData,
type_? : String,
) -> NAPTRRecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend NAPTRRecord with ToJson::{to_json}
///|
pub impl ToJson for NAPTRRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend NAPTRRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for NAPTRRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of NSRecord.
#derive(Eq, @debug.Debug)
pub(all) struct NSRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
}
///|
pub extend NSRecord with Eq::{equal, not_equal}
///|
pub extend NSRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a NSRecord with omitted optional fields absent.
pub fn NSRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> NSRecord {
{ comment, name, proxied, settings, tags, ttl, content, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend NSRecord with ToJson::{to_json}
///|
pub impl ToJson for NSRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend NSRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for NSRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of OPENPGPKEYRecord.
#derive(Eq, @debug.Debug)
pub(all) struct OPENPGPKEYRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
}
///|
pub extend OPENPGPKEYRecord with Eq::{equal, not_equal}
///|
pub extend OPENPGPKEYRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a OPENPGPKEYRecord with omitted optional fields absent.
pub fn OPENPGPKEYRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> OPENPGPKEYRecord {
{ comment, name, proxied, settings, tags, ttl, content, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend OPENPGPKEYRecord with ToJson::{to_json}
///|
pub impl ToJson for OPENPGPKEYRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend OPENPGPKEYRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for OPENPGPKEYRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of PTRRecord.
#derive(Eq, @debug.Debug)
pub(all) struct PTRRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
}
///|
pub extend PTRRecord with Eq::{equal, not_equal}
///|
pub extend PTRRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a PTRRecord with omitted optional fields absent.
pub fn PTRRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> PTRRecord {
{ comment, name, proxied, settings, tags, ttl, content, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend PTRRecord with ToJson::{to_json}
///|
pub impl ToJson for PTRRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend PTRRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for PTRRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a SMIMEA record.
#derive(Eq, @debug.Debug)
pub(all) struct SMIMEARecordData {
certificate : String?
matching_type : Int32?
selector : Int32?
usage : Int32?
}
///|
pub extend SMIMEARecordData with Eq::{equal, not_equal}
///|
pub extend SMIMEARecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a SMIMEARecordData with omitted optional fields absent.
pub fn SMIMEARecordData::new(
certificate? : String,
matching_type? : Int32,
selector? : Int32,
usage? : Int32,
) -> SMIMEARecordData {
{ certificate, matching_type, selector, usage, }
}
///|
///
/// Encodes this value as JSON.
pub extend SMIMEARecordData with ToJson::{to_json}
///|
pub impl ToJson for SMIMEARecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("certificate", self.certificate)
.opt("matching_type", self.matching_type)
.opt("selector", self.selector)
.opt("usage", self.usage)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend SMIMEARecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for SMIMEARecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
certificate: @sdkjson.opt_field(obj, "certificate", path),
matching_type: @sdkjson.opt_field(obj, "matching_type", path),
selector: @sdkjson.opt_field(obj, "selector", path),
usage: @sdkjson.opt_field(obj, "usage", path),
}
}
///|
///
/// Generated representation of SMIMEARecord.
#derive(Eq, @debug.Debug)
pub(all) struct SMIMEARecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : SMIMEARecordData?
type_ : String?
}
///|
pub extend SMIMEARecord with Eq::{equal, not_equal}
///|
pub extend SMIMEARecord with @debug.Debug::{to_repr}
///|
///
/// Creates a SMIMEARecord with omitted optional fields absent.
pub fn SMIMEARecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : SMIMEARecordData,
type_? : String,
) -> SMIMEARecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend SMIMEARecord with ToJson::{to_json}
///|
pub impl ToJson for SMIMEARecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend SMIMEARecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for SMIMEARecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a SRV record.
#derive(Eq, @debug.Debug)
pub(all) struct SRVRecordData {
port : Int32?
priority : Int32?
target : String?
weight : Int32?
}
///|
pub extend SRVRecordData with Eq::{equal, not_equal}
///|
pub extend SRVRecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a SRVRecordData with omitted optional fields absent.
pub fn SRVRecordData::new(
port? : Int32,
priority? : Int32,
target? : String,
weight? : Int32,
) -> SRVRecordData {
{ port, priority, target, weight, }
}
///|
///
/// Encodes this value as JSON.
pub extend SRVRecordData with ToJson::{to_json}
///|
pub impl ToJson for SRVRecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("port", self.port)
.opt("priority", self.priority)
.opt("target", self.target)
.opt("weight", self.weight)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend SRVRecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for SRVRecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
port: @sdkjson.opt_field(obj, "port", path),
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
weight: @sdkjson.opt_field(obj, "weight", path),
}
}
///|
///
/// Generated representation of SRVRecord.
#derive(Eq, @debug.Debug)
pub(all) struct SRVRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : SRVRecordData?
type_ : String?
}
///|
pub extend SRVRecord with Eq::{equal, not_equal}
///|
pub extend SRVRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a SRVRecord with omitted optional fields absent.
pub fn SRVRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : SRVRecordData,
type_? : String,
) -> SRVRecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend SRVRecord with ToJson::{to_json}
///|
pub impl ToJson for SRVRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend SRVRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for SRVRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a SSHFP record.
#derive(Eq, @debug.Debug)
pub(all) struct SSHFPRecordData {
algorithm : Int32?
fingerprint : String?
type_ : Int32?
}
///|
pub extend SSHFPRecordData with Eq::{equal, not_equal}
///|
pub extend SSHFPRecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a SSHFPRecordData with omitted optional fields absent.
pub fn SSHFPRecordData::new(
algorithm? : Int32,
fingerprint? : String,
type_? : Int32,
) -> SSHFPRecordData {
{ algorithm, fingerprint, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend SSHFPRecordData with ToJson::{to_json}
///|
pub impl ToJson for SSHFPRecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("fingerprint", self.fingerprint)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend SSHFPRecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for SSHFPRecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
fingerprint: @sdkjson.opt_field(obj, "fingerprint", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of SSHFPRecord.
#derive(Eq, @debug.Debug)
pub(all) struct SSHFPRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : SSHFPRecordData?
type_ : String?
}
///|
pub extend SSHFPRecord with Eq::{equal, not_equal}
///|
pub extend SSHFPRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a SSHFPRecord with omitted optional fields absent.
pub fn SSHFPRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : SSHFPRecordData,
type_? : String,
) -> SSHFPRecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend SSHFPRecord with ToJson::{to_json}
///|
pub impl ToJson for SSHFPRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend SSHFPRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for SSHFPRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a SVCB record.
#derive(Eq, @debug.Debug)
pub(all) struct SVCBRecordData {
priority : Int32?
target : String?
value : String?
}
///|
pub extend SVCBRecordData with Eq::{equal, not_equal}
///|
pub extend SVCBRecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a SVCBRecordData with omitted optional fields absent.
pub fn SVCBRecordData::new(
priority? : Int32,
target? : String,
value? : String,
) -> SVCBRecordData {
{ priority, target, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend SVCBRecordData with ToJson::{to_json}
///|
pub impl ToJson for SVCBRecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("priority", self.priority)
.opt("target", self.target)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend SVCBRecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for SVCBRecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Generated representation of SVCBRecord.
#derive(Eq, @debug.Debug)
pub(all) struct SVCBRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : SVCBRecordData?
type_ : String?
}
///|
pub extend SVCBRecord with Eq::{equal, not_equal}
///|
pub extend SVCBRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a SVCBRecord with omitted optional fields absent.
pub fn SVCBRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : SVCBRecordData,
type_? : String,
) -> SVCBRecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend SVCBRecord with ToJson::{to_json}
///|
pub impl ToJson for SVCBRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend SVCBRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for SVCBRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a TLSA record.
#derive(Eq, @debug.Debug)
pub(all) struct TLSARecordData {
certificate : String?
matching_type : Int32?
selector : Int32?
usage : Int32?
}
///|
pub extend TLSARecordData with Eq::{equal, not_equal}
///|
pub extend TLSARecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a TLSARecordData with omitted optional fields absent.
pub fn TLSARecordData::new(
certificate? : String,
matching_type? : Int32,
selector? : Int32,
usage? : Int32,
) -> TLSARecordData {
{ certificate, matching_type, selector, usage, }
}
///|
///
/// Encodes this value as JSON.
pub extend TLSARecordData with ToJson::{to_json}
///|
pub impl ToJson for TLSARecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("certificate", self.certificate)
.opt("matching_type", self.matching_type)
.opt("selector", self.selector)
.opt("usage", self.usage)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend TLSARecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for TLSARecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
certificate: @sdkjson.opt_field(obj, "certificate", path),
matching_type: @sdkjson.opt_field(obj, "matching_type", path),
selector: @sdkjson.opt_field(obj, "selector", path),
usage: @sdkjson.opt_field(obj, "usage", path),
}
}
///|
///
/// Generated representation of TLSARecord.
#derive(Eq, @debug.Debug)
pub(all) struct TLSARecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : TLSARecordData?
type_ : String?
}
///|
pub extend TLSARecord with Eq::{equal, not_equal}
///|
pub extend TLSARecord with @debug.Debug::{to_repr}
///|
///
/// Creates a TLSARecord with omitted optional fields absent.
pub fn TLSARecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : TLSARecordData,
type_? : String,
) -> TLSARecord {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend TLSARecord with ToJson::{to_json}
///|
pub impl ToJson for TLSARecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend TLSARecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for TLSARecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of TXTRecord.
#derive(Eq, @debug.Debug)
pub(all) struct TXTRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
}
///|
pub extend TXTRecord with Eq::{equal, not_equal}
///|
pub extend TXTRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a TXTRecord with omitted optional fields absent.
pub fn TXTRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> TXTRecord {
{ comment, name, proxied, settings, tags, ttl, content, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend TXTRecord with ToJson::{to_json}
///|
pub impl ToJson for TXTRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend TXTRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for TXTRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Components of a URI record.
#derive(Eq, @debug.Debug)
pub(all) struct URIRecordData {
target : String?
weight : Int32?
}
///|
pub extend URIRecordData with Eq::{equal, not_equal}
///|
pub extend URIRecordData with @debug.Debug::{to_repr}
///|
///
/// Creates a URIRecordData with omitted optional fields absent.
pub fn URIRecordData::new(target? : String, weight? : Int32) -> URIRecordData {
{ target, weight, }
}
///|
///
/// Encodes this value as JSON.
pub extend URIRecordData with ToJson::{to_json}
///|
pub impl ToJson for URIRecordData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("target", self.target)
.opt("weight", self.weight)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend URIRecordData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for URIRecordData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
target: @sdkjson.opt_field(obj, "target", path),
weight: @sdkjson.opt_field(obj, "weight", path),
}
}
///|
///
/// Generated representation of URIRecord.
#derive(Eq, @debug.Debug)
pub(all) struct URIRecord {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : URIRecordData?
priority : Int32?
type_ : String?
}
///|
pub extend URIRecord with Eq::{equal, not_equal}
///|
pub extend URIRecord with @debug.Debug::{to_repr}
///|
///
/// Creates a URIRecord with omitted optional fields absent.
pub fn URIRecord::new(
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : URIRecordData,
priority? : Int32,
type_? : String,
) -> URIRecord {
{
comment,
name,
proxied,
settings,
tags,
ttl,
content,
data,
priority,
type_,
}
}
///|
///
/// Encodes this value as JSON.
pub extend URIRecord with ToJson::{to_json}
///|
pub impl ToJson for URIRecord with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("priority", self.priority)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend URIRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for URIRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
priority: @sdkjson.opt_field(obj, "priority", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Direction to order DNS records in.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecordDirection {
Asc
Desc
Custom(String)
}
///|
pub extend DnsRecordDirection with Eq::{equal, not_equal}
///|
pub extend DnsRecordDirection with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend DnsRecordDirection with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordDirection with fn to_json(self) {
let raw = match self {
DnsRecordDirection::Asc => "asc"
DnsRecordDirection::Desc => "desc"
DnsRecordDirection::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend DnsRecordDirection with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordDirection with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"asc" => Option::Some(DnsRecordDirection::Asc)
"desc" => Option::Some(DnsRecordDirection::Desc)
_ => Option::None
}
},
raw => DnsRecordDirection::Custom(raw),
)
}
///|
///
/// Generated representation of BatchRecordDelete.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordDelete {
id : String
}
///|
pub extend BatchRecordDelete with Eq::{equal, not_equal}
///|
pub extend BatchRecordDelete with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordDelete with omitted optional fields absent.
pub fn BatchRecordDelete::new(id~ : String) -> BatchRecordDelete {
{ id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordDelete with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordDelete with fn to_json(self) {
@sdkjson.ObjBuilder::new().field("id", self.id).build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordDelete with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordDelete with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{ id: required_field(obj, "id", path), }
}
///|
///
/// Generated representation of BatchRecordPatchA.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchA {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
private_routing : Bool?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchA with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchA with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchA with omitted optional fields absent.
pub fn BatchRecordPatchA::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
private_routing? : Bool,
type_? : String,
) -> BatchRecordPatchA {
{
comment,
name,
proxied,
settings,
tags,
ttl,
content,
private_routing,
type_,
id,
}
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchA with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("private_routing", self.private_routing)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
private_routing: @sdkjson.opt_field(obj, "private_routing", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchAAAA.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchAAAA {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
private_routing : Bool?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchAAAA with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchAAAA with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchAAAA with omitted optional fields absent.
pub fn BatchRecordPatchAAAA::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
private_routing? : Bool,
type_? : String,
) -> BatchRecordPatchAAAA {
{
comment,
name,
proxied,
settings,
tags,
ttl,
content,
private_routing,
type_,
id,
}
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchAAAA with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchAAAA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("private_routing", self.private_routing)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchAAAA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchAAAA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
private_routing: @sdkjson.opt_field(obj, "private_routing", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchCNAMESettings.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchCNAMESettings {
flatten_cname : Bool?
}
///|
pub extend BatchRecordPatchCNAMESettings with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchCNAMESettings with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchCNAMESettings with omitted optional fields absent.
pub fn BatchRecordPatchCNAMESettings::new(
flatten_cname? : Bool,
) -> BatchRecordPatchCNAMESettings {
{ flatten_cname, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchCNAMESettings with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchCNAMESettings with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("flatten_cname", self.flatten_cname).build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchCNAMESettings with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchCNAMESettings with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{ flatten_cname: @sdkjson.opt_field(obj, "flatten_cname", path), }
}
///|
///
/// Generated representation of BatchRecordPatchCNAME.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchCNAME {
comment : String?
name : String?
proxied : Bool?
settings : BatchRecordPatchCNAMESettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchCNAME with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchCNAME with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchCNAME with omitted optional fields absent.
pub fn BatchRecordPatchCNAME::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : BatchRecordPatchCNAMESettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> BatchRecordPatchCNAME {
{ comment, name, proxied, settings, tags, ttl, content, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchCNAME with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchCNAME with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchCNAME with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchCNAME with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchMX.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchMX {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
priority : Int32?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchMX with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchMX with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchMX with omitted optional fields absent.
pub fn BatchRecordPatchMX::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
priority? : Int32,
type_? : String,
) -> BatchRecordPatchMX {
{ comment, name, proxied, settings, tags, ttl, content, priority, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchMX with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchMX with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("priority", self.priority)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchMX with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchMX with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
priority: @sdkjson.opt_field(obj, "priority", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchNS.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchNS {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchNS with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchNS with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchNS with omitted optional fields absent.
pub fn BatchRecordPatchNS::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> BatchRecordPatchNS {
{ comment, name, proxied, settings, tags, ttl, content, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchNS with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchNS with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchNS with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchNS with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchOPENPGPKEY.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchOPENPGPKEY {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchOPENPGPKEY with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchOPENPGPKEY with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchOPENPGPKEY with omitted optional fields absent.
pub fn BatchRecordPatchOPENPGPKEY::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> BatchRecordPatchOPENPGPKEY {
{ comment, name, proxied, settings, tags, ttl, content, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchOPENPGPKEY with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchOPENPGPKEY with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchOPENPGPKEY with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchOPENPGPKEY with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchPTR.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchPTR {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchPTR with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchPTR with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchPTR with omitted optional fields absent.
pub fn BatchRecordPatchPTR::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> BatchRecordPatchPTR {
{ comment, name, proxied, settings, tags, ttl, content, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchPTR with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchPTR with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchPTR with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchPTR with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchTXT.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchTXT {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchTXT with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchTXT with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchTXT with omitted optional fields absent.
pub fn BatchRecordPatchTXT::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> BatchRecordPatchTXT {
{ comment, name, proxied, settings, tags, ttl, content, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchTXT with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchTXT with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchTXT with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchTXT with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a CAA record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchCAAData {
flags : Int32?
tag : String?
value : String?
}
///|
pub extend BatchRecordPatchCAAData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchCAAData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchCAAData with omitted optional fields absent.
pub fn BatchRecordPatchCAAData::new(
flags? : Int32,
tag? : String,
value? : String,
) -> BatchRecordPatchCAAData {
{ flags, tag, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchCAAData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchCAAData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("flags", self.flags)
.opt("tag", self.tag)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchCAAData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchCAAData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
flags: @sdkjson.opt_field(obj, "flags", path),
tag: @sdkjson.opt_field(obj, "tag", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchCAA.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchCAA {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchCAAData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchCAA with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchCAA with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchCAA with omitted optional fields absent.
pub fn BatchRecordPatchCAA::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchCAAData,
type_? : String,
) -> BatchRecordPatchCAA {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchCAA with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchCAA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchCAA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchCAA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a CERT record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchCERTData {
algorithm : Int32?
certificate : String?
key_tag : Int32?
type_ : Int32?
}
///|
pub extend BatchRecordPatchCERTData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchCERTData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchCERTData with omitted optional fields absent.
pub fn BatchRecordPatchCERTData::new(
algorithm? : Int32,
certificate? : String,
key_tag? : Int32,
type_? : Int32,
) -> BatchRecordPatchCERTData {
{ algorithm, certificate, key_tag, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchCERTData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchCERTData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("certificate", self.certificate)
.opt("key_tag", self.key_tag)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchCERTData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchCERTData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
certificate: @sdkjson.opt_field(obj, "certificate", path),
key_tag: @sdkjson.opt_field(obj, "key_tag", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchCERT.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchCERT {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchCERTData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchCERT with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchCERT with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchCERT with omitted optional fields absent.
pub fn BatchRecordPatchCERT::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchCERTData,
type_? : String,
) -> BatchRecordPatchCERT {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchCERT with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchCERT with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchCERT with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchCERT with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a DNSKEY record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchDNSKEYData {
algorithm : Int32?
flags : Int32?
protocol : Int32?
public_key : String?
}
///|
pub extend BatchRecordPatchDNSKEYData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchDNSKEYData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchDNSKEYData with omitted optional fields absent.
pub fn BatchRecordPatchDNSKEYData::new(
algorithm? : Int32,
flags? : Int32,
protocol? : Int32,
public_key? : String,
) -> BatchRecordPatchDNSKEYData {
{ algorithm, flags, protocol, public_key, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchDNSKEYData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchDNSKEYData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("flags", self.flags)
.opt("protocol", self.protocol)
.opt("public_key", self.public_key)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchDNSKEYData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchDNSKEYData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
flags: @sdkjson.opt_field(obj, "flags", path),
protocol: @sdkjson.opt_field(obj, "protocol", path),
public_key: @sdkjson.opt_field(obj, "public_key", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchDNSKEY.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchDNSKEY {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchDNSKEYData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchDNSKEY with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchDNSKEY with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchDNSKEY with omitted optional fields absent.
pub fn BatchRecordPatchDNSKEY::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchDNSKEYData,
type_? : String,
) -> BatchRecordPatchDNSKEY {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchDNSKEY with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchDNSKEY with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchDNSKEY with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchDNSKEY with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a DS record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchDSData {
algorithm : Int32?
digest : String?
digest_type : Int32?
key_tag : Int32?
}
///|
pub extend BatchRecordPatchDSData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchDSData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchDSData with omitted optional fields absent.
pub fn BatchRecordPatchDSData::new(
algorithm? : Int32,
digest? : String,
digest_type? : Int32,
key_tag? : Int32,
) -> BatchRecordPatchDSData {
{ algorithm, digest, digest_type, key_tag, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchDSData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchDSData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("digest", self.digest)
.opt("digest_type", self.digest_type)
.opt("key_tag", self.key_tag)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchDSData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchDSData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
digest: @sdkjson.opt_field(obj, "digest", path),
digest_type: @sdkjson.opt_field(obj, "digest_type", path),
key_tag: @sdkjson.opt_field(obj, "key_tag", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchDS.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchDS {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchDSData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchDS with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchDS with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchDS with omitted optional fields absent.
pub fn BatchRecordPatchDS::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchDSData,
type_? : String,
) -> BatchRecordPatchDS {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchDS with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchDS with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchDS with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchDS with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a HTTPS record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchHTTPSData {
priority : Int32?
target : String?
value : String?
}
///|
pub extend BatchRecordPatchHTTPSData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchHTTPSData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchHTTPSData with omitted optional fields absent.
pub fn BatchRecordPatchHTTPSData::new(
priority? : Int32,
target? : String,
value? : String,
) -> BatchRecordPatchHTTPSData {
{ priority, target, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchHTTPSData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchHTTPSData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("priority", self.priority)
.opt("target", self.target)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchHTTPSData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchHTTPSData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchHTTPS.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchHTTPS {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchHTTPSData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchHTTPS with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchHTTPS with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchHTTPS with omitted optional fields absent.
pub fn BatchRecordPatchHTTPS::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchHTTPSData,
type_? : String,
) -> BatchRecordPatchHTTPS {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchHTTPS with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchHTTPS with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchHTTPS with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchHTTPS with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Latitude direction.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum BatchRecordPatchLOCDataLatDirection {
N
S
Custom(String)
}
///|
pub extend BatchRecordPatchLOCDataLatDirection with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchLOCDataLatDirection with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend BatchRecordPatchLOCDataLatDirection with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchLOCDataLatDirection with fn to_json(self) {
let raw = match self {
BatchRecordPatchLOCDataLatDirection::N => "N"
BatchRecordPatchLOCDataLatDirection::S => "S"
BatchRecordPatchLOCDataLatDirection::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend BatchRecordPatchLOCDataLatDirection with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchLOCDataLatDirection with fn from_json(
value,
path,
) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"N" => Option::Some(BatchRecordPatchLOCDataLatDirection::N)
"S" => Option::Some(BatchRecordPatchLOCDataLatDirection::S)
_ => Option::None
}
},
raw => BatchRecordPatchLOCDataLatDirection::Custom(raw),
)
}
///|
///
/// Longitude direction.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum BatchRecordPatchLOCDataLongDirection {
E
W
Custom(String)
}
///|
pub extend BatchRecordPatchLOCDataLongDirection with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchLOCDataLongDirection with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend BatchRecordPatchLOCDataLongDirection with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchLOCDataLongDirection with fn to_json(self) {
let raw = match self {
BatchRecordPatchLOCDataLongDirection::E => "E"
BatchRecordPatchLOCDataLongDirection::W => "W"
BatchRecordPatchLOCDataLongDirection::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend BatchRecordPatchLOCDataLongDirection with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchLOCDataLongDirection with fn from_json(
value,
path,
) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"E" => Option::Some(BatchRecordPatchLOCDataLongDirection::E)
"W" => Option::Some(BatchRecordPatchLOCDataLongDirection::W)
_ => Option::None
}
},
raw => BatchRecordPatchLOCDataLongDirection::Custom(raw),
)
}
///|
///
/// Components of a LOC record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchLOCData {
altitude : Double?
lat_degrees : Int32?
lat_direction : BatchRecordPatchLOCDataLatDirection?
lat_minutes : Int32?
lat_seconds : Double?
long_degrees : Int32?
long_direction : BatchRecordPatchLOCDataLongDirection?
long_minutes : Int32?
long_seconds : Double?
precision_horz : Double?
precision_vert : Double?
size : Double?
}
///|
pub extend BatchRecordPatchLOCData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchLOCData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchLOCData with omitted optional fields absent.
pub fn BatchRecordPatchLOCData::new(
altitude? : Double,
lat_degrees? : Int32,
lat_direction? : BatchRecordPatchLOCDataLatDirection,
lat_minutes? : Int32,
lat_seconds? : Double,
long_degrees? : Int32,
long_direction? : BatchRecordPatchLOCDataLongDirection,
long_minutes? : Int32,
long_seconds? : Double,
precision_horz? : Double,
precision_vert? : Double,
size? : Double,
) -> BatchRecordPatchLOCData {
{
altitude,
lat_degrees,
lat_direction,
lat_minutes,
lat_seconds,
long_degrees,
long_direction,
long_minutes,
long_seconds,
precision_horz,
precision_vert,
size,
}
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchLOCData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchLOCData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("altitude", self.altitude)
.opt("lat_degrees", self.lat_degrees)
.opt("lat_direction", self.lat_direction)
.opt("lat_minutes", self.lat_minutes)
.opt("lat_seconds", self.lat_seconds)
.opt("long_degrees", self.long_degrees)
.opt("long_direction", self.long_direction)
.opt("long_minutes", self.long_minutes)
.opt("long_seconds", self.long_seconds)
.opt("precision_horz", self.precision_horz)
.opt("precision_vert", self.precision_vert)
.opt("size", self.size)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchLOCData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchLOCData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
altitude: @sdkjson.opt_field(obj, "altitude", path),
lat_degrees: @sdkjson.opt_field(obj, "lat_degrees", path),
lat_direction: @sdkjson.opt_field(obj, "lat_direction", path),
lat_minutes: @sdkjson.opt_field(obj, "lat_minutes", path),
lat_seconds: @sdkjson.opt_field(obj, "lat_seconds", path),
long_degrees: @sdkjson.opt_field(obj, "long_degrees", path),
long_direction: @sdkjson.opt_field(obj, "long_direction", path),
long_minutes: @sdkjson.opt_field(obj, "long_minutes", path),
long_seconds: @sdkjson.opt_field(obj, "long_seconds", path),
precision_horz: @sdkjson.opt_field(obj, "precision_horz", path),
precision_vert: @sdkjson.opt_field(obj, "precision_vert", path),
size: @sdkjson.opt_field(obj, "size", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchLOC.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchLOC {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchLOCData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchLOC with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchLOC with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchLOC with omitted optional fields absent.
pub fn BatchRecordPatchLOC::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchLOCData,
type_? : String,
) -> BatchRecordPatchLOC {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchLOC with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchLOC with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchLOC with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchLOC with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a NAPTR record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchNAPTRData {
flags : String?
order : Int32?
preference : Int32?
regex : String?
replacement : String?
service : String?
}
///|
pub extend BatchRecordPatchNAPTRData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchNAPTRData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchNAPTRData with omitted optional fields absent.
pub fn BatchRecordPatchNAPTRData::new(
flags? : String,
order? : Int32,
preference? : Int32,
regex? : String,
replacement? : String,
service? : String,
) -> BatchRecordPatchNAPTRData {
{ flags, order, preference, regex, replacement, service, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchNAPTRData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchNAPTRData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("flags", self.flags)
.opt("order", self.order)
.opt("preference", self.preference)
.opt("regex", self.regex)
.opt("replacement", self.replacement)
.opt("service", self.service)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchNAPTRData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchNAPTRData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
flags: @sdkjson.opt_field(obj, "flags", path),
order: @sdkjson.opt_field(obj, "order", path),
preference: @sdkjson.opt_field(obj, "preference", path),
regex: @sdkjson.opt_field(obj, "regex", path),
replacement: @sdkjson.opt_field(obj, "replacement", path),
service: @sdkjson.opt_field(obj, "service", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchNAPTR.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchNAPTR {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchNAPTRData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchNAPTR with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchNAPTR with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchNAPTR with omitted optional fields absent.
pub fn BatchRecordPatchNAPTR::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchNAPTRData,
type_? : String,
) -> BatchRecordPatchNAPTR {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchNAPTR with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchNAPTR with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchNAPTR with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchNAPTR with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a SMIMEA record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchSMIMEAData {
certificate : String?
matching_type : Int32?
selector : Int32?
usage : Int32?
}
///|
pub extend BatchRecordPatchSMIMEAData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchSMIMEAData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchSMIMEAData with omitted optional fields absent.
pub fn BatchRecordPatchSMIMEAData::new(
certificate? : String,
matching_type? : Int32,
selector? : Int32,
usage? : Int32,
) -> BatchRecordPatchSMIMEAData {
{ certificate, matching_type, selector, usage, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchSMIMEAData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchSMIMEAData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("certificate", self.certificate)
.opt("matching_type", self.matching_type)
.opt("selector", self.selector)
.opt("usage", self.usage)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchSMIMEAData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchSMIMEAData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
certificate: @sdkjson.opt_field(obj, "certificate", path),
matching_type: @sdkjson.opt_field(obj, "matching_type", path),
selector: @sdkjson.opt_field(obj, "selector", path),
usage: @sdkjson.opt_field(obj, "usage", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchSMIMEA.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchSMIMEA {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchSMIMEAData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchSMIMEA with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchSMIMEA with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchSMIMEA with omitted optional fields absent.
pub fn BatchRecordPatchSMIMEA::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchSMIMEAData,
type_? : String,
) -> BatchRecordPatchSMIMEA {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchSMIMEA with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchSMIMEA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchSMIMEA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchSMIMEA with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a SRV record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchSRVData {
port : Int32?
priority : Int32?
target : String?
weight : Int32?
}
///|
pub extend BatchRecordPatchSRVData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchSRVData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchSRVData with omitted optional fields absent.
pub fn BatchRecordPatchSRVData::new(
port? : Int32,
priority? : Int32,
target? : String,
weight? : Int32,
) -> BatchRecordPatchSRVData {
{ port, priority, target, weight, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchSRVData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchSRVData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("port", self.port)
.opt("priority", self.priority)
.opt("target", self.target)
.opt("weight", self.weight)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchSRVData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchSRVData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
port: @sdkjson.opt_field(obj, "port", path),
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
weight: @sdkjson.opt_field(obj, "weight", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchSRV.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchSRV {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchSRVData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchSRV with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchSRV with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchSRV with omitted optional fields absent.
pub fn BatchRecordPatchSRV::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchSRVData,
type_? : String,
) -> BatchRecordPatchSRV {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchSRV with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchSRV with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchSRV with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchSRV with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a SSHFP record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchSSHFPData {
algorithm : Int32?
fingerprint : String?
type_ : Int32?
}
///|
pub extend BatchRecordPatchSSHFPData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchSSHFPData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchSSHFPData with omitted optional fields absent.
pub fn BatchRecordPatchSSHFPData::new(
algorithm? : Int32,
fingerprint? : String,
type_? : Int32,
) -> BatchRecordPatchSSHFPData {
{ algorithm, fingerprint, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchSSHFPData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchSSHFPData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("fingerprint", self.fingerprint)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchSSHFPData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchSSHFPData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
fingerprint: @sdkjson.opt_field(obj, "fingerprint", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchSSHFP.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchSSHFP {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchSSHFPData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchSSHFP with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchSSHFP with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchSSHFP with omitted optional fields absent.
pub fn BatchRecordPatchSSHFP::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchSSHFPData,
type_? : String,
) -> BatchRecordPatchSSHFP {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchSSHFP with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchSSHFP with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchSSHFP with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchSSHFP with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a SVCB record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchSVCBData {
priority : Int32?
target : String?
value : String?
}
///|
pub extend BatchRecordPatchSVCBData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchSVCBData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchSVCBData with omitted optional fields absent.
pub fn BatchRecordPatchSVCBData::new(
priority? : Int32,
target? : String,
value? : String,
) -> BatchRecordPatchSVCBData {
{ priority, target, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchSVCBData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchSVCBData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("priority", self.priority)
.opt("target", self.target)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchSVCBData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchSVCBData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchSVCB.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchSVCB {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchSVCBData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchSVCB with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchSVCB with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchSVCB with omitted optional fields absent.
pub fn BatchRecordPatchSVCB::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchSVCBData,
type_? : String,
) -> BatchRecordPatchSVCB {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchSVCB with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchSVCB with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchSVCB with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchSVCB with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a TLSA record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchTLSAData {
certificate : String?
matching_type : Int32?
selector : Int32?
usage : Int32?
}
///|
pub extend BatchRecordPatchTLSAData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchTLSAData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchTLSAData with omitted optional fields absent.
pub fn BatchRecordPatchTLSAData::new(
certificate? : String,
matching_type? : Int32,
selector? : Int32,
usage? : Int32,
) -> BatchRecordPatchTLSAData {
{ certificate, matching_type, selector, usage, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchTLSAData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchTLSAData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("certificate", self.certificate)
.opt("matching_type", self.matching_type)
.opt("selector", self.selector)
.opt("usage", self.usage)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchTLSAData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchTLSAData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
certificate: @sdkjson.opt_field(obj, "certificate", path),
matching_type: @sdkjson.opt_field(obj, "matching_type", path),
selector: @sdkjson.opt_field(obj, "selector", path),
usage: @sdkjson.opt_field(obj, "usage", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchTLSA.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchTLSA {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchTLSAData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchTLSA with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchTLSA with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchTLSA with omitted optional fields absent.
pub fn BatchRecordPatchTLSA::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchTLSAData,
type_? : String,
) -> BatchRecordPatchTLSA {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchTLSA with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchTLSA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchTLSA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchTLSA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a URI record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchURIData {
target : String?
weight : Int32?
}
///|
pub extend BatchRecordPatchURIData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchURIData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchURIData with omitted optional fields absent.
pub fn BatchRecordPatchURIData::new(
target? : String,
weight? : Int32,
) -> BatchRecordPatchURIData {
{ target, weight, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchURIData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchURIData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("target", self.target)
.opt("weight", self.weight)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchURIData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchURIData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
target: @sdkjson.opt_field(obj, "target", path),
weight: @sdkjson.opt_field(obj, "weight", path),
}
}
///|
///
/// Generated representation of BatchRecordPatchURI.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPatchURI {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPatchURIData?
priority : Int32?
type_ : String?
id : String
}
///|
pub extend BatchRecordPatchURI with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatchURI with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPatchURI with omitted optional fields absent.
pub fn BatchRecordPatchURI::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPatchURIData,
priority? : Int32,
type_? : String,
) -> BatchRecordPatchURI {
{
comment,
name,
proxied,
settings,
tags,
ttl,
content,
data,
priority,
type_,
id,
}
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPatchURI with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatchURI with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("priority", self.priority)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPatchURI with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatchURI with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
priority: @sdkjson.opt_field(obj, "priority", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated tagged union BatchRecordPatch.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum BatchRecordPatch {
A(BatchRecordPatchA)
AAAA(BatchRecordPatchAAAA)
CNAME(BatchRecordPatchCNAME)
MX(BatchRecordPatchMX)
NS(BatchRecordPatchNS)
OPENPGPKEY(BatchRecordPatchOPENPGPKEY)
PTR(BatchRecordPatchPTR)
TXT(BatchRecordPatchTXT)
CAA(BatchRecordPatchCAA)
CERT(BatchRecordPatchCERT)
DNSKEY(BatchRecordPatchDNSKEY)
DS(BatchRecordPatchDS)
HTTPS(BatchRecordPatchHTTPS)
LOC(BatchRecordPatchLOC)
NAPTR(BatchRecordPatchNAPTR)
SMIMEA(BatchRecordPatchSMIMEA)
SRV(BatchRecordPatchSRV)
SSHFP(BatchRecordPatchSSHFP)
SVCB(BatchRecordPatchSVCB)
TLSA(BatchRecordPatchTLSA)
URI(BatchRecordPatchURI)
Unknown(String, Json)
}
///|
pub extend BatchRecordPatch with Eq::{equal, not_equal}
///|
pub extend BatchRecordPatch with @debug.Debug::{to_repr}
///|
///
/// Encodes this tagged union as JSON.
pub extend BatchRecordPatch with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPatch with fn to_json(self) {
match self {
BatchRecordPatch::A(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "A")
BatchRecordPatch::AAAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "AAAA")
BatchRecordPatch::CNAME(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CNAME")
BatchRecordPatch::MX(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "MX")
BatchRecordPatch::NS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NS")
BatchRecordPatch::OPENPGPKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "OPENPGPKEY")
BatchRecordPatch::PTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "PTR")
BatchRecordPatch::TXT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TXT")
BatchRecordPatch::CAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CAA")
BatchRecordPatch::CERT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CERT")
BatchRecordPatch::DNSKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DNSKEY")
BatchRecordPatch::DS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DS")
BatchRecordPatch::HTTPS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "HTTPS")
BatchRecordPatch::LOC(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "LOC")
BatchRecordPatch::NAPTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NAPTR")
BatchRecordPatch::SMIMEA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SMIMEA")
BatchRecordPatch::SRV(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SRV")
BatchRecordPatch::SSHFP(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SSHFP")
BatchRecordPatch::SVCB(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SVCB")
BatchRecordPatch::TLSA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TLSA")
BatchRecordPatch::URI(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "URI")
BatchRecordPatch::Unknown(_, value) => value
}
}
///|
///
/// Decodes this tagged union from JSON.
pub extend BatchRecordPatch with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPatch with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
let tag : String = required_field(obj, "type", path)
match tag {
"A" => BatchRecordPatch::A(@json.from_json(value, path~))
"AAAA" => BatchRecordPatch::AAAA(@json.from_json(value, path~))
"CNAME" => BatchRecordPatch::CNAME(@json.from_json(value, path~))
"MX" => BatchRecordPatch::MX(@json.from_json(value, path~))
"NS" => BatchRecordPatch::NS(@json.from_json(value, path~))
"OPENPGPKEY" => BatchRecordPatch::OPENPGPKEY(@json.from_json(value, path~))
"PTR" => BatchRecordPatch::PTR(@json.from_json(value, path~))
"TXT" => BatchRecordPatch::TXT(@json.from_json(value, path~))
"CAA" => BatchRecordPatch::CAA(@json.from_json(value, path~))
"CERT" => BatchRecordPatch::CERT(@json.from_json(value, path~))
"DNSKEY" => BatchRecordPatch::DNSKEY(@json.from_json(value, path~))
"DS" => BatchRecordPatch::DS(@json.from_json(value, path~))
"HTTPS" => BatchRecordPatch::HTTPS(@json.from_json(value, path~))
"LOC" => BatchRecordPatch::LOC(@json.from_json(value, path~))
"NAPTR" => BatchRecordPatch::NAPTR(@json.from_json(value, path~))
"SMIMEA" => BatchRecordPatch::SMIMEA(@json.from_json(value, path~))
"SRV" => BatchRecordPatch::SRV(@json.from_json(value, path~))
"SSHFP" => BatchRecordPatch::SSHFP(@json.from_json(value, path~))
"SVCB" => BatchRecordPatch::SVCB(@json.from_json(value, path~))
"TLSA" => BatchRecordPatch::TLSA(@json.from_json(value, path~))
"URI" => BatchRecordPatch::URI(@json.from_json(value, path~))
other => BatchRecordPatch::Unknown(other, value)
}
}
///|
///
/// Generated representation of BatchRecordPutA.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutA {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
private_routing : Bool?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutA with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutA with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutA with omitted optional fields absent.
pub fn BatchRecordPutA::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
private_routing? : Bool,
type_? : String,
) -> BatchRecordPutA {
{
comment,
name,
proxied,
settings,
tags,
ttl,
content,
private_routing,
type_,
id,
}
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutA with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("private_routing", self.private_routing)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
private_routing: @sdkjson.opt_field(obj, "private_routing", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPutAAAA.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutAAAA {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
private_routing : Bool?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutAAAA with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutAAAA with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutAAAA with omitted optional fields absent.
pub fn BatchRecordPutAAAA::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
private_routing? : Bool,
type_? : String,
) -> BatchRecordPutAAAA {
{
comment,
name,
proxied,
settings,
tags,
ttl,
content,
private_routing,
type_,
id,
}
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutAAAA with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutAAAA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("private_routing", self.private_routing)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutAAAA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutAAAA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
private_routing: @sdkjson.opt_field(obj, "private_routing", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPutCNAMESettings.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutCNAMESettings {
flatten_cname : Bool?
}
///|
pub extend BatchRecordPutCNAMESettings with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutCNAMESettings with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutCNAMESettings with omitted optional fields absent.
pub fn BatchRecordPutCNAMESettings::new(
flatten_cname? : Bool,
) -> BatchRecordPutCNAMESettings {
{ flatten_cname, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutCNAMESettings with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutCNAMESettings with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("flatten_cname", self.flatten_cname).build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutCNAMESettings with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutCNAMESettings with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{ flatten_cname: @sdkjson.opt_field(obj, "flatten_cname", path), }
}
///|
///
/// Generated representation of BatchRecordPutCNAME.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutCNAME {
comment : String?
name : String?
proxied : Bool?
settings : BatchRecordPutCNAMESettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutCNAME with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutCNAME with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutCNAME with omitted optional fields absent.
pub fn BatchRecordPutCNAME::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : BatchRecordPutCNAMESettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> BatchRecordPutCNAME {
{ comment, name, proxied, settings, tags, ttl, content, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutCNAME with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutCNAME with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutCNAME with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutCNAME with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPutMX.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutMX {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
priority : Int32?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutMX with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutMX with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutMX with omitted optional fields absent.
pub fn BatchRecordPutMX::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
priority? : Int32,
type_? : String,
) -> BatchRecordPutMX {
{ comment, name, proxied, settings, tags, ttl, content, priority, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutMX with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutMX with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("priority", self.priority)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutMX with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutMX with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
priority: @sdkjson.opt_field(obj, "priority", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPutNS.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutNS {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutNS with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutNS with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutNS with omitted optional fields absent.
pub fn BatchRecordPutNS::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> BatchRecordPutNS {
{ comment, name, proxied, settings, tags, ttl, content, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutNS with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutNS with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutNS with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutNS with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPutOPENPGPKEY.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutOPENPGPKEY {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutOPENPGPKEY with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutOPENPGPKEY with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutOPENPGPKEY with omitted optional fields absent.
pub fn BatchRecordPutOPENPGPKEY::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> BatchRecordPutOPENPGPKEY {
{ comment, name, proxied, settings, tags, ttl, content, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutOPENPGPKEY with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutOPENPGPKEY with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutOPENPGPKEY with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutOPENPGPKEY with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPutPTR.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutPTR {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutPTR with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutPTR with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutPTR with omitted optional fields absent.
pub fn BatchRecordPutPTR::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> BatchRecordPutPTR {
{ comment, name, proxied, settings, tags, ttl, content, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutPTR with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutPTR with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutPTR with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutPTR with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated representation of BatchRecordPutTXT.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutTXT {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutTXT with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutTXT with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutTXT with omitted optional fields absent.
pub fn BatchRecordPutTXT::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
type_? : String,
) -> BatchRecordPutTXT {
{ comment, name, proxied, settings, tags, ttl, content, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutTXT with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutTXT with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutTXT with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutTXT with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a CAA record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutCAAData {
flags : Int32?
tag : String?
value : String?
}
///|
pub extend BatchRecordPutCAAData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutCAAData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutCAAData with omitted optional fields absent.
pub fn BatchRecordPutCAAData::new(
flags? : Int32,
tag? : String,
value? : String,
) -> BatchRecordPutCAAData {
{ flags, tag, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutCAAData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutCAAData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("flags", self.flags)
.opt("tag", self.tag)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutCAAData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutCAAData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
flags: @sdkjson.opt_field(obj, "flags", path),
tag: @sdkjson.opt_field(obj, "tag", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Generated representation of BatchRecordPutCAA.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutCAA {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutCAAData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutCAA with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutCAA with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutCAA with omitted optional fields absent.
pub fn BatchRecordPutCAA::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutCAAData,
type_? : String,
) -> BatchRecordPutCAA {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutCAA with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutCAA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutCAA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutCAA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a CERT record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutCERTData {
algorithm : Int32?
certificate : String?
key_tag : Int32?
type_ : Int32?
}
///|
pub extend BatchRecordPutCERTData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutCERTData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutCERTData with omitted optional fields absent.
pub fn BatchRecordPutCERTData::new(
algorithm? : Int32,
certificate? : String,
key_tag? : Int32,
type_? : Int32,
) -> BatchRecordPutCERTData {
{ algorithm, certificate, key_tag, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutCERTData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutCERTData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("certificate", self.certificate)
.opt("key_tag", self.key_tag)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutCERTData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutCERTData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
certificate: @sdkjson.opt_field(obj, "certificate", path),
key_tag: @sdkjson.opt_field(obj, "key_tag", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of BatchRecordPutCERT.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutCERT {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutCERTData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutCERT with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutCERT with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutCERT with omitted optional fields absent.
pub fn BatchRecordPutCERT::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutCERTData,
type_? : String,
) -> BatchRecordPutCERT {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutCERT with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutCERT with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutCERT with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutCERT with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a DNSKEY record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutDNSKEYData {
algorithm : Int32?
flags : Int32?
protocol : Int32?
public_key : String?
}
///|
pub extend BatchRecordPutDNSKEYData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutDNSKEYData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutDNSKEYData with omitted optional fields absent.
pub fn BatchRecordPutDNSKEYData::new(
algorithm? : Int32,
flags? : Int32,
protocol? : Int32,
public_key? : String,
) -> BatchRecordPutDNSKEYData {
{ algorithm, flags, protocol, public_key, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutDNSKEYData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutDNSKEYData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("flags", self.flags)
.opt("protocol", self.protocol)
.opt("public_key", self.public_key)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutDNSKEYData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutDNSKEYData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
flags: @sdkjson.opt_field(obj, "flags", path),
protocol: @sdkjson.opt_field(obj, "protocol", path),
public_key: @sdkjson.opt_field(obj, "public_key", path),
}
}
///|
///
/// Generated representation of BatchRecordPutDNSKEY.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutDNSKEY {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutDNSKEYData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutDNSKEY with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutDNSKEY with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutDNSKEY with omitted optional fields absent.
pub fn BatchRecordPutDNSKEY::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutDNSKEYData,
type_? : String,
) -> BatchRecordPutDNSKEY {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutDNSKEY with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutDNSKEY with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutDNSKEY with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutDNSKEY with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a DS record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutDSData {
algorithm : Int32?
digest : String?
digest_type : Int32?
key_tag : Int32?
}
///|
pub extend BatchRecordPutDSData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutDSData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutDSData with omitted optional fields absent.
pub fn BatchRecordPutDSData::new(
algorithm? : Int32,
digest? : String,
digest_type? : Int32,
key_tag? : Int32,
) -> BatchRecordPutDSData {
{ algorithm, digest, digest_type, key_tag, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutDSData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutDSData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("digest", self.digest)
.opt("digest_type", self.digest_type)
.opt("key_tag", self.key_tag)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutDSData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutDSData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
digest: @sdkjson.opt_field(obj, "digest", path),
digest_type: @sdkjson.opt_field(obj, "digest_type", path),
key_tag: @sdkjson.opt_field(obj, "key_tag", path),
}
}
///|
///
/// Generated representation of BatchRecordPutDS.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutDS {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutDSData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutDS with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutDS with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutDS with omitted optional fields absent.
pub fn BatchRecordPutDS::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutDSData,
type_? : String,
) -> BatchRecordPutDS {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutDS with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutDS with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutDS with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutDS with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a HTTPS record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutHTTPSData {
priority : Int32?
target : String?
value : String?
}
///|
pub extend BatchRecordPutHTTPSData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutHTTPSData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutHTTPSData with omitted optional fields absent.
pub fn BatchRecordPutHTTPSData::new(
priority? : Int32,
target? : String,
value? : String,
) -> BatchRecordPutHTTPSData {
{ priority, target, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutHTTPSData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutHTTPSData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("priority", self.priority)
.opt("target", self.target)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutHTTPSData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutHTTPSData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Generated representation of BatchRecordPutHTTPS.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutHTTPS {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutHTTPSData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutHTTPS with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutHTTPS with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutHTTPS with omitted optional fields absent.
pub fn BatchRecordPutHTTPS::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutHTTPSData,
type_? : String,
) -> BatchRecordPutHTTPS {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutHTTPS with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutHTTPS with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutHTTPS with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutHTTPS with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Latitude direction.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum BatchRecordPutLOCDataLatDirection {
N
S
Custom(String)
}
///|
pub extend BatchRecordPutLOCDataLatDirection with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutLOCDataLatDirection with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend BatchRecordPutLOCDataLatDirection with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutLOCDataLatDirection with fn to_json(self) {
let raw = match self {
BatchRecordPutLOCDataLatDirection::N => "N"
BatchRecordPutLOCDataLatDirection::S => "S"
BatchRecordPutLOCDataLatDirection::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend BatchRecordPutLOCDataLatDirection with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutLOCDataLatDirection with fn from_json(
value,
path,
) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"N" => Option::Some(BatchRecordPutLOCDataLatDirection::N)
"S" => Option::Some(BatchRecordPutLOCDataLatDirection::S)
_ => Option::None
}
},
raw => BatchRecordPutLOCDataLatDirection::Custom(raw),
)
}
///|
///
/// Longitude direction.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum BatchRecordPutLOCDataLongDirection {
E
W
Custom(String)
}
///|
pub extend BatchRecordPutLOCDataLongDirection with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutLOCDataLongDirection with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend BatchRecordPutLOCDataLongDirection with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutLOCDataLongDirection with fn to_json(self) {
let raw = match self {
BatchRecordPutLOCDataLongDirection::E => "E"
BatchRecordPutLOCDataLongDirection::W => "W"
BatchRecordPutLOCDataLongDirection::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend BatchRecordPutLOCDataLongDirection with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutLOCDataLongDirection with fn from_json(
value,
path,
) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"E" => Option::Some(BatchRecordPutLOCDataLongDirection::E)
"W" => Option::Some(BatchRecordPutLOCDataLongDirection::W)
_ => Option::None
}
},
raw => BatchRecordPutLOCDataLongDirection::Custom(raw),
)
}
///|
///
/// Components of a LOC record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutLOCData {
altitude : Double?
lat_degrees : Int32?
lat_direction : BatchRecordPutLOCDataLatDirection?
lat_minutes : Int32?
lat_seconds : Double?
long_degrees : Int32?
long_direction : BatchRecordPutLOCDataLongDirection?
long_minutes : Int32?
long_seconds : Double?
precision_horz : Double?
precision_vert : Double?
size : Double?
}
///|
pub extend BatchRecordPutLOCData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutLOCData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutLOCData with omitted optional fields absent.
pub fn BatchRecordPutLOCData::new(
altitude? : Double,
lat_degrees? : Int32,
lat_direction? : BatchRecordPutLOCDataLatDirection,
lat_minutes? : Int32,
lat_seconds? : Double,
long_degrees? : Int32,
long_direction? : BatchRecordPutLOCDataLongDirection,
long_minutes? : Int32,
long_seconds? : Double,
precision_horz? : Double,
precision_vert? : Double,
size? : Double,
) -> BatchRecordPutLOCData {
{
altitude,
lat_degrees,
lat_direction,
lat_minutes,
lat_seconds,
long_degrees,
long_direction,
long_minutes,
long_seconds,
precision_horz,
precision_vert,
size,
}
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutLOCData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutLOCData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("altitude", self.altitude)
.opt("lat_degrees", self.lat_degrees)
.opt("lat_direction", self.lat_direction)
.opt("lat_minutes", self.lat_minutes)
.opt("lat_seconds", self.lat_seconds)
.opt("long_degrees", self.long_degrees)
.opt("long_direction", self.long_direction)
.opt("long_minutes", self.long_minutes)
.opt("long_seconds", self.long_seconds)
.opt("precision_horz", self.precision_horz)
.opt("precision_vert", self.precision_vert)
.opt("size", self.size)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutLOCData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutLOCData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
altitude: @sdkjson.opt_field(obj, "altitude", path),
lat_degrees: @sdkjson.opt_field(obj, "lat_degrees", path),
lat_direction: @sdkjson.opt_field(obj, "lat_direction", path),
lat_minutes: @sdkjson.opt_field(obj, "lat_minutes", path),
lat_seconds: @sdkjson.opt_field(obj, "lat_seconds", path),
long_degrees: @sdkjson.opt_field(obj, "long_degrees", path),
long_direction: @sdkjson.opt_field(obj, "long_direction", path),
long_minutes: @sdkjson.opt_field(obj, "long_minutes", path),
long_seconds: @sdkjson.opt_field(obj, "long_seconds", path),
precision_horz: @sdkjson.opt_field(obj, "precision_horz", path),
precision_vert: @sdkjson.opt_field(obj, "precision_vert", path),
size: @sdkjson.opt_field(obj, "size", path),
}
}
///|
///
/// Generated representation of BatchRecordPutLOC.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutLOC {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutLOCData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutLOC with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutLOC with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutLOC with omitted optional fields absent.
pub fn BatchRecordPutLOC::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutLOCData,
type_? : String,
) -> BatchRecordPutLOC {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutLOC with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutLOC with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutLOC with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutLOC with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a NAPTR record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutNAPTRData {
flags : String?
order : Int32?
preference : Int32?
regex : String?
replacement : String?
service : String?
}
///|
pub extend BatchRecordPutNAPTRData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutNAPTRData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutNAPTRData with omitted optional fields absent.
pub fn BatchRecordPutNAPTRData::new(
flags? : String,
order? : Int32,
preference? : Int32,
regex? : String,
replacement? : String,
service? : String,
) -> BatchRecordPutNAPTRData {
{ flags, order, preference, regex, replacement, service, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutNAPTRData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutNAPTRData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("flags", self.flags)
.opt("order", self.order)
.opt("preference", self.preference)
.opt("regex", self.regex)
.opt("replacement", self.replacement)
.opt("service", self.service)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutNAPTRData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutNAPTRData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
flags: @sdkjson.opt_field(obj, "flags", path),
order: @sdkjson.opt_field(obj, "order", path),
preference: @sdkjson.opt_field(obj, "preference", path),
regex: @sdkjson.opt_field(obj, "regex", path),
replacement: @sdkjson.opt_field(obj, "replacement", path),
service: @sdkjson.opt_field(obj, "service", path),
}
}
///|
///
/// Generated representation of BatchRecordPutNAPTR.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutNAPTR {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutNAPTRData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutNAPTR with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutNAPTR with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutNAPTR with omitted optional fields absent.
pub fn BatchRecordPutNAPTR::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutNAPTRData,
type_? : String,
) -> BatchRecordPutNAPTR {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutNAPTR with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutNAPTR with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutNAPTR with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutNAPTR with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a SMIMEA record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutSMIMEAData {
certificate : String?
matching_type : Int32?
selector : Int32?
usage : Int32?
}
///|
pub extend BatchRecordPutSMIMEAData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutSMIMEAData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutSMIMEAData with omitted optional fields absent.
pub fn BatchRecordPutSMIMEAData::new(
certificate? : String,
matching_type? : Int32,
selector? : Int32,
usage? : Int32,
) -> BatchRecordPutSMIMEAData {
{ certificate, matching_type, selector, usage, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutSMIMEAData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutSMIMEAData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("certificate", self.certificate)
.opt("matching_type", self.matching_type)
.opt("selector", self.selector)
.opt("usage", self.usage)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutSMIMEAData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutSMIMEAData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
certificate: @sdkjson.opt_field(obj, "certificate", path),
matching_type: @sdkjson.opt_field(obj, "matching_type", path),
selector: @sdkjson.opt_field(obj, "selector", path),
usage: @sdkjson.opt_field(obj, "usage", path),
}
}
///|
///
/// Generated representation of BatchRecordPutSMIMEA.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutSMIMEA {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutSMIMEAData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutSMIMEA with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutSMIMEA with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutSMIMEA with omitted optional fields absent.
pub fn BatchRecordPutSMIMEA::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutSMIMEAData,
type_? : String,
) -> BatchRecordPutSMIMEA {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutSMIMEA with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutSMIMEA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutSMIMEA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutSMIMEA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a SRV record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutSRVData {
port : Int32?
priority : Int32?
target : String?
weight : Int32?
}
///|
pub extend BatchRecordPutSRVData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutSRVData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutSRVData with omitted optional fields absent.
pub fn BatchRecordPutSRVData::new(
port? : Int32,
priority? : Int32,
target? : String,
weight? : Int32,
) -> BatchRecordPutSRVData {
{ port, priority, target, weight, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutSRVData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutSRVData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("port", self.port)
.opt("priority", self.priority)
.opt("target", self.target)
.opt("weight", self.weight)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutSRVData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutSRVData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
port: @sdkjson.opt_field(obj, "port", path),
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
weight: @sdkjson.opt_field(obj, "weight", path),
}
}
///|
///
/// Generated representation of BatchRecordPutSRV.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutSRV {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutSRVData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutSRV with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutSRV with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutSRV with omitted optional fields absent.
pub fn BatchRecordPutSRV::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutSRVData,
type_? : String,
) -> BatchRecordPutSRV {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutSRV with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutSRV with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutSRV with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutSRV with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a SSHFP record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutSSHFPData {
algorithm : Int32?
fingerprint : String?
type_ : Int32?
}
///|
pub extend BatchRecordPutSSHFPData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutSSHFPData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutSSHFPData with omitted optional fields absent.
pub fn BatchRecordPutSSHFPData::new(
algorithm? : Int32,
fingerprint? : String,
type_? : Int32,
) -> BatchRecordPutSSHFPData {
{ algorithm, fingerprint, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutSSHFPData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutSSHFPData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("fingerprint", self.fingerprint)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutSSHFPData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutSSHFPData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
fingerprint: @sdkjson.opt_field(obj, "fingerprint", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Generated representation of BatchRecordPutSSHFP.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutSSHFP {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutSSHFPData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutSSHFP with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutSSHFP with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutSSHFP with omitted optional fields absent.
pub fn BatchRecordPutSSHFP::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutSSHFPData,
type_? : String,
) -> BatchRecordPutSSHFP {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutSSHFP with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutSSHFP with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutSSHFP with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutSSHFP with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a SVCB record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutSVCBData {
priority : Int32?
target : String?
value : String?
}
///|
pub extend BatchRecordPutSVCBData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutSVCBData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutSVCBData with omitted optional fields absent.
pub fn BatchRecordPutSVCBData::new(
priority? : Int32,
target? : String,
value? : String,
) -> BatchRecordPutSVCBData {
{ priority, target, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutSVCBData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutSVCBData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("priority", self.priority)
.opt("target", self.target)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutSVCBData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutSVCBData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Generated representation of BatchRecordPutSVCB.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutSVCB {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutSVCBData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutSVCB with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutSVCB with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutSVCB with omitted optional fields absent.
pub fn BatchRecordPutSVCB::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutSVCBData,
type_? : String,
) -> BatchRecordPutSVCB {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutSVCB with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutSVCB with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutSVCB with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutSVCB with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a TLSA record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutTLSAData {
certificate : String?
matching_type : Int32?
selector : Int32?
usage : Int32?
}
///|
pub extend BatchRecordPutTLSAData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutTLSAData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutTLSAData with omitted optional fields absent.
pub fn BatchRecordPutTLSAData::new(
certificate? : String,
matching_type? : Int32,
selector? : Int32,
usage? : Int32,
) -> BatchRecordPutTLSAData {
{ certificate, matching_type, selector, usage, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutTLSAData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutTLSAData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("certificate", self.certificate)
.opt("matching_type", self.matching_type)
.opt("selector", self.selector)
.opt("usage", self.usage)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutTLSAData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutTLSAData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
certificate: @sdkjson.opt_field(obj, "certificate", path),
matching_type: @sdkjson.opt_field(obj, "matching_type", path),
selector: @sdkjson.opt_field(obj, "selector", path),
usage: @sdkjson.opt_field(obj, "usage", path),
}
}
///|
///
/// Generated representation of BatchRecordPutTLSA.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutTLSA {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutTLSAData?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutTLSA with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutTLSA with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutTLSA with omitted optional fields absent.
pub fn BatchRecordPutTLSA::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutTLSAData,
type_? : String,
) -> BatchRecordPutTLSA {
{ comment, name, proxied, settings, tags, ttl, content, data, type_, id, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutTLSA with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutTLSA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutTLSA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutTLSA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Components of a URI record.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutURIData {
target : String?
weight : Int32?
}
///|
pub extend BatchRecordPutURIData with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutURIData with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutURIData with omitted optional fields absent.
pub fn BatchRecordPutURIData::new(
target? : String,
weight? : Int32,
) -> BatchRecordPutURIData {
{ target, weight, }
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutURIData with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutURIData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("target", self.target)
.opt("weight", self.weight)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutURIData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutURIData with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
target: @sdkjson.opt_field(obj, "target", path),
weight: @sdkjson.opt_field(obj, "weight", path),
}
}
///|
///
/// Generated representation of BatchRecordPutURI.
#derive(Eq, @debug.Debug)
pub(all) struct BatchRecordPutURI {
comment : String?
name : String?
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32?
content : String?
data : BatchRecordPutURIData?
priority : Int32?
type_ : String?
id : String
}
///|
pub extend BatchRecordPutURI with Eq::{equal, not_equal}
///|
pub extend BatchRecordPutURI with @debug.Debug::{to_repr}
///|
///
/// Creates a BatchRecordPutURI with omitted optional fields absent.
pub fn BatchRecordPutURI::new(
id~ : String,
comment? : String,
name? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
ttl? : Int32,
content? : String,
data? : BatchRecordPutURIData,
priority? : Int32,
type_? : String,
) -> BatchRecordPutURI {
{
comment,
name,
proxied,
settings,
tags,
ttl,
content,
data,
priority,
type_,
id,
}
}
///|
///
/// Encodes this value as JSON.
pub extend BatchRecordPutURI with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPutURI with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("comment", self.comment)
.opt("name", self.name)
.opt("proxied", self.proxied)
.opt("settings", self.settings)
.opt("tags", self.tags)
.opt("ttl", self.ttl)
.opt("content", self.content)
.opt("data", self.data)
.opt("priority", self.priority)
.opt("type", self.type_)
.field("id", self.id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend BatchRecordPutURI with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPutURI with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.opt_field(obj, "comment", path),
name: @sdkjson.opt_field(obj, "name", path),
proxied: @sdkjson.opt_field(obj, "proxied", path),
settings: @sdkjson.opt_field(obj, "settings", path),
tags: @sdkjson.opt_field(obj, "tags", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
content: @sdkjson.opt_field(obj, "content", path),
data: @sdkjson.opt_field(obj, "data", path),
priority: @sdkjson.opt_field(obj, "priority", path),
type_: @sdkjson.opt_field(obj, "type", path),
id: required_field(obj, "id", path),
}
}
///|
///
/// Generated tagged union BatchRecordPut.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum BatchRecordPut {
A(BatchRecordPutA)
AAAA(BatchRecordPutAAAA)
CNAME(BatchRecordPutCNAME)
MX(BatchRecordPutMX)
NS(BatchRecordPutNS)
OPENPGPKEY(BatchRecordPutOPENPGPKEY)
PTR(BatchRecordPutPTR)
TXT(BatchRecordPutTXT)
CAA(BatchRecordPutCAA)
CERT(BatchRecordPutCERT)
DNSKEY(BatchRecordPutDNSKEY)
DS(BatchRecordPutDS)
HTTPS(BatchRecordPutHTTPS)
LOC(BatchRecordPutLOC)
NAPTR(BatchRecordPutNAPTR)
SMIMEA(BatchRecordPutSMIMEA)
SRV(BatchRecordPutSRV)
SSHFP(BatchRecordPutSSHFP)
SVCB(BatchRecordPutSVCB)
TLSA(BatchRecordPutTLSA)
URI(BatchRecordPutURI)
Unknown(String, Json)
}
///|
pub extend BatchRecordPut with Eq::{equal, not_equal}
///|
pub extend BatchRecordPut with @debug.Debug::{to_repr}
///|
///
/// Encodes this tagged union as JSON.
pub extend BatchRecordPut with ToJson::{to_json}
///|
pub impl ToJson for BatchRecordPut with fn to_json(self) {
match self {
BatchRecordPut::A(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "A")
BatchRecordPut::AAAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "AAAA")
BatchRecordPut::CNAME(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CNAME")
BatchRecordPut::MX(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "MX")
BatchRecordPut::NS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NS")
BatchRecordPut::OPENPGPKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "OPENPGPKEY")
BatchRecordPut::PTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "PTR")
BatchRecordPut::TXT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TXT")
BatchRecordPut::CAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CAA")
BatchRecordPut::CERT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CERT")
BatchRecordPut::DNSKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DNSKEY")
BatchRecordPut::DS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DS")
BatchRecordPut::HTTPS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "HTTPS")
BatchRecordPut::LOC(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "LOC")
BatchRecordPut::NAPTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NAPTR")
BatchRecordPut::SMIMEA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SMIMEA")
BatchRecordPut::SRV(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SRV")
BatchRecordPut::SSHFP(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SSHFP")
BatchRecordPut::SVCB(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SVCB")
BatchRecordPut::TLSA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TLSA")
BatchRecordPut::URI(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "URI")
BatchRecordPut::Unknown(_, value) => value
}
}
///|
///
/// Decodes this tagged union from JSON.
pub extend BatchRecordPut with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for BatchRecordPut with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
let tag : String = required_field(obj, "type", path)
match tag {
"A" => BatchRecordPut::A(@json.from_json(value, path~))
"AAAA" => BatchRecordPut::AAAA(@json.from_json(value, path~))
"CNAME" => BatchRecordPut::CNAME(@json.from_json(value, path~))
"MX" => BatchRecordPut::MX(@json.from_json(value, path~))
"NS" => BatchRecordPut::NS(@json.from_json(value, path~))
"OPENPGPKEY" => BatchRecordPut::OPENPGPKEY(@json.from_json(value, path~))
"PTR" => BatchRecordPut::PTR(@json.from_json(value, path~))
"TXT" => BatchRecordPut::TXT(@json.from_json(value, path~))
"CAA" => BatchRecordPut::CAA(@json.from_json(value, path~))
"CERT" => BatchRecordPut::CERT(@json.from_json(value, path~))
"DNSKEY" => BatchRecordPut::DNSKEY(@json.from_json(value, path~))
"DS" => BatchRecordPut::DS(@json.from_json(value, path~))
"HTTPS" => BatchRecordPut::HTTPS(@json.from_json(value, path~))
"LOC" => BatchRecordPut::LOC(@json.from_json(value, path~))
"NAPTR" => BatchRecordPut::NAPTR(@json.from_json(value, path~))
"SMIMEA" => BatchRecordPut::SMIMEA(@json.from_json(value, path~))
"SRV" => BatchRecordPut::SRV(@json.from_json(value, path~))
"SSHFP" => BatchRecordPut::SSHFP(@json.from_json(value, path~))
"SVCB" => BatchRecordPut::SVCB(@json.from_json(value, path~))
"TLSA" => BatchRecordPut::TLSA(@json.from_json(value, path~))
"URI" => BatchRecordPut::URI(@json.from_json(value, path~))
other => BatchRecordPut::Unknown(other, value)
}
}
///|
///
/// Generated tagged union DnsRecordPatch.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecordPatch {
A(ARecord)
AAAA(AAAARecord)
CNAME(CNAMERecord)
MX(MXRecord)
NS(NSRecord)
OPENPGPKEY(OPENPGPKEYRecord)
PTR(PTRRecord)
TXT(TXTRecord)
CAA(CAARecord)
CERT(CERTRecord)
DNSKEY(DNSKEYRecord)
DS(DSRecord)
HTTPS(HTTPSRecord)
LOC(LOCRecord)
NAPTR(NAPTRRecord)
SMIMEA(SMIMEARecord)
SRV(SRVRecord)
SSHFP(SSHFPRecord)
SVCB(SVCBRecord)
TLSA(TLSARecord)
URI(URIRecord)
Unknown(String, Json)
}
///|
pub extend DnsRecordPatch with Eq::{equal, not_equal}
///|
pub extend DnsRecordPatch with @debug.Debug::{to_repr}
///|
///
/// Encodes this tagged union as JSON.
pub extend DnsRecordPatch with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordPatch with fn to_json(self) {
match self {
DnsRecordPatch::A(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "A")
DnsRecordPatch::AAAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "AAAA")
DnsRecordPatch::CNAME(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CNAME")
DnsRecordPatch::MX(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "MX")
DnsRecordPatch::NS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NS")
DnsRecordPatch::OPENPGPKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "OPENPGPKEY")
DnsRecordPatch::PTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "PTR")
DnsRecordPatch::TXT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TXT")
DnsRecordPatch::CAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CAA")
DnsRecordPatch::CERT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CERT")
DnsRecordPatch::DNSKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DNSKEY")
DnsRecordPatch::DS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DS")
DnsRecordPatch::HTTPS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "HTTPS")
DnsRecordPatch::LOC(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "LOC")
DnsRecordPatch::NAPTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NAPTR")
DnsRecordPatch::SMIMEA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SMIMEA")
DnsRecordPatch::SRV(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SRV")
DnsRecordPatch::SSHFP(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SSHFP")
DnsRecordPatch::SVCB(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SVCB")
DnsRecordPatch::TLSA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TLSA")
DnsRecordPatch::URI(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "URI")
DnsRecordPatch::Unknown(_, value) => value
}
}
///|
///
/// Decodes this tagged union from JSON.
pub extend DnsRecordPatch with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordPatch with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
let tag : String = required_field(obj, "type", path)
match tag {
"A" => DnsRecordPatch::A(@json.from_json(value, path~))
"AAAA" => DnsRecordPatch::AAAA(@json.from_json(value, path~))
"CNAME" => DnsRecordPatch::CNAME(@json.from_json(value, path~))
"MX" => DnsRecordPatch::MX(@json.from_json(value, path~))
"NS" => DnsRecordPatch::NS(@json.from_json(value, path~))
"OPENPGPKEY" => DnsRecordPatch::OPENPGPKEY(@json.from_json(value, path~))
"PTR" => DnsRecordPatch::PTR(@json.from_json(value, path~))
"TXT" => DnsRecordPatch::TXT(@json.from_json(value, path~))
"CAA" => DnsRecordPatch::CAA(@json.from_json(value, path~))
"CERT" => DnsRecordPatch::CERT(@json.from_json(value, path~))
"DNSKEY" => DnsRecordPatch::DNSKEY(@json.from_json(value, path~))
"DS" => DnsRecordPatch::DS(@json.from_json(value, path~))
"HTTPS" => DnsRecordPatch::HTTPS(@json.from_json(value, path~))
"LOC" => DnsRecordPatch::LOC(@json.from_json(value, path~))
"NAPTR" => DnsRecordPatch::NAPTR(@json.from_json(value, path~))
"SMIMEA" => DnsRecordPatch::SMIMEA(@json.from_json(value, path~))
"SRV" => DnsRecordPatch::SRV(@json.from_json(value, path~))
"SSHFP" => DnsRecordPatch::SSHFP(@json.from_json(value, path~))
"SVCB" => DnsRecordPatch::SVCB(@json.from_json(value, path~))
"TLSA" => DnsRecordPatch::TLSA(@json.from_json(value, path~))
"URI" => DnsRecordPatch::URI(@json.from_json(value, path~))
other => DnsRecordPatch::Unknown(other, value)
}
}
///|
///
/// Generated tagged union DnsRecord.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecord {
A(ARecord)
AAAA(AAAARecord)
CNAME(CNAMERecord)
MX(MXRecord)
NS(NSRecord)
OPENPGPKEY(OPENPGPKEYRecord)
PTR(PTRRecord)
TXT(TXTRecord)
CAA(CAARecord)
CERT(CERTRecord)
DNSKEY(DNSKEYRecord)
DS(DSRecord)
HTTPS(HTTPSRecord)
LOC(LOCRecord)
NAPTR(NAPTRRecord)
SMIMEA(SMIMEARecord)
SRV(SRVRecord)
SSHFP(SSHFPRecord)
SVCB(SVCBRecord)
TLSA(TLSARecord)
URI(URIRecord)
Unknown(String, Json)
}
///|
pub extend DnsRecord with Eq::{equal, not_equal}
///|
pub extend DnsRecord with @debug.Debug::{to_repr}
///|
///
/// Encodes this tagged union as JSON.
pub extend DnsRecord with ToJson::{to_json}
///|
pub impl ToJson for DnsRecord with fn to_json(self) {
match self {
DnsRecord::A(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "A")
DnsRecord::AAAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "AAAA")
DnsRecord::CNAME(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CNAME")
DnsRecord::MX(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "MX")
DnsRecord::NS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NS")
DnsRecord::OPENPGPKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "OPENPGPKEY")
DnsRecord::PTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "PTR")
DnsRecord::TXT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TXT")
DnsRecord::CAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CAA")
DnsRecord::CERT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CERT")
DnsRecord::DNSKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DNSKEY")
DnsRecord::DS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DS")
DnsRecord::HTTPS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "HTTPS")
DnsRecord::LOC(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "LOC")
DnsRecord::NAPTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NAPTR")
DnsRecord::SMIMEA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SMIMEA")
DnsRecord::SRV(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SRV")
DnsRecord::SSHFP(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SSHFP")
DnsRecord::SVCB(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SVCB")
DnsRecord::TLSA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TLSA")
DnsRecord::URI(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "URI")
DnsRecord::Unknown(_, value) => value
}
}
///|
///
/// Decodes this tagged union from JSON.
pub extend DnsRecord with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecord with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
let tag : String = required_field(obj, "type", path)
match tag {
"A" => DnsRecord::A(@json.from_json(value, path~))
"AAAA" => DnsRecord::AAAA(@json.from_json(value, path~))
"CNAME" => DnsRecord::CNAME(@json.from_json(value, path~))
"MX" => DnsRecord::MX(@json.from_json(value, path~))
"NS" => DnsRecord::NS(@json.from_json(value, path~))
"OPENPGPKEY" => DnsRecord::OPENPGPKEY(@json.from_json(value, path~))
"PTR" => DnsRecord::PTR(@json.from_json(value, path~))
"TXT" => DnsRecord::TXT(@json.from_json(value, path~))
"CAA" => DnsRecord::CAA(@json.from_json(value, path~))
"CERT" => DnsRecord::CERT(@json.from_json(value, path~))
"DNSKEY" => DnsRecord::DNSKEY(@json.from_json(value, path~))
"DS" => DnsRecord::DS(@json.from_json(value, path~))
"HTTPS" => DnsRecord::HTTPS(@json.from_json(value, path~))
"LOC" => DnsRecord::LOC(@json.from_json(value, path~))
"NAPTR" => DnsRecord::NAPTR(@json.from_json(value, path~))
"SMIMEA" => DnsRecord::SMIMEA(@json.from_json(value, path~))
"SRV" => DnsRecord::SRV(@json.from_json(value, path~))
"SSHFP" => DnsRecord::SSHFP(@json.from_json(value, path~))
"SVCB" => DnsRecord::SVCB(@json.from_json(value, path~))
"TLSA" => DnsRecord::TLSA(@json.from_json(value, path~))
"URI" => DnsRecord::URI(@json.from_json(value, path~))
other => DnsRecord::Unknown(other, value)
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseAMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseAMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseAMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseAMeta with omitted optional fields absent.
pub fn DnsRecordResponseAMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseAMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseAMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseAMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseAMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseAMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseA.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseA {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
private_routing : Bool?
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseAMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseA with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseA with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseA with omitted optional fields absent.
pub fn DnsRecordResponseA::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseAMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
private_routing? : Bool,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseA {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
private_routing,
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseA with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.opt("private_routing", self.private_routing)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
private_routing: @sdkjson.opt_field(obj, "private_routing", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseAAAAMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseAAAAMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseAAAAMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseAAAAMeta with omitted optional fields absent.
pub fn DnsRecordResponseAAAAMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseAAAAMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseAAAAMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseAAAAMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseAAAAMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseAAAAMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseAAAA.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseAAAA {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
private_routing : Bool?
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseAAAAMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseAAAA with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseAAAA with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseAAAA with omitted optional fields absent.
pub fn DnsRecordResponseAAAA::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseAAAAMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
private_routing? : Bool,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseAAAA {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
private_routing,
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseAAAA with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseAAAA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.opt("private_routing", self.private_routing)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseAAAA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseAAAA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
private_routing: @sdkjson.opt_field(obj, "private_routing", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Generated representation of DnsRecordResponseCNAMESettings.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseCNAMESettings {
flatten_cname : Bool?
}
///|
pub extend DnsRecordResponseCNAMESettings with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseCNAMESettings with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseCNAMESettings with omitted optional fields absent.
pub fn DnsRecordResponseCNAMESettings::new(
flatten_cname? : Bool,
) -> DnsRecordResponseCNAMESettings {
{ flatten_cname, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseCNAMESettings with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseCNAMESettings with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("flatten_cname", self.flatten_cname).build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseCNAMESettings with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseCNAMESettings with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{ flatten_cname: @sdkjson.opt_field(obj, "flatten_cname", path), }
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseCNAMEMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseCNAMEMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseCNAMEMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseCNAMEMeta with omitted optional fields absent.
pub fn DnsRecordResponseCNAMEMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseCNAMEMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseCNAMEMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseCNAMEMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseCNAMEMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseCNAMEMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseCNAME.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseCNAME {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordResponseCNAMESettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseCNAMEMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseCNAME with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseCNAME with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseCNAME with omitted optional fields absent.
pub fn DnsRecordResponseCNAME::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseCNAMEMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordResponseCNAMESettings,
tags? : Array[String],
content? : String,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseCNAME {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseCNAME with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseCNAME with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseCNAME with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseCNAME with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseMXMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseMXMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseMXMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseMXMeta with omitted optional fields absent.
pub fn DnsRecordResponseMXMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseMXMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseMXMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseMXMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseMXMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseMXMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseMX.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseMX {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
priority : Int32?
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseMXMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseMX with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseMX with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseMX with omitted optional fields absent.
pub fn DnsRecordResponseMX::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseMXMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
priority? : Int32,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseMX {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
priority,
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseMX with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseMX with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.opt("priority", self.priority)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseMX with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseMX with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
priority: @sdkjson.opt_field(obj, "priority", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseNSMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseNSMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseNSMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseNSMeta with omitted optional fields absent.
pub fn DnsRecordResponseNSMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseNSMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseNSMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseNSMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseNSMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseNSMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseNS.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseNS {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseNSMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseNS with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseNS with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseNS with omitted optional fields absent.
pub fn DnsRecordResponseNS::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseNSMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseNS {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseNS with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseNS with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseNS with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseNS with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseOPENPGPKEYMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseOPENPGPKEYMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseOPENPGPKEYMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseOPENPGPKEYMeta with omitted optional fields absent.
pub fn DnsRecordResponseOPENPGPKEYMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseOPENPGPKEYMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseOPENPGPKEYMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseOPENPGPKEYMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseOPENPGPKEYMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseOPENPGPKEYMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseOPENPGPKEY.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseOPENPGPKEY {
comment : String?
name : String
proxied : Bool?
settings : DnsRecordSettings?
tags : Array[String]?
ttl : Int32
content : String?
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseOPENPGPKEYMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseOPENPGPKEY with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseOPENPGPKEY with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseOPENPGPKEY with omitted optional fields absent.
pub fn DnsRecordResponseOPENPGPKEY::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseOPENPGPKEYMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseOPENPGPKEY {
{
comment,
name,
proxied,
settings,
tags,
ttl,
content,
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseOPENPGPKEY with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseOPENPGPKEY with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", nullable_presence(self.comment.map(value => value)))
.field("name", self.name)
.presence("proxied", nullable_presence(self.proxied.map(value => value)))
.presence("settings", nullable_presence(self.settings.map(value => value)))
.presence("tags", nullable_presence(self.tags.map(value => value)))
.field("ttl", self.ttl)
.presence("content", nullable_presence(self.content.map(value => value)))
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseOPENPGPKEY with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseOPENPGPKEY with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: decode_nullable_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: decode_nullable_field(obj, "proxied", path),
settings: decode_nullable_field(obj, "settings", path),
tags: decode_nullable_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: decode_nullable_field(obj, "content", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponsePTRMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponsePTRMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponsePTRMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponsePTRMeta with omitted optional fields absent.
pub fn DnsRecordResponsePTRMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponsePTRMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponsePTRMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponsePTRMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponsePTRMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponsePTRMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponsePTR.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponsePTR {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponsePTRMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponsePTR with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponsePTR with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponsePTR with omitted optional fields absent.
pub fn DnsRecordResponsePTR::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponsePTRMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponsePTR {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponsePTR with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponsePTR with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponsePTR with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponsePTR with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseTXTMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseTXTMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseTXTMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseTXTMeta with omitted optional fields absent.
pub fn DnsRecordResponseTXTMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseTXTMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseTXTMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseTXTMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseTXTMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseTXTMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseTXT.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseTXT {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseTXTMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseTXT with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseTXT with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseTXT with omitted optional fields absent.
pub fn DnsRecordResponseTXT::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseTXTMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseTXT {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseTXT with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseTXT with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseTXT with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseTXT with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a CAA record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseCAAData {
flags : Int32?
tag : String?
value : String?
}
///|
pub extend DnsRecordResponseCAAData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseCAAData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseCAAData with omitted optional fields absent.
pub fn DnsRecordResponseCAAData::new(
flags? : Int32,
tag? : String,
value? : String,
) -> DnsRecordResponseCAAData {
{ flags, tag, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseCAAData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseCAAData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("flags", self.flags)
.opt("tag", self.tag)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseCAAData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseCAAData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
flags: @sdkjson.opt_field(obj, "flags", path),
tag: @sdkjson.opt_field(obj, "tag", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseCAAMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseCAAMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseCAAMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseCAAMeta with omitted optional fields absent.
pub fn DnsRecordResponseCAAMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseCAAMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseCAAMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseCAAMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseCAAMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseCAAMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseCAA.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseCAA {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseCAAData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseCAAMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseCAA with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseCAA with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseCAA with omitted optional fields absent.
pub fn DnsRecordResponseCAA::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseCAAMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseCAAData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseCAA {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseCAA with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseCAA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseCAA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseCAA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a CERT record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseCERTData {
algorithm : Int32?
certificate : String?
key_tag : Int32?
type_ : Int32?
}
///|
pub extend DnsRecordResponseCERTData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseCERTData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseCERTData with omitted optional fields absent.
pub fn DnsRecordResponseCERTData::new(
algorithm? : Int32,
certificate? : String,
key_tag? : Int32,
type_? : Int32,
) -> DnsRecordResponseCERTData {
{ algorithm, certificate, key_tag, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseCERTData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseCERTData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("certificate", self.certificate)
.opt("key_tag", self.key_tag)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseCERTData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseCERTData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
certificate: @sdkjson.opt_field(obj, "certificate", path),
key_tag: @sdkjson.opt_field(obj, "key_tag", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseCERTMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseCERTMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseCERTMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseCERTMeta with omitted optional fields absent.
pub fn DnsRecordResponseCERTMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseCERTMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseCERTMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseCERTMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseCERTMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseCERTMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseCERT.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseCERT {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseCERTData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseCERTMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseCERT with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseCERT with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseCERT with omitted optional fields absent.
pub fn DnsRecordResponseCERT::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseCERTMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseCERTData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseCERT {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseCERT with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseCERT with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseCERT with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseCERT with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a DNSKEY record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseDNSKEYData {
algorithm : Int32?
flags : Int32?
protocol : Int32?
public_key : String?
}
///|
pub extend DnsRecordResponseDNSKEYData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseDNSKEYData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseDNSKEYData with omitted optional fields absent.
pub fn DnsRecordResponseDNSKEYData::new(
algorithm? : Int32,
flags? : Int32,
protocol? : Int32,
public_key? : String,
) -> DnsRecordResponseDNSKEYData {
{ algorithm, flags, protocol, public_key, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseDNSKEYData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseDNSKEYData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("flags", self.flags)
.opt("protocol", self.protocol)
.opt("public_key", self.public_key)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseDNSKEYData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseDNSKEYData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
flags: @sdkjson.opt_field(obj, "flags", path),
protocol: @sdkjson.opt_field(obj, "protocol", path),
public_key: @sdkjson.opt_field(obj, "public_key", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseDNSKEYMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseDNSKEYMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseDNSKEYMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseDNSKEYMeta with omitted optional fields absent.
pub fn DnsRecordResponseDNSKEYMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseDNSKEYMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseDNSKEYMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseDNSKEYMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseDNSKEYMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseDNSKEYMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseDNSKEY.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseDNSKEY {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseDNSKEYData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseDNSKEYMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseDNSKEY with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseDNSKEY with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseDNSKEY with omitted optional fields absent.
pub fn DnsRecordResponseDNSKEY::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseDNSKEYMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseDNSKEYData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseDNSKEY {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseDNSKEY with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseDNSKEY with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseDNSKEY with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseDNSKEY with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a DS record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseDSData {
algorithm : Int32?
digest : String?
digest_type : Int32?
key_tag : Int32?
}
///|
pub extend DnsRecordResponseDSData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseDSData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseDSData with omitted optional fields absent.
pub fn DnsRecordResponseDSData::new(
algorithm? : Int32,
digest? : String,
digest_type? : Int32,
key_tag? : Int32,
) -> DnsRecordResponseDSData {
{ algorithm, digest, digest_type, key_tag, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseDSData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseDSData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("digest", self.digest)
.opt("digest_type", self.digest_type)
.opt("key_tag", self.key_tag)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseDSData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseDSData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
digest: @sdkjson.opt_field(obj, "digest", path),
digest_type: @sdkjson.opt_field(obj, "digest_type", path),
key_tag: @sdkjson.opt_field(obj, "key_tag", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseDSMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseDSMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseDSMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseDSMeta with omitted optional fields absent.
pub fn DnsRecordResponseDSMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseDSMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseDSMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseDSMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseDSMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseDSMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseDS.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseDS {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseDSData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseDSMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseDS with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseDS with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseDS with omitted optional fields absent.
pub fn DnsRecordResponseDS::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseDSMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseDSData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseDS {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseDS with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseDS with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseDS with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseDS with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a HTTPS record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseHTTPSData {
priority : Int32?
target : String?
value : String?
}
///|
pub extend DnsRecordResponseHTTPSData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseHTTPSData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseHTTPSData with omitted optional fields absent.
pub fn DnsRecordResponseHTTPSData::new(
priority? : Int32,
target? : String,
value? : String,
) -> DnsRecordResponseHTTPSData {
{ priority, target, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseHTTPSData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseHTTPSData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("priority", self.priority)
.opt("target", self.target)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseHTTPSData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseHTTPSData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseHTTPSMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseHTTPSMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseHTTPSMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseHTTPSMeta with omitted optional fields absent.
pub fn DnsRecordResponseHTTPSMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseHTTPSMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseHTTPSMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseHTTPSMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseHTTPSMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseHTTPSMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseHTTPS.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseHTTPS {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseHTTPSData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseHTTPSMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseHTTPS with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseHTTPS with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseHTTPS with omitted optional fields absent.
pub fn DnsRecordResponseHTTPS::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseHTTPSMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseHTTPSData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseHTTPS {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseHTTPS with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseHTTPS with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseHTTPS with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseHTTPS with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Latitude direction.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecordResponseLOCDataLatDirection {
N
S
Unknown(String)
}
///|
pub extend DnsRecordResponseLOCDataLatDirection with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseLOCDataLatDirection with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend DnsRecordResponseLOCDataLatDirection with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseLOCDataLatDirection with fn to_json(self) {
let raw = match self {
DnsRecordResponseLOCDataLatDirection::N => "N"
DnsRecordResponseLOCDataLatDirection::S => "S"
DnsRecordResponseLOCDataLatDirection::Unknown(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend DnsRecordResponseLOCDataLatDirection with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseLOCDataLatDirection with fn from_json(
value,
path,
) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"N" => Option::Some(DnsRecordResponseLOCDataLatDirection::N)
"S" => Option::Some(DnsRecordResponseLOCDataLatDirection::S)
_ => Option::None
}
},
raw => DnsRecordResponseLOCDataLatDirection::Unknown(raw),
)
}
///|
///
/// Longitude direction.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecordResponseLOCDataLongDirection {
E
W
Unknown(String)
}
///|
pub extend DnsRecordResponseLOCDataLongDirection with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseLOCDataLongDirection with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend DnsRecordResponseLOCDataLongDirection with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseLOCDataLongDirection with fn to_json(self) {
let raw = match self {
DnsRecordResponseLOCDataLongDirection::E => "E"
DnsRecordResponseLOCDataLongDirection::W => "W"
DnsRecordResponseLOCDataLongDirection::Unknown(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend DnsRecordResponseLOCDataLongDirection with @json.FromJson::{
from_json,
}
///|
pub impl @json.FromJson for DnsRecordResponseLOCDataLongDirection with fn from_json(
value,
path,
) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"E" => Option::Some(DnsRecordResponseLOCDataLongDirection::E)
"W" => Option::Some(DnsRecordResponseLOCDataLongDirection::W)
_ => Option::None
}
},
raw => DnsRecordResponseLOCDataLongDirection::Unknown(raw),
)
}
///|
///
/// Components of a LOC record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseLOCData {
altitude : Double?
lat_degrees : Int32?
lat_direction : DnsRecordResponseLOCDataLatDirection?
lat_minutes : Int32?
lat_seconds : Double?
long_degrees : Int32?
long_direction : DnsRecordResponseLOCDataLongDirection?
long_minutes : Int32?
long_seconds : Double?
precision_horz : Double?
precision_vert : Double?
size : Double?
}
///|
pub extend DnsRecordResponseLOCData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseLOCData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseLOCData with omitted optional fields absent.
pub fn DnsRecordResponseLOCData::new(
altitude? : Double,
lat_degrees? : Int32,
lat_direction? : DnsRecordResponseLOCDataLatDirection,
lat_minutes? : Int32,
lat_seconds? : Double,
long_degrees? : Int32,
long_direction? : DnsRecordResponseLOCDataLongDirection,
long_minutes? : Int32,
long_seconds? : Double,
precision_horz? : Double,
precision_vert? : Double,
size? : Double,
) -> DnsRecordResponseLOCData {
{
altitude,
lat_degrees,
lat_direction,
lat_minutes,
lat_seconds,
long_degrees,
long_direction,
long_minutes,
long_seconds,
precision_horz,
precision_vert,
size,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseLOCData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseLOCData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("altitude", self.altitude)
.opt("lat_degrees", self.lat_degrees)
.opt("lat_direction", self.lat_direction)
.opt("lat_minutes", self.lat_minutes)
.opt("lat_seconds", self.lat_seconds)
.opt("long_degrees", self.long_degrees)
.opt("long_direction", self.long_direction)
.opt("long_minutes", self.long_minutes)
.opt("long_seconds", self.long_seconds)
.opt("precision_horz", self.precision_horz)
.opt("precision_vert", self.precision_vert)
.opt("size", self.size)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseLOCData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseLOCData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
altitude: @sdkjson.opt_field(obj, "altitude", path),
lat_degrees: @sdkjson.opt_field(obj, "lat_degrees", path),
lat_direction: @sdkjson.opt_field(obj, "lat_direction", path),
lat_minutes: @sdkjson.opt_field(obj, "lat_minutes", path),
lat_seconds: @sdkjson.opt_field(obj, "lat_seconds", path),
long_degrees: @sdkjson.opt_field(obj, "long_degrees", path),
long_direction: @sdkjson.opt_field(obj, "long_direction", path),
long_minutes: @sdkjson.opt_field(obj, "long_minutes", path),
long_seconds: @sdkjson.opt_field(obj, "long_seconds", path),
precision_horz: @sdkjson.opt_field(obj, "precision_horz", path),
precision_vert: @sdkjson.opt_field(obj, "precision_vert", path),
size: @sdkjson.opt_field(obj, "size", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseLOCMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseLOCMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseLOCMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseLOCMeta with omitted optional fields absent.
pub fn DnsRecordResponseLOCMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseLOCMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseLOCMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseLOCMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseLOCMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseLOCMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseLOC.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseLOC {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseLOCData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseLOCMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseLOC with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseLOC with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseLOC with omitted optional fields absent.
pub fn DnsRecordResponseLOC::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseLOCMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseLOCData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseLOC {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseLOC with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseLOC with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseLOC with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseLOC with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a NAPTR record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseNAPTRData {
flags : String?
order : Int32?
preference : Int32?
regex : String?
replacement : String?
service : String?
}
///|
pub extend DnsRecordResponseNAPTRData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseNAPTRData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseNAPTRData with omitted optional fields absent.
pub fn DnsRecordResponseNAPTRData::new(
flags? : String,
order? : Int32,
preference? : Int32,
regex? : String,
replacement? : String,
service? : String,
) -> DnsRecordResponseNAPTRData {
{ flags, order, preference, regex, replacement, service, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseNAPTRData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseNAPTRData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("flags", self.flags)
.opt("order", self.order)
.opt("preference", self.preference)
.opt("regex", self.regex)
.opt("replacement", self.replacement)
.opt("service", self.service)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseNAPTRData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseNAPTRData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
flags: @sdkjson.opt_field(obj, "flags", path),
order: @sdkjson.opt_field(obj, "order", path),
preference: @sdkjson.opt_field(obj, "preference", path),
regex: @sdkjson.opt_field(obj, "regex", path),
replacement: @sdkjson.opt_field(obj, "replacement", path),
service: @sdkjson.opt_field(obj, "service", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseNAPTRMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseNAPTRMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseNAPTRMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseNAPTRMeta with omitted optional fields absent.
pub fn DnsRecordResponseNAPTRMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseNAPTRMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseNAPTRMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseNAPTRMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseNAPTRMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseNAPTRMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseNAPTR.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseNAPTR {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseNAPTRData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseNAPTRMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseNAPTR with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseNAPTR with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseNAPTR with omitted optional fields absent.
pub fn DnsRecordResponseNAPTR::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseNAPTRMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseNAPTRData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseNAPTR {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseNAPTR with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseNAPTR with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseNAPTR with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseNAPTR with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a SMIMEA record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSMIMEAData {
certificate : String?
matching_type : Int32?
selector : Int32?
usage : Int32?
}
///|
pub extend DnsRecordResponseSMIMEAData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSMIMEAData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSMIMEAData with omitted optional fields absent.
pub fn DnsRecordResponseSMIMEAData::new(
certificate? : String,
matching_type? : Int32,
selector? : Int32,
usage? : Int32,
) -> DnsRecordResponseSMIMEAData {
{ certificate, matching_type, selector, usage, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSMIMEAData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSMIMEAData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("certificate", self.certificate)
.opt("matching_type", self.matching_type)
.opt("selector", self.selector)
.opt("usage", self.usage)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSMIMEAData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSMIMEAData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
certificate: @sdkjson.opt_field(obj, "certificate", path),
matching_type: @sdkjson.opt_field(obj, "matching_type", path),
selector: @sdkjson.opt_field(obj, "selector", path),
usage: @sdkjson.opt_field(obj, "usage", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSMIMEAMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseSMIMEAMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSMIMEAMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSMIMEAMeta with omitted optional fields absent.
pub fn DnsRecordResponseSMIMEAMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseSMIMEAMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSMIMEAMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSMIMEAMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSMIMEAMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSMIMEAMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseSMIMEA.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSMIMEA {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseSMIMEAData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseSMIMEAMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseSMIMEA with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSMIMEA with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSMIMEA with omitted optional fields absent.
pub fn DnsRecordResponseSMIMEA::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseSMIMEAMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseSMIMEAData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseSMIMEA {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSMIMEA with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSMIMEA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSMIMEA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSMIMEA with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a SRV record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSRVData {
port : Int32?
priority : Int32?
target : String?
weight : Int32?
}
///|
pub extend DnsRecordResponseSRVData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSRVData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSRVData with omitted optional fields absent.
pub fn DnsRecordResponseSRVData::new(
port? : Int32,
priority? : Int32,
target? : String,
weight? : Int32,
) -> DnsRecordResponseSRVData {
{ port, priority, target, weight, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSRVData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSRVData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("port", self.port)
.opt("priority", self.priority)
.opt("target", self.target)
.opt("weight", self.weight)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSRVData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSRVData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
port: @sdkjson.opt_field(obj, "port", path),
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
weight: @sdkjson.opt_field(obj, "weight", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSRVMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseSRVMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSRVMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSRVMeta with omitted optional fields absent.
pub fn DnsRecordResponseSRVMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseSRVMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSRVMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSRVMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSRVMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSRVMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseSRV.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSRV {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseSRVData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseSRVMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseSRV with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSRV with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSRV with omitted optional fields absent.
pub fn DnsRecordResponseSRV::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseSRVMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseSRVData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseSRV {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSRV with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSRV with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSRV with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSRV with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a SSHFP record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSSHFPData {
algorithm : Int32?
fingerprint : String?
type_ : Int32?
}
///|
pub extend DnsRecordResponseSSHFPData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSSHFPData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSSHFPData with omitted optional fields absent.
pub fn DnsRecordResponseSSHFPData::new(
algorithm? : Int32,
fingerprint? : String,
type_? : Int32,
) -> DnsRecordResponseSSHFPData {
{ algorithm, fingerprint, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSSHFPData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSSHFPData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("algorithm", self.algorithm)
.opt("fingerprint", self.fingerprint)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSSHFPData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSSHFPData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.opt_field(obj, "algorithm", path),
fingerprint: @sdkjson.opt_field(obj, "fingerprint", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSSHFPMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseSSHFPMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSSHFPMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSSHFPMeta with omitted optional fields absent.
pub fn DnsRecordResponseSSHFPMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseSSHFPMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSSHFPMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSSHFPMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSSHFPMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSSHFPMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseSSHFP.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSSHFP {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseSSHFPData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseSSHFPMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseSSHFP with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSSHFP with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSSHFP with omitted optional fields absent.
pub fn DnsRecordResponseSSHFP::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseSSHFPMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseSSHFPData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseSSHFP {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSSHFP with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSSHFP with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSSHFP with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSSHFP with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a SVCB record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSVCBData {
priority : Int32?
target : String?
value : String?
}
///|
pub extend DnsRecordResponseSVCBData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSVCBData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSVCBData with omitted optional fields absent.
pub fn DnsRecordResponseSVCBData::new(
priority? : Int32,
target? : String,
value? : String,
) -> DnsRecordResponseSVCBData {
{ priority, target, value, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSVCBData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSVCBData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("priority", self.priority)
.opt("target", self.target)
.opt("value", self.value)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSVCBData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSVCBData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
priority: @sdkjson.opt_field(obj, "priority", path),
target: @sdkjson.opt_field(obj, "target", path),
value: @sdkjson.opt_field(obj, "value", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSVCBMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseSVCBMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSVCBMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSVCBMeta with omitted optional fields absent.
pub fn DnsRecordResponseSVCBMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseSVCBMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSVCBMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSVCBMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSVCBMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSVCBMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseSVCB.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseSVCB {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseSVCBData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseSVCBMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseSVCB with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseSVCB with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseSVCB with omitted optional fields absent.
pub fn DnsRecordResponseSVCB::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseSVCBMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseSVCBData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseSVCB {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseSVCB with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseSVCB with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseSVCB with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseSVCB with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a TLSA record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseTLSAData {
certificate : String?
matching_type : Int32?
selector : Int32?
usage : Int32?
}
///|
pub extend DnsRecordResponseTLSAData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseTLSAData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseTLSAData with omitted optional fields absent.
pub fn DnsRecordResponseTLSAData::new(
certificate? : String,
matching_type? : Int32,
selector? : Int32,
usage? : Int32,
) -> DnsRecordResponseTLSAData {
{ certificate, matching_type, selector, usage, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseTLSAData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseTLSAData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("certificate", self.certificate)
.opt("matching_type", self.matching_type)
.opt("selector", self.selector)
.opt("usage", self.usage)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseTLSAData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseTLSAData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
certificate: @sdkjson.opt_field(obj, "certificate", path),
matching_type: @sdkjson.opt_field(obj, "matching_type", path),
selector: @sdkjson.opt_field(obj, "selector", path),
usage: @sdkjson.opt_field(obj, "usage", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseTLSAMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseTLSAMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseTLSAMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseTLSAMeta with omitted optional fields absent.
pub fn DnsRecordResponseTLSAMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseTLSAMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseTLSAMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseTLSAMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseTLSAMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseTLSAMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseTLSA.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseTLSA {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseTLSAData]
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseTLSAMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseTLSA with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseTLSA with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseTLSA with omitted optional fields absent.
pub fn DnsRecordResponseTLSA::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseTLSAMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseTLSAData,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseTLSA {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseTLSA with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseTLSA with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseTLSA with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseTLSA with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Components of a URI record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseURIData {
target : String?
weight : Int32?
}
///|
pub extend DnsRecordResponseURIData with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseURIData with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseURIData with omitted optional fields absent.
pub fn DnsRecordResponseURIData::new(
target? : String,
weight? : Int32,
) -> DnsRecordResponseURIData {
{ target, weight, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseURIData with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseURIData with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("target", self.target)
.opt("weight", self.weight)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseURIData with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseURIData with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
target: @sdkjson.opt_field(obj, "target", path),
weight: @sdkjson.opt_field(obj, "weight", path),
}
}
///|
///
/// Extra Cloudflare-specific metadata about the record.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseURIMeta {
dead_glue : Bool?
is_glue : Bool?
shadowed_by : Array[String]?
shadowed_records_count : Int32?
}
///|
pub extend DnsRecordResponseURIMeta with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseURIMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseURIMeta with omitted optional fields absent.
pub fn DnsRecordResponseURIMeta::new(
dead_glue? : Bool,
is_glue? : Bool,
shadowed_by? : Array[String],
shadowed_records_count? : Int32,
) -> DnsRecordResponseURIMeta {
{ dead_glue, is_glue, shadowed_by, shadowed_records_count, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseURIMeta with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseURIMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dead_glue", self.dead_glue)
.opt("is_glue", self.is_glue)
.opt("shadowed_by", self.shadowed_by)
.opt("shadowed_records_count", self.shadowed_records_count)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseURIMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseURIMeta with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
dead_glue: @sdkjson.opt_field(obj, "dead_glue", path),
is_glue: @sdkjson.opt_field(obj, "is_glue", path),
shadowed_by: @sdkjson.opt_field(obj, "shadowed_by", path),
shadowed_records_count: @sdkjson.opt_field(
obj, "shadowed_records_count", path,
),
}
}
///|
///
/// Generated representation of DnsRecordResponseURI.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordResponseURI {
comment : @sdkjson.Presence[String]
name : String
proxied : @sdkjson.Presence[Bool]
settings : @sdkjson.Presence[DnsRecordSettings]
tags : @sdkjson.Presence[Array[String]]
ttl : Int32
content : @sdkjson.Presence[String]
data : @sdkjson.Presence[DnsRecordResponseURIData]
priority : Int32?
type_ : String
comment_modified_on : String?
created_on : String
id : String
meta : DnsRecordResponseURIMeta
modified_on : String
proxiable : Bool
tags_modified_on : String?
}
///|
pub extend DnsRecordResponseURI with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponseURI with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordResponseURI with omitted optional fields absent.
pub fn DnsRecordResponseURI::new(
name~ : String,
ttl~ : Int32,
type_~ : String,
created_on~ : String,
id~ : String,
meta~ : DnsRecordResponseURIMeta,
modified_on~ : String,
proxiable~ : Bool,
comment? : String,
proxied? : Bool,
settings? : DnsRecordSettings,
tags? : Array[String],
content? : String,
data? : DnsRecordResponseURIData,
priority? : Int32,
comment_modified_on? : String,
tags_modified_on? : String,
) -> DnsRecordResponseURI {
{
comment: @sdkjson.Presence::from_option(comment),
name,
proxied: @sdkjson.Presence::from_option(proxied),
settings: @sdkjson.Presence::from_option(settings),
tags: @sdkjson.Presence::from_option(tags),
ttl,
content: @sdkjson.Presence::from_option(content),
data: @sdkjson.Presence::from_option(data),
priority,
type_,
comment_modified_on,
created_on,
id,
meta,
modified_on,
proxiable,
tags_modified_on,
}
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordResponseURI with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponseURI with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("comment", self.comment)
.field("name", self.name)
.presence("proxied", self.proxied)
.presence("settings", self.settings)
.presence("tags", self.tags)
.field("ttl", self.ttl)
.presence("content", self.content)
.presence("data", self.data)
.opt("priority", self.priority)
.field("type", self.type_)
.opt("comment_modified_on", self.comment_modified_on)
.field("created_on", self.created_on)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("proxiable", self.proxiable)
.opt("tags_modified_on", self.tags_modified_on)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordResponseURI with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponseURI with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
comment: @sdkjson.presence_field(obj, "comment", path),
name: required_field(obj, "name", path),
proxied: @sdkjson.presence_field(obj, "proxied", path),
settings: @sdkjson.presence_field(obj, "settings", path),
tags: @sdkjson.presence_field(obj, "tags", path),
ttl: required_field(obj, "ttl", path),
content: @sdkjson.presence_field(obj, "content", path),
data: @sdkjson.presence_field(obj, "data", path),
priority: @sdkjson.opt_field(obj, "priority", path),
type_: required_field(obj, "type", path),
comment_modified_on: @sdkjson.opt_field(obj, "comment_modified_on", path),
created_on: required_field(obj, "created_on", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
proxiable: required_field(obj, "proxiable", path),
tags_modified_on: @sdkjson.opt_field(obj, "tags_modified_on", path),
}
}
///|
///
/// Generated tagged union DnsRecordResponse.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecordResponse {
A(DnsRecordResponseA)
AAAA(DnsRecordResponseAAAA)
CNAME(DnsRecordResponseCNAME)
MX(DnsRecordResponseMX)
NS(DnsRecordResponseNS)
OPENPGPKEY(DnsRecordResponseOPENPGPKEY)
PTR(DnsRecordResponsePTR)
TXT(DnsRecordResponseTXT)
CAA(DnsRecordResponseCAA)
CERT(DnsRecordResponseCERT)
DNSKEY(DnsRecordResponseDNSKEY)
DS(DnsRecordResponseDS)
HTTPS(DnsRecordResponseHTTPS)
LOC(DnsRecordResponseLOC)
NAPTR(DnsRecordResponseNAPTR)
SMIMEA(DnsRecordResponseSMIMEA)
SRV(DnsRecordResponseSRV)
SSHFP(DnsRecordResponseSSHFP)
SVCB(DnsRecordResponseSVCB)
TLSA(DnsRecordResponseTLSA)
URI(DnsRecordResponseURI)
Unknown(String, Json)
}
///|
pub extend DnsRecordResponse with Eq::{equal, not_equal}
///|
pub extend DnsRecordResponse with @debug.Debug::{to_repr}
///|
///
/// Encodes this tagged union as JSON.
pub extend DnsRecordResponse with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordResponse with fn to_json(self) {
match self {
DnsRecordResponse::A(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "A")
DnsRecordResponse::AAAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "AAAA")
DnsRecordResponse::CNAME(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CNAME")
DnsRecordResponse::MX(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "MX")
DnsRecordResponse::NS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NS")
DnsRecordResponse::OPENPGPKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "OPENPGPKEY")
DnsRecordResponse::PTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "PTR")
DnsRecordResponse::TXT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TXT")
DnsRecordResponse::CAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CAA")
DnsRecordResponse::CERT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CERT")
DnsRecordResponse::DNSKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DNSKEY")
DnsRecordResponse::DS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DS")
DnsRecordResponse::HTTPS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "HTTPS")
DnsRecordResponse::LOC(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "LOC")
DnsRecordResponse::NAPTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NAPTR")
DnsRecordResponse::SMIMEA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SMIMEA")
DnsRecordResponse::SRV(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SRV")
DnsRecordResponse::SSHFP(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SSHFP")
DnsRecordResponse::SVCB(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SVCB")
DnsRecordResponse::TLSA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TLSA")
DnsRecordResponse::URI(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "URI")
DnsRecordResponse::Unknown(_, value) => value
}
}
///|
///
/// Decodes this tagged union from JSON.
pub extend DnsRecordResponse with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordResponse with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
let tag : String = required_field(obj, "type", path)
match tag {
"A" => DnsRecordResponse::A(@json.from_json(value, path~))
"AAAA" => DnsRecordResponse::AAAA(@json.from_json(value, path~))
"CNAME" => DnsRecordResponse::CNAME(@json.from_json(value, path~))
"MX" => DnsRecordResponse::MX(@json.from_json(value, path~))
"NS" => DnsRecordResponse::NS(@json.from_json(value, path~))
"OPENPGPKEY" => DnsRecordResponse::OPENPGPKEY(@json.from_json(value, path~))
"PTR" => DnsRecordResponse::PTR(@json.from_json(value, path~))
"TXT" => DnsRecordResponse::TXT(@json.from_json(value, path~))
"CAA" => DnsRecordResponse::CAA(@json.from_json(value, path~))
"CERT" => DnsRecordResponse::CERT(@json.from_json(value, path~))
"DNSKEY" => DnsRecordResponse::DNSKEY(@json.from_json(value, path~))
"DS" => DnsRecordResponse::DS(@json.from_json(value, path~))
"HTTPS" => DnsRecordResponse::HTTPS(@json.from_json(value, path~))
"LOC" => DnsRecordResponse::LOC(@json.from_json(value, path~))
"NAPTR" => DnsRecordResponse::NAPTR(@json.from_json(value, path~))
"SMIMEA" => DnsRecordResponse::SMIMEA(@json.from_json(value, path~))
"SRV" => DnsRecordResponse::SRV(@json.from_json(value, path~))
"SSHFP" => DnsRecordResponse::SSHFP(@json.from_json(value, path~))
"SVCB" => DnsRecordResponse::SVCB(@json.from_json(value, path~))
"TLSA" => DnsRecordResponse::TLSA(@json.from_json(value, path~))
"URI" => DnsRecordResponse::URI(@json.from_json(value, path~))
other => DnsRecordResponse::Unknown(other, value)
}
}
///|
///
/// Generated tagged union DnsRecordScanBatchAccept.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecordScanBatchAccept {
A(ARecord)
AAAA(AAAARecord)
CNAME(CNAMERecord)
MX(MXRecord)
NS(NSRecord)
OPENPGPKEY(OPENPGPKEYRecord)
PTR(PTRRecord)
TXT(TXTRecord)
CAA(CAARecord)
CERT(CERTRecord)
DNSKEY(DNSKEYRecord)
DS(DSRecord)
HTTPS(HTTPSRecord)
LOC(LOCRecord)
NAPTR(NAPTRRecord)
SMIMEA(SMIMEARecord)
SRV(SRVRecord)
SSHFP(SSHFPRecord)
SVCB(SVCBRecord)
TLSA(TLSARecord)
URI(URIRecord)
Unknown(String, Json)
}
///|
pub extend DnsRecordScanBatchAccept with Eq::{equal, not_equal}
///|
pub extend DnsRecordScanBatchAccept with @debug.Debug::{to_repr}
///|
///
/// Encodes this tagged union as JSON.
pub extend DnsRecordScanBatchAccept with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordScanBatchAccept with fn to_json(self) {
match self {
DnsRecordScanBatchAccept::A(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "A")
DnsRecordScanBatchAccept::AAAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "AAAA")
DnsRecordScanBatchAccept::CNAME(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CNAME")
DnsRecordScanBatchAccept::MX(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "MX")
DnsRecordScanBatchAccept::NS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NS")
DnsRecordScanBatchAccept::OPENPGPKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "OPENPGPKEY")
DnsRecordScanBatchAccept::PTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "PTR")
DnsRecordScanBatchAccept::TXT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TXT")
DnsRecordScanBatchAccept::CAA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CAA")
DnsRecordScanBatchAccept::CERT(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "CERT")
DnsRecordScanBatchAccept::DNSKEY(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DNSKEY")
DnsRecordScanBatchAccept::DS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "DS")
DnsRecordScanBatchAccept::HTTPS(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "HTTPS")
DnsRecordScanBatchAccept::LOC(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "LOC")
DnsRecordScanBatchAccept::NAPTR(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "NAPTR")
DnsRecordScanBatchAccept::SMIMEA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SMIMEA")
DnsRecordScanBatchAccept::SRV(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SRV")
DnsRecordScanBatchAccept::SSHFP(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SSHFP")
DnsRecordScanBatchAccept::SVCB(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "SVCB")
DnsRecordScanBatchAccept::TLSA(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "TLSA")
DnsRecordScanBatchAccept::URI(value) =>
encode_inferred_tag(@json.Json::Json(value), "type", "URI")
DnsRecordScanBatchAccept::Unknown(_, value) => value
}
}
///|
///
/// Decodes this tagged union from JSON.
pub extend DnsRecordScanBatchAccept with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordScanBatchAccept with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
let tag : String = required_field(obj, "type", path)
match tag {
"A" => DnsRecordScanBatchAccept::A(@json.from_json(value, path~))
"AAAA" => DnsRecordScanBatchAccept::AAAA(@json.from_json(value, path~))
"CNAME" => DnsRecordScanBatchAccept::CNAME(@json.from_json(value, path~))
"MX" => DnsRecordScanBatchAccept::MX(@json.from_json(value, path~))
"NS" => DnsRecordScanBatchAccept::NS(@json.from_json(value, path~))
"OPENPGPKEY" =>
DnsRecordScanBatchAccept::OPENPGPKEY(@json.from_json(value, path~))
"PTR" => DnsRecordScanBatchAccept::PTR(@json.from_json(value, path~))
"TXT" => DnsRecordScanBatchAccept::TXT(@json.from_json(value, path~))
"CAA" => DnsRecordScanBatchAccept::CAA(@json.from_json(value, path~))
"CERT" => DnsRecordScanBatchAccept::CERT(@json.from_json(value, path~))
"DNSKEY" => DnsRecordScanBatchAccept::DNSKEY(@json.from_json(value, path~))
"DS" => DnsRecordScanBatchAccept::DS(@json.from_json(value, path~))
"HTTPS" => DnsRecordScanBatchAccept::HTTPS(@json.from_json(value, path~))
"LOC" => DnsRecordScanBatchAccept::LOC(@json.from_json(value, path~))
"NAPTR" => DnsRecordScanBatchAccept::NAPTR(@json.from_json(value, path~))
"SMIMEA" => DnsRecordScanBatchAccept::SMIMEA(@json.from_json(value, path~))
"SRV" => DnsRecordScanBatchAccept::SRV(@json.from_json(value, path~))
"SSHFP" => DnsRecordScanBatchAccept::SSHFP(@json.from_json(value, path~))
"SVCB" => DnsRecordScanBatchAccept::SVCB(@json.from_json(value, path~))
"TLSA" => DnsRecordScanBatchAccept::TLSA(@json.from_json(value, path~))
"URI" => DnsRecordScanBatchAccept::URI(@json.from_json(value, path~))
other => DnsRecordScanBatchAccept::Unknown(other, value)
}
}
///|
///
/// Generated representation of DnsRecordScanBatchReject.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordScanBatchReject {
id : String
}
///|
pub extend DnsRecordScanBatchReject with Eq::{equal, not_equal}
///|
pub extend DnsRecordScanBatchReject with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordScanBatchReject with omitted optional fields absent.
pub fn DnsRecordScanBatchReject::new(id~ : String) -> DnsRecordScanBatchReject {
{ id, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordScanBatchReject with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordScanBatchReject with fn to_json(self) {
@sdkjson.ObjBuilder::new().field("id", self.id).build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordScanBatchReject with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordScanBatchReject with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{ id: required_field(obj, "id", path), }
}
///|
///
/// Generated representation of DnsBatch.
#derive(Eq, @debug.Debug)
pub(all) struct DnsBatch {
deletes : Array[BatchRecordDelete]?
patches : Array[BatchRecordPatch]?
posts : Array[DnsRecord]?
puts : Array[BatchRecordPut]?
}
///|
pub extend DnsBatch with Eq::{equal, not_equal}
///|
pub extend DnsBatch with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsBatch with omitted optional fields absent.
pub fn DnsBatch::new(
deletes? : Array[BatchRecordDelete],
patches? : Array[BatchRecordPatch],
posts? : Array[DnsRecord],
puts? : Array[BatchRecordPut],
) -> DnsBatch {
{ deletes, patches, posts, puts, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsBatch with ToJson::{to_json}
///|
pub impl ToJson for DnsBatch with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("deletes", self.deletes)
.opt("patches", self.patches)
.opt("posts", self.posts)
.opt("puts", self.puts)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsBatch with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsBatch with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
deletes: @sdkjson.opt_field(obj, "deletes", path),
patches: @sdkjson.opt_field(obj, "patches", path),
posts: @sdkjson.opt_field(obj, "posts", path),
puts: @sdkjson.opt_field(obj, "puts", path),
}
}
///|
///
/// Generated representation of DnsScanReview.
#derive(Eq, @debug.Debug)
pub(all) struct DnsScanReview {
accepts : Array[DnsRecordScanBatchAccept]?
rejects : Array[DnsRecordScanBatchReject]?
}
///|
pub extend DnsScanReview with Eq::{equal, not_equal}
///|
pub extend DnsScanReview with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsScanReview with omitted optional fields absent.
pub fn DnsScanReview::new(
accepts? : Array[DnsRecordScanBatchAccept],
rejects? : Array[DnsRecordScanBatchReject],
) -> DnsScanReview {
{ accepts, rejects, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsScanReview with ToJson::{to_json}
///|
pub impl ToJson for DnsScanReview with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("accepts", self.accepts)
.opt("rejects", self.rejects)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsScanReview with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsScanReview with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
accepts: @sdkjson.opt_field(obj, "accepts", path),
rejects: @sdkjson.opt_field(obj, "rejects", path),
}
}
///|
///
/// Generated representation of DnsBatchResult.
#derive(Eq, @debug.Debug)
pub(all) struct DnsBatchResult {
deletes : Array[DnsRecordResponse]?
patches : Array[DnsRecordResponse]?
posts : Array[DnsRecordResponse]?
puts : Array[DnsRecordResponse]?
}
///|
pub extend DnsBatchResult with Eq::{equal, not_equal}
///|
pub extend DnsBatchResult with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsBatchResult with omitted optional fields absent.
pub fn DnsBatchResult::new(
deletes? : Array[DnsRecordResponse],
patches? : Array[DnsRecordResponse],
posts? : Array[DnsRecordResponse],
puts? : Array[DnsRecordResponse],
) -> DnsBatchResult {
{ deletes, patches, posts, puts, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsBatchResult with ToJson::{to_json}
///|
pub impl ToJson for DnsBatchResult with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("deletes", self.deletes)
.opt("patches", self.patches)
.opt("posts", self.posts)
.opt("puts", self.puts)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsBatchResult with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsBatchResult with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
deletes: @sdkjson.opt_field(obj, "deletes", path),
patches: @sdkjson.opt_field(obj, "patches", path),
posts: @sdkjson.opt_field(obj, "posts", path),
puts: @sdkjson.opt_field(obj, "puts", path),
}
}
///|
///
/// Generated representation of DnsScanReviewResult.
#derive(Eq, @debug.Debug)
pub(all) struct DnsScanReviewResult {
accepts : Array[DnsRecordResponse]?
rejects : Array[String]?
}
///|
pub extend DnsScanReviewResult with Eq::{equal, not_equal}
///|
pub extend DnsScanReviewResult with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsScanReviewResult with omitted optional fields absent.
pub fn DnsScanReviewResult::new(
accepts? : Array[DnsRecordResponse],
rejects? : Array[String],
) -> DnsScanReviewResult {
{ accepts, rejects, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsScanReviewResult with ToJson::{to_json}
///|
pub impl ToJson for DnsScanReviewResult with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("accepts", self.accepts)
.opt("rejects", self.rejects)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsScanReviewResult with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsScanReviewResult with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
accepts: @sdkjson.opt_field(obj, "accepts", path),
rejects: @sdkjson.opt_field(obj, "rejects", path),
}
}
///|
///
/// Generated representation of DnsImportResult.
#derive(Eq, @debug.Debug)
pub(all) struct DnsImportResult {
recs_added : Int32?
total_records_parsed : Int32?
}
///|
pub extend DnsImportResult with Eq::{equal, not_equal}
///|
pub extend DnsImportResult with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsImportResult with omitted optional fields absent.
pub fn DnsImportResult::new(
recs_added? : Int32,
total_records_parsed? : Int32,
) -> DnsImportResult {
{ recs_added, total_records_parsed, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsImportResult with ToJson::{to_json}
///|
pub impl ToJson for DnsImportResult with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("recs_added", self.recs_added)
.opt("total_records_parsed", self.total_records_parsed)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsImportResult with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsImportResult with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
recs_added: @sdkjson.opt_field(obj, "recs_added", path),
total_records_parsed: @sdkjson.opt_field(obj, "total_records_parsed", path),
}
}
///|
///
/// Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead. Note that the interaction between tag filters is controlled by the `tag-match` parameter instead.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecordMatch {
Any
All
Custom(String)
}
///|
pub extend DnsRecordMatch with Eq::{equal, not_equal}
///|
pub extend DnsRecordMatch with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend DnsRecordMatch with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordMatch with fn to_json(self) {
let raw = match self {
DnsRecordMatch::Any => "any"
DnsRecordMatch::All => "all"
DnsRecordMatch::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend DnsRecordMatch with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordMatch with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"any" => Option::Some(DnsRecordMatch::Any)
"all" => Option::Some(DnsRecordMatch::All)
_ => Option::None
}
},
raw => DnsRecordMatch::Custom(raw),
)
}
///|
///
/// Field to order DNS records by.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecordOrder {
Type
Name
Content
Ttl
Proxied
Custom(String)
}
///|
pub extend DnsRecordOrder with Eq::{equal, not_equal}
///|
pub extend DnsRecordOrder with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend DnsRecordOrder with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordOrder with fn to_json(self) {
let raw = match self {
DnsRecordOrder::Type => "type"
DnsRecordOrder::Name => "name"
DnsRecordOrder::Content => "content"
DnsRecordOrder::Ttl => "ttl"
DnsRecordOrder::Proxied => "proxied"
DnsRecordOrder::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend DnsRecordOrder with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordOrder with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"type" => Option::Some(DnsRecordOrder::Type)
"name" => Option::Some(DnsRecordOrder::Name)
"content" => Option::Some(DnsRecordOrder::Content)
"ttl" => Option::Some(DnsRecordOrder::Ttl)
"proxied" => Option::Some(DnsRecordOrder::Proxied)
_ => Option::None
}
},
raw => DnsRecordOrder::Custom(raw),
)
}
///|
///
/// Whether to match all tag search requirements or at least one (any). If set to `all`, acts like a logical AND between tag filters. If set to `any`, acts like a logical OR instead. Note that the regular `match` parameter is still used to combine the resulting condition with other filters that aren't related to tags.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecordTagMatch {
Any
All
Custom(String)
}
///|
pub extend DnsRecordTagMatch with Eq::{equal, not_equal}
///|
pub extend DnsRecordTagMatch with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend DnsRecordTagMatch with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordTagMatch with fn to_json(self) {
let raw = match self {
DnsRecordTagMatch::Any => "any"
DnsRecordTagMatch::All => "all"
DnsRecordTagMatch::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend DnsRecordTagMatch with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordTagMatch with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"any" => Option::Some(DnsRecordTagMatch::Any)
"all" => Option::Some(DnsRecordTagMatch::All)
_ => Option::None
}
},
raw => DnsRecordTagMatch::Custom(raw),
)
}
///|
///
/// Record type.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnsRecordType {
A
AAAA
CAA
CERT
CNAME
DNSKEY
DS
HTTPS
LOC
MX
NAPTR
NS
OPENPGPKEY
PTR
SMIMEA
SRV
SSHFP
SVCB
TLSA
TXT
URI
Custom(String)
}
///|
pub extend DnsRecordType with Eq::{equal, not_equal}
///|
pub extend DnsRecordType with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend DnsRecordType with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordType with fn to_json(self) {
let raw = match self {
DnsRecordType::A => "A"
DnsRecordType::AAAA => "AAAA"
DnsRecordType::CAA => "CAA"
DnsRecordType::CERT => "CERT"
DnsRecordType::CNAME => "CNAME"
DnsRecordType::DNSKEY => "DNSKEY"
DnsRecordType::DS => "DS"
DnsRecordType::HTTPS => "HTTPS"
DnsRecordType::LOC => "LOC"
DnsRecordType::MX => "MX"
DnsRecordType::NAPTR => "NAPTR"
DnsRecordType::NS => "NS"
DnsRecordType::OPENPGPKEY => "OPENPGPKEY"
DnsRecordType::PTR => "PTR"
DnsRecordType::SMIMEA => "SMIMEA"
DnsRecordType::SRV => "SRV"
DnsRecordType::SSHFP => "SSHFP"
DnsRecordType::SVCB => "SVCB"
DnsRecordType::TLSA => "TLSA"
DnsRecordType::TXT => "TXT"
DnsRecordType::URI => "URI"
DnsRecordType::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend DnsRecordType with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordType with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"A" => Option::Some(DnsRecordType::A)
"AAAA" => Option::Some(DnsRecordType::AAAA)
"CAA" => Option::Some(DnsRecordType::CAA)
"CERT" => Option::Some(DnsRecordType::CERT)
"CNAME" => Option::Some(DnsRecordType::CNAME)
"DNSKEY" => Option::Some(DnsRecordType::DNSKEY)
"DS" => Option::Some(DnsRecordType::DS)
"HTTPS" => Option::Some(DnsRecordType::HTTPS)
"LOC" => Option::Some(DnsRecordType::LOC)
"MX" => Option::Some(DnsRecordType::MX)
"NAPTR" => Option::Some(DnsRecordType::NAPTR)
"NS" => Option::Some(DnsRecordType::NS)
"OPENPGPKEY" => Option::Some(DnsRecordType::OPENPGPKEY)
"PTR" => Option::Some(DnsRecordType::PTR)
"SMIMEA" => Option::Some(DnsRecordType::SMIMEA)
"SRV" => Option::Some(DnsRecordType::SRV)
"SSHFP" => Option::Some(DnsRecordType::SSHFP)
"SVCB" => Option::Some(DnsRecordType::SVCB)
"TLSA" => Option::Some(DnsRecordType::TLSA)
"TXT" => Option::Some(DnsRecordType::TXT)
"URI" => Option::Some(DnsRecordType::URI)
_ => Option::None
}
},
raw => DnsRecordType::Custom(raw),
)
}
///|
///
/// Settings for this internal zone.
#derive(Eq, @debug.Debug)
pub(all) struct InternalDnsBase {
reference_zone_id : String?
}
///|
pub extend InternalDnsBase with Eq::{equal, not_equal}
///|
pub extend InternalDnsBase with @debug.Debug::{to_repr}
///|
///
/// Creates a InternalDnsBase with omitted optional fields absent.
pub fn InternalDnsBase::new(reference_zone_id? : String) -> InternalDnsBase {
{ reference_zone_id, }
}
///|
///
/// Encodes this value as JSON.
pub extend InternalDnsBase with ToJson::{to_json}
///|
pub impl ToJson for InternalDnsBase with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("reference_zone_id", self.reference_zone_id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend InternalDnsBase with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for InternalDnsBase with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{ reference_zone_id: @sdkjson.opt_field(obj, "reference_zone_id", path), }
}
///|
///
/// Components of the zone's SOA record.
#derive(Eq, @debug.Debug)
pub(all) struct SoaPatch {
expire : Int32?
min_ttl : Int32?
mname : @sdkjson.Presence[String]
refresh : Int32?
retry : Int32?
rname : String?
ttl : Int32?
}
///|
pub extend SoaPatch with Eq::{equal, not_equal}
///|
pub extend SoaPatch with @debug.Debug::{to_repr}
///|
///
/// Creates a SoaPatch with omitted optional fields absent.
pub fn SoaPatch::new(
expire? : Int32,
min_ttl? : Int32,
mname? : String,
refresh? : Int32,
retry? : Int32,
rname? : String,
ttl? : Int32,
) -> SoaPatch {
{
expire,
min_ttl,
mname: @sdkjson.Presence::from_option(mname),
refresh,
retry,
rname,
ttl,
}
}
///|
///
/// Encodes this value as JSON.
pub extend SoaPatch with ToJson::{to_json}
///|
pub impl ToJson for SoaPatch with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("expire", self.expire)
.opt("min_ttl", self.min_ttl)
.presence("mname", self.mname)
.opt("refresh", self.refresh)
.opt("retry", self.retry)
.opt("rname", self.rname)
.opt("ttl", self.ttl)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend SoaPatch with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for SoaPatch with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
expire: @sdkjson.opt_field(obj, "expire", path),
min_ttl: @sdkjson.opt_field(obj, "min_ttl", path),
mname: @sdkjson.presence_field(obj, "mname", path),
refresh: @sdkjson.opt_field(obj, "refresh", path),
retry: @sdkjson.opt_field(obj, "retry", path),
rname: @sdkjson.opt_field(obj, "rname", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
}
}
///|
///
/// Whether the zone mode is a regular or CDN/DNS only zone.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneMode {
Standard
CdnOnly
DnsOnly
Unknown(String)
}
///|
pub extend ZoneMode with Eq::{equal, not_equal}
///|
pub extend ZoneMode with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZoneMode with ToJson::{to_json}
///|
pub impl ToJson for ZoneMode with fn to_json(self) {
let raw = match self {
ZoneMode::Standard => "standard"
ZoneMode::CdnOnly => "cdn_only"
ZoneMode::DnsOnly => "dns_only"
ZoneMode::Unknown(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZoneMode with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneMode with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"standard" => Option::Some(ZoneMode::Standard)
"cdn_only" => Option::Some(ZoneMode::CdnOnly)
"dns_only" => Option::Some(ZoneMode::DnsOnly)
_ => Option::None
}
},
raw => ZoneMode::Unknown(raw),
)
}
///|
///
/// Generated representation of InternalDnsResponse.
#derive(Eq, @debug.Debug)
pub(all) struct InternalDnsResponse {
reference_zone_id : String?
}
///|
pub extend InternalDnsResponse with Eq::{equal, not_equal}
///|
pub extend InternalDnsResponse with @debug.Debug::{to_repr}
///|
///
/// Creates a InternalDnsResponse with omitted optional fields absent.
pub fn InternalDnsResponse::new(
reference_zone_id? : String,
) -> InternalDnsResponse {
{ reference_zone_id, }
}
///|
///
/// Encodes this value as JSON.
pub extend InternalDnsResponse with ToJson::{to_json}
///|
pub impl ToJson for InternalDnsResponse with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("reference_zone_id", self.reference_zone_id)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend InternalDnsResponse with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for InternalDnsResponse with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{ reference_zone_id: @sdkjson.opt_field(obj, "reference_zone_id", path), }
}
///|
///
/// Generated representation of Soa.
#derive(Eq, @debug.Debug)
pub(all) struct Soa {
expire : Int32?
min_ttl : Int32?
mname : @sdkjson.Presence[String]
refresh : Int32?
retry : Int32?
rname : String?
ttl : Int32?
}
///|
pub extend Soa with Eq::{equal, not_equal}
///|
pub extend Soa with @debug.Debug::{to_repr}
///|
///
/// Creates a Soa with omitted optional fields absent.
pub fn Soa::new(
expire? : Int32,
min_ttl? : Int32,
mname? : String,
refresh? : Int32,
retry? : Int32,
rname? : String,
ttl? : Int32,
) -> Soa {
{
expire,
min_ttl,
mname: @sdkjson.Presence::from_option(mname),
refresh,
retry,
rname,
ttl,
}
}
///|
///
/// Encodes this value as JSON.
pub extend Soa with ToJson::{to_json}
///|
pub impl ToJson for Soa with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("expire", self.expire)
.opt("min_ttl", self.min_ttl)
.presence("mname", self.mname)
.opt("refresh", self.refresh)
.opt("retry", self.retry)
.opt("rname", self.rname)
.opt("ttl", self.ttl)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend Soa with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for Soa with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
expire: @sdkjson.opt_field(obj, "expire", path),
min_ttl: @sdkjson.opt_field(obj, "min_ttl", path),
mname: @sdkjson.presence_field(obj, "mname", path),
refresh: @sdkjson.opt_field(obj, "refresh", path),
retry: @sdkjson.opt_field(obj, "retry", path),
rname: @sdkjson.opt_field(obj, "rname", path),
ttl: @sdkjson.opt_field(obj, "ttl", path),
}
}
///|
///
/// Nameserver type.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneNameserversCloudflareType {
CloudflareStandard
CloudflareAdvanced
Unknown(String)
}
///|
pub extend ZoneNameserversCloudflareType with Eq::{equal, not_equal}
///|
pub extend ZoneNameserversCloudflareType with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZoneNameserversCloudflareType with ToJson::{to_json}
///|
pub impl ToJson for ZoneNameserversCloudflareType with fn to_json(self) {
let raw = match self {
ZoneNameserversCloudflareType::CloudflareStandard => "cloudflare.standard"
ZoneNameserversCloudflareType::CloudflareAdvanced => "cloudflare.advanced"
ZoneNameserversCloudflareType::Unknown(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZoneNameserversCloudflareType with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneNameserversCloudflareType with fn from_json(
value,
path,
) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"cloudflare.standard" =>
Option::Some(ZoneNameserversCloudflareType::CloudflareStandard)
"cloudflare.advanced" =>
Option::Some(ZoneNameserversCloudflareType::CloudflareAdvanced)
_ => Option::None
}
},
raw => ZoneNameserversCloudflareType::Unknown(raw),
)
}
///|
///
/// Generated representation of ZoneNameserversCloudflare.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneNameserversCloudflare {
type_ : ZoneNameserversCloudflareType
}
///|
pub extend ZoneNameserversCloudflare with Eq::{equal, not_equal}
///|
pub extend ZoneNameserversCloudflare with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneNameserversCloudflare with omitted optional fields absent.
pub fn ZoneNameserversCloudflare::new(
type_~ : ZoneNameserversCloudflareType,
) -> ZoneNameserversCloudflare {
{ type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneNameserversCloudflare with ToJson::{to_json}
///|
pub impl ToJson for ZoneNameserversCloudflare with fn to_json(self) {
@sdkjson.ObjBuilder::new().field("type", self.type_).build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneNameserversCloudflare with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneNameserversCloudflare with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{ type_: required_field(obj, "type", path), }
}
///|
///
/// Nameserver type.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneNameserversCustomExistingType {
CustomAccount
CustomTenant
CustomZone
Unknown(String)
}
///|
pub extend ZoneNameserversCustomExistingType with Eq::{equal, not_equal}
///|
pub extend ZoneNameserversCustomExistingType with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZoneNameserversCustomExistingType with ToJson::{to_json}
///|
pub impl ToJson for ZoneNameserversCustomExistingType with fn to_json(self) {
let raw = match self {
ZoneNameserversCustomExistingType::CustomAccount => "custom.account"
ZoneNameserversCustomExistingType::CustomTenant => "custom.tenant"
ZoneNameserversCustomExistingType::CustomZone => "custom.zone"
ZoneNameserversCustomExistingType::Unknown(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZoneNameserversCustomExistingType with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneNameserversCustomExistingType with fn from_json(
value,
path,
) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"custom.account" =>
Option::Some(ZoneNameserversCustomExistingType::CustomAccount)
"custom.tenant" =>
Option::Some(ZoneNameserversCustomExistingType::CustomTenant)
"custom.zone" =>
Option::Some(ZoneNameserversCustomExistingType::CustomZone)
_ => Option::None
}
},
raw => ZoneNameserversCustomExistingType::Unknown(raw),
)
}
///|
///
/// Generated representation of ZoneNameserversCustomExisting.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneNameserversCustomExisting {
ns_set : Int32?
type_ : ZoneNameserversCustomExistingType
}
///|
pub extend ZoneNameserversCustomExisting with Eq::{equal, not_equal}
///|
pub extend ZoneNameserversCustomExisting with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneNameserversCustomExisting with omitted optional fields absent.
pub fn ZoneNameserversCustomExisting::new(
type_~ : ZoneNameserversCustomExistingType,
ns_set? : Int32,
) -> ZoneNameserversCustomExisting {
{ ns_set, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneNameserversCustomExisting with ToJson::{to_json}
///|
pub impl ToJson for ZoneNameserversCustomExisting with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("ns_set", self.ns_set)
.field("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneNameserversCustomExisting with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneNameserversCustomExisting with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
ns_set: @sdkjson.opt_field(obj, "ns_set", path),
type_: required_field(obj, "type", path),
}
}
///|
///
/// Generated representation of ZoneNameserversCustomSet.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneNameserversCustomSet {
nameserver_set_id : String
type_ : String
}
///|
pub extend ZoneNameserversCustomSet with Eq::{equal, not_equal}
///|
pub extend ZoneNameserversCustomSet with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneNameserversCustomSet with omitted optional fields absent.
pub fn ZoneNameserversCustomSet::new(
nameserver_set_id~ : String,
type_~ : String,
) -> ZoneNameserversCustomSet {
{ nameserver_set_id, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneNameserversCustomSet with ToJson::{to_json}
///|
pub impl ToJson for ZoneNameserversCustomSet with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.field("nameserver_set_id", self.nameserver_set_id)
.field("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneNameserversCustomSet with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneNameserversCustomSet with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
{
nameserver_set_id: required_field(obj, "nameserver_set_id", path),
type_: required_field(obj, "type", path),
}
}
///|
///
/// Generated tagged union ZoneDnsSettingsPatchNameservers.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneDnsSettingsPatchNameservers {
DnsSettingsZoneNameserversCloudflare(ZoneNameserversCloudflare)
DnsSettingsZoneNameserversCustomExisting(ZoneNameserversCustomExisting)
DnsSettingsZoneNameserversCustomSet(ZoneNameserversCustomSet)
Unknown(String, Json)
}
///|
pub extend ZoneDnsSettingsPatchNameservers with Eq::{equal, not_equal}
///|
pub extend ZoneDnsSettingsPatchNameservers with @debug.Debug::{to_repr}
///|
///
/// Encodes this tagged union as JSON.
pub extend ZoneDnsSettingsPatchNameservers with ToJson::{to_json}
///|
pub impl ToJson for ZoneDnsSettingsPatchNameservers with fn to_json(self) {
match self {
ZoneDnsSettingsPatchNameservers::DnsSettingsZoneNameserversCloudflare(value) =>
@json.Json::Json(value)
ZoneDnsSettingsPatchNameservers::DnsSettingsZoneNameserversCustomExisting(
value,
) => @json.Json::Json(value)
ZoneDnsSettingsPatchNameservers::DnsSettingsZoneNameserversCustomSet(value) =>
@json.Json::Json(value)
ZoneDnsSettingsPatchNameservers::Unknown(_, value) => value
}
}
///|
///
/// Decodes this tagged union from JSON.
pub extend ZoneDnsSettingsPatchNameservers with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneDnsSettingsPatchNameservers with fn from_json(
value,
path,
) {
let obj = @sdkjson.expect_object(value, path)
let tag : String = required_field(obj, "type", path)
match tag {
"cloudflare.standard" =>
ZoneDnsSettingsPatchNameservers::DnsSettingsZoneNameserversCloudflare(
@json.from_json(value, path~),
)
"cloudflare.advanced" =>
ZoneDnsSettingsPatchNameservers::DnsSettingsZoneNameserversCloudflare(
@json.from_json(value, path~),
)
"custom.account" =>
ZoneDnsSettingsPatchNameservers::DnsSettingsZoneNameserversCustomExisting(
@json.from_json(value, path~),
)
"custom.tenant" =>
ZoneDnsSettingsPatchNameservers::DnsSettingsZoneNameserversCustomExisting(
@json.from_json(value, path~),
)
"custom.zone" =>
ZoneDnsSettingsPatchNameservers::DnsSettingsZoneNameserversCustomExisting(
@json.from_json(value, path~),
)
"custom" =>
ZoneDnsSettingsPatchNameservers::DnsSettingsZoneNameserversCustomSet(
@json.from_json(value, path~),
)
other => ZoneDnsSettingsPatchNameservers::Unknown(other, value)
}
}
///|
///
/// Generated representation of ZoneDnsSettingsPatch.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneDnsSettingsPatch {
flatten_all_cnames : Bool?
internal_dns : InternalDnsBase?
multi_provider : Bool?
ns_ttl : Int32?
secondary_overrides : Bool?
soa : SoaPatch?
zone_mode : ZoneMode?
nameservers : ZoneDnsSettingsPatchNameservers?
}
///|
pub extend ZoneDnsSettingsPatch with Eq::{equal, not_equal}
///|
pub extend ZoneDnsSettingsPatch with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneDnsSettingsPatch with omitted optional fields absent.
pub fn ZoneDnsSettingsPatch::new(
flatten_all_cnames? : Bool,
internal_dns? : InternalDnsBase,
multi_provider? : Bool,
ns_ttl? : Int32,
secondary_overrides? : Bool,
soa? : SoaPatch,
zone_mode? : ZoneMode,
nameservers? : ZoneDnsSettingsPatchNameservers,
) -> ZoneDnsSettingsPatch {
{
flatten_all_cnames,
internal_dns,
multi_provider,
ns_ttl,
secondary_overrides,
soa,
zone_mode,
nameservers,
}
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneDnsSettingsPatch with ToJson::{to_json}
///|
pub impl ToJson for ZoneDnsSettingsPatch with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("flatten_all_cnames", self.flatten_all_cnames)
.opt("internal_dns", self.internal_dns)
.opt("multi_provider", self.multi_provider)
.opt("ns_ttl", self.ns_ttl)
.opt("secondary_overrides", self.secondary_overrides)
.opt("soa", self.soa)
.opt("zone_mode", self.zone_mode)
.opt("nameservers", self.nameservers)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneDnsSettingsPatch with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneDnsSettingsPatch with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
flatten_all_cnames: @sdkjson.opt_field(obj, "flatten_all_cnames", path),
internal_dns: @sdkjson.opt_field(obj, "internal_dns", path),
multi_provider: @sdkjson.opt_field(obj, "multi_provider", path),
ns_ttl: @sdkjson.opt_field(obj, "ns_ttl", path),
secondary_overrides: @sdkjson.opt_field(obj, "secondary_overrides", path),
soa: @sdkjson.opt_field(obj, "soa", path),
zone_mode: @sdkjson.opt_field(obj, "zone_mode", path),
nameservers: @sdkjson.opt_field(obj, "nameservers", path),
}
}
///|
///
/// Controls the nameservers through which the zone is available.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneNameservers {
DnsSettingsZoneNameserversCloudflare(ZoneNameserversCloudflare)
DnsSettingsZoneNameserversCustomExisting(ZoneNameserversCustomExisting)
DnsSettingsZoneNameserversCustomSet(ZoneNameserversCustomSet)
Unknown(String, Json)
}
///|
pub extend ZoneNameservers with Eq::{equal, not_equal}
///|
pub extend ZoneNameservers with @debug.Debug::{to_repr}
///|
///
/// Encodes this tagged union as JSON.
pub extend ZoneNameservers with ToJson::{to_json}
///|
pub impl ToJson for ZoneNameservers with fn to_json(self) {
match self {
ZoneNameservers::DnsSettingsZoneNameserversCloudflare(value) =>
@json.Json::Json(value)
ZoneNameservers::DnsSettingsZoneNameserversCustomExisting(value) =>
@json.Json::Json(value)
ZoneNameservers::DnsSettingsZoneNameserversCustomSet(value) =>
@json.Json::Json(value)
ZoneNameservers::Unknown(_, value) => value
}
}
///|
///
/// Decodes this tagged union from JSON.
pub extend ZoneNameservers with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneNameservers with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
let tag : String = required_field(obj, "type", path)
match tag {
"cloudflare.standard" =>
ZoneNameservers::DnsSettingsZoneNameserversCloudflare(
@json.from_json(value, path~),
)
"cloudflare.advanced" =>
ZoneNameservers::DnsSettingsZoneNameserversCloudflare(
@json.from_json(value, path~),
)
"custom.account" =>
ZoneNameservers::DnsSettingsZoneNameserversCustomExisting(
@json.from_json(value, path~),
)
"custom.tenant" =>
ZoneNameservers::DnsSettingsZoneNameserversCustomExisting(
@json.from_json(value, path~),
)
"custom.zone" =>
ZoneNameservers::DnsSettingsZoneNameserversCustomExisting(
@json.from_json(value, path~),
)
"custom" =>
ZoneNameservers::DnsSettingsZoneNameserversCustomSet(
@json.from_json(value, path~),
)
other => ZoneNameservers::Unknown(other, value)
}
}
///|
///
/// Generated representation of ZoneDnsSettings.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneDnsSettings {
flatten_all_cnames : Bool
internal_dns : InternalDnsResponse
multi_provider : Bool
ns_ttl : Int32
secondary_overrides : Bool
soa : Soa
zone_mode : ZoneMode
nameservers : ZoneNameservers
}
///|
pub extend ZoneDnsSettings with Eq::{equal, not_equal}
///|
pub extend ZoneDnsSettings with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneDnsSettings with omitted optional fields absent.
pub fn ZoneDnsSettings::new(
flatten_all_cnames~ : Bool,
internal_dns~ : InternalDnsResponse,
multi_provider~ : Bool,
ns_ttl~ : Int32,
secondary_overrides~ : Bool,
soa~ : Soa,
zone_mode~ : ZoneMode,
nameservers~ : ZoneNameservers,
) -> ZoneDnsSettings {
{
flatten_all_cnames,
internal_dns,
multi_provider,
ns_ttl,
secondary_overrides,
soa,
zone_mode,
nameservers,
}
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneDnsSettings with ToJson::{to_json}
///|
pub impl ToJson for ZoneDnsSettings with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.field("flatten_all_cnames", self.flatten_all_cnames)
.field("internal_dns", self.internal_dns)
.field("multi_provider", self.multi_provider)
.field("ns_ttl", self.ns_ttl)
.field("secondary_overrides", self.secondary_overrides)
.field("soa", self.soa)
.field("zone_mode", self.zone_mode)
.field("nameservers", self.nameservers)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneDnsSettings with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneDnsSettings with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
flatten_all_cnames: required_field(obj, "flatten_all_cnames", path),
internal_dns: required_field(obj, "internal_dns", path),
multi_provider: required_field(obj, "multi_provider", path),
ns_ttl: required_field(obj, "ns_ttl", path),
secondary_overrides: required_field(obj, "secondary_overrides", path),
soa: required_field(obj, "soa", path),
zone_mode: required_field(obj, "zone_mode", path),
nameservers: required_field(obj, "nameservers", path),
}
}
///|
///
/// Status of DNSSEC, based on user-desired state and presence of necessary records.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnssecStatus {
Active
Pending
Disabled
PendingDisabled
Error
Unknown(String)
}
///|
pub extend DnssecStatus with Eq::{equal, not_equal}
///|
pub extend DnssecStatus with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend DnssecStatus with ToJson::{to_json}
///|
pub impl ToJson for DnssecStatus with fn to_json(self) {
let raw = match self {
DnssecStatus::Active => "active"
DnssecStatus::Pending => "pending"
DnssecStatus::Disabled => "disabled"
DnssecStatus::PendingDisabled => "pending-disabled"
DnssecStatus::Error => "error"
DnssecStatus::Unknown(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend DnssecStatus with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnssecStatus with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"active" => Option::Some(DnssecStatus::Active)
"pending" => Option::Some(DnssecStatus::Pending)
"disabled" => Option::Some(DnssecStatus::Disabled)
"pending-disabled" => Option::Some(DnssecStatus::PendingDisabled)
"error" => Option::Some(DnssecStatus::Error)
_ => Option::None
}
},
raw => DnssecStatus::Unknown(raw),
)
}
///|
///
/// Generated representation of Dnssec.
#derive(Eq, @debug.Debug)
pub(all) struct Dnssec {
algorithm : @sdkjson.Presence[String]
digest : @sdkjson.Presence[String]
digest_algorithm : @sdkjson.Presence[String]
digest_type : @sdkjson.Presence[String]
dnssec_multi_signer : Bool?
dnssec_presigned : Bool?
dnssec_use_nsec3 : Bool?
ds : @sdkjson.Presence[String]
flags : @sdkjson.Presence[Int32]
key_tag : @sdkjson.Presence[Int32]
key_type : @sdkjson.Presence[String]
modified_on : @sdkjson.Presence[String]
public_key : @sdkjson.Presence[String]
status : DnssecStatus?
}
///|
pub extend Dnssec with Eq::{equal, not_equal}
///|
pub extend Dnssec with @debug.Debug::{to_repr}
///|
///
/// Creates a Dnssec with omitted optional fields absent.
pub fn Dnssec::new(
algorithm? : String,
digest? : String,
digest_algorithm? : String,
digest_type? : String,
dnssec_multi_signer? : Bool,
dnssec_presigned? : Bool,
dnssec_use_nsec3? : Bool,
ds? : String,
flags? : Int32,
key_tag? : Int32,
key_type? : String,
modified_on? : String,
public_key? : String,
status? : DnssecStatus,
) -> Dnssec {
{
algorithm: @sdkjson.Presence::from_option(algorithm),
digest: @sdkjson.Presence::from_option(digest),
digest_algorithm: @sdkjson.Presence::from_option(digest_algorithm),
digest_type: @sdkjson.Presence::from_option(digest_type),
dnssec_multi_signer,
dnssec_presigned,
dnssec_use_nsec3,
ds: @sdkjson.Presence::from_option(ds),
flags: @sdkjson.Presence::from_option(flags),
key_tag: @sdkjson.Presence::from_option(key_tag),
key_type: @sdkjson.Presence::from_option(key_type),
modified_on: @sdkjson.Presence::from_option(modified_on),
public_key: @sdkjson.Presence::from_option(public_key),
status,
}
}
///|
///
/// Encodes this value as JSON.
pub extend Dnssec with ToJson::{to_json}
///|
pub impl ToJson for Dnssec with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.presence("algorithm", self.algorithm)
.presence("digest", self.digest)
.presence("digest_algorithm", self.digest_algorithm)
.presence("digest_type", self.digest_type)
.opt("dnssec_multi_signer", self.dnssec_multi_signer)
.opt("dnssec_presigned", self.dnssec_presigned)
.opt("dnssec_use_nsec3", self.dnssec_use_nsec3)
.presence("ds", self.ds)
.presence("flags", self.flags)
.presence("key_tag", self.key_tag)
.presence("key_type", self.key_type)
.presence("modified_on", self.modified_on)
.presence("public_key", self.public_key)
.opt("status", self.status)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend Dnssec with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for Dnssec with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
algorithm: @sdkjson.presence_field(obj, "algorithm", path),
digest: @sdkjson.presence_field(obj, "digest", path),
digest_algorithm: @sdkjson.presence_field(obj, "digest_algorithm", path),
digest_type: @sdkjson.presence_field(obj, "digest_type", path),
dnssec_multi_signer: @sdkjson.opt_field(obj, "dnssec_multi_signer", path),
dnssec_presigned: @sdkjson.opt_field(obj, "dnssec_presigned", path),
dnssec_use_nsec3: @sdkjson.opt_field(obj, "dnssec_use_nsec3", path),
ds: @sdkjson.presence_field(obj, "ds", path),
flags: @sdkjson.presence_field(obj, "flags", path),
key_tag: @sdkjson.presence_field(obj, "key_tag", path),
key_type: @sdkjson.presence_field(obj, "key_type", path),
modified_on: @sdkjson.presence_field(obj, "modified_on", path),
public_key: @sdkjson.presence_field(obj, "public_key", path),
status: @sdkjson.opt_field(obj, "status", path),
}
}
///|
///
/// Generated representation of ZoneDeletion.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneDeletion {
id : String
}
///|
pub extend ZoneDeletion with Eq::{equal, not_equal}
///|
pub extend ZoneDeletion with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneDeletion with omitted optional fields absent.
pub fn ZoneDeletion::new(id~ : String) -> ZoneDeletion {
{ id, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneDeletion with ToJson::{to_json}
///|
pub impl ToJson for ZoneDeletion with fn to_json(self) {
@sdkjson.ObjBuilder::new().field("id", self.id).build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneDeletion with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneDeletion with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{ id: required_field(obj, "id", path), }
}
///|
///
/// A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneType {
Full
Partial
Secondary
Internal
Unknown(String)
}
///|
pub extend ZoneType with Eq::{equal, not_equal}
///|
pub extend ZoneType with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZoneType with ToJson::{to_json}
///|
pub impl ToJson for ZoneType with fn to_json(self) {
let raw = match self {
ZoneType::Full => "full"
ZoneType::Partial => "partial"
ZoneType::Secondary => "secondary"
ZoneType::Internal => "internal"
ZoneType::Unknown(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZoneType with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneType with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"full" => Option::Some(ZoneType::Full)
"partial" => Option::Some(ZoneType::Partial)
"secondary" => Option::Some(ZoneType::Secondary)
"internal" => Option::Some(ZoneType::Internal)
_ => Option::None
}
},
raw => ZoneType::Unknown(raw),
)
}
///|
///
/// The account the zone belongs to.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneAccount {
id : String?
name : String?
}
///|
pub extend ZoneAccount with Eq::{equal, not_equal}
///|
pub extend ZoneAccount with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneAccount with omitted optional fields absent.
pub fn ZoneAccount::new(id? : String, name? : String) -> ZoneAccount {
{ id, name, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneAccount with ToJson::{to_json}
///|
pub impl ToJson for ZoneAccount with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("id", self.id).opt("name", self.name).build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneAccount with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneAccount with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
id: @sdkjson.opt_field(obj, "id", path),
name: @sdkjson.opt_field(obj, "name", path),
}
}
///|
///
/// Metadata about the zone.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneMeta {
cdn_only : Bool?
custom_certificate_quota : Int32?
dns_only : Bool?
foundation_dns : Bool?
page_rule_quota : Int32?
phishing_detected : Bool?
step : Int32?
}
///|
pub extend ZoneMeta with Eq::{equal, not_equal}
///|
pub extend ZoneMeta with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneMeta with omitted optional fields absent.
pub fn ZoneMeta::new(
cdn_only? : Bool,
custom_certificate_quota? : Int32,
dns_only? : Bool,
foundation_dns? : Bool,
page_rule_quota? : Int32,
phishing_detected? : Bool,
step? : Int32,
) -> ZoneMeta {
{
cdn_only,
custom_certificate_quota,
dns_only,
foundation_dns,
page_rule_quota,
phishing_detected,
step,
}
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneMeta with ToJson::{to_json}
///|
pub impl ToJson for ZoneMeta with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("cdn_only", self.cdn_only)
.opt("custom_certificate_quota", self.custom_certificate_quota)
.opt("dns_only", self.dns_only)
.opt("foundation_dns", self.foundation_dns)
.opt("page_rule_quota", self.page_rule_quota)
.opt("phishing_detected", self.phishing_detected)
.opt("step", self.step)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneMeta with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneMeta with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
cdn_only: @sdkjson.opt_field(obj, "cdn_only", path),
custom_certificate_quota: @sdkjson.opt_field(
obj, "custom_certificate_quota", path,
),
dns_only: @sdkjson.opt_field(obj, "dns_only", path),
foundation_dns: @sdkjson.opt_field(obj, "foundation_dns", path),
page_rule_quota: @sdkjson.opt_field(obj, "page_rule_quota", path),
phishing_detected: @sdkjson.opt_field(obj, "phishing_detected", path),
step: @sdkjson.opt_field(obj, "step", path),
}
}
///|
///
/// The owner of the zone.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneOwner {
id : String?
name : String?
type_ : String?
}
///|
pub extend ZoneOwner with Eq::{equal, not_equal}
///|
pub extend ZoneOwner with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneOwner with omitted optional fields absent.
pub fn ZoneOwner::new(
id? : String,
name? : String,
type_? : String,
) -> ZoneOwner {
{ id, name, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneOwner with ToJson::{to_json}
///|
pub impl ToJson for ZoneOwner with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("id", self.id)
.opt("name", self.name)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneOwner with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneOwner with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
id: @sdkjson.opt_field(obj, "id", path),
name: @sdkjson.opt_field(obj, "name", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// A Zones subscription information.
#derive(Eq, @debug.Debug)
pub(all) struct ZonePlan {
can_subscribe : Bool?
currency : String?
externally_managed : Bool?
frequency : String?
id : String?
is_subscribed : Bool?
legacy_discount : Bool?
legacy_id : String?
name : String?
price : Double?
}
///|
pub extend ZonePlan with Eq::{equal, not_equal}
///|
pub extend ZonePlan with @debug.Debug::{to_repr}
///|
///
/// Creates a ZonePlan with omitted optional fields absent.
pub fn ZonePlan::new(
can_subscribe? : Bool,
currency? : String,
externally_managed? : Bool,
frequency? : String,
id? : String,
is_subscribed? : Bool,
legacy_discount? : Bool,
legacy_id? : String,
name? : String,
price? : Double,
) -> ZonePlan {
{
can_subscribe,
currency,
externally_managed,
frequency,
id,
is_subscribed,
legacy_discount,
legacy_id,
name,
price,
}
}
///|
///
/// Encodes this value as JSON.
pub extend ZonePlan with ToJson::{to_json}
///|
pub impl ToJson for ZonePlan with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("can_subscribe", self.can_subscribe)
.opt("currency", self.currency)
.opt("externally_managed", self.externally_managed)
.opt("frequency", self.frequency)
.opt("id", self.id)
.opt("is_subscribed", self.is_subscribed)
.opt("legacy_discount", self.legacy_discount)
.opt("legacy_id", self.legacy_id)
.opt("name", self.name)
.opt("price", self.price)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZonePlan with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZonePlan with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
can_subscribe: @sdkjson.opt_field(obj, "can_subscribe", path),
currency: @sdkjson.opt_field(obj, "currency", path),
externally_managed: @sdkjson.opt_field(obj, "externally_managed", path),
frequency: @sdkjson.opt_field(obj, "frequency", path),
id: @sdkjson.opt_field(obj, "id", path),
is_subscribed: @sdkjson.opt_field(obj, "is_subscribed", path),
legacy_discount: @sdkjson.opt_field(obj, "legacy_discount", path),
legacy_id: @sdkjson.opt_field(obj, "legacy_id", path),
name: @sdkjson.opt_field(obj, "name", path),
price: @sdkjson.opt_field(obj, "price", path),
}
}
///|
///
/// The zone status on Cloudflare.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneStatus {
Initializing
Pending
Active
Moved
Unknown(String)
}
///|
pub extend ZoneStatus with Eq::{equal, not_equal}
///|
pub extend ZoneStatus with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZoneStatus with ToJson::{to_json}
///|
pub impl ToJson for ZoneStatus with fn to_json(self) {
let raw = match self {
ZoneStatus::Initializing => "initializing"
ZoneStatus::Pending => "pending"
ZoneStatus::Active => "active"
ZoneStatus::Moved => "moved"
ZoneStatus::Unknown(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZoneStatus with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneStatus with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"initializing" => Option::Some(ZoneStatus::Initializing)
"pending" => Option::Some(ZoneStatus::Pending)
"active" => Option::Some(ZoneStatus::Active)
"moved" => Option::Some(ZoneStatus::Moved)
_ => Option::None
}
},
raw => ZoneStatus::Unknown(raw),
)
}
///|
///
/// The root organizational unit that this zone belongs to (such as a tenant or organization).
#derive(Eq, @debug.Debug)
pub(all) struct ZoneTenant {
id : String?
name : String?
}
///|
pub extend ZoneTenant with Eq::{equal, not_equal}
///|
pub extend ZoneTenant with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneTenant with omitted optional fields absent.
pub fn ZoneTenant::new(id? : String, name? : String) -> ZoneTenant {
{ id, name, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneTenant with ToJson::{to_json}
///|
pub impl ToJson for ZoneTenant with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("id", self.id).opt("name", self.name).build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneTenant with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneTenant with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
id: @sdkjson.opt_field(obj, "id", path),
name: @sdkjson.opt_field(obj, "name", path),
}
}
///|
///
/// The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization).
#derive(Eq, @debug.Debug)
pub(all) struct ZoneTenantUnit {
id : String?
}
///|
pub extend ZoneTenantUnit with Eq::{equal, not_equal}
///|
pub extend ZoneTenantUnit with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneTenantUnit with omitted optional fields absent.
pub fn ZoneTenantUnit::new(id? : String) -> ZoneTenantUnit {
{ id, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneTenantUnit with ToJson::{to_json}
///|
pub impl ToJson for ZoneTenantUnit with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("id", self.id).build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneTenantUnit with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneTenantUnit with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{ id: @sdkjson.opt_field(obj, "id", path), }
}
///|
///
/// Generated representation of Zone.
#derive(Eq, @debug.Debug)
pub(all) struct Zone {
account : ZoneAccount
activated_on : @sdkjson.Presence[String]
cname_suffix : String?
created_on : String
development_mode : Int32
id : String
meta : ZoneMeta
modified_on : String
name : String
name_servers : Array[String]
original_dnshost : @sdkjson.Presence[String]
original_name_servers : @sdkjson.Presence[Array[String]]
original_registrar : @sdkjson.Presence[String]
owner : ZoneOwner
paused : Bool?
permissions : Array[String]?
plan : ZonePlan
status : ZoneStatus?
tenant : ZoneTenant?
tenant_unit : ZoneTenantUnit?
type_ : ZoneType?
vanity_name_servers : Array[String]?
verification_key : String?
}
///|
pub extend Zone with Eq::{equal, not_equal}
///|
pub extend Zone with @debug.Debug::{to_repr}
///|
///
/// Creates a Zone with omitted optional fields absent.
pub fn Zone::new(
account~ : ZoneAccount,
created_on~ : String,
development_mode~ : Int32,
id~ : String,
meta~ : ZoneMeta,
modified_on~ : String,
name~ : String,
name_servers~ : Array[String],
owner~ : ZoneOwner,
plan~ : ZonePlan,
activated_on? : String,
cname_suffix? : String,
original_dnshost? : String,
original_name_servers? : Array[String],
original_registrar? : String,
paused? : Bool,
permissions? : Array[String],
status? : ZoneStatus,
tenant? : ZoneTenant,
tenant_unit? : ZoneTenantUnit,
type_? : ZoneType,
vanity_name_servers? : Array[String],
verification_key? : String,
) -> Zone {
{
account,
activated_on: @sdkjson.Presence::from_option(activated_on),
cname_suffix,
created_on,
development_mode,
id,
meta,
modified_on,
name,
name_servers,
original_dnshost: @sdkjson.Presence::from_option(original_dnshost),
original_name_servers: @sdkjson.Presence::from_option(original_name_servers),
original_registrar: @sdkjson.Presence::from_option(original_registrar),
owner,
paused,
permissions,
plan,
status,
tenant,
tenant_unit,
type_,
vanity_name_servers,
verification_key,
}
}
///|
///
/// Encodes this value as JSON.
pub extend Zone with ToJson::{to_json}
///|
pub impl ToJson for Zone with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.field("account", self.account)
.presence("activated_on", self.activated_on)
.opt("cname_suffix", self.cname_suffix)
.field("created_on", self.created_on)
.field("development_mode", self.development_mode)
.field("id", self.id)
.field("meta", self.meta)
.field("modified_on", self.modified_on)
.field("name", self.name)
.field("name_servers", self.name_servers)
.presence("original_dnshost", self.original_dnshost)
.presence("original_name_servers", self.original_name_servers)
.presence("original_registrar", self.original_registrar)
.field("owner", self.owner)
.opt("paused", self.paused)
.opt("permissions", self.permissions)
.field("plan", self.plan)
.opt("status", self.status)
.opt("tenant", self.tenant)
.opt("tenant_unit", self.tenant_unit)
.opt("type", self.type_)
.opt("vanity_name_servers", self.vanity_name_servers)
.opt("verification_key", self.verification_key)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend Zone with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for Zone with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
account: required_field(obj, "account", path),
activated_on: @sdkjson.presence_field(obj, "activated_on", path),
cname_suffix: @sdkjson.opt_field(obj, "cname_suffix", path),
created_on: required_field(obj, "created_on", path),
development_mode: required_field(obj, "development_mode", path),
id: required_field(obj, "id", path),
meta: required_field(obj, "meta", path),
modified_on: required_field(obj, "modified_on", path),
name: required_field(obj, "name", path),
name_servers: required_field(obj, "name_servers", path),
original_dnshost: @sdkjson.presence_field(obj, "original_dnshost", path),
original_name_servers: @sdkjson.presence_field(
obj, "original_name_servers", path,
),
original_registrar: @sdkjson.presence_field(obj, "original_registrar", path),
owner: required_field(obj, "owner", path),
paused: @sdkjson.opt_field(obj, "paused", path),
permissions: @sdkjson.opt_field(obj, "permissions", path),
plan: required_field(obj, "plan", path),
status: @sdkjson.opt_field(obj, "status", path),
tenant: @sdkjson.opt_field(obj, "tenant", path),
tenant_unit: @sdkjson.opt_field(obj, "tenant_unit", path),
type_: @sdkjson.opt_field(obj, "type", path),
vanity_name_servers: @sdkjson.opt_field(obj, "vanity_name_servers", path),
verification_key: @sdkjson.opt_field(obj, "verification_key", path),
}
}
///|
///
/// Specify a zone status to filter by.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneListStatus {
Initializing
Pending
Active
Moved
Custom(String)
}
///|
pub extend ZoneListStatus with Eq::{equal, not_equal}
///|
pub extend ZoneListStatus with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZoneListStatus with ToJson::{to_json}
///|
pub impl ToJson for ZoneListStatus with fn to_json(self) {
let raw = match self {
ZoneListStatus::Initializing => "initializing"
ZoneListStatus::Pending => "pending"
ZoneListStatus::Active => "active"
ZoneListStatus::Moved => "moved"
ZoneListStatus::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZoneListStatus with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneListStatus with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"initializing" => Option::Some(ZoneListStatus::Initializing)
"pending" => Option::Some(ZoneListStatus::Pending)
"active" => Option::Some(ZoneListStatus::Active)
"moved" => Option::Some(ZoneListStatus::Moved)
_ => Option::None
}
},
raw => ZoneListStatus::Custom(raw),
)
}
///|
///
/// Generated string enum ZoneListType.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneListType {
Full
Partial
Secondary
Internal
Custom(String)
}
///|
pub extend ZoneListType with Eq::{equal, not_equal}
///|
pub extend ZoneListType with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZoneListType with ToJson::{to_json}
///|
pub impl ToJson for ZoneListType with fn to_json(self) {
let raw = match self {
ZoneListType::Full => "full"
ZoneListType::Partial => "partial"
ZoneListType::Secondary => "secondary"
ZoneListType::Internal => "internal"
ZoneListType::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZoneListType with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneListType with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"full" => Option::Some(ZoneListType::Full)
"partial" => Option::Some(ZoneListType::Partial)
"secondary" => Option::Some(ZoneListType::Secondary)
"internal" => Option::Some(ZoneListType::Internal)
_ => Option::None
}
},
raw => ZoneListType::Custom(raw),
)
}
///|
///
/// Field to order zones by.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneOrder {
Name
Status
AccountId
AccountName
PlanId
Custom(String)
}
///|
pub extend ZoneOrder with Eq::{equal, not_equal}
///|
pub extend ZoneOrder with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZoneOrder with ToJson::{to_json}
///|
pub impl ToJson for ZoneOrder with fn to_json(self) {
let raw = match self {
ZoneOrder::Name => "name"
ZoneOrder::Status => "status"
ZoneOrder::AccountId => "account.id"
ZoneOrder::AccountName => "account.name"
ZoneOrder::PlanId => "plan.id"
ZoneOrder::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZoneOrder with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneOrder with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"name" => Option::Some(ZoneOrder::Name)
"status" => Option::Some(ZoneOrder::Status)
"account.id" => Option::Some(ZoneOrder::AccountId)
"account.name" => Option::Some(ZoneOrder::AccountName)
"plan.id" => Option::Some(ZoneOrder::PlanId)
_ => Option::None
}
},
raw => ZoneOrder::Custom(raw),
)
}
///|
///
/// Direction to order zones.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneDirection {
Asc
Desc
Custom(String)
}
///|
pub extend ZoneDirection with Eq::{equal, not_equal}
///|
pub extend ZoneDirection with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZoneDirection with ToJson::{to_json}
///|
pub impl ToJson for ZoneDirection with fn to_json(self) {
let raw = match self {
ZoneDirection::Asc => "asc"
ZoneDirection::Desc => "desc"
ZoneDirection::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZoneDirection with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneDirection with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"asc" => Option::Some(ZoneDirection::Asc)
"desc" => Option::Some(ZoneDirection::Desc)
_ => Option::None
}
},
raw => ZoneDirection::Custom(raw),
)
}
///|
///
/// Whether to match all search requirements or at least one (any).
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZoneMatch {
Any
All
Custom(String)
}
///|
pub extend ZoneMatch with Eq::{equal, not_equal}
///|
pub extend ZoneMatch with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZoneMatch with ToJson::{to_json}
///|
pub impl ToJson for ZoneMatch with fn to_json(self) {
let raw = match self {
ZoneMatch::Any => "any"
ZoneMatch::All => "all"
ZoneMatch::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZoneMatch with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneMatch with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"any" => Option::Some(ZoneMatch::Any)
"all" => Option::Some(ZoneMatch::All)
_ => Option::None
}
},
raw => ZoneMatch::Custom(raw),
)
}
///|
///
/// Generated representation of ZoneCreateAccount.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneCreateAccount {
id : String?
}
///|
pub extend ZoneCreateAccount with Eq::{equal, not_equal}
///|
pub extend ZoneCreateAccount with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneCreateAccount with omitted optional fields absent.
pub fn ZoneCreateAccount::new(id? : String) -> ZoneCreateAccount {
{ id, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneCreateAccount with ToJson::{to_json}
///|
pub impl ToJson for ZoneCreateAccount with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("id", self.id).build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneCreateAccount with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneCreateAccount with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{ id: @sdkjson.opt_field(obj, "id", path), }
}
///|
///
/// Generated representation of ZoneCreate.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneCreate {
account : ZoneCreateAccount
name : String
type_ : ZoneType?
}
///|
pub extend ZoneCreate with Eq::{equal, not_equal}
///|
pub extend ZoneCreate with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneCreate with omitted optional fields absent.
pub fn ZoneCreate::new(
account~ : ZoneCreateAccount,
name~ : String,
type_? : ZoneType,
) -> ZoneCreate {
{ account, name, type_, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneCreate with ToJson::{to_json}
///|
pub impl ToJson for ZoneCreate with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.field("account", self.account)
.field("name", self.name)
.opt("type", self.type_)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneCreate with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneCreate with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
account: required_field(obj, "account", path),
name: required_field(obj, "name", path),
type_: @sdkjson.opt_field(obj, "type", path),
}
}
///|
///
/// (Deprecated) Please use the `/zones/{zone_id}/subscription` API to update a zone's plan. Changing this value will create/cancel associated subscriptions. To view available plans for this zone, see Zone Plans.
#derive(Eq, @debug.Debug)
pub(all) struct ZonePatchPlan {
id : String?
}
///|
pub extend ZonePatchPlan with Eq::{equal, not_equal}
///|
pub extend ZonePatchPlan with @debug.Debug::{to_repr}
///|
///
/// Creates a ZonePatchPlan with omitted optional fields absent.
pub fn ZonePatchPlan::new(id? : String) -> ZonePatchPlan {
{ id, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZonePatchPlan with ToJson::{to_json}
///|
pub impl ToJson for ZonePatchPlan with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("id", self.id).build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZonePatchPlan with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZonePatchPlan with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{ id: @sdkjson.opt_field(obj, "id", path), }
}
///|
///
/// A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. This parameter is only available to Enterprise customers or if it has been explicitly enabled on a zone.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum ZonePatchType {
Full
Partial
Secondary
Internal
Custom(String)
}
///|
pub extend ZonePatchType with Eq::{equal, not_equal}
///|
pub extend ZonePatchType with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend ZonePatchType with ToJson::{to_json}
///|
pub impl ToJson for ZonePatchType with fn to_json(self) {
let raw = match self {
ZonePatchType::Full => "full"
ZonePatchType::Partial => "partial"
ZonePatchType::Secondary => "secondary"
ZonePatchType::Internal => "internal"
ZonePatchType::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend ZonePatchType with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZonePatchType with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"full" => Option::Some(ZonePatchType::Full)
"partial" => Option::Some(ZonePatchType::Partial)
"secondary" => Option::Some(ZonePatchType::Secondary)
"internal" => Option::Some(ZonePatchType::Internal)
_ => Option::None
}
},
raw => ZonePatchType::Custom(raw),
)
}
///|
///
/// Generated representation of ZonePatch.
#derive(Eq, @debug.Debug)
pub(all) struct ZonePatch {
paused : Bool?
plan : ZonePatchPlan?
type_ : ZonePatchType?
vanity_name_servers : Array[String]?
}
///|
pub extend ZonePatch with Eq::{equal, not_equal}
///|
pub extend ZonePatch with @debug.Debug::{to_repr}
///|
///
/// Creates a ZonePatch with omitted optional fields absent.
pub fn ZonePatch::new(
paused? : Bool,
plan? : ZonePatchPlan,
type_? : ZonePatchType,
vanity_name_servers? : Array[String],
) -> ZonePatch {
{ paused, plan, type_, vanity_name_servers, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZonePatch with ToJson::{to_json}
///|
pub impl ToJson for ZonePatch with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("paused", self.paused)
.opt("plan", self.plan)
.opt("type", self.type_)
.opt("vanity_name_servers", self.vanity_name_servers)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZonePatch with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZonePatch with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
paused: @sdkjson.opt_field(obj, "paused", path),
plan: @sdkjson.opt_field(obj, "plan", path),
type_: @sdkjson.opt_field(obj, "type", path),
vanity_name_servers: @sdkjson.opt_field(obj, "vanity_name_servers", path),
}
}
///|
///
/// Generated representation of ZoneActivation.
#derive(Eq, @debug.Debug)
pub(all) struct ZoneActivation {
id : String?
}
///|
pub extend ZoneActivation with Eq::{equal, not_equal}
///|
pub extend ZoneActivation with @debug.Debug::{to_repr}
///|
///
/// Creates a ZoneActivation with omitted optional fields absent.
pub fn ZoneActivation::new(id? : String) -> ZoneActivation {
{ id, }
}
///|
///
/// Encodes this value as JSON.
pub extend ZoneActivation with ToJson::{to_json}
///|
pub impl ToJson for ZoneActivation with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("id", self.id).build()
}
///|
///
/// Decodes this value from JSON.
pub extend ZoneActivation with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for ZoneActivation with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{ id: @sdkjson.opt_field(obj, "id", path), }
}
///|
///
/// Generated representation of DnsRecordDeletion.
#derive(Eq, @debug.Debug)
pub(all) struct DnsRecordDeletion {
id : String?
}
///|
pub extend DnsRecordDeletion with Eq::{equal, not_equal}
///|
pub extend DnsRecordDeletion with @debug.Debug::{to_repr}
///|
///
/// Creates a DnsRecordDeletion with omitted optional fields absent.
pub fn DnsRecordDeletion::new(id? : String) -> DnsRecordDeletion {
{ id, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnsRecordDeletion with ToJson::{to_json}
///|
pub impl ToJson for DnsRecordDeletion with fn to_json(self) {
@sdkjson.ObjBuilder::new().opt("id", self.id).build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnsRecordDeletion with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnsRecordDeletion with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{ id: @sdkjson.opt_field(obj, "id", path), }
}
///|
///
/// Status of DNSSEC, based on user-desired state and presence of necessary records.
#derive(Eq, @debug.Debug)
#non_exhaustive
pub(all) enum DnssecPatchStatus {
Active
Disabled
Custom(String)
}
///|
pub extend DnssecPatchStatus with Eq::{equal, not_equal}
///|
pub extend DnssecPatchStatus with @debug.Debug::{to_repr}
///|
///
/// Encodes this string enum as JSON.
pub extend DnssecPatchStatus with ToJson::{to_json}
///|
pub impl ToJson for DnssecPatchStatus with fn to_json(self) {
let raw = match self {
DnssecPatchStatus::Active => "active"
DnssecPatchStatus::Disabled => "disabled"
DnssecPatchStatus::Custom(raw) => raw
}
@json.Json::Json(raw)
}
///|
///
/// Decodes this string enum from JSON.
pub extend DnssecPatchStatus with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnssecPatchStatus with fn from_json(value, path) {
@sdkjson.open_string(
value,
path,
raw => {
match raw {
"active" => Option::Some(DnssecPatchStatus::Active)
"disabled" => Option::Some(DnssecPatchStatus::Disabled)
_ => Option::None
}
},
raw => DnssecPatchStatus::Custom(raw),
)
}
///|
///
/// Generated representation of DnssecPatch.
#derive(Eq, @debug.Debug)
pub(all) struct DnssecPatch {
dnssec_multi_signer : Bool?
dnssec_presigned : Bool?
dnssec_use_nsec3 : Bool?
status : DnssecPatchStatus?
}
///|
pub extend DnssecPatch with Eq::{equal, not_equal}
///|
pub extend DnssecPatch with @debug.Debug::{to_repr}
///|
///
/// Creates a DnssecPatch with omitted optional fields absent.
pub fn DnssecPatch::new(
dnssec_multi_signer? : Bool,
dnssec_presigned? : Bool,
dnssec_use_nsec3? : Bool,
status? : DnssecPatchStatus,
) -> DnssecPatch {
{ dnssec_multi_signer, dnssec_presigned, dnssec_use_nsec3, status, }
}
///|
///
/// Encodes this value as JSON.
pub extend DnssecPatch with ToJson::{to_json}
///|
pub impl ToJson for DnssecPatch with fn to_json(self) {
@sdkjson.ObjBuilder::new()
.opt("dnssec_multi_signer", self.dnssec_multi_signer)
.opt("dnssec_presigned", self.dnssec_presigned)
.opt("dnssec_use_nsec3", self.dnssec_use_nsec3)
.opt("status", self.status)
.build()
}
///|
///
/// Decodes this value from JSON.
pub extend DnssecPatch with @json.FromJson::{from_json}
///|
pub impl @json.FromJson for DnssecPatch with fn from_json(value, path) {
let obj = @sdkjson.expect_object(value, path)
{
dnssec_multi_signer: @sdkjson.opt_field(obj, "dnssec_multi_signer", path),
dnssec_presigned: @sdkjson.opt_field(obj, "dnssec_presigned", path),
dnssec_use_nsec3: @sdkjson.opt_field(obj, "dnssec_use_nsec3", path),
status: @sdkjson.opt_field(obj, "status", path),
}
}