/*
 * 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 item containing storage SAS definition metadata.
 *
 */
class SasDefinitionItem {
  /**
   * Create a SasDefinitionItem.
   * @member {string} [id] The storage SAS identifier.
   * @member {string} [secretId] The storage account SAS definition secret id.
   * @member {object} [attributes] The SAS definition management attributes.
   * @member {boolean} [attributes.enabled] the enabled state of the object.
   * @member {date} [attributes.created] Creation time in UTC.
   * @member {date} [attributes.updated] Last updated time in UTC.
   * @member {string} [attributes.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 SasDefinitionItem
   *
   * @returns {object} metadata of SasDefinitionItem
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SasDefinitionItem',
      type: {
        name: 'Composite',
        className: 'SasDefinitionItem',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          secretId: {
            required: false,
            readOnly: true,
            serializedName: 'sid',
            type: {
              name: 'String'
            }
          },
          attributes: {
            required: false,
            readOnly: true,
            serializedName: 'attributes',
            type: {
              name: 'Composite',
              className: 'SasDefinitionAttributes'
            }
          },
          tags: {
            required: false,
            readOnly: true,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = SasDefinitionItem;
