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

/**
 * ARM resource for a site.
 *
 * @extends models['ProxyOnlyResource']
 */
class SitePatchResource extends models['ProxyOnlyResource'] {
  /**
   * Create a SitePatchResource.
   * @member {string} [state] Current state of the app.
   * @member {array} [hostNames] Hostnames associated with the app.
   * @member {string} [repositorySiteName] Name of the repository site.
   * @member {string} [usageState] State indicating whether the app has
   * exceeded its quota usage. Read-only. Possible values include: 'Normal',
   * 'Exceeded'
   * @member {boolean} [enabled] <code>true</code> if the app is enabled;
   * otherwise, <code>false</code>. Setting this value to false disables the
   * app (takes the app offline).
   * @member {array} [enabledHostNames] Enabled hostnames for the app.Hostnames
   * need to be assigned (see HostNames) AND enabled. Otherwise,
   * the app is not served on those hostnames.
   * @member {string} [availabilityState] Management information availability
   * state for the app. Possible values include: 'Normal', 'Limited',
   * 'DisasterRecoveryMode'
   * @member {array} [hostNameSslStates] Hostname SSL states are used to manage
   * the SSL bindings for app's hostnames.
   * @member {string} [serverFarmId] Resource ID of the associated App Service
   * plan, formatted as:
   * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
   * @member {boolean} [reserved] <code>true</code> if reserved; otherwise,
   * <code>false</code>. Default value: false .
   * @member {boolean} [isXenon] Obsolete: Hyper-V sandbox. Default value:
   * false .
   * @member {boolean} [hyperV] Hyper-V sandbox. Default value: false .
   * @member {date} [lastModifiedTimeUtc] Last time the app was modified, in
   * UTC. Read-only.
   * @member {object} [siteConfig] Configuration of the app.
   * @member {number} [siteConfig.numberOfWorkers] Number of workers.
   * @member {array} [siteConfig.defaultDocuments] Default documents.
   * @member {string} [siteConfig.netFrameworkVersion] .NET Framework version.
   * @member {string} [siteConfig.phpVersion] Version of PHP.
   * @member {string} [siteConfig.pythonVersion] Version of Python.
   * @member {string} [siteConfig.nodeVersion] Version of Node.js.
   * @member {string} [siteConfig.linuxFxVersion] Linux App Framework and
   * version
   * @member {string} [siteConfig.windowsFxVersion] Xenon App Framework and
   * version
   * @member {boolean} [siteConfig.requestTracingEnabled] <code>true</code> if
   * request tracing is enabled; otherwise, <code>false</code>.
   * @member {date} [siteConfig.requestTracingExpirationTime] Request tracing
   * expiration time.
   * @member {boolean} [siteConfig.remoteDebuggingEnabled] <code>true</code> if
   * remote debugging is enabled; otherwise, <code>false</code>.
   * @member {string} [siteConfig.remoteDebuggingVersion] Remote debugging
   * version.
   * @member {boolean} [siteConfig.httpLoggingEnabled] <code>true</code> if
   * HTTP logging is enabled; otherwise, <code>false</code>.
   * @member {number} [siteConfig.logsDirectorySizeLimit] HTTP logs directory
   * size limit.
   * @member {boolean} [siteConfig.detailedErrorLoggingEnabled]
   * <code>true</code> if detailed error logging is enabled; otherwise,
   * <code>false</code>.
   * @member {string} [siteConfig.publishingUsername] Publishing user name.
   * @member {array} [siteConfig.appSettings] Application settings.
   * @member {object} [siteConfig.azureStorageAccounts] User-provided Azure
   * storage accounts.
   * @member {array} [siteConfig.connectionStrings] Connection strings.
   * @member {object} [siteConfig.machineKey] Site MachineKey.
   * @member {string} [siteConfig.machineKey.validation] MachineKey validation.
   * @member {string} [siteConfig.machineKey.validationKey] Validation key.
   * @member {string} [siteConfig.machineKey.decryption] Algorithm used for
   * decryption.
   * @member {string} [siteConfig.machineKey.decryptionKey] Decryption key.
   * @member {array} [siteConfig.handlerMappings] Handler mappings.
   * @member {string} [siteConfig.documentRoot] Document root.
   * @member {string} [siteConfig.scmType] SCM type. Possible values include:
   * 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit',
   * 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg',
   * 'OneDrive', 'VSO'
   * @member {boolean} [siteConfig.use32BitWorkerProcess] <code>true</code> to
   * use 32-bit worker process; otherwise, <code>false</code>.
   * @member {boolean} [siteConfig.webSocketsEnabled] <code>true</code> if
   * WebSocket is enabled; otherwise, <code>false</code>.
   * @member {boolean} [siteConfig.alwaysOn] <code>true</code> if Always On is
   * enabled; otherwise, <code>false</code>.
   * @member {string} [siteConfig.javaVersion] Java version.
   * @member {string} [siteConfig.javaContainer] Java container.
   * @member {string} [siteConfig.javaContainerVersion] Java container version.
   * @member {string} [siteConfig.appCommandLine] App command line to launch.
   * @member {string} [siteConfig.managedPipelineMode] Managed pipeline mode.
   * Possible values include: 'Integrated', 'Classic'
   * @member {array} [siteConfig.virtualApplications] Virtual applications.
   * @member {string} [siteConfig.loadBalancing] Site load balancing. Possible
   * values include: 'WeightedRoundRobin', 'LeastRequests',
   * 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash'
   * @member {object} [siteConfig.experiments] This is work around for
   * polymophic types.
   * @member {array} [siteConfig.experiments.rampUpRules] List of ramp-up
   * rules.
   * @member {object} [siteConfig.limits] Site limits.
   * @member {number} [siteConfig.limits.maxPercentageCpu] Maximum allowed CPU
   * usage percentage.
   * @member {number} [siteConfig.limits.maxMemoryInMb] Maximum allowed memory
   * usage in MB.
   * @member {number} [siteConfig.limits.maxDiskSizeInMb] Maximum allowed disk
   * size usage in MB.
   * @member {boolean} [siteConfig.autoHealEnabled] <code>true</code> if Auto
   * Heal is enabled; otherwise, <code>false</code>.
   * @member {object} [siteConfig.autoHealRules] Auto Heal rules.
   * @member {object} [siteConfig.autoHealRules.triggers] Conditions that
   * describe when to execute the auto-heal actions.
   * @member {object} [siteConfig.autoHealRules.triggers.requests] A rule based
   * on total requests.
   * @member {number} [siteConfig.autoHealRules.triggers.requests.count]
   * Request Count.
   * @member {string} [siteConfig.autoHealRules.triggers.requests.timeInterval]
   * Time interval.
   * @member {number} [siteConfig.autoHealRules.triggers.privateBytesInKB] A
   * rule based on private bytes.
   * @member {array} [siteConfig.autoHealRules.triggers.statusCodes] A rule
   * based on status codes.
   * @member {object} [siteConfig.autoHealRules.triggers.slowRequests] A rule
   * based on request execution time.
   * @member {string}
   * [siteConfig.autoHealRules.triggers.slowRequests.timeTaken] Time taken.
   * @member {number} [siteConfig.autoHealRules.triggers.slowRequests.count]
   * Request Count.
   * @member {string}
   * [siteConfig.autoHealRules.triggers.slowRequests.timeInterval] Time
   * interval.
   * @member {object} [siteConfig.autoHealRules.actions] Actions to be executed
   * when a rule is triggered.
   * @member {string} [siteConfig.autoHealRules.actions.actionType] Predefined
   * action to be taken. Possible values include: 'Recycle', 'LogEvent',
   * 'CustomAction'
   * @member {object} [siteConfig.autoHealRules.actions.customAction] Custom
   * action to be taken.
   * @member {string} [siteConfig.autoHealRules.actions.customAction.exe]
   * Executable to be run.
   * @member {string}
   * [siteConfig.autoHealRules.actions.customAction.parameters] Parameters for
   * the executable.
   * @member {string}
   * [siteConfig.autoHealRules.actions.minProcessExecutionTime] Minimum time
   * the process must execute
   * before taking the action
   * @member {string} [siteConfig.tracingOptions] Tracing options.
   * @member {string} [siteConfig.vnetName] Virtual Network name.
   * @member {object} [siteConfig.cors] Cross-Origin Resource Sharing (CORS)
   * settings.
   * @member {array} [siteConfig.cors.allowedOrigins] Gets or sets the list of
   * origins that should be allowed to make cross-origin
   * calls (for example: http://example.com:12345). Use "*" to allow all.
   * @member {object} [siteConfig.push] Push endpoint settings.
   * @member {boolean} [siteConfig.push.isPushEnabled] Gets or sets a flag
   * indicating whether the Push endpoint is enabled.
   * @member {string} [siteConfig.push.tagWhitelistJson] Gets or sets a JSON
   * string containing a list of tags that are whitelisted for use by the push
   * registration endpoint.
   * @member {string} [siteConfig.push.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} [siteConfig.push.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.
   * @member {object} [siteConfig.apiDefinition] Information about the formal
   * API definition for the app.
   * @member {string} [siteConfig.apiDefinition.url] The URL of the API
   * definition.
   * @member {string} [siteConfig.autoSwapSlotName] Auto-swap slot name.
   * @member {boolean} [siteConfig.localMySqlEnabled] <code>true</code> to
   * enable local MySQL; otherwise, <code>false</code>.
   * @member {number} [siteConfig.managedServiceIdentityId] Managed Service
   * Identity Id
   * @member {number} [siteConfig.xManagedServiceIdentityId] Explicit Managed
   * Service Identity Id
   * @member {array} [siteConfig.ipSecurityRestrictions] IP security
   * restrictions.
   * @member {boolean} [siteConfig.http20Enabled] Http20Enabled: configures a
   * web site to allow clients to connect over http2.0
   * @member {string} [siteConfig.minTlsVersion] MinTlsVersion: configures the
   * minimum version of TLS required for SSL requests. Possible values include:
   * '1.0', '1.1', '1.2'
   * @member {string} [siteConfig.ftpsState] State of FTP / FTPS service.
   * Possible values include: 'AllAllowed', 'FtpsOnly', 'Disabled'
   * @member {number} [siteConfig.reservedInstanceCount] Number of reserved
   * instances.
   * This setting only applies to the Consumption Plan
   * @member {array} [trafficManagerHostNames] Azure Traffic Manager hostnames
   * associated with the app. Read-only.
   * @member {boolean} [scmSiteAlsoStopped] <code>true</code> to stop SCM
   * (KUDU) site when the app is stopped; otherwise, <code>false</code>. The
   * default is <code>false</code>. Default value: false .
   * @member {string} [targetSwapSlot] Specifies which deployment slot this app
   * will swap into. Read-only.
   * @member {object} [hostingEnvironmentProfile] App Service Environment to
   * use for the app.
   * @member {string} [hostingEnvironmentProfile.id] Resource ID of the App
   * Service Environment.
   * @member {string} [hostingEnvironmentProfile.name] Name of the App Service
   * Environment.
   * @member {string} [hostingEnvironmentProfile.type] Resource type of the App
   * Service Environment.
   * @member {boolean} [clientAffinityEnabled] <code>true</code> to enable
   * client affinity; <code>false</code> to stop sending session affinity
   * cookies, which route client requests in the same session to the same
   * instance. Default is <code>true</code>.
   * @member {boolean} [clientCertEnabled] <code>true</code> to enable client
   * certificate authentication (TLS mutual authentication); otherwise,
   * <code>false</code>. Default is <code>false</code>.
   * @member {boolean} [hostNamesDisabled] <code>true</code> to disable the
   * public hostnames of the app; otherwise, <code>false</code>.
   * If <code>true</code>, the app is only accessible via API management
   * process.
   * @member {string} [outboundIpAddresses] List of IP addresses that the app
   * uses for outbound connections (e.g. database access). Includes VIPs from
   * tenants that site can be hosted with current settings. Read-only.
   * @member {string} [possibleOutboundIpAddresses] List of IP addresses that
   * the app uses for outbound connections (e.g. database access). Includes
   * VIPs from all tenants. Read-only.
   * @member {number} [containerSize] Size of the function container.
   * @member {number} [dailyMemoryTimeQuota] Maximum allowed daily memory-time
   * quota (applicable on dynamic apps only).
   * @member {date} [suspendedTill] App suspended till in case memory-time
   * quota is exceeded.
   * @member {number} [maxNumberOfWorkers] Maximum number of workers.
   * This only applies to Functions container.
   * @member {object} [cloningInfo] If specified during app creation, the app
   * is cloned from a source app.
   * @member {uuid} [cloningInfo.correlationId] Correlation ID of cloning
   * operation. This ID ties multiple cloning operations
   * together to use the same snapshot.
   * @member {boolean} [cloningInfo.overwrite] <code>true</code> to overwrite
   * destination app; otherwise, <code>false</code>.
   * @member {boolean} [cloningInfo.cloneCustomHostNames] <code>true</code> to
   * clone custom hostnames from source app; otherwise, <code>false</code>.
   * @member {boolean} [cloningInfo.cloneSourceControl] <code>true</code> to
   * clone source control from source app; otherwise, <code>false</code>.
   * @member {string} [cloningInfo.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} [cloningInfo.hostingEnvironment] App Service Environment.
   * @member {object} [cloningInfo.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} [cloningInfo.configureLoadBalancing] <code>true</code>
   * to configure load balancing for source and destination app.
   * @member {string} [cloningInfo.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} [cloningInfo.trafficManagerProfileName] Name of Traffic
   * Manager profile to create. This is only needed if Traffic Manager profile
   * does not already exist.
   * @member {string} [resourceGroup] Name of the resource group the app
   * belongs to. Read-only.
   * @member {boolean} [isDefaultContainer] <code>true</code> if the app is a
   * default container; otherwise, <code>false</code>.
   * @member {string} [defaultHostName] Default hostname of the app. Read-only.
   * @member {object} [slotSwapStatus] Status of the last deployment slot swap
   * operation.
   * @member {date} [slotSwapStatus.timestampUtc] The time the last successful
   * slot swap completed.
   * @member {string} [slotSwapStatus.sourceSlotName] The source slot of the
   * last swap operation.
   * @member {string} [slotSwapStatus.destinationSlotName] The destination slot
   * of the last swap operation.
   * @member {boolean} [httpsOnly] HttpsOnly: configures a web site to accept
   * only https requests. Issues redirect for
   * http requests
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of SitePatchResource
   *
   * @returns {object} metadata of SitePatchResource
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SitePatchResource',
      type: {
        name: 'Composite',
        className: 'SitePatchResource',
        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'
            }
          },
          state: {
            required: false,
            readOnly: true,
            serializedName: 'properties.state',
            type: {
              name: 'String'
            }
          },
          hostNames: {
            required: false,
            readOnly: true,
            serializedName: 'properties.hostNames',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          repositorySiteName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.repositorySiteName',
            type: {
              name: 'String'
            }
          },
          usageState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.usageState',
            type: {
              name: 'Enum',
              allowedValues: [ 'Normal', 'Exceeded' ]
            }
          },
          enabled: {
            required: false,
            serializedName: 'properties.enabled',
            type: {
              name: 'Boolean'
            }
          },
          enabledHostNames: {
            required: false,
            readOnly: true,
            serializedName: 'properties.enabledHostNames',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          availabilityState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.availabilityState',
            type: {
              name: 'Enum',
              allowedValues: [ 'Normal', 'Limited', 'DisasterRecoveryMode' ]
            }
          },
          hostNameSslStates: {
            required: false,
            serializedName: 'properties.hostNameSslStates',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'HostNameSslStateElementType',
                  type: {
                    name: 'Composite',
                    className: 'HostNameSslState'
                  }
              }
            }
          },
          serverFarmId: {
            required: false,
            serializedName: 'properties.serverFarmId',
            type: {
              name: 'String'
            }
          },
          reserved: {
            required: false,
            serializedName: 'properties.reserved',
            defaultValue: false,
            type: {
              name: 'Boolean'
            }
          },
          isXenon: {
            required: false,
            serializedName: 'properties.isXenon',
            defaultValue: false,
            type: {
              name: 'Boolean'
            }
          },
          hyperV: {
            required: false,
            serializedName: 'properties.hyperV',
            defaultValue: false,
            type: {
              name: 'Boolean'
            }
          },
          lastModifiedTimeUtc: {
            required: false,
            readOnly: true,
            serializedName: 'properties.lastModifiedTimeUtc',
            type: {
              name: 'DateTime'
            }
          },
          siteConfig: {
            required: false,
            serializedName: 'properties.siteConfig',
            type: {
              name: 'Composite',
              className: 'SiteConfig'
            }
          },
          trafficManagerHostNames: {
            required: false,
            readOnly: true,
            serializedName: 'properties.trafficManagerHostNames',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          scmSiteAlsoStopped: {
            required: false,
            serializedName: 'properties.scmSiteAlsoStopped',
            defaultValue: false,
            type: {
              name: 'Boolean'
            }
          },
          targetSwapSlot: {
            required: false,
            readOnly: true,
            serializedName: 'properties.targetSwapSlot',
            type: {
              name: 'String'
            }
          },
          hostingEnvironmentProfile: {
            required: false,
            serializedName: 'properties.hostingEnvironmentProfile',
            type: {
              name: 'Composite',
              className: 'HostingEnvironmentProfile'
            }
          },
          clientAffinityEnabled: {
            required: false,
            serializedName: 'properties.clientAffinityEnabled',
            type: {
              name: 'Boolean'
            }
          },
          clientCertEnabled: {
            required: false,
            serializedName: 'properties.clientCertEnabled',
            type: {
              name: 'Boolean'
            }
          },
          hostNamesDisabled: {
            required: false,
            serializedName: 'properties.hostNamesDisabled',
            type: {
              name: 'Boolean'
            }
          },
          outboundIpAddresses: {
            required: false,
            readOnly: true,
            serializedName: 'properties.outboundIpAddresses',
            type: {
              name: 'String'
            }
          },
          possibleOutboundIpAddresses: {
            required: false,
            readOnly: true,
            serializedName: 'properties.possibleOutboundIpAddresses',
            type: {
              name: 'String'
            }
          },
          containerSize: {
            required: false,
            serializedName: 'properties.containerSize',
            type: {
              name: 'Number'
            }
          },
          dailyMemoryTimeQuota: {
            required: false,
            serializedName: 'properties.dailyMemoryTimeQuota',
            type: {
              name: 'Number'
            }
          },
          suspendedTill: {
            required: false,
            readOnly: true,
            serializedName: 'properties.suspendedTill',
            type: {
              name: 'DateTime'
            }
          },
          maxNumberOfWorkers: {
            required: false,
            readOnly: true,
            serializedName: 'properties.maxNumberOfWorkers',
            type: {
              name: 'Number'
            }
          },
          cloningInfo: {
            required: false,
            serializedName: 'properties.cloningInfo',
            type: {
              name: 'Composite',
              className: 'CloningInfo'
            }
          },
          resourceGroup: {
            required: false,
            readOnly: true,
            serializedName: 'properties.resourceGroup',
            type: {
              name: 'String'
            }
          },
          isDefaultContainer: {
            required: false,
            readOnly: true,
            serializedName: 'properties.isDefaultContainer',
            type: {
              name: 'Boolean'
            }
          },
          defaultHostName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.defaultHostName',
            type: {
              name: 'String'
            }
          },
          slotSwapStatus: {
            required: false,
            readOnly: true,
            serializedName: 'properties.slotSwapStatus',
            type: {
              name: 'Composite',
              className: 'SlotSwapStatus'
            }
          },
          httpsOnly: {
            required: false,
            serializedName: 'properties.httpsOnly',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = SitePatchResource;
