/*
 * 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');

/**
 * Describes a profile type participating in an interaction.
 *
 */
class Participant {
  /**
   * Create a Participant.
   * @member {string} profileTypeName Profile type name.
   * @member {array} participantPropertyReferences The property references.
   * @member {string} participantName Participant name.
   * @member {object} [displayName] Localized display name.
   * @member {object} [description] Localized descriptions.
   * @member {string} [role] The role that the participant is playing in the
   * interaction.
   */
  constructor() {
  }

  /**
   * Defines the metadata of Participant
   *
   * @returns {object} metadata of Participant
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Participant',
      type: {
        name: 'Composite',
        className: 'Participant',
        modelProperties: {
          profileTypeName: {
            required: true,
            serializedName: 'profileTypeName',
            type: {
              name: 'String'
            }
          },
          participantPropertyReferences: {
            required: true,
            serializedName: 'participantPropertyReferences',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ParticipantPropertyReferenceElementType',
                  type: {
                    name: 'Composite',
                    className: 'ParticipantPropertyReference'
                  }
              }
            }
          },
          participantName: {
            required: true,
            serializedName: 'participantName',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'displayName',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          role: {
            required: false,
            serializedName: 'role',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Participant;
