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 CapacityReservationInstanceSummary(object): 12 """ 13 Condensed instance data when listing instances in a compute capacity reservation. 14 """ 15 16 def __init__(self, **kwargs): 17 """ 18 Initializes a new CapacityReservationInstanceSummary object with values from keyword arguments. 19 The following keyword arguments are supported (corresponding to the getters/setters of this class): 20 21 :param id: 22 The value to assign to the id property of this CapacityReservationInstanceSummary. 23 :type id: str 24 25 :param availability_domain: 26 The value to assign to the availability_domain property of this CapacityReservationInstanceSummary. 27 :type availability_domain: str 28 29 :param compartment_id: 30 The value to assign to the compartment_id property of this CapacityReservationInstanceSummary. 31 :type compartment_id: str 32 33 :param fault_domain: 34 The value to assign to the fault_domain property of this CapacityReservationInstanceSummary. 35 :type fault_domain: str 36 37 :param shape_config: 38 The value to assign to the shape_config property of this CapacityReservationInstanceSummary. 39 :type shape_config: oci.core.models.InstanceReservationShapeConfigDetails 40 41 :param shape: 42 The value to assign to the shape property of this CapacityReservationInstanceSummary. 43 :type shape: str 44 45 """ 46 self.swagger_types = { 47 'id': 'str', 48 'availability_domain': 'str', 49 'compartment_id': 'str', 50 'fault_domain': 'str', 51 'shape_config': 'InstanceReservationShapeConfigDetails', 52 'shape': 'str' 53 } 54 55 self.attribute_map = { 56 'id': 'id', 57 'availability_domain': 'availabilityDomain', 58 'compartment_id': 'compartmentId', 59 'fault_domain': 'faultDomain', 60 'shape_config': 'shapeConfig', 61 'shape': 'shape' 62 } 63 64 self._id = None 65 self._availability_domain = None 66 self._compartment_id = None 67 self._fault_domain = None 68 self._shape_config = None 69 self._shape = None 70 71 @property 72 def id(self): 73 """ 74 **[Required]** Gets the id of this CapacityReservationInstanceSummary. 75 The OCID of the instance. 76 77 78 :return: The id of this CapacityReservationInstanceSummary. 79 :rtype: str 80 """ 81 return self._id 82 83 @id.setter 84 def id(self, id): 85 """ 86 Sets the id of this CapacityReservationInstanceSummary. 87 The OCID of the instance. 88 89 90 :param id: The id of this CapacityReservationInstanceSummary. 91 :type: str 92 """ 93 self._id = id 94 95 @property 96 def availability_domain(self): 97 """ 98 **[Required]** Gets the availability_domain of this CapacityReservationInstanceSummary. 99 The availability domain the instance is running in. 100 101 102 :return: The availability_domain of this CapacityReservationInstanceSummary. 103 :rtype: str 104 """ 105 return self._availability_domain 106 107 @availability_domain.setter 108 def availability_domain(self, availability_domain): 109 """ 110 Sets the availability_domain of this CapacityReservationInstanceSummary. 111 The availability domain the instance is running in. 112 113 114 :param availability_domain: The availability_domain of this CapacityReservationInstanceSummary. 115 :type: str 116 """ 117 self._availability_domain = availability_domain 118 119 @property 120 def compartment_id(self): 121 """ 122 **[Required]** Gets the compartment_id of this CapacityReservationInstanceSummary. 123 The OCID of the compartment that contains the instance. 124 125 126 :return: The compartment_id of this CapacityReservationInstanceSummary. 127 :rtype: str 128 """ 129 return self._compartment_id 130 131 @compartment_id.setter 132 def compartment_id(self, compartment_id): 133 """ 134 Sets the compartment_id of this CapacityReservationInstanceSummary. 135 The OCID of the compartment that contains the instance. 136 137 138 :param compartment_id: The compartment_id of this CapacityReservationInstanceSummary. 139 :type: str 140 """ 141 self._compartment_id = compartment_id 142 143 @property 144 def fault_domain(self): 145 """ 146 Gets the fault_domain of this CapacityReservationInstanceSummary. 147 The fault domain the instance is running in. 148 149 150 :return: The fault_domain of this CapacityReservationInstanceSummary. 151 :rtype: str 152 """ 153 return self._fault_domain 154 155 @fault_domain.setter 156 def fault_domain(self, fault_domain): 157 """ 158 Sets the fault_domain of this CapacityReservationInstanceSummary. 159 The fault domain the instance is running in. 160 161 162 :param fault_domain: The fault_domain of this CapacityReservationInstanceSummary. 163 :type: str 164 """ 165 self._fault_domain = fault_domain 166 167 @property 168 def shape_config(self): 169 """ 170 Gets the shape_config of this CapacityReservationInstanceSummary. 171 172 :return: The shape_config of this CapacityReservationInstanceSummary. 173 :rtype: oci.core.models.InstanceReservationShapeConfigDetails 174 """ 175 return self._shape_config 176 177 @shape_config.setter 178 def shape_config(self, shape_config): 179 """ 180 Sets the shape_config of this CapacityReservationInstanceSummary. 181 182 :param shape_config: The shape_config of this CapacityReservationInstanceSummary. 183 :type: oci.core.models.InstanceReservationShapeConfigDetails 184 """ 185 self._shape_config = shape_config 186 187 @property 188 def shape(self): 189 """ 190 **[Required]** Gets the shape of this CapacityReservationInstanceSummary. 191 The shape of the instance. The shape determines the number of CPUs, amount of memory, 192 and other resources allocated to the instance. 193 194 You can enumerate all available shapes by calling :func:`list_compute_capacity_reservation_instance_shapes`. 195 196 197 :return: The shape of this CapacityReservationInstanceSummary. 198 :rtype: str 199 """ 200 return self._shape 201 202 @shape.setter 203 def shape(self, shape): 204 """ 205 Sets the shape of this CapacityReservationInstanceSummary. 206 The shape of the instance. The shape determines the number of CPUs, amount of memory, 207 and other resources allocated to the instance. 208 209 You can enumerate all available shapes by calling :func:`list_compute_capacity_reservation_instance_shapes`. 210 211 212 :param shape: The shape of this CapacityReservationInstanceSummary. 213 :type: str 214 """ 215 self._shape = shape 216 217 def __repr__(self): 218 return formatted_flat_dict(self) 219 220 def __eq__(self, other): 221 if other is None: 222 return False 223 224 return self.__dict__ == other.__dict__ 225 226 def __ne__(self, other): 227 return not self == other 228