# coding: utf-8
# Copyright (c) 2016, 2026, Oracle and/or its affiliates.  All rights reserved.
# 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.

# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220919


from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel  # noqa: F401
from oci.decorators import init_model_state_from_kwargs


@init_model_state_from_kwargs
class OlvmMemoryPolicy(object):
    """
    Logical grouping of memory-related properties of virtual machine-like entities.
    """

    def __init__(self, **kwargs):
        """
        Initializes a new OlvmMemoryPolicy object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param is_ballooning:
            The value to assign to the is_ballooning property of this OlvmMemoryPolicy.
        :type is_ballooning: bool

        :param guaranteed_memory_in_bytes:
            The value to assign to the guaranteed_memory_in_bytes property of this OlvmMemoryPolicy.
        :type guaranteed_memory_in_bytes: int

        :param max_memory_in_bytes:
            The value to assign to the max_memory_in_bytes property of this OlvmMemoryPolicy.
        :type max_memory_in_bytes: int

        :param memory_over_commit:
            The value to assign to the memory_over_commit property of this OlvmMemoryPolicy.
        :type memory_over_commit: oci.cloud_migrations.models.MemoryOverCommit

        :param transparent_huge_pages:
            The value to assign to the transparent_huge_pages property of this OlvmMemoryPolicy.
        :type transparent_huge_pages: oci.cloud_migrations.models.TransparentHugePages

        """
        self.swagger_types = {
            'is_ballooning': 'bool',
            'guaranteed_memory_in_bytes': 'int',
            'max_memory_in_bytes': 'int',
            'memory_over_commit': 'MemoryOverCommit',
            'transparent_huge_pages': 'TransparentHugePages'
        }
        self.attribute_map = {
            'is_ballooning': 'isBallooning',
            'guaranteed_memory_in_bytes': 'guaranteedMemoryInBytes',
            'max_memory_in_bytes': 'maxMemoryInBytes',
            'memory_over_commit': 'memoryOverCommit',
            'transparent_huge_pages': 'transparentHugePages'
        }
        self._is_ballooning = None
        self._guaranteed_memory_in_bytes = None
        self._max_memory_in_bytes = None
        self._memory_over_commit = None
        self._transparent_huge_pages = None

    @property
    def is_ballooning(self):
        """
        Gets the is_ballooning of this OlvmMemoryPolicy.
        Indicates if ballooning is enabled


        :return: The is_ballooning of this OlvmMemoryPolicy.
        :rtype: bool
        """
        return self._is_ballooning

    @is_ballooning.setter
    def is_ballooning(self, is_ballooning):
        """
        Sets the is_ballooning of this OlvmMemoryPolicy.
        Indicates if ballooning is enabled


        :param is_ballooning: The is_ballooning of this OlvmMemoryPolicy.
        :type: bool
        """
        self._is_ballooning = is_ballooning

    @property
    def guaranteed_memory_in_bytes(self):
        """
        Gets the guaranteed_memory_in_bytes of this OlvmMemoryPolicy.
        The amount of memory, in bytes, that is guaranteed to not be drained by the balloon mechanism


        :return: The guaranteed_memory_in_bytes of this OlvmMemoryPolicy.
        :rtype: int
        """
        return self._guaranteed_memory_in_bytes

    @guaranteed_memory_in_bytes.setter
    def guaranteed_memory_in_bytes(self, guaranteed_memory_in_bytes):
        """
        Sets the guaranteed_memory_in_bytes of this OlvmMemoryPolicy.
        The amount of memory, in bytes, that is guaranteed to not be drained by the balloon mechanism


        :param guaranteed_memory_in_bytes: The guaranteed_memory_in_bytes of this OlvmMemoryPolicy.
        :type: int
        """
        self._guaranteed_memory_in_bytes = guaranteed_memory_in_bytes

    @property
    def max_memory_in_bytes(self):
        """
        Gets the max_memory_in_bytes of this OlvmMemoryPolicy.
        Maximum virtual machine memory in Bytes


        :return: The max_memory_in_bytes of this OlvmMemoryPolicy.
        :rtype: int
        """
        return self._max_memory_in_bytes

    @max_memory_in_bytes.setter
    def max_memory_in_bytes(self, max_memory_in_bytes):
        """
        Sets the max_memory_in_bytes of this OlvmMemoryPolicy.
        Maximum virtual machine memory in Bytes


        :param max_memory_in_bytes: The max_memory_in_bytes of this OlvmMemoryPolicy.
        :type: int
        """
        self._max_memory_in_bytes = max_memory_in_bytes

    @property
    def memory_over_commit(self):
        """
        Gets the memory_over_commit of this OlvmMemoryPolicy.

        :return: The memory_over_commit of this OlvmMemoryPolicy.
        :rtype: oci.cloud_migrations.models.MemoryOverCommit
        """
        return self._memory_over_commit

    @memory_over_commit.setter
    def memory_over_commit(self, memory_over_commit):
        """
        Sets the memory_over_commit of this OlvmMemoryPolicy.

        :param memory_over_commit: The memory_over_commit of this OlvmMemoryPolicy.
        :type: oci.cloud_migrations.models.MemoryOverCommit
        """
        self._memory_over_commit = memory_over_commit

    @property
    def transparent_huge_pages(self):
        """
        Gets the transparent_huge_pages of this OlvmMemoryPolicy.

        :return: The transparent_huge_pages of this OlvmMemoryPolicy.
        :rtype: oci.cloud_migrations.models.TransparentHugePages
        """
        return self._transparent_huge_pages

    @transparent_huge_pages.setter
    def transparent_huge_pages(self, transparent_huge_pages):
        """
        Sets the transparent_huge_pages of this OlvmMemoryPolicy.

        :param transparent_huge_pages: The transparent_huge_pages of this OlvmMemoryPolicy.
        :type: oci.cloud_migrations.models.TransparentHugePages
        """
        self._transparent_huge_pages = transparent_huge_pages

    def __repr__(self):
        return formatted_flat_dict(self)

    def __eq__(self, other):
        if other is None:
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not self == other
