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 // CreateTsigKeyDetails The body for defining a TSIG key.
21 // **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
22 type CreateTsigKeyDetails struct {
23 24 // TSIG key algorithms are encoded as domain names, but most consist of only one
25 // non-empty label, which is not required to be explicitly absolute.
26 // Applicable algorithms include: hmac-sha1, hmac-sha224, hmac-sha256,
27 // hmac-sha512. For more information on these algorithms, see RFC 4635 (https://tools.ietf.org/html/rfc4635#section-2).
28 Algorithm *string `mandatory:"true" json:"algorithm"`
29 30 // A globally unique domain name identifying the key for a given pair of hosts.
31 Name *string `mandatory:"true" json:"name"`
32 33 // The OCID of the compartment containing the TSIG key.
34 CompartmentId *string `mandatory:"true" json:"compartmentId"`
35 36 // A base64 string encoding the binary shared secret.
37 Secret *string `mandatory:"true" json:"secret"`
38 39 // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
40 // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
41 //
42 // **Example:** `{"Department": "Finance"}`
43 FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
44 45 // Defined tags for this resource. Each key is predefined and scoped to a namespace.
46 // For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
47 //
48 // **Example:** `{"Operations": {"CostCenter": "42"}}`
49 DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`
50 }
51 52 func (m CreateTsigKeyDetails) String() string {
53 return common.PointerString(m)
54 }
55 56 // ValidateEnumValue returns an error when providing an unsupported enum value
57 // This function is being called during constructing API request process
58 // Not recommended for calling this function directly
59 func (m CreateTsigKeyDetails) ValidateEnumValue() (bool, error) {
60 errMessage := []string{}
61 62 if len(errMessage) > 0 {
63 return true, fmt.Errorf("%s", strings.Join(errMessage, "\n"))
64 }
65 return false, nil
66 }
67