'Gets the result of evaluating an automatic scaling formula on the pool.
This API is primarily for validating an autoscale formula, as it simply
returns the result without applying the formula to the pool.
:param pool_id: The ID of the pool on which to evaluate the automatic
scaling formula.
:type pool_id: str
:param auto_scale_formula: The formula for the desired number of
compute nodes in the pool. The formula is validated and its results
calculated, but it is not applied to the pool. To apply the formula to
the pool, \'Enable automatic scaling on a pool\'. For more information
about specifying this formula, see Automatically scale compute nodes
in an Azure Batch pool
(https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling).
:type auto_scale_formula: str
:param pool_evaluate_auto_scale_options: Additional parameters for the
operation
:type pool_evaluate_auto_scale_options:
:class:`PoolEvaluateAutoScaleOptions
<azure.batch.models.PoolEvaluateAutoScaleOptions>`
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:rtype: :class:`AutoScaleRun <azure.batch.models.AutoScaleRun>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises:
:class:`BatchErrorException<azure.batch.models.BatchErrorException>`'

def evaluate_auto_scale(self, pool_id, auto_scale_formula, pool_evaluate_auto_scale_options=None, custom_headers=None, raw=False, **operation_config):

    timeout = None
    if (pool_evaluate_auto_scale_options is not None):
        timeout = pool_evaluate_auto_scale_options.timeout
    client_request_id = None
    if (pool_evaluate_auto_scale_options is not None):
        client_request_id = pool_evaluate_auto_scale_options.client_request_id
    return_client_request_id = None
    if (pool_evaluate_auto_scale_options is not None):
        return_client_request_id = pool_evaluate_auto_scale_options.return_client_request_id
    ocp_date = None
    if (pool_evaluate_auto_scale_options is not None):
        ocp_date = pool_evaluate_auto_scale_options.ocp_date
    pool_evaluate_auto_scale_parameter = models.PoolEvaluateAutoScaleParameter(auto_scale_formula=auto_scale_formula)
    url = '/pools/{poolId}/evaluateautoscale'
    path_format_arguments = {'poolId': self._serialize.url('pool_id', pool_id, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('self.api_version', self.api_version, 'str')
    if (timeout is not None):
        query_parameters['timeout'] = self._serialize.query('timeout', timeout, 'int')
    header_parameters = {}
    header_parameters['Content-Type'] = 'application/json;    odata=minimalmetadata;    charset=utf-8'
    if self.config.generate_client_request_id:
        header_parameters['client-request-id'] = str(uuid.uuid1())
    if custom_headers:
        header_parameters.update(custom_headers)
    if (self.config.accept_language is not None):
        header_parameters['accept-language'] = self._serialize.header('self.config.accept_language', self.config.accept_language, 'str')
    if (client_request_id is not None):
        header_parameters['client-request-id'] = self._serialize.header('client_request_id', client_request_id, 'str')
    if (return_client_request_id is not None):
        header_parameters['return-client-request-id'] = self._serialize.header('return_client_request_id', return_client_request_id, 'bool')
    if (ocp_date is not None):
        header_parameters['ocp-date'] = self._serialize.header('ocp_date', ocp_date, 'rfc-1123')
    body_content = self._serialize.body(pool_evaluate_auto_scale_parameter, 'PoolEvaluateAutoScaleParameter')
    request = self._client.post(url, query_parameters)
    response = self._client.send(request, header_parameters, body_content, **operation_config)
    if (response.status_code not in [200]):
        raise models.BatchErrorException(self._deserialize, response)
    deserialized = None
    header_dict = {}
    if (response.status_code == 200):
        deserialized = self._deserialize('AutoScaleRun', response)
        header_dict = {'client-request-id': 'str', 'request-id': 'str', 'ETag': 'str', 'Last-Modified': 'rfc-1123', 'DataServiceId': 'str'}
    if raw:
        client_raw_response = ClientRawResponse(deserialized, response)
        client_raw_response.add_headers(header_dict)
        return client_raw_response
    return deserialized
