1# coding: utf-8
2# Copyright (c) 2016, 2021, Oracle and/or its affiliates.  All rights reserved.
3# 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.
4
5
6from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel  # noqa: F401
7from oci.decorators import init_model_state_from_kwargs
8
9
10@init_model_state_from_kwargs
11class CreateTsigKeyDetails(object):
12    """
13    The body for defining a TSIG key.
14
15    **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
16    """
17
18    def __init__(self, **kwargs):
19        """
20        Initializes a new CreateTsigKeyDetails object with values from keyword arguments.
21        The following keyword arguments are supported (corresponding to the getters/setters of this class):
22
23        :param algorithm:
24            The value to assign to the algorithm property of this CreateTsigKeyDetails.
25        :type algorithm: str
26
27        :param name:
28            The value to assign to the name property of this CreateTsigKeyDetails.
29        :type name: str
30
31        :param compartment_id:
32            The value to assign to the compartment_id property of this CreateTsigKeyDetails.
33        :type compartment_id: str
34
35        :param secret:
36            The value to assign to the secret property of this CreateTsigKeyDetails.
37        :type secret: str
38
39        :param freeform_tags:
40            The value to assign to the freeform_tags property of this CreateTsigKeyDetails.
41        :type freeform_tags: dict(str, str)
42
43        :param defined_tags:
44            The value to assign to the defined_tags property of this CreateTsigKeyDetails.
45        :type defined_tags: dict(str, dict(str, object))
46
47        """
48        self.swagger_types = {
49            'algorithm': 'str',
50            'name': 'str',
51            'compartment_id': 'str',
52            'secret': 'str',
53            'freeform_tags': 'dict(str, str)',
54            'defined_tags': 'dict(str, dict(str, object))'
55        }
56
57        self.attribute_map = {
58            'algorithm': 'algorithm',
59            'name': 'name',
60            'compartment_id': 'compartmentId',
61            'secret': 'secret',
62            'freeform_tags': 'freeformTags',
63            'defined_tags': 'definedTags'
64        }
65
66        self._algorithm = None
67        self._name = None
68        self._compartment_id = None
69        self._secret = None
70        self._freeform_tags = None
71        self._defined_tags = None
72
73    @property
74    def algorithm(self):
75        """
76        **[Required]** Gets the algorithm of this CreateTsigKeyDetails.
77        TSIG key algorithms are encoded as domain names, but most consist of only one
78        non-empty label, which is not required to be explicitly absolute.
79        Applicable algorithms include: hmac-sha1, hmac-sha224, hmac-sha256,
80        hmac-sha512. For more information on these algorithms, see `RFC 4635`__.
81
82        __ https://tools.ietf.org/html/rfc4635#section-2
83
84
85        :return: The algorithm of this CreateTsigKeyDetails.
86        :rtype: str
87        """
88        return self._algorithm
89
90    @algorithm.setter
91    def algorithm(self, algorithm):
92        """
93        Sets the algorithm of this CreateTsigKeyDetails.
94        TSIG key algorithms are encoded as domain names, but most consist of only one
95        non-empty label, which is not required to be explicitly absolute.
96        Applicable algorithms include: hmac-sha1, hmac-sha224, hmac-sha256,
97        hmac-sha512. For more information on these algorithms, see `RFC 4635`__.
98
99        __ https://tools.ietf.org/html/rfc4635#section-2
100
101
102        :param algorithm: The algorithm of this CreateTsigKeyDetails.
103        :type: str
104        """
105        self._algorithm = algorithm
106
107    @property
108    def name(self):
109        """
110        **[Required]** Gets the name of this CreateTsigKeyDetails.
111        A globally unique domain name identifying the key for a given pair of hosts.
112
113
114        :return: The name of this CreateTsigKeyDetails.
115        :rtype: str
116        """
117        return self._name
118
119    @name.setter
120    def name(self, name):
121        """
122        Sets the name of this CreateTsigKeyDetails.
123        A globally unique domain name identifying the key for a given pair of hosts.
124
125
126        :param name: The name of this CreateTsigKeyDetails.
127        :type: str
128        """
129        self._name = name
130
131    @property
132    def compartment_id(self):
133        """
134        **[Required]** Gets the compartment_id of this CreateTsigKeyDetails.
135        The OCID of the compartment containing the TSIG key.
136
137
138        :return: The compartment_id of this CreateTsigKeyDetails.
139        :rtype: str
140        """
141        return self._compartment_id
142
143    @compartment_id.setter
144    def compartment_id(self, compartment_id):
145        """
146        Sets the compartment_id of this CreateTsigKeyDetails.
147        The OCID of the compartment containing the TSIG key.
148
149
150        :param compartment_id: The compartment_id of this CreateTsigKeyDetails.
151        :type: str
152        """
153        self._compartment_id = compartment_id
154
155    @property
156    def secret(self):
157        """
158        **[Required]** Gets the secret of this CreateTsigKeyDetails.
159        A base64 string encoding the binary shared secret.
160
161
162        :return: The secret of this CreateTsigKeyDetails.
163        :rtype: str
164        """
165        return self._secret
166
167    @secret.setter
168    def secret(self, secret):
169        """
170        Sets the secret of this CreateTsigKeyDetails.
171        A base64 string encoding the binary shared secret.
172
173
174        :param secret: The secret of this CreateTsigKeyDetails.
175        :type: str
176        """
177        self._secret = secret
178
179    @property
180    def freeform_tags(self):
181        """
182        Gets the freeform_tags of this CreateTsigKeyDetails.
183        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
184        For more information, see `Resource Tags`__.
185
186
187        **Example:** `{\"Department\": \"Finance\"}`
188
189        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
190
191
192        :return: The freeform_tags of this CreateTsigKeyDetails.
193        :rtype: dict(str, str)
194        """
195        return self._freeform_tags
196
197    @freeform_tags.setter
198    def freeform_tags(self, freeform_tags):
199        """
200        Sets the freeform_tags of this CreateTsigKeyDetails.
201        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
202        For more information, see `Resource Tags`__.
203
204
205        **Example:** `{\"Department\": \"Finance\"}`
206
207        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
208
209
210        :param freeform_tags: The freeform_tags of this CreateTsigKeyDetails.
211        :type: dict(str, str)
212        """
213        self._freeform_tags = freeform_tags
214
215    @property
216    def defined_tags(self):
217        """
218        Gets the defined_tags of this CreateTsigKeyDetails.
219        Defined tags for this resource. Each key is predefined and scoped to a namespace.
220        For more information, see `Resource Tags`__.
221
222
223        **Example:** `{\"Operations\": {\"CostCenter\": \"42\"}}`
224
225        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
226
227
228        :return: The defined_tags of this CreateTsigKeyDetails.
229        :rtype: dict(str, dict(str, object))
230        """
231        return self._defined_tags
232
233    @defined_tags.setter
234    def defined_tags(self, defined_tags):
235        """
236        Sets the defined_tags of this CreateTsigKeyDetails.
237        Defined tags for this resource. Each key is predefined and scoped to a namespace.
238        For more information, see `Resource Tags`__.
239
240
241        **Example:** `{\"Operations\": {\"CostCenter\": \"42\"}}`
242
243        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm
244
245
246        :param defined_tags: The defined_tags of this CreateTsigKeyDetails.
247        :type: dict(str, dict(str, object))
248        """
249        self._defined_tags = defined_tags
250
251    def __repr__(self):
252        return formatted_flat_dict(self)
253
254    def __eq__(self, other):
255        if other is None:
256            return False
257
258        return self.__dict__ == other.__dict__
259
260    def __ne__(self, other):
261        return not self == other
262