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 RegionSubscription(object): 12 """ 13 An object that represents your tenancy's access to a particular region (i.e., a subscription), the status of that 14 access, and whether that region is the home region. For more information, see `Managing Regions`__. 15 16 To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, 17 talk to an administrator. If you're an administrator who needs to write policies to give users access, 18 see `Getting Started with Policies`__. 19 20 __ https://docs.cloud.oracle.com/Content/Identity/Tasks/managingregions.htm 21 __ https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm 22 """ 23 24 #: A constant which can be used with the status property of a RegionSubscription. 25 #: This constant has a value of "READY" 26 STATUS_READY = "READY" 27 28 #: A constant which can be used with the status property of a RegionSubscription. 29 #: This constant has a value of "IN_PROGRESS" 30 STATUS_IN_PROGRESS = "IN_PROGRESS" 31 32 def __init__(self, **kwargs): 33 """ 34 Initializes a new RegionSubscription object with values from keyword arguments. 35 The following keyword arguments are supported (corresponding to the getters/setters of this class): 36 37 :param region_key: 38 The value to assign to the region_key property of this RegionSubscription. 39 :type region_key: str 40 41 :param region_name: 42 The value to assign to the region_name property of this RegionSubscription. 43 :type region_name: str 44 45 :param status: 46 The value to assign to the status property of this RegionSubscription. 47 Allowed values for this property are: "READY", "IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'. 48 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 49 :type status: str 50 51 :param is_home_region: 52 The value to assign to the is_home_region property of this RegionSubscription. 53 :type is_home_region: bool 54 55 """ 56 self.swagger_types = { 57 'region_key': 'str', 58 'region_name': 'str', 59 'status': 'str', 60 'is_home_region': 'bool' 61 } 62 63 self.attribute_map = { 64 'region_key': 'regionKey', 65 'region_name': 'regionName', 66 'status': 'status', 67 'is_home_region': 'isHomeRegion' 68 } 69 70 self._region_key = None 71 self._region_name = None 72 self._status = None 73 self._is_home_region = None 74 75 @property 76 def region_key(self): 77 """ 78 **[Required]** Gets the region_key of this RegionSubscription. 79 The region's key. See `Regions and Availability Domains`__ 80 for the full list of supported 3-letter region codes. 81 82 Example: `PHX` 83 84 __ https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm 85 86 87 :return: The region_key of this RegionSubscription. 88 :rtype: str 89 """ 90 return self._region_key 91 92 @region_key.setter 93 def region_key(self, region_key): 94 """ 95 Sets the region_key of this RegionSubscription. 96 The region's key. See `Regions and Availability Domains`__ 97 for the full list of supported 3-letter region codes. 98 99 Example: `PHX` 100 101 __ https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm 102 103 104 :param region_key: The region_key of this RegionSubscription. 105 :type: str 106 """ 107 self._region_key = region_key 108 109 @property 110 def region_name(self): 111 """ 112 **[Required]** Gets the region_name of this RegionSubscription. 113 The region's name. See `Regions and Availability Domains`__ 114 for the full list of supported region names. 115 116 Example: `us-phoenix-1` 117 118 __ https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm 119 120 121 :return: The region_name of this RegionSubscription. 122 :rtype: str 123 """ 124 return self._region_name 125 126 @region_name.setter 127 def region_name(self, region_name): 128 """ 129 Sets the region_name of this RegionSubscription. 130 The region's name. See `Regions and Availability Domains`__ 131 for the full list of supported region names. 132 133 Example: `us-phoenix-1` 134 135 __ https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm 136 137 138 :param region_name: The region_name of this RegionSubscription. 139 :type: str 140 """ 141 self._region_name = region_name 142 143 @property 144 def status(self): 145 """ 146 **[Required]** Gets the status of this RegionSubscription. 147 The region subscription status. 148 149 Allowed values for this property are: "READY", "IN_PROGRESS", 'UNKNOWN_ENUM_VALUE'. 150 Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. 151 152 153 :return: The status of this RegionSubscription. 154 :rtype: str 155 """ 156 return self._status 157 158 @status.setter 159 def status(self, status): 160 """ 161 Sets the status of this RegionSubscription. 162 The region subscription status. 163 164 165 :param status: The status of this RegionSubscription. 166 :type: str 167 """ 168 allowed_values = ["READY", "IN_PROGRESS"] 169 if not value_allowed_none_or_none_sentinel(status, allowed_values): 170 status = 'UNKNOWN_ENUM_VALUE' 171 self._status = status 172 173 @property 174 def is_home_region(self): 175 """ 176 **[Required]** Gets the is_home_region of this RegionSubscription. 177 Indicates if the region is the home region or not. 178 179 180 :return: The is_home_region of this RegionSubscription. 181 :rtype: bool 182 """ 183 return self._is_home_region 184 185 @is_home_region.setter 186 def is_home_region(self, is_home_region): 187 """ 188 Sets the is_home_region of this RegionSubscription. 189 Indicates if the region is the home region or not. 190 191 192 :param is_home_region: The is_home_region of this RegionSubscription. 193 :type: bool 194 """ 195 self._is_home_region = is_home_region 196 197 def __repr__(self): 198 return formatted_flat_dict(self) 199 200 def __eq__(self, other): 201 if other is None: 202 return False 203 204 return self.__dict__ == other.__dict__ 205 206 def __ne__(self, other): 207 return not self == other 208