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 SecretBundleVersionSummary(object): 12 """ 13 The properties of the secret bundle. (Secret bundle version summary objects do not include the actual contents of the secret.) 14 """ 15 16 #: A constant which can be used with the stages property of a SecretBundleVersionSummary. 17 #: This constant has a value of "CURRENT" 18 STAGES_CURRENT = "CURRENT" 19 20 #: A constant which can be used with the stages property of a SecretBundleVersionSummary. 21 #: This constant has a value of "PENDING" 22 STAGES_PENDING = "PENDING" 23 24 #: A constant which can be used with the stages property of a SecretBundleVersionSummary. 25 #: This constant has a value of "LATEST" 26 STAGES_LATEST = "LATEST" 27 28 #: A constant which can be used with the stages property of a SecretBundleVersionSummary. 29 #: This constant has a value of "PREVIOUS" 30 STAGES_PREVIOUS = "PREVIOUS" 31 32 #: A constant which can be used with the stages property of a SecretBundleVersionSummary. 33 #: This constant has a value of "DEPRECATED" 34 STAGES_DEPRECATED = "DEPRECATED" 35 36 def __init__(self, **kwargs): 37 """ 38 Initializes a new SecretBundleVersionSummary object with values from keyword arguments. 39 The following keyword arguments are supported (corresponding to the getters/setters of this class): 40 41 :param secret_id: 42 The value to assign to the secret_id property of this SecretBundleVersionSummary. 43 :type secret_id: str 44 45 :param time_created: 46 The value to assign to the time_created property of this SecretBundleVersionSummary. 47 :type time_created: datetime 48 49 :param version_number: 50 The value to assign to the version_number property of this SecretBundleVersionSummary. 51 :type version_number: int 52 53 :param version_name: 54 The value to assign to the version_name property of this SecretBundleVersionSummary. 55 :type version_name: str 56 57 :param time_of_deletion: 58 The value to assign to the time_of_deletion property of this SecretBundleVersionSummary. 59 :type time_of_deletion: datetime 60 61 :param time_of_expiry: 62 The value to assign to the time_of_expiry property of this SecretBundleVersionSummary. 63 :type time_of_expiry: datetime 64 65 :param stages: 66 The value to assign to the stages property of this SecretBundleVersionSummary. 67 Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'. 68 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 69 :type stages: list[str] 70 71 """ 72 self.swagger_types = { 73 'secret_id': 'str', 74 'time_created': 'datetime', 75 'version_number': 'int', 76 'version_name': 'str', 77 'time_of_deletion': 'datetime', 78 'time_of_expiry': 'datetime', 79 'stages': 'list[str]' 80 } 81 82 self.attribute_map = { 83 'secret_id': 'secretId', 84 'time_created': 'timeCreated', 85 'version_number': 'versionNumber', 86 'version_name': 'versionName', 87 'time_of_deletion': 'timeOfDeletion', 88 'time_of_expiry': 'timeOfExpiry', 89 'stages': 'stages' 90 } 91 92 self._secret_id = None 93 self._time_created = None 94 self._version_number = None 95 self._version_name = None 96 self._time_of_deletion = None 97 self._time_of_expiry = None 98 self._stages = None 99 100 @property 101 def secret_id(self): 102 """ 103 **[Required]** Gets the secret_id of this SecretBundleVersionSummary. 104 The OCID of the secret. 105 106 107 :return: The secret_id of this SecretBundleVersionSummary. 108 :rtype: str 109 """ 110 return self._secret_id 111 112 @secret_id.setter 113 def secret_id(self, secret_id): 114 """ 115 Sets the secret_id of this SecretBundleVersionSummary. 116 The OCID of the secret. 117 118 119 :param secret_id: The secret_id of this SecretBundleVersionSummary. 120 :type: str 121 """ 122 self._secret_id = secret_id 123 124 @property 125 def time_created(self): 126 """ 127 Gets the time_created of this SecretBundleVersionSummary. 128 The time when the secret bundle was created. 129 130 131 :return: The time_created of this SecretBundleVersionSummary. 132 :rtype: datetime 133 """ 134 return self._time_created 135 136 @time_created.setter 137 def time_created(self, time_created): 138 """ 139 Sets the time_created of this SecretBundleVersionSummary. 140 The time when the secret bundle was created. 141 142 143 :param time_created: The time_created of this SecretBundleVersionSummary. 144 :type: datetime 145 """ 146 self._time_created = time_created 147 148 @property 149 def version_number(self): 150 """ 151 **[Required]** Gets the version_number of this SecretBundleVersionSummary. 152 The version number of the secret. 153 154 155 :return: The version_number of this SecretBundleVersionSummary. 156 :rtype: int 157 """ 158 return self._version_number 159 160 @version_number.setter 161 def version_number(self, version_number): 162 """ 163 Sets the version_number of this SecretBundleVersionSummary. 164 The version number of the secret. 165 166 167 :param version_number: The version_number of this SecretBundleVersionSummary. 168 :type: int 169 """ 170 self._version_number = version_number 171 172 @property 173 def version_name(self): 174 """ 175 Gets the version_name of this SecretBundleVersionSummary. 176 The version name of the secret bundle, as provided when the secret was created or last rotated. 177 178 179 :return: The version_name of this SecretBundleVersionSummary. 180 :rtype: str 181 """ 182 return self._version_name 183 184 @version_name.setter 185 def version_name(self, version_name): 186 """ 187 Sets the version_name of this SecretBundleVersionSummary. 188 The version name of the secret bundle, as provided when the secret was created or last rotated. 189 190 191 :param version_name: The version_name of this SecretBundleVersionSummary. 192 :type: str 193 """ 194 self._version_name = version_name 195 196 @property 197 def time_of_deletion(self): 198 """ 199 Gets the time_of_deletion of this SecretBundleVersionSummary. 200 An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. 201 Example: `2019-04-03T21:10:29.600Z` 202 203 __ https://tools.ietf.org/html/rfc3339 204 205 206 :return: The time_of_deletion of this SecretBundleVersionSummary. 207 :rtype: datetime 208 """ 209 return self._time_of_deletion 210 211 @time_of_deletion.setter 212 def time_of_deletion(self, time_of_deletion): 213 """ 214 Sets the time_of_deletion of this SecretBundleVersionSummary. 215 An optional property indicating when to delete the secret version, expressed in `RFC 3339`__ timestamp format. 216 Example: `2019-04-03T21:10:29.600Z` 217 218 __ https://tools.ietf.org/html/rfc3339 219 220 221 :param time_of_deletion: The time_of_deletion of this SecretBundleVersionSummary. 222 :type: datetime 223 """ 224 self._time_of_deletion = time_of_deletion 225 226 @property 227 def time_of_expiry(self): 228 """ 229 Gets the time_of_expiry of this SecretBundleVersionSummary. 230 An optional property indicating when the secret version will expire, expressed in `RFC 3339`__ timestamp format. 231 Example: `2019-04-03T21:10:29.600Z` 232 233 __ https://tools.ietf.org/html/rfc3339 234 235 236 :return: The time_of_expiry of this SecretBundleVersionSummary. 237 :rtype: datetime 238 """ 239 return self._time_of_expiry 240 241 @time_of_expiry.setter 242 def time_of_expiry(self, time_of_expiry): 243 """ 244 Sets the time_of_expiry of this SecretBundleVersionSummary. 245 An optional property indicating when the secret version will expire, expressed in `RFC 3339`__ timestamp format. 246 Example: `2019-04-03T21:10:29.600Z` 247 248 __ https://tools.ietf.org/html/rfc3339 249 250 251 :param time_of_expiry: The time_of_expiry of this SecretBundleVersionSummary. 252 :type: datetime 253 """ 254 self._time_of_expiry = time_of_expiry 255 256 @property 257 def stages(self): 258 """ 259 Gets the stages of this SecretBundleVersionSummary. 260 A list of possible rotation states for the secret bundle. 261 262 Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'. 263 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 264 265 266 :return: The stages of this SecretBundleVersionSummary. 267 :rtype: list[str] 268 """ 269 return self._stages 270 271 @stages.setter 272 def stages(self, stages): 273 """ 274 Sets the stages of this SecretBundleVersionSummary. 275 A list of possible rotation states for the secret bundle. 276 277 278 :param stages: The stages of this SecretBundleVersionSummary. 279 :type: list[str] 280 """ 281 allowed_values = ["CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED"] 282 if stages: 283 stages[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in stages] 284 self._stages = stages 285 286 def __repr__(self): 287 return formatted_flat_dict(self) 288 289 def __eq__(self, other): 290 if other is None: 291 return False 292 293 return self.__dict__ == other.__dict__ 294 295 def __ne__(self, other): 296 return not self == other 297