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

/**
 * An Azure Resource Manager template.
 *
 * @extends models['Resource']
 */
class ArmTemplate extends models['Resource'] {
  /**
   * Create a ArmTemplate.
   * @property {string} [displayName] The display name of the ARM template.
   * @property {string} [description] The description of the ARM template.
   * @property {string} [publisher] The publisher of the ARM template.
   * @property {string} [icon] The URI to the icon of the ARM template.
   * @property {object} [contents] The contents of the ARM template.
   * @property {date} [createdDate] The creation date of the armTemplate.
   * @property {array} [parametersValueFilesInfo] File name and parameter
   * values information from all azuredeploy.*.parameters.json for the ARM
   * template.
   * @property {boolean} [enabled] Whether or not ARM template is enabled for
   * use by lab user.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ArmTemplate
   *
   * @returns {object} metadata of ArmTemplate
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ArmTemplate',
      type: {
        name: 'Composite',
        className: 'ArmTemplate',
        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'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          displayName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            readOnly: true,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          publisher: {
            required: false,
            readOnly: true,
            serializedName: 'properties.publisher',
            type: {
              name: 'String'
            }
          },
          icon: {
            required: false,
            readOnly: true,
            serializedName: 'properties.icon',
            type: {
              name: 'String'
            }
          },
          contents: {
            required: false,
            readOnly: true,
            serializedName: 'properties.contents',
            type: {
              name: 'Object'
            }
          },
          createdDate: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdDate',
            type: {
              name: 'DateTime'
            }
          },
          parametersValueFilesInfo: {
            required: false,
            readOnly: true,
            serializedName: 'properties.parametersValueFilesInfo',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ParametersValueFileInfoElementType',
                  type: {
                    name: 'Composite',
                    className: 'ParametersValueFileInfo'
                  }
              }
            }
          },
          enabled: {
            required: false,
            readOnly: true,
            serializedName: 'properties.enabled',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = ArmTemplate;
