func (o *GetHTTPResponseRuleParams) bindParentType(rawData []string, hasKey bool, formats strfmt.Registry) error {
	if !hasKey {
		return errors.Required("parent_type", "query")
	}
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}
	if err := validate.RequiredString("parent_type", "query", raw); err != nil {
		return err
	}
	o.ParentType = raw
	if err := o.validateParentType(formats); err != nil {
		return err
	}
	return nil
}
bindParentType binds and validates parameter ParentType from query.
package http_response_rule
import (
	"net/http"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/runtime/middleware"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)
func NewGetHTTPResponseRuleParams() GetHTTPResponseRuleParams {
	return GetHTTPResponseRuleParams{}
}
type GetHTTPResponseRuleParams struct {
	HTTPRequest *http.Request `json:"-"`
	Index int64
	ParentName string
	ParentType string
	TransactionID *string
}
func (o *GetHTTPResponseRuleParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
	var res []error
	o.HTTPRequest = r
	qs := runtime.Values(r.URL.Query())
	rIndex, rhkIndex, _ := route.Params.GetOK("index")
	if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil {
		res = append(res, err)
	}
	qParentName, qhkParentName, _ := qs.GetOK("parent_name")
	if err := o.bindParentName(qParentName, qhkParentName, route.Formats); err != nil {
		res = append(res, err)
	}
	qParentType, qhkParentType, _ := qs.GetOK("parent_type")
	if err := o.bindParentType(qParentType, qhkParentType, route.Formats); err != nil {
		res = append(res, err)
	}
	qTransactionID, qhkTransactionID, _ := qs.GetOK("transaction_id")
	if err := o.bindTransactionID(qTransactionID, qhkTransactionID, route.Formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (o *GetHTTPResponseRuleParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error {
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}
	value, err := swag.ConvertInt64(raw)
	if err != nil {
		return errors.InvalidType("index", "path", "int64", raw)
	}
	o.Index = value
	return nil
}
func (o *GetHTTPResponseRuleParams) bindParentName(rawData []string, hasKey bool, formats strfmt.Registry) error {
	if !hasKey {
		return errors.Required("parent_name", "query")
	}
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}
	if err := validate.RequiredString("parent_name", "query", raw); err != nil {
		return err
	}
	o.ParentName = raw
	return nil
}