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

/**
 * Information needed for cloning operation.
 *
 */
class CloningInfo {
  /**
   * Create a CloningInfo.
   * @member {uuid} [correlationId] Correlation ID of cloning operation. This
   * ID ties multiple cloning operations
   * together to use the same snapshot.
   * @member {boolean} [overwrite] <code>true</code> to overwrite destination
   * app; otherwise, <code>false</code>.
   * @member {boolean} [cloneCustomHostNames] <code>true</code> to clone custom
   * hostnames from source app; otherwise, <code>false</code>.
   * @member {boolean} [cloneSourceControl] <code>true</code> to clone source
   * control from source app; otherwise, <code>false</code>.
   * @member {string} sourceWebAppId ARM resource ID of the source app. App
   * resource ID is of the form
   * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}
   * for production slots and
   * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName}
   * for other slots.
   * @member {string} [hostingEnvironment] App Service Environment.
   * @member {object} [appSettingsOverrides] Application setting overrides for
   * cloned app. If specified, these settings override the settings cloned
   * from source app. Otherwise, application settings from source app are
   * retained.
   * @member {boolean} [configureLoadBalancing] <code>true</code> to configure
   * load balancing for source and destination app.
   * @member {string} [trafficManagerProfileId] ARM resource ID of the Traffic
   * Manager profile to use, if it exists. Traffic Manager resource ID is of
   * the form
   * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}.
   * @member {string} [trafficManagerProfileName] Name of Traffic Manager
   * profile to create. This is only needed if Traffic Manager profile does not
   * already exist.
   */
  constructor() {
  }

  /**
   * Defines the metadata of CloningInfo
   *
   * @returns {object} metadata of CloningInfo
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CloningInfo',
      type: {
        name: 'Composite',
        className: 'CloningInfo',
        modelProperties: {
          correlationId: {
            required: false,
            serializedName: 'correlationId',
            type: {
              name: 'String'
            }
          },
          overwrite: {
            required: false,
            serializedName: 'overwrite',
            type: {
              name: 'Boolean'
            }
          },
          cloneCustomHostNames: {
            required: false,
            serializedName: 'cloneCustomHostNames',
            type: {
              name: 'Boolean'
            }
          },
          cloneSourceControl: {
            required: false,
            serializedName: 'cloneSourceControl',
            type: {
              name: 'Boolean'
            }
          },
          sourceWebAppId: {
            required: true,
            serializedName: 'sourceWebAppId',
            type: {
              name: 'String'
            }
          },
          hostingEnvironment: {
            required: false,
            serializedName: 'hostingEnvironment',
            type: {
              name: 'String'
            }
          },
          appSettingsOverrides: {
            required: false,
            serializedName: 'appSettingsOverrides',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          configureLoadBalancing: {
            required: false,
            serializedName: 'configureLoadBalancing',
            type: {
              name: 'Boolean'
            }
          },
          trafficManagerProfileId: {
            required: false,
            serializedName: 'trafficManagerProfileId',
            type: {
              name: 'String'
            }
          },
          trafficManagerProfileName: {
            required: false,
            serializedName: 'trafficManagerProfileName',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = CloningInfo;
