// SetHasMoreApplications sets the HasMoreApplications field's value.
555984
func (s *ListApplicationsOutput) SetHasMoreApplications(v bool) *ListApplicationsOutput {
	s.HasMoreApplications = &v
	return s
}
741749
func (s *CreateStackInput) SetApplicationSettings(v *ApplicationSettings) *CreateStackInput {
	s.ApplicationSettings = v
	return s
}
298715
func (s *ChannelResponse) SetHasCredential(v bool) *ChannelResponse {
	s.HasCredential = &v
	return s
}
1147288
func (s *DescribeHsmClientCertificatesOutput) SetHsmClientCertificates(v []*HsmClientCertificate) *DescribeHsmClientCertificatesOutput {
	s.HsmClientCertificates = v
	return s
}
182691
func (client *Client) GetApplicationApplicationInstances(guid string) (map[int]ApplicationInstance, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetAppInstancesRequest,
		URIParams:   Params{"app_guid": guid},
	})
	if err != nil {
		return nil, nil, err
	}

	var instances map[string]ApplicationInstance
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &instances,
	}

	err = client.connection.Make(request, &response)
	if err != nil {
		return nil, response.Warnings, err
	}

	returnedInstances := map[int]ApplicationInstance{}
	for instanceID, instance := range instances {
		id, convertErr := strconv.Atoi(instanceID)
		if convertErr != nil {
			return nil, response.Warnings, convertErr
		}
		instance.ID = id
		returnedInstances[id] = instance
	}

	return returnedInstances, response.Warnings, nil
}
276603
func (s *BatchGetApplicationsInput) SetApplicationNames(v []*string) *BatchGetApplicationsInput {
	s.ApplicationNames = v
	return s
}
6197
func (s *Stack) SetApplicationSettings(v *ApplicationSettingsResponse) *Stack {
	s.ApplicationSettings = v
	return s
}
876560
func (s *ListTagsForStreamOutput) SetHasMoreTags(v bool) *ListTagsForStreamOutput {
	s.HasMoreTags = &v
	return s
}
195999
func (s *DescribeSimulationJobOutput) SetSimulationApplications(v []*SimulationApplicationConfig) *DescribeSimulationJobOutput {
	s.SimulationApplications = v
	return s
}
97120
func (client *Client) UpdateApplication(app Application) (Application, Warnings, error) {
	bodyBytes, err := json.Marshal(app)
	if err != nil {
		return Application{}, nil, err
	}

	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.PatchApplicationRequest,
		Body:        bytes.NewReader(bodyBytes),
		URIParams:   map[string]string{"app_guid": app.GUID},
	})
	if err != nil {
		return Application{}, nil, err
	}

	var responseApp Application
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &responseApp,
	}
	err = client.connection.Make(request, &response)

	return responseApp, response.Warnings, err
}
37141
func (t *ETagConfig) SetHashFunc(hashFunc ETagHashFunc) *ETagConfig {
	t.HashFunc = hashFunc
	return t
}
1183410
func (s *ApplicationConfigurationDescription) SetApplicationSnapshotConfigurationDescription(v *ApplicationSnapshotConfigurationDescription) *ApplicationConfigurationDescription {
	s.ApplicationSnapshotConfigurationDescription = v
	return s
}
1201587
func (c Client) GetApplications() (*ApplicationItemsPage, error) {
	var aggregateAppItemsPages ApplicationItemsPage
	var continueToken string
	for {
		res, err := c.getHTTP("Applications/", withContinue(continueToken))
		if err != nil {
			return nil, err
		}

		var appItemsPage ApplicationItemsPage
		err = json.Unmarshal(res, &appItemsPage)
		if err != nil {
			return nil, fmt.Errorf("could not deserialise JSON response: %+v", err)
		}

		aggregateAppItemsPages.Items = append(aggregateAppItemsPages.Items, appItemsPage.Items...)

		continueToken = getString(appItemsPage.ContinuationToken)
		if continueToken == "" {
			break
		}
	}
	return &aggregateAppItemsPages, nil
}
577885
func (s *SimulationJob) SetSimulationApplications(v []*SimulationApplicationConfig) *SimulationJob {
	s.SimulationApplications = v
	return s
}
592948
func (s *UpdateChannelOutput) SetHlsIngest(v *HlsIngest) *UpdateChannelOutput {
	s.HlsIngest = v
	return s
}
461589
func (c *Client) GetApplications() ([]Application, error) {
	var appMap map[string]Application
	if err := c.get(`app/list`, &appMap); err != nil {
		return nil, err
	}

	var appList []Application
	for _, app := range appMap {
		appList = append(appList, app)
	}
	sort.Sort(applications(appList))
	return appList, nil
}
22091
func (s *GetDiscoverySummaryOutput) SetServersMappedToApplications(v int64) *GetDiscoverySummaryOutput {
	s.ServersMappedToApplications = &v
	return s
}