func (c *Client) ScaleApplication(in ScaleApplicationParams) (params.ScaleApplicationResult, error) {
	if !names.IsValidApplication(in.ApplicationName) {
		return params.ScaleApplicationResult{}, errors.NotValidf("application %q", in.ApplicationName)
	}

	if err := validateApplicationScale(in.Scale, in.ScaleChange); err != nil {
		return params.ScaleApplicationResult{}, errors.Trace(err)
	}

	args := params.ScaleApplicationsParams{
		Applications: []params.ScaleApplicationParams{{
			ApplicationTag: names.NewApplicationTag(in.ApplicationName).String(),
			Scale:          in.Scale,
			ScaleChange:    in.ScaleChange,
			Force:          in.Force,
		}},
	}
	var results params.ScaleApplicationResults
	if err := c.facade.FacadeCall("ScaleApplications", args, &results); err != nil {
		return params.ScaleApplicationResult{}, errors.Trace(err)
	}
	if n := len(results.Results); n != 1 {
		return params.ScaleApplicationResult{}, errors.Errorf("expected 1 result, got %d", n)
	}
	result := results.Results[0]
	if err := result.Error; err != nil {
		return params.ScaleApplicationResult{}, err
	}
	return results.Results[0], nil
}
// ScaleApplication sets the desired unit count for one or more applications.
ScaleApplication sets the desired unit count for one or more applications.
// ScaleApplication sets the desired unit count for one or more applications .
func (c *Client) ScaleApplication(in ScaleApplicationParams) (params.ScaleApplicationResult, error) {
	if !names.IsValidApplication(in.ApplicationName) {
		return params.ScaleApplicationResult{}, errors.NotValidf("application %q", in.ApplicationName)
	}
	if err := validateApplicationScale(in.Scale, in.ScaleChange); err != nil {
		return params.ScaleApplicationResult{}, errors.Trace(err)
	}
	args := params.ScaleApplicationsParams{
		Applications: []params.ScaleApplicationParams{{
			ApplicationTag: names.NewApplicationTag(in.ApplicationName).String(),
			Scale:          in.Scale,
			ScaleChange:    in.ScaleChange,
			Force:          in.Force,
		}},
	}
	var results params.ScaleApplicationResults
	if err := c.facade.FacadeCall("ScaleApplications", args, &results); err != nil {
		return params.ScaleApplicationResult{}, errors.Trace(err)
	}
	if n := len(results.Results); n != 1 {
		return params.ScaleApplicationResult{}, errors.Errorf("expected 1 result, got %d", n)
	}
	result := results.Results[0]
	if err := result.Error; err != nil {
		return params.ScaleApplicationResult{}, err
	}
	return results.Results[0], nil
}
func ( c * Client ) ScaleApplication ( in ScaleApplicationParams ) ( params . ScaleApplicationResult , error ) { if ! names . IsValidApplication ( in . ApplicationName ) { return params . ScaleApplicationResult { } , errors . NotValidf ( " " , in . ApplicationName ) } if err := validateApplicationScale ( in . Scale , in . ScaleChange ) ; err != nil { return params . ScaleApplicationResult { } , errors . Trace ( err ) } args := params . ScaleApplicationsParams { Applications : [ ] params . ScaleApplicationParams { { ApplicationTag : names . NewApplicationTag ( in . ApplicationName ) . String ( ) , Scale : in . Scale , ScaleChange : in . ScaleChange , Force : in . Force , } } , } var results params . ScaleApplicationResults if err := c . facade . FacadeCall ( " " , args , & results ) ; err != nil { return params . ScaleApplicationResult { } , errors . Trace ( err ) } if n := len ( results . Results ) ; n != 1 { return params . ScaleApplicationResult { } , errors . Errorf ( " " , n ) } result := results . Results [ 0 ] if err := result . Error ; err != nil { return params . ScaleApplicationResult { } , err } return results . Results [ 0 ] , nil }
ScaleApplication sets the desired unit count for one or more applications.
ScaleApplication sets the desired unit count for one or more applications .