/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

const models = require('./index');

/**
 * The relationship link resource format.
 *
 * @extends models['ProxyResource']
 */
class RelationshipLinkResourceFormat extends models['ProxyResource'] {
  /**
   * Create a RelationshipLinkResourceFormat.
   * @member {object} [displayName] Localized display name for the Relationship
   * Link.
   * @member {object} [description] Localized descriptions for the Relationship
   * Link.
   * @member {string} interactionType The InteractionType associated with the
   * Relationship Link.
   * @member {string} [linkName] The name of the Relationship Link.
   * @member {array} [mappings] The mappings between Interaction and
   * Relationship fields.
   * @member {array} profilePropertyReferences The property references for the
   * Profile of the Relationship.
   * @member {string} [provisioningState] Provisioning state. Possible values
   * include: 'Provisioning', 'Succeeded', 'Expiring', 'Deleting',
   * 'HumanIntervention', 'Failed'
   * @member {array} relatedProfilePropertyReferences The property references
   * for the Related Profile of the Relationship.
   * @member {string} relationshipName The Relationship associated with the
   * Link.
   * @member {string} [relationshipGuidId] The relationship guid id.
   * @member {string} [tenantId] The hub name.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of RelationshipLinkResourceFormat
   *
   * @returns {object} metadata of RelationshipLinkResourceFormat
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RelationshipLinkResourceFormat',
      type: {
        name: 'Composite',
        className: 'RelationshipLinkResourceFormat',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          interactionType: {
            required: true,
            serializedName: 'properties.interactionType',
            type: {
              name: 'String'
            }
          },
          linkName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.linkName',
            type: {
              name: 'String'
            }
          },
          mappings: {
            required: false,
            serializedName: 'properties.mappings',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RelationshipLinkFieldMappingElementType',
                  type: {
                    name: 'Composite',
                    className: 'RelationshipLinkFieldMapping'
                  }
              }
            }
          },
          profilePropertyReferences: {
            required: true,
            serializedName: 'properties.profilePropertyReferences',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ParticipantProfilePropertyReferenceElementType',
                  type: {
                    name: 'Composite',
                    className: 'ParticipantProfilePropertyReference'
                  }
              }
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          relatedProfilePropertyReferences: {
            required: true,
            serializedName: 'properties.relatedProfilePropertyReferences',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ParticipantProfilePropertyReferenceElementType',
                  type: {
                    name: 'Composite',
                    className: 'ParticipantProfilePropertyReference'
                  }
              }
            }
          },
          relationshipName: {
            required: true,
            serializedName: 'properties.relationshipName',
            type: {
              name: 'String'
            }
          },
          relationshipGuidId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.relationshipGuidId',
            type: {
              name: 'String'
            }
          },
          tenantId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.tenantId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = RelationshipLinkResourceFormat;
