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

/**
 * Product profile.
 *
 * @extends models['ProductEntityBaseParameters']
 */
class ProductTagResourceContractProperties extends models['ProductEntityBaseParameters'] {
  /**
   * Create a ProductTagResourceContractProperties.
   * @property {string} [id] Identifier of the product in the form of
   * /products/{productId}
   * @property {string} name Product name.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ProductTagResourceContractProperties
   *
   * @returns {object} metadata of ProductTagResourceContractProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ProductTagResourceContractProperties',
      type: {
        name: 'Composite',
        className: 'ProductTagResourceContractProperties',
        modelProperties: {
          description: {
            required: false,
            serializedName: 'description',
            constraints: {
              MaxLength: 1000,
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          },
          terms: {
            required: false,
            serializedName: 'terms',
            type: {
              name: 'String'
            }
          },
          subscriptionRequired: {
            required: false,
            serializedName: 'subscriptionRequired',
            type: {
              name: 'Boolean'
            }
          },
          approvalRequired: {
            required: false,
            serializedName: 'approvalRequired',
            type: {
              name: 'Boolean'
            }
          },
          subscriptionsLimit: {
            required: false,
            serializedName: 'subscriptionsLimit',
            type: {
              name: 'Number'
            }
          },
          state: {
            required: false,
            serializedName: 'state',
            type: {
              name: 'Enum',
              allowedValues: [ 'notPublished', 'published' ]
            }
          },
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: true,
            serializedName: 'name',
            constraints: {
              MaxLength: 300,
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ProductTagResourceContractProperties;
