// RequestRXParamSetup modifies the RX1 data-rate offset, RX2 frequency and
// RX2 data-rate.
971895
func RequestRXParamSetup(rx1DROffset, rx2Frequency, rx2DR int) storage.MACCommandBlock {
	return storage.MACCommandBlock{
		CID: lorawan.RXParamSetupReq,
		MACCommands: []lorawan.MACCommand{
			{
				CID: lorawan.RXParamSetupReq,
				Payload: &lorawan.RXParamSetupReqPayload{
					Frequency: uint32(rx2Frequency),
					DLSettings: lorawan.DLSettings{
						RX2DataRate: uint8(rx2DR),
						RX1DROffset: uint8(rx1DROffset),
					},
				},
			},
		},
	}
}
433282
func (s *Session) combineRequestOptions(ro *RequestOptions) *RequestOptions {
	if ro == nil {
		ro = &RequestOptions{}
	}

	if ro.UserAgent == "" && s.RequestOptions.UserAgent != "" {
		ro.UserAgent = s.RequestOptions.UserAgent
	}

	if ro.Host == "" && s.RequestOptions.Host != "" {
		ro.Host = s.RequestOptions.Host
	}

	if ro.Auth == nil && s.RequestOptions.Auth != nil {
		ro.Auth = s.RequestOptions.Auth
	}

	if len(s.RequestOptions.Headers) > 0 || len(ro.Headers) > 0 {
		headers := make(map[string]string)
		for k, v := range s.RequestOptions.Headers {
			headers[k] = v
		}
		for k, v := range ro.Headers {
			headers[k] = v
		}
		ro.Headers = headers
	}
	return ro
}
65299
func (s *GetIntegrationOutput) SetRequestParameters(v map[string]*string) *GetIntegrationOutput {
	s.RequestParameters = v
	return s
}
311108
func (s *GetRouteOutput) SetRequestParameters(v map[string]*ParameterConstraints) *GetRouteOutput {
	s.RequestParameters = v
	return s
}
1355809
func (s *BaremetalService) NewAddBaremetalPxeKickStartServerParams(password string, physicalnetworkid string, pxeservertype string, tftpdir string, url string, username string) *AddBaremetalPxeKickStartServerParams {
	p := &AddBaremetalPxeKickStartServerParams{}
	p.p = make(map[string]interface{})
	p.p["password"] = password
	p.p["physicalnetworkid"] = physicalnetworkid
	p.p["pxeservertype"] = pxeservertype
	p.p["tftpdir"] = tftpdir
	p.p["url"] = url
	p.p["username"] = username
	return p
}
426592
func (c *Client) UpdateRequestSetting(i *UpdateRequestSettingInput) (*RequestSetting, error) {
	if i.Service == "" {
		return nil, ErrMissingService
	}

	if i.Version == 0 {
		return nil, ErrMissingVersion
	}

	if i.Name == "" {
		return nil, ErrMissingName
	}

	path := fmt.Sprintf("/service/%s/version/%d/request_settings/%s", i.Service, i.Version, i.Name)
	resp, err := c.PutForm(path, i, nil)
	if err != nil {
		return nil, err
	}

	var b *RequestSetting
	if err := decodeJSON(&b, resp.Body); err != nil {
		return nil, err
	}
	return b, nil
}
164896
func RequestSampler(sampleFunc func(r *http.Request) bool) ServerOption {
	return func(h *handler) {
		h.requestSampler = sampleFunc
	}
}
1150363
func (s *CreateRouteResponseInput) SetResponseParameters(v map[string]*ParameterConstraints) *CreateRouteResponseInput {
	s.ResponseParameters = v
	return s
}
1127756
func (s *CreateIntegrationInput) SetRequestParameters(v map[string]*string) *CreateIntegrationInput {
	s.RequestParameters = v
	return s
}
882255
func (e *endpointDetails) requestToken(w http.ResponseWriter, req *http.Request) {
	authReq := e.osinOAuthClient.NewAuthorizeRequest(osincli.CODE)
	oauthURL := authReq.GetAuthorizeUrl()

	http.Redirect(w, req, oauthURL.String(), http.StatusFound)
}
432991
func (s *GetIntegrationResponseOutput) SetResponseParameters(v map[string]*string) *GetIntegrationResponseOutput {
	s.ResponseParameters = v
	return s
}
215904
func (s *UpdateRouteResponseOutput) SetResponseParameters(v map[string]*ParameterConstraints) *UpdateRouteResponseOutput {
	s.ResponseParameters = v
	return s
}
482477
func (s *PutGatewayResponseInput) SetResponseParameters(v map[string]*string) *PutGatewayResponseInput {
	s.ResponseParameters = v
	return s
}
1154151
func (s *UpdateIntegrationOutput) SetRequestParameters(v map[string]*string) *UpdateIntegrationOutput {
	s.RequestParameters = v
	return s
}
750357
func (s *GetRouteResponseOutput) SetResponseParameters(v map[string]*ParameterConstraints) *GetRouteResponseOutput {
	s.ResponseParameters = v
	return s
}
662638
func (s *RouteResponse) SetResponseParameters(v map[string]*ParameterConstraints) *RouteResponse {
	s.ResponseParameters = v
	return s
}
244957
func (r *Request) MatchParams(params map[string]string) *Request {
	query := r.URLStruct.Query()
	for key, value := range params {
		query.Set(key, value)
	}
	r.URLStruct.RawQuery = query.Encode()
	return r
}