# -*- coding: utf-8 -*-

"""
instagramapi

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from instagramapi.api_helper import APIHelper


class RelationshipStatus(object):

    """Implementation of the 'RelationshipStatus' model.

    Attributes:
        outgoing_status (OutgoingStatusEnum): Status of outgoing relationship

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "outgoing_status": 'outgoing_status'
    }

    _optionals = [
        'outgoing_status',
    ]

    def __init__(self,
                 outgoing_status=APIHelper.SKIP):
        """Constructor for the RelationshipStatus class"""

        # Initialize members of the class
        if outgoing_status is not APIHelper.SKIP:
            self.outgoing_status = outgoing_status 

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """

        if not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        outgoing_status = dictionary.get("outgoing_status") if dictionary.get("outgoing_status") else APIHelper.SKIP
        # Return an object of this model
        return cls(outgoing_status)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'outgoing_status={(self.outgoing_status if hasattr(self, "outgoing_status") else None)!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'outgoing_status={(self.outgoing_status if hasattr(self, "outgoing_status") else None)!s})')
