// SetDownlinkLossPercent sets the DownlinkLossPercent field's value.
968202
func (s *UpdateNetworkProfileInput) SetDownlinkLossPercent(v int64) *UpdateNetworkProfileInput {
	s.DownlinkLossPercent = &v
	return s
}
612140
func (s *ThrottleSettings) SetRateLimit(v float64) *ThrottleSettings {
	s.RateLimit = &v
	return s
}
624133
func (s *LiteralOptions) SetSortEnabled(v bool) *LiteralOptions {
	s.SortEnabled = &v
	return s
}
1264610
func (client *Client) SetListenerAccessControlStatus(loadBalancerId string, port int, status AccessControlStatus) (err error) {
	args := &SetListenerAccessControlStatusArgs{
		LoadBalancerId:      loadBalancerId,
		ListenerPort:        port,
		AccessControlStatus: status,
	}
	response := &CommonLoadBalancerListenerResponse{}
	err = client.Invoke("SetListenerAccessControlStatus", args, response)
	return err
}
1159445
func (s *EndpointRequest) SetEndpointStatus(v string) *EndpointRequest {
	s.EndpointStatus = &v
	return s
}
228021
func (s *CountClosedWorkflowExecutionsInput) SetCloseStatusFilter(v *CloseStatusFilter) *CountClosedWorkflowExecutionsInput {
	s.CloseStatusFilter = v
	return s
}
1134519
func (s *DeploymentGroupInfo) SetLastAttemptedDeployment(v *LastDeploymentInfo) *DeploymentGroupInfo {
	s.LastAttemptedDeployment = v
	return s
}
247157
func (s *CreateNetworkProfileInput) SetDownlinkDelayMs(v int64) *CreateNetworkProfileInput {
	s.DownlinkDelayMs = &v
	return s
}
1080658
func (s *ClusterIamRole) SetApplyStatus(v string) *ClusterIamRole {
	s.ApplyStatus = &v
	return s
}
842429
func (s *DoubleOptions) SetSortEnabled(v bool) *DoubleOptions {
	s.SortEnabled = &v
	return s
}
113517
func SetDownlinkTXInfoDataRate(txInfo *gw.DownlinkTXInfo, dr int, b band.Band) error {
	dataRate, err := b.GetDataRate(dr)
	if err != nil {
		return errors.Wrap(err, "get data-rate error")
	}

	switch dataRate.Modulation {
	case band.LoRaModulation:
		txInfo.Modulation = common.Modulation_LORA
		txInfo.ModulationInfo = &gw.DownlinkTXInfo_LoraModulationInfo{
			LoraModulationInfo: &gw.LoRaModulationInfo{
				SpreadingFactor:       uint32(dataRate.SpreadFactor),
				Bandwidth:             uint32(dataRate.Bandwidth),
				CodeRate:              defaultCodeRate,
				PolarizationInversion: true,
			},
		}
	case band.FSKModulation:
		txInfo.Modulation = common.Modulation_FSK
		txInfo.ModulationInfo = &gw.DownlinkTXInfo_FskModulationInfo{
			FskModulationInfo: &gw.FSKModulationInfo{
				Bitrate:   uint32(dataRate.BitRate),
				Bandwidth: uint32(dataRate.Bandwidth),
			},
		}
	default:
		return fmt.Errorf("unknown modulation: %s", dataRate.Modulation)
	}

	return nil
}
267638
func (s *DescribeEndpointOutput) SetEndpointStatus(v string) *DescribeEndpointOutput {
	s.EndpointStatus = &v
	return s
}
548175
func (s *NetworkProfile) SetDownlinkDelayMs(v int64) *NetworkProfile {
	s.DownlinkDelayMs = &v
	return s
}
92722
func (s *DBClusterEndpoint) SetEndpoint(v string) *DBClusterEndpoint {
	s.Endpoint = &v
	return s
}
329658
func (s *PlacementStatistics) SetMissingPercentage(v float64) *PlacementStatistics {
	s.MissingPercentage = &v
	return s
}
662966
func (s *LatLonOptions) SetSortEnabled(v bool) *LatLonOptions {
	s.SortEnabled = &v
	return s
}
965122
func (s *EndpointGroup) SetTrafficDialPercentage(v float64) *EndpointGroup {
	s.TrafficDialPercentage = &v
	return s
}