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

/**
 * Defines the parameters for the cache expiration action.
 *
 */
class CacheExpirationActionParameters {
  /**
   * Create a CacheExpirationActionParameters.
   * @property {string} cacheBehavior Caching behavior for the requests that
   * include query strings. Possible values include: 'BypassCache', 'Override',
   * 'SetIfMissing'
   * @property {string} [cacheDuration] The duration for which the content
   * needs to be cached. Allowed format is [d.]hh:mm:ss
   */
  constructor() {
  }

  /**
   * Defines the metadata of CacheExpirationActionParameters
   *
   * @returns {object} metadata of CacheExpirationActionParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CacheExpirationActionParameters',
      type: {
        name: 'Composite',
        className: 'CacheExpirationActionParameters',
        modelProperties: {
          odatatype: {
            required: true,
            isConstant: true,
            serializedName: '@odata\\.type',
            defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters',
            type: {
              name: 'String'
            }
          },
          cacheBehavior: {
            required: true,
            serializedName: 'cacheBehavior',
            type: {
              name: 'String'
            }
          },
          cacheType: {
            required: true,
            isConstant: true,
            serializedName: 'cacheType',
            defaultValue: 'All',
            type: {
              name: 'String'
            }
          },
          cacheDuration: {
            required: false,
            nullable: true,
            serializedName: 'cacheDuration',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = CacheExpirationActionParameters;
