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

/**
 * Web Job Information.
 *
 * @extends models['ProxyOnlyResource']
 */
class FunctionEnvelope extends models['ProxyOnlyResource'] {
  /**
   * Create a FunctionEnvelope.
   * @member {string} [functionAppId] Function App ID.
   * @member {string} [scriptRootPathHref] Script root path URI.
   * @member {string} [scriptHref] Script URI.
   * @member {string} [configHref] Config URI.
   * @member {string} [secretsFileHref] Secrets file URI.
   * @member {string} [href] Function URI.
   * @member {object} [config] Config information.
   * @member {object} [files] File list.
   * @member {string} [testData] Test data used when testing via the Azure
   * Portal.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of FunctionEnvelope
   *
   * @returns {object} metadata of FunctionEnvelope
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'FunctionEnvelope',
      type: {
        name: 'Composite',
        className: 'FunctionEnvelope',
        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'
            }
          },
          functionAppId: {
            required: false,
            serializedName: 'properties.function_app_id',
            type: {
              name: 'String'
            }
          },
          scriptRootPathHref: {
            required: false,
            serializedName: 'properties.script_root_path_href',
            type: {
              name: 'String'
            }
          },
          scriptHref: {
            required: false,
            serializedName: 'properties.script_href',
            type: {
              name: 'String'
            }
          },
          configHref: {
            required: false,
            serializedName: 'properties.config_href',
            type: {
              name: 'String'
            }
          },
          secretsFileHref: {
            required: false,
            serializedName: 'properties.secrets_file_href',
            type: {
              name: 'String'
            }
          },
          href: {
            required: false,
            serializedName: 'properties.href',
            type: {
              name: 'String'
            }
          },
          config: {
            required: false,
            serializedName: 'properties.config',
            type: {
              name: 'Object'
            }
          },
          files: {
            required: false,
            serializedName: 'properties.files',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          testData: {
            required: false,
            serializedName: 'properties.test_data',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = FunctionEnvelope;
