// bindPetID binds and validates parameter PetID from path.
421369
func (o *UpdatePetWithFormParams) bindPetID(rawData []string, hasKey bool, formats strfmt.Registry) error {
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}

	// Required: true
	// Parameter is provided by construction from the route

	o.PetID = raw

	return nil
}
571581
func (pc peerConn) ID() ID {
	return PubKeyToID(pc.conn.(*tmconn.SecretConnection).RemotePubKey())
}
235885
func BindNamed(bindType int, query string, arg interface{}) (string, []interface{}, error) {
	return bindNamedMapper(bindType, query, arg, mapper())
}
512124
func (o *ListTasksParams) bindSinceID(rawData []string, hasKey bool, formats strfmt.Registry) error {
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}

	// Required: false
	// AllowEmptyValue: false
	if raw == "" { // empty values pass all other validations
		return nil
	}

	value, err := swag.ConvertInt64(raw)
	if err != nil {
		return errors.InvalidType("sinceId", "query", "int64", raw)
	}
	o.SinceID = &value

	return nil
}
1066948
func (o *PetListParams) bindStatus(rawData []string, hasKey bool, formats strfmt.Registry) error {
	if !hasKey {
		return errors.Required("status", "query")
	}

	// CollectionFormat: multi
	statusIC := rawData

	if len(statusIC) == 0 {
		return errors.Required("status", "query")
	}

	var statusIR []string
	for i, statusIV := range statusIC {
		statusI := statusIV

		if err := validate.Enum(fmt.Sprintf("%s.%v", "status", i), "query", statusI, []interface{}{"available", "pending", "sold"}); err != nil {
			return err
		}

		statusIR = append(statusIR, statusI)
	}

	o.Status = statusIR

	return nil
}
846862
func (p *Peer) ID() int32 {
	p.flagsMtx.Lock()
	id := p.id
	p.flagsMtx.Unlock()

	return id
}
1125581
func (o *DeletePetParams) bindAPIKey(rawData []string, hasKey bool, formats strfmt.Registry) error {
	if !hasKey {
		return errors.Required("api_key", "header")
	}
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}

	// Required: true

	if err := validate.RequiredString("api_key", "header", raw); err != nil {
		return err
	}

	o.APIKey = raw

	return nil
}
163203
func (s *M3u8Settings) SetPmtPid(v string) *M3u8Settings {
	s.PmtPid = &v
	return s
}
1085379
func (s *GetVpcLinkInput) SetVpcLinkId(v string) *GetVpcLinkInput {
	s.VpcLinkId = &v
	return s
}
1283185
func (s *UpdateIPSetInput) SetIpSetId(v string) *UpdateIPSetInput {
	s.IpSetId = &v
	return s
}
646674
func (o *PetUploadImageParams) WithPetID(petID int64) *PetUploadImageParams {
	o.SetPetID(petID)
	return o
}
1142523
func (o *GetOrdersForItemParams) bindItemID(rawData []string, hasKey bool, formats strfmt.Registry) error {
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}

	// Required: true
	// Parameter is provided by construction from the route

	o.ItemID = raw

	return nil
}
330480
func (o *PetUploadImageParams) bindAdditionalMetadata(rawData []string, hasKey bool, formats strfmt.Registry) error {
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}

	// Required: false

	if raw == "" { // empty values pass all other validations
		return nil
	}

	o.AdditionalMetadata = &raw

	return nil
}
1358788
func AppendGTID(rp Position, gtid GTID) Position {
	if gtid == nil {
		return rp
	}
	if rp.GTIDSet == nil {
		return Position{GTIDSet: gtid.GTIDSet()}
	}
	return Position{GTIDSet: rp.GTIDSet.AddGTID(gtid)}
}
1227588
func (req IPRequest) IPID() string {
	return fmt.Sprintf("%s-%s", req.HostID, req.IPAddress)
}
995649
func (s *UpdateIPSetInput) SetIPSetId(v string) *UpdateIPSetInput {
	s.IPSetId = &v
	return s
}
197332
func ValidateAPIEndpoint(c *kubeadm.APIEndpoint, fldPath *field.Path) field.ErrorList {
	allErrs := field.ErrorList{}
	allErrs = append(allErrs, ValidateIPFromString(c.AdvertiseAddress, fldPath.Child("advertiseAddress"))...)
	allErrs = append(allErrs, ValidatePort(c.BindPort, fldPath.Child("bindPort"))...)
	return allErrs
}