record.go raw

   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  // Record A DNS resource record. For more information, see
  21  // Supported DNS Resource Record Types (https://docs.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm).
  22  type Record struct {
  23  
  24  	// The fully qualified domain name where the record can be located.
  25  	Domain *string `mandatory:"false" json:"domain"`
  26  
  27  	// A unique identifier for the record within its zone.
  28  	RecordHash *string `mandatory:"false" json:"recordHash"`
  29  
  30  	// A Boolean flag indicating whether or not parts of the record
  31  	// are unable to be explicitly managed.
  32  	IsProtected *bool `mandatory:"false" json:"isProtected"`
  33  
  34  	// The record's data, as whitespace-delimited tokens in
  35  	// type-specific presentation format. All RDATA is normalized and the
  36  	// returned presentation of your RDATA may differ from its initial input.
  37  	// For more information about RDATA, see Supported DNS Resource Record Types (https://docs.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm)
  38  	Rdata *string `mandatory:"false" json:"rdata"`
  39  
  40  	// The latest version of the record's zone in which its RRSet differs
  41  	// from the preceding version.
  42  	RrsetVersion *string `mandatory:"false" json:"rrsetVersion"`
  43  
  44  	// 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).
  45  	Rtype *string `mandatory:"false" json:"rtype"`
  46  
  47  	// The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
  48  	Ttl *int `mandatory:"false" json:"ttl"`
  49  }
  50  
  51  func (m Record) String() string {
  52  	return common.PointerString(m)
  53  }
  54  
  55  // ValidateEnumValue returns an error when providing an unsupported enum value
  56  // This function is being called during constructing API request process
  57  // Not recommended for calling this function directly
  58  func (m Record) ValidateEnumValue() (bool, error) {
  59  	errMessage := []string{}
  60  
  61  	if len(errMessage) > 0 {
  62  		return true, fmt.Errorf("%s", strings.Join(errMessage, "\n"))
  63  	}
  64  	return false, nil
  65  }
  66