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

/**
 * Information about appliance definition.
 *
 * @extends models['GenericResource']
 */
class ApplianceDefinition extends models['GenericResource'] {
  /**
   * Create a ApplianceDefinition.
   * @property {string} lockLevel The appliance lock level. Possible values
   * include: 'CanNotDelete', 'ReadOnly', 'None'
   * @property {string} [displayName] The appliance definition display name.
   * @property {array} authorizations The appliance provider authorizations.
   * @property {array} [artifacts] The collection of appliance artifacts. The
   * portal will use the files specified as artifacts to construct the user
   * experience of creating an appliance from an appliance definition.
   * @property {string} [description] The appliance definition description.
   * @property {string} packageFileUri The appliance definition package file
   * Uri.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ApplianceDefinition
   *
   * @returns {object} metadata of ApplianceDefinition
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApplianceDefinition',
      type: {
        name: 'Composite',
        className: 'ApplianceDefinition',
        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'
                  }
              }
            }
          },
          managedBy: {
            required: false,
            serializedName: 'managedBy',
            type: {
              name: 'String'
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'Sku'
            }
          },
          identity: {
            required: false,
            serializedName: 'identity',
            type: {
              name: 'Composite',
              className: 'Identity'
            }
          },
          lockLevel: {
            required: true,
            serializedName: 'properties.lockLevel',
            type: {
              name: 'Enum',
              allowedValues: [ 'CanNotDelete', 'ReadOnly', 'None' ]
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          authorizations: {
            required: true,
            serializedName: 'properties.authorizations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplianceProviderAuthorizationElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplianceProviderAuthorization'
                  }
              }
            }
          },
          artifacts: {
            required: false,
            serializedName: 'properties.artifacts',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ApplianceArtifactElementType',
                  type: {
                    name: 'Composite',
                    className: 'ApplianceArtifact'
                  }
              }
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          packageFileUri: {
            required: true,
            serializedName: 'properties.packageFileUri',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ApplianceDefinition;
