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

/**
 * Terms properties for provided Publisher/Offer/Plan tuple
 *
 * @extends models['Resource']
 */
class AgreementTerms extends models['Resource'] {
  /**
   * Create a AgreementTerms.
   * @property {string} [publisher] Publisher identifier string of image being
   * deployed.
   * @property {string} [product] Offer identifier string of image being
   * deployed.
   * @property {string} [plan] Plan identifier string of image being deployed.
   * @property {string} [licenseTextLink] Link to HTML with Microsoft and
   * Publisher terms.
   * @property {string} [privacyPolicyLink] Link to the privacy policy of the
   * publisher.
   * @property {string} [retrieveDatetime] Date and time in UTC of when the
   * terms were accepted. This is empty if Accepted is false.
   * @property {string} [signature] Terms signature.
   * @property {boolean} [accepted] If any version of the terms have been
   * accepted, otherwise false.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AgreementTerms
   *
   * @returns {object} metadata of AgreementTerms
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AgreementTerms',
      type: {
        name: 'Composite',
        className: 'AgreementTerms',
        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'
            }
          },
          publisher: {
            required: false,
            serializedName: 'properties.publisher',
            type: {
              name: 'String'
            }
          },
          product: {
            required: false,
            serializedName: 'properties.product',
            type: {
              name: 'String'
            }
          },
          plan: {
            required: false,
            serializedName: 'properties.plan',
            type: {
              name: 'String'
            }
          },
          licenseTextLink: {
            required: false,
            serializedName: 'properties.licenseTextLink',
            type: {
              name: 'String'
            }
          },
          privacyPolicyLink: {
            required: false,
            serializedName: 'properties.privacyPolicyLink',
            type: {
              name: 'String'
            }
          },
          retrieveDatetime: {
            required: false,
            serializedName: 'properties.retrieveDatetime',
            type: {
              name: 'String'
            }
          },
          signature: {
            required: false,
            serializedName: 'properties.signature',
            type: {
              name: 'String'
            }
          },
          accepted: {
            required: false,
            serializedName: 'properties.accepted',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = AgreementTerms;
