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 ImageMemoryConstraints(object): 12 """ 13 For a flexible image and shape, the amount of memory supported for instances that use this image. 14 """ 15 16 def __init__(self, **kwargs): 17 """ 18 Initializes a new ImageMemoryConstraints object with values from keyword arguments. 19 The following keyword arguments are supported (corresponding to the getters/setters of this class): 20 21 :param min_in_gbs: 22 The value to assign to the min_in_gbs property of this ImageMemoryConstraints. 23 :type min_in_gbs: int 24 25 :param max_in_gbs: 26 The value to assign to the max_in_gbs property of this ImageMemoryConstraints. 27 :type max_in_gbs: int 28 29 """ 30 self.swagger_types = { 31 'min_in_gbs': 'int', 32 'max_in_gbs': 'int' 33 } 34 35 self.attribute_map = { 36 'min_in_gbs': 'minInGBs', 37 'max_in_gbs': 'maxInGBs' 38 } 39 40 self._min_in_gbs = None 41 self._max_in_gbs = None 42 43 @property 44 def min_in_gbs(self): 45 """ 46 Gets the min_in_gbs of this ImageMemoryConstraints. 47 The minimum amount of memory, in gigabytes. 48 49 50 :return: The min_in_gbs of this ImageMemoryConstraints. 51 :rtype: int 52 """ 53 return self._min_in_gbs 54 55 @min_in_gbs.setter 56 def min_in_gbs(self, min_in_gbs): 57 """ 58 Sets the min_in_gbs of this ImageMemoryConstraints. 59 The minimum amount of memory, in gigabytes. 60 61 62 :param min_in_gbs: The min_in_gbs of this ImageMemoryConstraints. 63 :type: int 64 """ 65 self._min_in_gbs = min_in_gbs 66 67 @property 68 def max_in_gbs(self): 69 """ 70 Gets the max_in_gbs of this ImageMemoryConstraints. 71 The maximum amount of memory, in gigabytes. 72 73 74 :return: The max_in_gbs of this ImageMemoryConstraints. 75 :rtype: int 76 """ 77 return self._max_in_gbs 78 79 @max_in_gbs.setter 80 def max_in_gbs(self, max_in_gbs): 81 """ 82 Sets the max_in_gbs of this ImageMemoryConstraints. 83 The maximum amount of memory, in gigabytes. 84 85 86 :param max_in_gbs: The max_in_gbs of this ImageMemoryConstraints. 87 :type: int 88 """ 89 self._max_in_gbs = max_in_gbs 90 91 def __repr__(self): 92 return formatted_flat_dict(self) 93 94 def __eq__(self, other): 95 if other is None: 96 return False 97 98 return self.__dict__ == other.__dict__ 99 100 def __ne__(self, other): 101 return not self == other 102