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 // SteeringPolicyAnswer DNS record data with metadata for processing in a steering policy.
21 //
22 // **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
23 type SteeringPolicyAnswer struct {
24 25 // A user-friendly name for the answer, unique within the steering policy.
26 // An answer's `name` property can be referenced in `answerCondition` properties
27 // of rules using `answer.name`.
28 // **Example:**
29 // "rules": [
30 // {
31 // "ruleType": "FILTER",
32 // "defaultAnswerData": [
33 // {
34 // "answerCondition": "answer.name == 'server 1'",
35 // "shouldKeep": true
36 // }
37 // ]
38 // }
39 // ]
40 Name *string `mandatory:"true" json:"name"`
41 42 // The type of DNS record, such as A or CNAME. Only A, AAAA, and CNAME are supported. For more
43 // information, see Supported DNS Resource Record Types (https://docs.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm).
44 Rtype *string `mandatory:"true" json:"rtype"`
45 46 // The record's data, as whitespace-delimited tokens in
47 // type-specific presentation format. All RDATA is normalized and the
48 // returned presentation of your RDATA may differ from its initial input.
49 // For more information about RDATA, see Supported DNS Resource Record Types (https://docs.oracle.com/iaas/Content/DNS/Reference/supporteddnsresource.htm).
50 Rdata *string `mandatory:"true" json:"rdata"`
51 52 // The freeform name of a group of one or more records in which this record is included,
53 // such as "LAX data center". An answer's `pool` property can be referenced in `answerCondition`
54 // properties of rules using `answer.pool`.
55 // **Example:**
56 // "rules": [
57 // {
58 // "ruleType": "FILTER",
59 // "defaultAnswerData": [
60 // {
61 // "answerCondition": "answer.pool == 'US East Servers'",
62 // "shouldKeep": true
63 // }
64 // ]
65 // }
66 // ]
67 Pool *string `mandatory:"false" json:"pool"`
68 69 // Set this property to `true` to indicate that the answer is administratively disabled,
70 // such as when the corresponding server is down for maintenance. An answer's `isDisabled`
71 // property can be referenced in `answerCondition` properties in rules using `answer.isDisabled`.
72 // **Example:**
73 // "rules": [
74 // {
75 // "ruleType": "FILTER",
76 // "defaultAnswerData": [
77 // {
78 // "answerCondition": "answer.isDisabled != true",
79 // "shouldKeep": true
80 // }
81 // ]
82 // },
83 IsDisabled *bool `mandatory:"false" json:"isDisabled"`
84 }
85 86 func (m SteeringPolicyAnswer) String() string {
87 return common.PointerString(m)
88 }
89 90 // ValidateEnumValue returns an error when providing an unsupported enum value
91 // This function is being called during constructing API request process
92 // Not recommended for calling this function directly
93 func (m SteeringPolicyAnswer) ValidateEnumValue() (bool, error) {
94 errMessage := []string{}
95 96 if len(errMessage) > 0 {
97 return true, fmt.Errorf("%s", strings.Join(errMessage, "\n"))
98 }
99 return false, nil
100 }
101