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

/**
 * The SAS definition update parameters.
 *
 */
class SasDefinitionUpdateParameters {
  /**
   * Create a SasDefinitionUpdateParameters.
   * @member {string} [templateUri] The SAS definition token template signed
   * with an arbitrary key.  Tokens created according to the SAS definition
   * will have the same properties as the template.
   * @member {string} [sasType] The type of SAS token the SAS definition will
   * create. Possible values include: 'account', 'service'
   * @member {string} [validityPeriod] The validity period of SAS tokens
   * created according to the SAS definition.
   * @member {object} [sasDefinitionAttributes] The attributes of the SAS
   * definition.
   * @member {boolean} [sasDefinitionAttributes.enabled] the enabled state of
   * the object.
   * @member {date} [sasDefinitionAttributes.created] Creation time in UTC.
   * @member {date} [sasDefinitionAttributes.updated] Last updated time in UTC.
   * @member {string} [sasDefinitionAttributes.recoveryLevel] Reflects the
   * deletion recovery level currently in effect for SAS definitions in the
   * current vault. If it contains 'Purgeable' the SAS definition can be
   * permanently deleted by a privileged user; otherwise, only the system can
   * purge the SAS definition, at the end of the retention interval. Possible
   * values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable',
   * 'Recoverable+ProtectedSubscription'
   * @member {object} [tags] Application specific metadata in the form of
   * key-value pairs.
   */
  constructor() {
  }

  /**
   * Defines the metadata of SasDefinitionUpdateParameters
   *
   * @returns {object} metadata of SasDefinitionUpdateParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SasDefinitionUpdateParameters',
      type: {
        name: 'Composite',
        className: 'SasDefinitionUpdateParameters',
        modelProperties: {
          templateUri: {
            required: false,
            serializedName: 'templateUri',
            type: {
              name: 'String'
            }
          },
          sasType: {
            required: false,
            serializedName: 'sasType',
            type: {
              name: 'String'
            }
          },
          validityPeriod: {
            required: false,
            serializedName: 'validityPeriod',
            type: {
              name: 'String'
            }
          },
          sasDefinitionAttributes: {
            required: false,
            serializedName: 'attributes',
            type: {
              name: 'Composite',
              className: 'SasDefinitionAttributes'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = SasDefinitionUpdateParameters;
