# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class IRelationshipMetadata(Model):
    """IRelationshipMetadata.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    :ivar name:
    :vartype name: str
    :ivar friendly_name:
    :vartype friendly_name: str
    :param from_attribute:
    :type from_attribute:
     ~dynamics.customerinsights.api.models.IAttributeMetadata
    :param to_attribute:
    :type to_attribute:
     ~dynamics.customerinsights.api.models.IAttributeMetadata
    :param relationship_type: Possible values include:
     'singleKeyRelationshipOrigin', 'singleKeyRelationshipDestination',
     'dataSourceLineageOrigin', 'dataSourceLineageDestination'
    :type relationship_type: str or ~dynamics.customerinsights.api.models.enum
    :param data_source_entity:
    :type data_source_entity:
     ~dynamics.customerinsights.api.models.IEntityMetadata
    :ivar data_source_mapping_attributes:
    :vartype data_source_mapping_attributes:
     list[~dynamics.customerinsights.api.models.IAttributeMetadata]
    """

    _validation = {
        'name': {'readonly': True},
        'friendly_name': {'readonly': True},
        'data_source_mapping_attributes': {'readonly': True},
    }

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'friendly_name': {'key': 'friendlyName', 'type': 'str'},
        'from_attribute': {'key': 'fromAttribute', 'type': 'IAttributeMetadata'},
        'to_attribute': {'key': 'toAttribute', 'type': 'IAttributeMetadata'},
        'relationship_type': {'key': 'relationshipType', 'type': 'str'},
        'data_source_entity': {'key': 'dataSourceEntity', 'type': 'IEntityMetadata'},
        'data_source_mapping_attributes': {'key': 'dataSourceMappingAttributes', 'type': '[IAttributeMetadata]'},
    }

    def __init__(self, *, from_attribute=None, to_attribute=None, relationship_type=None, data_source_entity=None, **kwargs) -> None:
        super(IRelationshipMetadata, self).__init__(**kwargs)
        self.name = None
        self.friendly_name = None
        self.from_attribute = from_attribute
        self.to_attribute = to_attribute
        self.relationship_type = relationship_type
        self.data_source_entity = data_source_entity
        self.data_source_mapping_attributes = None
