// SetAvailabilityZone sets the AvailabilityZone field's value.
333232
func (s *ReplicationInstance) SetAvailabilityZone(v string) *ReplicationInstance {
	s.AvailabilityZone = &v
	return s
}
1149010
func (s *LoadBalancer) SetAvailabilityZones(v []*AvailabilityZone) *LoadBalancer {
	s.AvailabilityZones = v
	return s
}
757575
func (s *NodeConfiguration) SetAvailabilityZone(v string) *NodeConfiguration {
	s.AvailabilityZone = &v
	return s
}
222405
func (s *CreateFlowInput) SetAvailabilityZone(v string) *CreateFlowInput {
	s.AvailabilityZone = &v
	return s
}
1348272
func (s *CacheCluster) SetPreferredAvailabilityZone(v string) *CacheCluster {
	s.PreferredAvailabilityZone = &v
	return s
}
608970
func (s *CreateStackInput) SetDefaultAvailabilityZone(v string) *CreateStackInput {
	s.DefaultAvailabilityZone = &v
	return s
}
433699
func (s *CreateAutoScalingGroupInput) SetAvailabilityZones(v []*string) *CreateAutoScalingGroupInput {
	s.AvailabilityZones = v
	return s
}
1172050
func (s *UpdateAutoScalingGroupInput) SetAvailabilityZones(v []*string) *UpdateAutoScalingGroupInput {
	s.AvailabilityZones = v
	return s
}
229397
func (s *ZoneAwarenessConfig) SetAvailabilityZoneCount(v int64) *ZoneAwarenessConfig {
	s.AvailabilityZoneCount = &v
	return s
}
1178673
func (s *BrokerInstanceOption) SetAvailabilityZones(v []*AvailabilityZone) *BrokerInstanceOption {
	s.AvailabilityZones = v
	return s
}
1095723
func (s *EnableAvailabilityZonesForLoadBalancerInput) SetAvailabilityZones(v []*string) *EnableAvailabilityZonesForLoadBalancerInput {
	s.AvailabilityZones = v
	return s
}
863234
func (s *CreateInstanceInput) SetAvailabilityZone(v string) *CreateInstanceInput {
	s.AvailabilityZone = &v
	return s
}
1088949
func (s *DBInstance) SetAvailabilityZone(v string) *DBInstance {
	s.AvailabilityZone = &v
	return s
}
862221
func (s *CreateDiskFromSnapshotInput) SetAvailabilityZone(v string) *CreateDiskFromSnapshotInput {
	s.AvailabilityZone = &v
	return s
}
1350194
func (s *CreateDBClusterInput) SetAvailabilityZones(v []*string) *CreateDBClusterInput {
	s.AvailabilityZones = v
	return s
}
1225235
func (s *EventFilter) SetAvailabilityZones(v []*string) *EventFilter {
	s.AvailabilityZones = v
	return s
}
816134
func (api *HostsAPI) SetAvailabilityZone(id string, availabilityZone *HostSetAvailabilityZoneOperation) (task *Task, err error) {
	body, err := json.Marshal(availabilityZone)
	if err != nil {
		return
	}

	res, err := api.client.restClient.Post(
		api.client.Endpoint+hostUrl+"/"+id+"/set_availability_zone",
		"application/json",
		bytes.NewReader(body),
		api.client.options.TokenOptions)

	if err != nil {
		return
	}

	defer res.Body.Close()
	task, err = getTask(getError(res))
	return
}