// You should always use this function to get a new AddBaremetalRctParams instance,
// as then you are sure you have configured all required params
7562
func (s *BaremetalService) NewAddBaremetalRctParams(baremetalrcturl string) *AddBaremetalRctParams {
	p := &AddBaremetalRctParams{}
	p.p = make(map[string]interface{})
	p.p["baremetalrcturl"] = baremetalrcturl
	return p
}
910856
func (s *BaremetalService) NewNotifyBaremetalProvisionDoneParams(mac string) *NotifyBaremetalProvisionDoneParams {
	p := &NotifyBaremetalProvisionDoneParams{}
	p.p = make(map[string]interface{})
	p.p["mac"] = mac
	return p
}
106365
func AddParamsToContext(ctx context.Context, params map[string]string) context.Context {
	return context.WithValue(ctx, paramsContextKey, params)
}
238481
func (p *propConnectedSwitches) AddEmptyConnectedParam() {
	if p.ConnectedSwitches == nil {
		p.ClearConnectedSwitches()
	}
	p.ConnectedSwitches = append(p.ConnectedSwitches, nil)
}
670896
func (c *contractMaturityReport) AddLimboDirectHtlc(kid *kidOutput) {
	c.limboBalance += kid.Amount()

	htlcReport := htlcMaturityReport{
		outpoint:       *kid.OutPoint(),
		amount:         kid.Amount(),
		maturityHeight: kid.absoluteMaturity,
		stage:          2,
	}

	c.htlcs = append(c.htlcs, htlcReport)
}
17387
func (c *Client) AddNicToVirtualMachine(p *AddNicToVirtualMachineParameter) (*VirtualMachine, error) {
	obj, err := c.Request("addNicToVirtualMachine", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*VirtualMachine), err
}
1312239
func (a *ActionDefinition) initImplicitParams() {
	for _, ro := range a.Routes {
		for _, wc := range ro.Params() {
			found := false
			search := func(params *AttributeDefinition) {
				if params == nil {
					return
				}
				att, ok := params.Type.ToObject()[wc]
				if ok {
					if a.Params == nil {
						a.Params = &AttributeDefinition{Type: Object{}}
					}
					a.Params.Type.ToObject()[wc] = att
					found = true
				}
			}
			search(a.Params)
			parent := a.Parent
			for !found && parent != nil {
				bp := parent.Params
				parent = parent.Parent()
				search(bp)
			}
			if found {
				continue
			}
			search(Design.Params)
			if found {
				continue
			}
			if a.Params == nil {
				a.Params = &AttributeDefinition{Type: Object{}}
			}
			a.Params.Type.ToObject()[wc] = &AttributeDefinition{Type: String}
		}
	}
}
1026465
func (s *BaremetalService) NewAddBaremetalDhcpParams(dhcpservertype string, password string, physicalnetworkid string, url string, username string) *AddBaremetalDhcpParams {
	p := &AddBaremetalDhcpParams{}
	p.p = make(map[string]interface{})
	p.p["dhcpservertype"] = dhcpservertype
	p.p["password"] = password
	p.p["physicalnetworkid"] = physicalnetworkid
	p.p["url"] = url
	p.p["username"] = username
	return p
}
257923
func appendCustomerParamsToValues(c *CustomerParams, values *url.Values) {
	// add optional parameters, if specified
	if c.Email != "" {
		values.Add("email", c.Email)
	}
	if c.Desc != "" {
		values.Add("description", c.Desc)
	}
	if c.Coupon != "" {
		values.Add("coupon", c.Coupon)
	}
	if c.Plan != "" {
		values.Add("plan", c.Plan)
	}
	if c.TrialEnd != 0 {
		values.Add("trial_end", strconv.FormatInt(c.TrialEnd, 10))
	}
	if c.AccountBalance != 0 {
		values.Add("account_balance", strconv.FormatInt(c.AccountBalance, 10))
	}
	if c.Quantity != 0 {
		values.Add("quantity", strconv.FormatInt(c.Quantity, 10))
	}

	// add metadata, if specified
	for k, v := range c.Metadata {
		values.Add("metadata["+k+"]", v)
	}

	// add optional credit card details, if specified
	if c.Card != nil {
		appendCardParamsToValues(c.Card, values)
	} else if len(c.Token) != 0 {
		values.Add("card", c.Token)
	}
}
383282
func (api *API) GetBaremetalModel(bm_id string) (*BaremetalModel, error) {
	res := new(BaremetalModel)
	url := createUrl(api, serverPathSegment, baremetalSegment, bm_id)
	err := api.Client.Get(url, &res, http.StatusOK)
	if err != nil {
		return nil, err
	}
	//	res.api = api
	return res, nil
}
783547
func (s *LoadBalancerService) NewConfigureNetscalerLoadBalancerParams(lbdeviceid string) *ConfigureNetscalerLoadBalancerParams {
	p := &ConfigureNetscalerLoadBalancerParams{}
	p.p = make(map[string]interface{})
	p.p["lbdeviceid"] = lbdeviceid
	return p
}
411001
func (s *GuestOSService) NewAddGuestOsParams(details map[string]string, oscategoryid string, osdisplayname string) *AddGuestOsParams {
	p := &AddGuestOsParams{}
	p.p = make(map[string]interface{})
	p.p["details"] = details
	p.p["oscategoryid"] = oscategoryid
	p.p["osdisplayname"] = osdisplayname
	return p
}
668378
func (service *BaseService) AddNetRPCMethods(rcvr interface{}, option ...Options) Service {
	service.methodManager.AddNetRPCMethods(rcvr, option...)
	return service
}
572521
func NewSetAttributesAsTextArgs(nodeID NodeID, text string) *SetAttributesAsTextArgs {
	args := new(SetAttributesAsTextArgs)
	args.NodeID = nodeID
	args.Text = text
	return args
}
582694
func (s *BrocadeVCSService) NewAddBrocadeVcsDeviceParams(hostname string, password string, physicalnetworkid string, username string) *AddBrocadeVcsDeviceParams {
	p := &AddBrocadeVcsDeviceParams{}
	p.p = make(map[string]interface{})
	p.p["hostname"] = hostname
	p.p["password"] = password
	p.p["physicalnetworkid"] = physicalnetworkid
	p.p["username"] = username
	return p
}
259934
func (p provider) AddCustomParameters(req *osincli.AuthorizeRequest) {
	for k, v := range p.ExtraAuthorizeParameters {
		req.CustomParameters[k] = v
	}
}
1006247
func (s *HostService) AddBaremetalHost(p *AddBaremetalHostParams) (*AddBaremetalHostResponse, error) {
	resp, err := s.cs.newRequest("addBaremetalHost", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r AddBaremetalHostResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}