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

/**
 * Push settings for the App.
 *
 * @extends models['ProxyOnlyResource']
 */
class PushSettings extends models['ProxyOnlyResource'] {
  /**
   * Create a PushSettings.
   * @member {boolean} isPushEnabled Gets or sets a flag indicating whether the
   * Push endpoint is enabled.
   * @member {string} [tagWhitelistJson] Gets or sets a JSON string containing
   * a list of tags that are whitelisted for use by the push registration
   * endpoint.
   * @member {string} [tagsRequiringAuth] Gets or sets a JSON string containing
   * a list of tags that require user authentication to be used in the push
   * registration endpoint.
   * Tags can consist of alphanumeric characters and the following:
   * '_', '@', '#', '.', ':', '-'.
   * Validation should be performed at the PushRequestHandler.
   * @member {string} [dynamicTagsJson] Gets or sets a JSON string containing a
   * list of dynamic tags that will be evaluated from user claims in the push
   * registration endpoint.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of PushSettings
   *
   * @returns {object} metadata of PushSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PushSettings',
      type: {
        name: 'Composite',
        className: 'PushSettings',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          isPushEnabled: {
            required: true,
            serializedName: 'properties.isPushEnabled',
            type: {
              name: 'Boolean'
            }
          },
          tagWhitelistJson: {
            required: false,
            serializedName: 'properties.tagWhitelistJson',
            type: {
              name: 'String'
            }
          },
          tagsRequiringAuth: {
            required: false,
            serializedName: 'properties.tagsRequiringAuth',
            type: {
              name: 'String'
            }
          },
          dynamicTagsJson: {
            required: false,
            serializedName: 'properties.dynamicTagsJson',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = PushSettings;
