# 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 MigrationBandwidth(object):
    """
    Defines the bandwidth used by migration
    """

    #: A constant which can be used with the assignment_method property of a MigrationBandwidth.
    #: This constant has a value of "AUTO"
    ASSIGNMENT_METHOD_AUTO = "AUTO"

    #: A constant which can be used with the assignment_method property of a MigrationBandwidth.
    #: This constant has a value of "CUSTOM"
    ASSIGNMENT_METHOD_CUSTOM = "CUSTOM"

    #: A constant which can be used with the assignment_method property of a MigrationBandwidth.
    #: This constant has a value of "HYPERVISOR_DEFAULT"
    ASSIGNMENT_METHOD_HYPERVISOR_DEFAULT = "HYPERVISOR_DEFAULT"

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

        :param assignment_method:
            The value to assign to the assignment_method property of this MigrationBandwidth.
            Allowed values for this property are: "AUTO", "CUSTOM", "HYPERVISOR_DEFAULT"
        :type assignment_method: str

        """
        self.swagger_types = {
            'assignment_method': 'str'
        }
        self.attribute_map = {
            'assignment_method': 'assignmentMethod'
        }
        self._assignment_method = None

    @property
    def assignment_method(self):
        """
        Gets the assignment_method of this MigrationBandwidth.
        Defines how the migration bandwidth is assigned

        Allowed values for this property are: "AUTO", "CUSTOM", "HYPERVISOR_DEFAULT"


        :return: The assignment_method of this MigrationBandwidth.
        :rtype: str
        """
        return self._assignment_method

    @assignment_method.setter
    def assignment_method(self, assignment_method):
        """
        Sets the assignment_method of this MigrationBandwidth.
        Defines how the migration bandwidth is assigned


        :param assignment_method: The assignment_method of this MigrationBandwidth.
        :type: str
        """
        allowed_values = ["AUTO", "CUSTOM", "HYPERVISOR_DEFAULT"]
        if not value_allowed_none_or_none_sentinel(assignment_method, allowed_values):
            raise ValueError(
                f"Invalid value for `assignment_method`, must be None or one of {allowed_values}"
            )
        self._assignment_method = assignment_method

    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
