|
| 1 | +// Code based on the AtlasAPI V2 OpenAPI file |
| 2 | + |
| 3 | +package admin |
| 4 | + |
| 5 | +// FreeComputeAutoScalingRules Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down. |
| 6 | +type FreeComputeAutoScalingRules struct { |
| 7 | + // Maximum instance size to which your cluster can automatically scale. |
| 8 | + MaxInstanceSize *string `json:"maxInstanceSize,omitempty"` |
| 9 | + // Minimum instance size to which your cluster can automatically scale. |
| 10 | + MinInstanceSize *string `json:"minInstanceSize,omitempty"` |
| 11 | +} |
| 12 | + |
| 13 | +// NewFreeComputeAutoScalingRules instantiates a new FreeComputeAutoScalingRules object |
| 14 | +// This constructor will assign default values to properties that have it defined, |
| 15 | +// and makes sure properties required by API are set, but the set of arguments |
| 16 | +// will change when the set of required properties is changed |
| 17 | +func NewFreeComputeAutoScalingRules() *FreeComputeAutoScalingRules { |
| 18 | + this := FreeComputeAutoScalingRules{} |
| 19 | + return &this |
| 20 | +} |
| 21 | + |
| 22 | +// NewFreeComputeAutoScalingRulesWithDefaults instantiates a new FreeComputeAutoScalingRules object |
| 23 | +// This constructor will only assign default values to properties that have it defined, |
| 24 | +// but it doesn't guarantee that properties required by API are set |
| 25 | +func NewFreeComputeAutoScalingRulesWithDefaults() *FreeComputeAutoScalingRules { |
| 26 | + this := FreeComputeAutoScalingRules{} |
| 27 | + return &this |
| 28 | +} |
| 29 | + |
| 30 | +// GetMaxInstanceSize returns the MaxInstanceSize field value if set, zero value otherwise |
| 31 | +func (o *FreeComputeAutoScalingRules) GetMaxInstanceSize() string { |
| 32 | + if o == nil || IsNil(o.MaxInstanceSize) { |
| 33 | + var ret string |
| 34 | + return ret |
| 35 | + } |
| 36 | + return *o.MaxInstanceSize |
| 37 | +} |
| 38 | + |
| 39 | +// GetMaxInstanceSizeOk returns a tuple with the MaxInstanceSize field value if set, nil otherwise |
| 40 | +// and a boolean to check if the value has been set. |
| 41 | +func (o *FreeComputeAutoScalingRules) GetMaxInstanceSizeOk() (*string, bool) { |
| 42 | + if o == nil || IsNil(o.MaxInstanceSize) { |
| 43 | + return nil, false |
| 44 | + } |
| 45 | + |
| 46 | + return o.MaxInstanceSize, true |
| 47 | +} |
| 48 | + |
| 49 | +// HasMaxInstanceSize returns a boolean if a field has been set. |
| 50 | +func (o *FreeComputeAutoScalingRules) HasMaxInstanceSize() bool { |
| 51 | + if o != nil && !IsNil(o.MaxInstanceSize) { |
| 52 | + return true |
| 53 | + } |
| 54 | + |
| 55 | + return false |
| 56 | +} |
| 57 | + |
| 58 | +// SetMaxInstanceSize gets a reference to the given string and assigns it to the MaxInstanceSize field. |
| 59 | +func (o *FreeComputeAutoScalingRules) SetMaxInstanceSize(v string) { |
| 60 | + o.MaxInstanceSize = &v |
| 61 | +} |
| 62 | + |
| 63 | +// GetMinInstanceSize returns the MinInstanceSize field value if set, zero value otherwise |
| 64 | +func (o *FreeComputeAutoScalingRules) GetMinInstanceSize() string { |
| 65 | + if o == nil || IsNil(o.MinInstanceSize) { |
| 66 | + var ret string |
| 67 | + return ret |
| 68 | + } |
| 69 | + return *o.MinInstanceSize |
| 70 | +} |
| 71 | + |
| 72 | +// GetMinInstanceSizeOk returns a tuple with the MinInstanceSize field value if set, nil otherwise |
| 73 | +// and a boolean to check if the value has been set. |
| 74 | +func (o *FreeComputeAutoScalingRules) GetMinInstanceSizeOk() (*string, bool) { |
| 75 | + if o == nil || IsNil(o.MinInstanceSize) { |
| 76 | + return nil, false |
| 77 | + } |
| 78 | + |
| 79 | + return o.MinInstanceSize, true |
| 80 | +} |
| 81 | + |
| 82 | +// HasMinInstanceSize returns a boolean if a field has been set. |
| 83 | +func (o *FreeComputeAutoScalingRules) HasMinInstanceSize() bool { |
| 84 | + if o != nil && !IsNil(o.MinInstanceSize) { |
| 85 | + return true |
| 86 | + } |
| 87 | + |
| 88 | + return false |
| 89 | +} |
| 90 | + |
| 91 | +// SetMinInstanceSize gets a reference to the given string and assigns it to the MinInstanceSize field. |
| 92 | +func (o *FreeComputeAutoScalingRules) SetMinInstanceSize(v string) { |
| 93 | + o.MinInstanceSize = &v |
| 94 | +} |
0 commit comments