# 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: 20180419


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 AccessToken(object):
    """
    Access token response for OCI Container Registry extension authentication.
    """

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

        :param token:
            The value to assign to the token property of this AccessToken.
        :type token: str

        :param access_token:
            The value to assign to the access_token property of this AccessToken.
        :type access_token: str

        :param scope:
            The value to assign to the scope property of this AccessToken.
        :type scope: str

        :param expires_in:
            The value to assign to the expires_in property of this AccessToken.
        :type expires_in: int

        """
        self.swagger_types = {
            'token': 'str',
            'access_token': 'str',
            'scope': 'str',
            'expires_in': 'int'
        }
        self.attribute_map = {
            'token': 'token',
            'access_token': 'access_token',
            'scope': 'scope',
            'expires_in': 'expires_in'
        }
        self._token = None
        self._access_token = None
        self._scope = None
        self._expires_in = None

    @property
    def token(self):
        """
        **[Required]** Gets the token of this AccessToken.
        Access token string.


        :return: The token of this AccessToken.
        :rtype: str
        """
        return self._token

    @token.setter
    def token(self, token):
        """
        Sets the token of this AccessToken.
        Access token string.


        :param token: The token of this AccessToken.
        :type: str
        """
        self._token = token

    @property
    def access_token(self):
        """
        **[Required]** Gets the access_token of this AccessToken.
        Access token string (alias for token).


        :return: The access_token of this AccessToken.
        :rtype: str
        """
        return self._access_token

    @access_token.setter
    def access_token(self, access_token):
        """
        Sets the access_token of this AccessToken.
        Access token string (alias for token).


        :param access_token: The access_token of this AccessToken.
        :type: str
        """
        self._access_token = access_token

    @property
    def scope(self):
        """
        **[Required]** Gets the scope of this AccessToken.
        Scope that restricts access to resources.


        :return: The scope of this AccessToken.
        :rtype: str
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """
        Sets the scope of this AccessToken.
        Scope that restricts access to resources.


        :param scope: The scope of this AccessToken.
        :type: str
        """
        self._scope = scope

    @property
    def expires_in(self):
        """
        **[Required]** Gets the expires_in of this AccessToken.
        Seconds until the token expires.


        :return: The expires_in of this AccessToken.
        :rtype: int
        """
        return self._expires_in

    @expires_in.setter
    def expires_in(self, expires_in):
        """
        Sets the expires_in of this AccessToken.
        Seconds until the token expires.


        :param expires_in: The expires_in of this AccessToken.
        :type: int
        """
        self._expires_in = expires_in

    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
