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

/**
 * Contract details.
 *
 * @extends models['Resource']
 */
class TagDescriptionContract extends models['Resource'] {
  /**
   * Create a TagDescriptionContract.
   * @property {string} [description] Description of the Tag.
   * @property {string} [externalDocsUrl] Absolute URL of external resources
   * describing the tag.
   * @property {string} [externalDocsDescription] Description of the external
   * resources describing the tag.
   * @property {string} [tagId] Identifier of the tag in the form of
   * /tags/{tagId}
   * @property {string} [displayName] Tag name.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of TagDescriptionContract
   *
   * @returns {object} metadata of TagDescriptionContract
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TagDescriptionContract',
      type: {
        name: 'Composite',
        className: 'TagDescriptionContract',
        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'
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          externalDocsUrl: {
            required: false,
            serializedName: 'properties.externalDocsUrl',
            constraints: {
              MaxLength: 2000
            },
            type: {
              name: 'String'
            }
          },
          externalDocsDescription: {
            required: false,
            serializedName: 'properties.externalDocsDescription',
            type: {
              name: 'String'
            }
          },
          tagId: {
            required: false,
            serializedName: 'properties.tagId',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            constraints: {
              MaxLength: 160,
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = TagDescriptionContract;
