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

/**
 * Email Template update Parameters.
 *
 */
class EmailTemplateUpdateParameters {
  /**
   * Create a EmailTemplateUpdateParameters.
   * @property {string} [subject] Subject of the Template.
   * @property {string} [title] Title of the Template.
   * @property {string} [description] Description of the Email Template.
   * @property {string} [body] Email Template Body. This should be a valid
   * XDocument
   * @property {array} [parameters] Email Template Parameter values.
   */
  constructor() {
  }

  /**
   * Defines the metadata of EmailTemplateUpdateParameters
   *
   * @returns {object} metadata of EmailTemplateUpdateParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'EmailTemplateUpdateParameters',
      type: {
        name: 'Composite',
        className: 'EmailTemplateUpdateParameters',
        modelProperties: {
          subject: {
            required: false,
            serializedName: 'properties.subject',
            constraints: {
              MaxLength: 1000,
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          },
          title: {
            required: false,
            serializedName: 'properties.title',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          body: {
            required: false,
            serializedName: 'properties.body',
            constraints: {
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          },
          parameters: {
            required: false,
            serializedName: 'properties.parameters',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'EmailTemplateParametersContractPropertiesElementType',
                  type: {
                    name: 'Composite',
                    className: 'EmailTemplateParametersContractProperties'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = EmailTemplateUpdateParameters;
