1 // Copyright (c) 2016, 2018, 2025, Oracle and/or its affiliates. All rights reserved.
2 // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
3 // Code generated. DO NOT EDIT.
4 5 // DNS API
6 //
7 // API for the DNS service. Use this API to manage DNS zones, records, and other DNS resources.
8 // For more information, see Overview of the DNS Service (https://docs.oracle.com/iaas/Content/DNS/Concepts/dnszonemanagement.htm).
9 //
10 11 package dns
12 13 import (
14 "fmt"
15 "strings"
16 17 "github.com/nrdcg/oci-go-sdk/common/v1065"
18 )
19 20 // MigrationReplacement A record to add to a zone in replacement of contents that cannot be migrated.
21 type MigrationReplacement struct {
22 23 // The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs (https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4).
24 Rtype *string `mandatory:"true" json:"rtype"`
25 26 // The Time To Live of the replacement record, in seconds.
27 Ttl *int `mandatory:"true" json:"ttl"`
28 29 // The record data of the replacement record, as whitespace-delimited tokens in
30 // type-specific presentation format.
31 Rdata *string `mandatory:"true" json:"rdata"`
32 33 // The canonical name for a substitute type of the replacement record to be used if the specified `rtype` is not allowed at the domain. The specified `ttl` and `rdata` will still apply with the substitute type.
34 SubstituteRtype *string `mandatory:"false" json:"substituteRtype"`
35 }
36 37 func (m MigrationReplacement) String() string {
38 return common.PointerString(m)
39 }
40 41 // ValidateEnumValue returns an error when providing an unsupported enum value
42 // This function is being called during constructing API request process
43 // Not recommended for calling this function directly
44 func (m MigrationReplacement) ValidateEnumValue() (bool, error) {
45 errMessage := []string{}
46 47 if len(errMessage) > 0 {
48 return true, fmt.Errorf("%s", strings.Join(errMessage, "\n"))
49 }
50 return false, nil
51 }
52