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

/**
 * The description of the IoT Central application.
 *
 */
class AppPatch {
  /**
   * Create a AppPatch.
   * @member {object} [tags] Instance tags
   * @member {string} [applicationId] The ID of the application.
   * @member {string} [displayName] The display name of the application.
   * @member {string} [subdomain] The subdomain of the application.
   * @member {string} [template] The ID of the application template, which is a
   * blueprint that defines the characteristics and behaviors of an
   * application. Optional; if not specified, defaults to a blank blueprint and
   * allows the application to be defined from scratch.
   */
  constructor() {
  }

  /**
   * Defines the metadata of AppPatch
   *
   * @returns {object} metadata of AppPatch
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AppPatch',
      type: {
        name: 'Composite',
        className: 'AppPatch',
        modelProperties: {
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          applicationId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.applicationId',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            constraints: {
              Pattern: '^.{1,200}$'
            },
            type: {
              name: 'String'
            }
          },
          subdomain: {
            required: false,
            serializedName: 'properties.subdomain',
            constraints: {
              Pattern: '^[a-z0-9-]{1,63}$'
            },
            type: {
              name: 'String'
            }
          },
          template: {
            required: false,
            serializedName: 'properties.template',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = AppPatch;
