// WriteToRequest writes these params to a swagger request
func (o *GetCatalogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	r.SetTimeout(o.timeout)
	var res []error

	if o.Query != nil {

		// query param query
		var qrQuery string
		if o.Query != nil {
			qrQuery = *o.Query
		}
		qQuery := qrQuery
		if qQuery != "" {
			if err := r.SetQueryParam("query", qQuery); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetOrganizationTeamMembersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.IncludePending != nil {

		// query param includePending
		var qrIncludePending bool
		if o.IncludePending != nil {
			qrIncludePending = *o.IncludePending
		}
		qIncludePending := swag.FormatBool(qrIncludePending)
		if qIncludePending != "" {
			if err := r.SetQueryParam("includePending", qIncludePending); err != nil {
				return err
			}
		}

	}

	// path param orgname
	if err := r.SetPathParam("orgname", o.Orgname); err != nil {
		return err
	}

	// path param teamname
	if err := r.SetPathParam("teamname", o.Teamname); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *ListTriggerRecentBuildsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.Limit != nil {

		// query param limit
		var qrLimit int64
		if o.Limit != nil {
			qrLimit = *o.Limit
		}
		qLimit := swag.FormatInt64(qrLimit)
		if qLimit != "" {
			if err := r.SetQueryParam("limit", qLimit); err != nil {
				return err
			}
		}

	}

	// path param repository
	if err := r.SetPathParam("repository", o.Repository); err != nil {
		return err
	}

	// path param trigger_uuid
	if err := r.SetPathParam("trigger_uuid", o.TriggerUUID); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *ListStarredReposParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.NextPage != nil {

		// query param next_page
		var qrNextPage string
		if o.NextPage != nil {
			qrNextPage = *o.NextPage
		}
		qNextPage := qrNextPage
		if qNextPage != "" {
			if err := r.SetQueryParam("next_page", qNextPage); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *PostNodesIdentifierWorkflowsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	r.SetTimeout(o.timeout)
	var res []error

	if err := r.SetBodyParam(o.Body); err != nil {
		return err
	}

	// path param identifier
	if err := r.SetPathParam("identifier", o.Identifier); err != nil {
		return err
	}

	// query param name
	qrName := o.Name
	qName := qrName
	if qName != "" {
		if err := r.SetQueryParam("name", qName); err != nil {
			return err
		}
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetRepoImageSecurityParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	// path param imageid
	if err := r.SetPathParam("imageid", o.Imageid); err != nil {
		return err
	}

	// path param repository
	if err := r.SetPathParam("repository", o.Repository); err != nil {
		return err
	}

	if o.Vulnerabilities != nil {

		// query param vulnerabilities
		var qrVulnerabilities bool
		if o.Vulnerabilities != nil {
			qrVulnerabilities = *o.Vulnerabilities
		}
		qVulnerabilities := swag.FormatBool(qrVulnerabilities)
		if qVulnerabilities != "" {
			if err := r.SetQueryParam("vulnerabilities", qVulnerabilities); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *ListTagImagesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.Owned != nil {

		// query param owned
		var qrOwned bool
		if o.Owned != nil {
			qrOwned = *o.Owned
		}
		qOwned := swag.FormatBool(qrOwned)
		if qOwned != "" {
			if err := r.SetQueryParam("owned", qOwned); err != nil {
				return err
			}
		}

	}

	// path param repository
	if err := r.SetPathParam("repository", o.Repository); err != nil {
		return err
	}

	// path param tag
	if err := r.SetPathParam("tag", o.Tag); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
Example #8
0
// WriteToRequest writes these params to a swagger request
func (o *DiscoveryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.Internal != nil {

		// query param internal
		var qrInternal bool
		if o.Internal != nil {
			qrInternal = *o.Internal
		}
		qInternal := swag.FormatBool(qrInternal)
		if qInternal != "" {
			if err := r.SetQueryParam("internal", qInternal); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *SetMetadataForProductParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if err := r.SetBodyParam(o.Metadata); err != nil {
		return err
	}

	valuesOrganizations := o.Organizations

	joinedOrganizations := swag.JoinByFormat(valuesOrganizations, "multi")
	// query array param organizations
	if err := r.SetQueryParam("organizations", joinedOrganizations...); err != nil {
		return err
	}

	// path param product-ID
	if err := r.SetPathParam("product-ID", o.ProductID); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetLookupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	r.SetTimeout(o.timeout)
	var res []error

	if o.Q != nil {

		// query param q
		var qrQ string
		if o.Q != nil {
			qrQ = *o.Q
		}
		qQ := qrQ
		if qQ != "" {
			if err := r.SetQueryParam("q", qQ); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetOrgRobotsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	// path param orgname
	if err := r.SetPathParam("orgname", o.Orgname); err != nil {
		return err
	}

	if o.Permissions != nil {

		// query param permissions
		var qrPermissions bool
		if o.Permissions != nil {
			qrPermissions = *o.Permissions
		}
		qPermissions := swag.FormatBool(qrPermissions)
		if qPermissions != "" {
			if err := r.SetQueryParam("permissions", qPermissions); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *FindByReferenceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	// query param apikey
	qrApikey := o.Apikey
	qApikey := qrApikey
	if qApikey != "" {
		if err := r.SetQueryParam("apikey", qApikey); err != nil {
			return err
		}
	}

	// query param customerNumber
	qrCustomerNumber := o.CustomerNumber
	qCustomerNumber := qrCustomerNumber
	if qCustomerNumber != "" {
		if err := r.SetQueryParam("customerNumber", qCustomerNumber); err != nil {
			return err
		}
	}

	if o.Locale != nil {

		// query param locale
		var qrLocale string
		if o.Locale != nil {
			qrLocale = *o.Locale
		}
		qLocale := qrLocale
		if qLocale != "" {
			if err := r.SetQueryParam("locale", qLocale); err != nil {
				return err
			}
		}

	}

	// query param referenceValue
	qrReferenceValue := o.ReferenceValue
	qReferenceValue := qrReferenceValue
	if qReferenceValue != "" {
		if err := r.SetQueryParam("referenceValue", qReferenceValue); err != nil {
			return err
		}
	}

	// path param returntype
	if err := r.SetPathParam("returntype", o.Returntype); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *ListTasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.PageSize != nil {

		// query param pageSize
		var qrPageSize int32
		if o.PageSize != nil {
			qrPageSize = *o.PageSize
		}
		qPageSize := swag.FormatInt32(qrPageSize)
		if qPageSize != "" {
			if err := r.SetQueryParam("pageSize", qPageSize); err != nil {
				return err
			}
		}

	}

	if o.SinceID != nil {

		// query param sinceId
		var qrSinceID int64
		if o.SinceID != nil {
			qrSinceID = *o.SinceID
		}
		qSinceID := swag.FormatInt64(qrSinceID)
		if qSinceID != "" {
			if err := r.SetQueryParam("sinceId", qSinceID); err != nil {
				return err
			}
		}

	}

	valuesStatus := o.Status

	joinedStatus := swag.JoinByFormat(valuesStatus, "pipes")
	// query array param status
	if err := r.SetQueryParam("status", joinedStatus...); err != nil {
		return err
	}

	valuesTags := o.Tags

	joinedTags := swag.JoinByFormat(valuesTags, "")
	// query array param tags
	if err := r.SetQueryParam("tags", joinedTags...); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *FindByNotificationCodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	// query param apikey
	qrApikey := o.Apikey
	qApikey := qrApikey
	if qApikey != "" {
		if err := r.SetQueryParam("apikey", qApikey); err != nil {
			return err
		}
	}

	if o.Locale != nil {

		// query param locale
		var qrLocale string
		if o.Locale != nil {
			qrLocale = *o.Locale
		}
		qLocale := qrLocale
		if qLocale != "" {
			if err := r.SetQueryParam("locale", qLocale); err != nil {
				return err
			}
		}

	}

	// query param notificationCode
	qrNotificationCode := o.NotificationCode
	qNotificationCode := qrNotificationCode
	if qNotificationCode != "" {
		if err := r.SetQueryParam("notificationCode", qNotificationCode); err != nil {
			return err
		}
	}

	// query param notificationPhoneNumber
	qrNotificationPhoneNumber := o.NotificationPhoneNumber
	qNotificationPhoneNumber := qrNotificationPhoneNumber
	if qNotificationPhoneNumber != "" {
		if err := r.SetQueryParam("notificationPhoneNumber", qNotificationPhoneNumber); err != nil {
			return err
		}
	}

	// path param returntype
	if err := r.SetPathParam("returntype", o.Returntype); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetTaskCommentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	// path param id
	if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil {
		return err
	}

	if o.PageSize != nil {

		// query param pageSize
		var qrPageSize int32
		if o.PageSize != nil {
			qrPageSize = *o.PageSize
		}
		qPageSize := swag.FormatInt32(qrPageSize)
		if qPageSize != "" {
			if err := r.SetQueryParam("pageSize", qPageSize); err != nil {
				return err
			}
		}

	}

	if o.Since != nil {

		// query param since
		var qrSince strfmt.DateTime
		if o.Since != nil {
			qrSince = *o.Since
		}
		qSince := qrSince.String()
		if qSince != "" {
			if err := r.SetQueryParam("since", qSince); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetRepoBuildsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.Limit != nil {

		// query param limit
		var qrLimit int64
		if o.Limit != nil {
			qrLimit = *o.Limit
		}
		qLimit := swag.FormatInt64(qrLimit)
		if qLimit != "" {
			if err := r.SetQueryParam("limit", qLimit); err != nil {
				return err
			}
		}

	}

	// path param repository
	if err := r.SetPathParam("repository", o.Repository); err != nil {
		return err
	}

	if o.Since != nil {

		// query param since
		var qrSince int64
		if o.Since != nil {
			qrSince = *o.Since
		}
		qSince := swag.FormatInt64(qrSince)
		if qSince != "" {
			if err := r.SetQueryParam("since", qSince); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetAggregateRepoLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.Endtime != nil {

		// query param endtime
		var qrEndtime string
		if o.Endtime != nil {
			qrEndtime = *o.Endtime
		}
		qEndtime := qrEndtime
		if qEndtime != "" {
			if err := r.SetQueryParam("endtime", qEndtime); err != nil {
				return err
			}
		}

	}

	// path param repository
	if err := r.SetPathParam("repository", o.Repository); err != nil {
		return err
	}

	if o.Starttime != nil {

		// query param starttime
		var qrStarttime string
		if o.Starttime != nil {
			qrStarttime = *o.Starttime
		}
		qStarttime := qrStarttime
		if qStarttime != "" {
			if err := r.SetQueryParam("starttime", qStarttime); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetPaymentMethodByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	valuesOrganizations := o.Organizations

	joinedOrganizations := swag.JoinByFormat(valuesOrganizations, "multi")
	// query array param organizations
	if err := r.SetQueryParam("organizations", joinedOrganizations...); err != nil {
		return err
	}

	// path param payment-method-ID
	if err := r.SetPathParam("payment-method-ID", o.PaymentMethodID); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetSubscriptionByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.IncludeRetired != nil {

		// query param include_retired
		var qrIncludeRetired bool
		if o.IncludeRetired != nil {
			qrIncludeRetired = *o.IncludeRetired
		}
		qIncludeRetired := swag.FormatBool(qrIncludeRetired)
		if qIncludeRetired != "" {
			if err := r.SetQueryParam("include_retired", qIncludeRetired); err != nil {
				return err
			}
		}

	}

	valuesOrganizations := o.Organizations

	joinedOrganizations := swag.JoinByFormat(valuesOrganizations, "multi")
	// query array param organizations
	if err := r.SetQueryParam("organizations", joinedOrganizations...); err != nil {
		return err
	}

	// path param subscription-ID
	if err := r.SetPathParam("subscription-ID", o.SubscriptionID); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetAggregateUserLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.Endtime != nil {

		// query param endtime
		var qrEndtime string
		if o.Endtime != nil {
			qrEndtime = *o.Endtime
		}
		qEndtime := qrEndtime
		if qEndtime != "" {
			if err := r.SetQueryParam("endtime", qEndtime); err != nil {
				return err
			}
		}

	}

	if o.Performer != nil {

		// query param performer
		var qrPerformer string
		if o.Performer != nil {
			qrPerformer = *o.Performer
		}
		qPerformer := qrPerformer
		if qPerformer != "" {
			if err := r.SetQueryParam("performer", qPerformer); err != nil {
				return err
			}
		}

	}

	if o.Starttime != nil {

		// query param starttime
		var qrStarttime string
		if o.Starttime != nil {
			qrStarttime = *o.Starttime
		}
		qStarttime := qrStarttime
		if qStarttime != "" {
			if err := r.SetQueryParam("starttime", qStarttime); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetTransitTimeInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	// query param apikey
	qrApikey := o.Apikey
	qApikey := qrApikey
	if qApikey != "" {
		if err := r.SetQueryParam("apikey", qApikey); err != nil {
			return err
		}
	}

	if o.DateOfDeparture != nil {

		// query param dateOfDeparture
		var qrDateOfDeparture string
		if o.DateOfDeparture != nil {
			qrDateOfDeparture = *o.DateOfDeparture
		}
		qDateOfDeparture := qrDateOfDeparture
		if qDateOfDeparture != "" {
			if err := r.SetQueryParam("dateOfDeparture", qDateOfDeparture); err != nil {
				return err
			}
		}

	}

	// query param fromAddressCountryCode
	qrFromAddressCountryCode := o.FromAddressCountryCode
	qFromAddressCountryCode := qrFromAddressCountryCode
	if qFromAddressCountryCode != "" {
		if err := r.SetQueryParam("fromAddressCountryCode", qFromAddressCountryCode); err != nil {
			return err
		}
	}

	// query param fromAddressPostalCode
	qrFromAddressPostalCode := o.FromAddressPostalCode
	qFromAddressPostalCode := qrFromAddressPostalCode
	if qFromAddressPostalCode != "" {
		if err := r.SetQueryParam("fromAddressPostalCode", qFromAddressPostalCode); err != nil {
			return err
		}
	}

	if o.FromAddressStreetName != nil {

		// query param fromAddressStreetName
		var qrFromAddressStreetName string
		if o.FromAddressStreetName != nil {
			qrFromAddressStreetName = *o.FromAddressStreetName
		}
		qFromAddressStreetName := qrFromAddressStreetName
		if qFromAddressStreetName != "" {
			if err := r.SetQueryParam("fromAddressStreetName", qFromAddressStreetName); err != nil {
				return err
			}
		}

	}

	if o.FromAddressStreetNumber != nil {

		// query param fromAddressStreetNumber
		var qrFromAddressStreetNumber string
		if o.FromAddressStreetNumber != nil {
			qrFromAddressStreetNumber = *o.FromAddressStreetNumber
		}
		qFromAddressStreetNumber := qrFromAddressStreetNumber
		if qFromAddressStreetNumber != "" {
			if err := r.SetQueryParam("fromAddressStreetNumber", qFromAddressStreetNumber); err != nil {
				return err
			}
		}

	}

	if o.ResponseContent != nil {

		// query param responseContent
		var qrResponseContent string
		if o.ResponseContent != nil {
			qrResponseContent = *o.ResponseContent
		}
		qResponseContent := qrResponseContent
		if qResponseContent != "" {
			if err := r.SetQueryParam("responseContent", qResponseContent); err != nil {
				return err
			}
		}

	}

	// path param returntype
	if err := r.SetPathParam("returntype", o.Returntype); err != nil {
		return err
	}

	if o.ServiceCode != nil {

		// query param serviceCode
		var qrServiceCode string
		if o.ServiceCode != nil {
			qrServiceCode = *o.ServiceCode
		}
		qServiceCode := qrServiceCode
		if qServiceCode != "" {
			if err := r.SetQueryParam("serviceCode", qServiceCode); err != nil {
				return err
			}
		}

	}

	// query param serviceGroupCode
	qrServiceGroupCode := o.ServiceGroupCode
	qServiceGroupCode := qrServiceGroupCode
	if qServiceGroupCode != "" {
		if err := r.SetQueryParam("serviceGroupCode", qServiceGroupCode); err != nil {
			return err
		}
	}

	// query param toAddressCountryCode
	qrToAddressCountryCode := o.ToAddressCountryCode
	qToAddressCountryCode := qrToAddressCountryCode
	if qToAddressCountryCode != "" {
		if err := r.SetQueryParam("toAddressCountryCode", qToAddressCountryCode); err != nil {
			return err
		}
	}

	// query param toAddressPostalCode
	qrToAddressPostalCode := o.ToAddressPostalCode
	qToAddressPostalCode := qrToAddressPostalCode
	if qToAddressPostalCode != "" {
		if err := r.SetQueryParam("toAddressPostalCode", qToAddressPostalCode); err != nil {
			return err
		}
	}

	if o.ToAddressStreetName != nil {

		// query param toAddressStreetName
		var qrToAddressStreetName string
		if o.ToAddressStreetName != nil {
			qrToAddressStreetName = *o.ToAddressStreetName
		}
		qToAddressStreetName := qrToAddressStreetName
		if qToAddressStreetName != "" {
			if err := r.SetQueryParam("toAddressStreetName", qToAddressStreetName); err != nil {
				return err
			}
		}

	}

	if o.ToAddressStreetNumber != nil {

		// query param toAddressStreetNumber
		var qrToAddressStreetNumber string
		if o.ToAddressStreetNumber != nil {
			qrToAddressStreetNumber = *o.ToAddressStreetNumber
		}
		qToAddressStreetNumber := qrToAddressStreetNumber
		if qToAddressStreetNumber != "" {
			if err := r.SetQueryParam("toAddressStreetNumber", qToAddressStreetNumber); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
Example #22
0
// WriteToRequest writes these params to a swagger request
func (o *ListReposParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.LastModified != nil {

		// query param last_modified
		var qrLastModified bool
		if o.LastModified != nil {
			qrLastModified = *o.LastModified
		}
		qLastModified := swag.FormatBool(qrLastModified)
		if qLastModified != "" {
			if err := r.SetQueryParam("last_modified", qLastModified); err != nil {
				return err
			}
		}

	}

	if o.Namespace != nil {

		// query param namespace
		var qrNamespace string
		if o.Namespace != nil {
			qrNamespace = *o.Namespace
		}
		qNamespace := qrNamespace
		if qNamespace != "" {
			if err := r.SetQueryParam("namespace", qNamespace); err != nil {
				return err
			}
		}

	}

	if o.NextPage != nil {

		// query param next_page
		var qrNextPage string
		if o.NextPage != nil {
			qrNextPage = *o.NextPage
		}
		qNextPage := qrNextPage
		if qNextPage != "" {
			if err := r.SetQueryParam("next_page", qNextPage); err != nil {
				return err
			}
		}

	}

	if o.Popularity != nil {

		// query param popularity
		var qrPopularity bool
		if o.Popularity != nil {
			qrPopularity = *o.Popularity
		}
		qPopularity := swag.FormatBool(qrPopularity)
		if qPopularity != "" {
			if err := r.SetQueryParam("popularity", qPopularity); err != nil {
				return err
			}
		}

	}

	if o.Public != nil {

		// query param public
		var qrPublic bool
		if o.Public != nil {
			qrPublic = *o.Public
		}
		qPublic := swag.FormatBool(qrPublic)
		if qPublic != "" {
			if err := r.SetQueryParam("public", qPublic); err != nil {
				return err
			}
		}

	}

	if o.Starred != nil {

		// query param starred
		var qrStarred bool
		if o.Starred != nil {
			qrStarred = *o.Starred
		}
		qStarred := swag.FormatBool(qrStarred)
		if qStarred != "" {
			if err := r.SetQueryParam("starred", qStarred); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *ListOrgLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.Endtime != nil {

		// query param endtime
		var qrEndtime string
		if o.Endtime != nil {
			qrEndtime = *o.Endtime
		}
		qEndtime := qrEndtime
		if qEndtime != "" {
			if err := r.SetQueryParam("endtime", qEndtime); err != nil {
				return err
			}
		}

	}

	if o.NextPage != nil {

		// query param next_page
		var qrNextPage string
		if o.NextPage != nil {
			qrNextPage = *o.NextPage
		}
		qNextPage := qrNextPage
		if qNextPage != "" {
			if err := r.SetQueryParam("next_page", qNextPage); err != nil {
				return err
			}
		}

	}

	// path param orgname
	if err := r.SetPathParam("orgname", o.Orgname); err != nil {
		return err
	}

	if o.Page != nil {

		// query param page
		var qrPage int64
		if o.Page != nil {
			qrPage = *o.Page
		}
		qPage := swag.FormatInt64(qrPage)
		if qPage != "" {
			if err := r.SetQueryParam("page", qPage); err != nil {
				return err
			}
		}

	}

	if o.Performer != nil {

		// query param performer
		var qrPerformer string
		if o.Performer != nil {
			qrPerformer = *o.Performer
		}
		qPerformer := qrPerformer
		if qPerformer != "" {
			if err := r.SetQueryParam("performer", qPerformer); err != nil {
				return err
			}
		}

	}

	if o.Starttime != nil {

		// query param starttime
		var qrStarttime string
		if o.Starttime != nil {
			qrStarttime = *o.Starttime
		}
		qStarttime := qrStarttime
		if qStarttime != "" {
			if err := r.SetQueryParam("starttime", qStarttime); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *FindNearestByCoordinatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	// query param apikey
	qrApikey := o.Apikey
	qApikey := qrApikey
	if qApikey != "" {
		if err := r.SetQueryParam("apikey", qApikey); err != nil {
			return err
		}
	}

	// query param countryCode
	qrCountryCode := o.CountryCode
	qCountryCode := qrCountryCode
	if qCountryCode != "" {
		if err := r.SetQueryParam("countryCode", qCountryCode); err != nil {
			return err
		}
	}

	// query param easting
	qrEasting := o.Easting
	qEasting := swag.FormatFloat64(qrEasting)
	if qEasting != "" {
		if err := r.SetQueryParam("easting", qEasting); err != nil {
			return err
		}
	}

	if o.Locale != nil {

		// query param locale
		var qrLocale string
		if o.Locale != nil {
			qrLocale = *o.Locale
		}
		qLocale := qrLocale
		if qLocale != "" {
			if err := r.SetQueryParam("locale", qLocale); err != nil {
				return err
			}
		}

	}

	// query param northing
	qrNorthing := o.Northing
	qNorthing := swag.FormatFloat64(qrNorthing)
	if qNorthing != "" {
		if err := r.SetQueryParam("northing", qNorthing); err != nil {
			return err
		}
	}

	if o.NumberOfServicePoints != nil {

		// query param numberOfServicePoints
		var qrNumberOfServicePoints int32
		if o.NumberOfServicePoints != nil {
			qrNumberOfServicePoints = *o.NumberOfServicePoints
		}
		qNumberOfServicePoints := swag.FormatInt32(qrNumberOfServicePoints)
		if qNumberOfServicePoints != "" {
			if err := r.SetQueryParam("numberOfServicePoints", qNumberOfServicePoints); err != nil {
				return err
			}
		}

	}

	// path param returntype
	if err := r.SetPathParam("returntype", o.Returntype); err != nil {
		return err
	}

	if o.SrID != nil {

		// query param srId
		var qrSrID string
		if o.SrID != nil {
			qrSrID = *o.SrID
		}
		qSrID := qrSrID
		if qSrID != "" {
			if err := r.SetQueryParam("srId", qSrID); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *ListRepoTagsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.Limit != nil {

		// query param limit
		var qrLimit int64
		if o.Limit != nil {
			qrLimit = *o.Limit
		}
		qLimit := swag.FormatInt64(qrLimit)
		if qLimit != "" {
			if err := r.SetQueryParam("limit", qLimit); err != nil {
				return err
			}
		}

	}

	if o.Page != nil {

		// query param page
		var qrPage int64
		if o.Page != nil {
			qrPage = *o.Page
		}
		qPage := swag.FormatInt64(qrPage)
		if qPage != "" {
			if err := r.SetQueryParam("page", qPage); err != nil {
				return err
			}
		}

	}

	// path param repository
	if err := r.SetPathParam("repository", o.Repository); err != nil {
		return err
	}

	if o.SpecificTag != nil {

		// query param specificTag
		var qrSpecificTag string
		if o.SpecificTag != nil {
			qrSpecificTag = *o.SpecificTag
		}
		qSpecificTag := qrSpecificTag
		if qSpecificTag != "" {
			if err := r.SetQueryParam("specificTag", qSpecificTag); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetRatePlanByProductAndRatePlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.IncludeRetired != nil {

		// query param include_retired
		var qrIncludeRetired bool
		if o.IncludeRetired != nil {
			qrIncludeRetired = *o.IncludeRetired
		}
		qIncludeRetired := swag.FormatBool(qrIncludeRetired)
		if qIncludeRetired != "" {
			if err := r.SetQueryParam("include_retired", qIncludeRetired); err != nil {
				return err
			}
		}

	}

	if o.Offset != nil {

		// query param offset
		var qrOffset int32
		if o.Offset != nil {
			qrOffset = *o.Offset
		}
		qOffset := swag.FormatInt32(qrOffset)
		if qOffset != "" {
			if err := r.SetQueryParam("offset", qOffset); err != nil {
				return err
			}
		}

	}

	if o.Order != nil {

		// query param order
		var qrOrder string
		if o.Order != nil {
			qrOrder = *o.Order
		}
		qOrder := qrOrder
		if qOrder != "" {
			if err := r.SetQueryParam("order", qOrder); err != nil {
				return err
			}
		}

	}

	if o.OrderBy != nil {

		// query param order_by
		var qrOrderBy string
		if o.OrderBy != nil {
			qrOrderBy = *o.OrderBy
		}
		qOrderBy := qrOrderBy
		if qOrderBy != "" {
			if err := r.SetQueryParam("order_by", qOrderBy); err != nil {
				return err
			}
		}

	}

	valuesOrganizations := o.Organizations

	joinedOrganizations := swag.JoinByFormat(valuesOrganizations, "multi")
	// query array param organizations
	if err := r.SetQueryParam("organizations", joinedOrganizations...); err != nil {
		return err
	}

	// path param product-ID
	if err := r.SetPathParam("product-ID", o.ProductID); err != nil {
		return err
	}

	// path param rate-plan-ID
	if err := r.SetPathParam("rate-plan-ID", o.RatePlanID); err != nil {
		return err
	}

	if o.Records != nil {

		// query param records
		var qrRecords int32
		if o.Records != nil {
			qrRecords = *o.Records
		}
		qRecords := swag.FormatInt32(qrRecords)
		if qRecords != "" {
			if err := r.SetQueryParam("records", qRecords); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *AvailablePaymentMethodsForSubscriptionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.Offset != nil {

		// query param offset
		var qrOffset int32
		if o.Offset != nil {
			qrOffset = *o.Offset
		}
		qOffset := swag.FormatInt32(qrOffset)
		if qOffset != "" {
			if err := r.SetQueryParam("offset", qOffset); err != nil {
				return err
			}
		}

	}

	if o.Order != nil {

		// query param order
		var qrOrder string
		if o.Order != nil {
			qrOrder = *o.Order
		}
		qOrder := qrOrder
		if qOrder != "" {
			if err := r.SetQueryParam("order", qOrder); err != nil {
				return err
			}
		}

	}

	if o.OrderBy != nil {

		// query param order_by
		var qrOrderBy string
		if o.OrderBy != nil {
			qrOrderBy = *o.OrderBy
		}
		qOrderBy := qrOrderBy
		if qOrderBy != "" {
			if err := r.SetQueryParam("order_by", qOrderBy); err != nil {
				return err
			}
		}

	}

	valuesOrganizations := o.Organizations

	joinedOrganizations := swag.JoinByFormat(valuesOrganizations, "multi")
	// query array param organizations
	if err := r.SetQueryParam("organizations", joinedOrganizations...); err != nil {
		return err
	}

	if o.Records != nil {

		// query param records
		var qrRecords int32
		if o.Records != nil {
			qrRecords = *o.Records
		}
		qRecords := swag.FormatInt32(qrRecords)
		if qRecords != "" {
			if err := r.SetQueryParam("records", qRecords); err != nil {
				return err
			}
		}

	}

	// path param subscription-ID
	if err := r.SetPathParam("subscription-ID", o.SubscriptionID); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *FindNearestByAddressParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	// query param apikey
	qrApikey := o.Apikey
	qApikey := qrApikey
	if qApikey != "" {
		if err := r.SetQueryParam("apikey", qApikey); err != nil {
			return err
		}
	}

	if o.City != nil {

		// query param city
		var qrCity string
		if o.City != nil {
			qrCity = *o.City
		}
		qCity := qrCity
		if qCity != "" {
			if err := r.SetQueryParam("city", qCity); err != nil {
				return err
			}
		}

	}

	// query param countryCode
	qrCountryCode := o.CountryCode
	qCountryCode := qrCountryCode
	if qCountryCode != "" {
		if err := r.SetQueryParam("countryCode", qCountryCode); err != nil {
			return err
		}
	}

	if o.Locale != nil {

		// query param locale
		var qrLocale string
		if o.Locale != nil {
			qrLocale = *o.Locale
		}
		qLocale := qrLocale
		if qLocale != "" {
			if err := r.SetQueryParam("locale", qLocale); err != nil {
				return err
			}
		}

	}

	if o.NumberOfServicePoints != nil {

		// query param numberOfServicePoints
		var qrNumberOfServicePoints int32
		if o.NumberOfServicePoints != nil {
			qrNumberOfServicePoints = *o.NumberOfServicePoints
		}
		qNumberOfServicePoints := swag.FormatInt32(qrNumberOfServicePoints)
		if qNumberOfServicePoints != "" {
			if err := r.SetQueryParam("numberOfServicePoints", qNumberOfServicePoints); err != nil {
				return err
			}
		}

	}

	if o.PostalCode != nil {

		// query param postalCode
		var qrPostalCode string
		if o.PostalCode != nil {
			qrPostalCode = *o.PostalCode
		}
		qPostalCode := qrPostalCode
		if qPostalCode != "" {
			if err := r.SetQueryParam("postalCode", qPostalCode); err != nil {
				return err
			}
		}

	}

	// path param returntype
	if err := r.SetPathParam("returntype", o.Returntype); err != nil {
		return err
	}

	if o.SrID != nil {

		// query param srId
		var qrSrID string
		if o.SrID != nil {
			qrSrID = *o.SrID
		}
		qSrID := qrSrID
		if qSrID != "" {
			if err := r.SetQueryParam("srId", qSrID); err != nil {
				return err
			}
		}

	}

	if o.StreetName != nil {

		// query param streetName
		var qrStreetName string
		if o.StreetName != nil {
			qrStreetName = *o.StreetName
		}
		qStreetName := qrStreetName
		if qStreetName != "" {
			if err := r.SetQueryParam("streetName", qStreetName); err != nil {
				return err
			}
		}

	}

	if o.StreetNumber != nil {

		// query param streetNumber
		var qrStreetNumber string
		if o.StreetNumber != nil {
			qrStreetNumber = *o.StreetNumber
		}
		qStreetNumber := qrStreetNumber
		if qStreetNumber != "" {
			if err := r.SetQueryParam("streetNumber", qStreetNumber); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetAllSubscriptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	valuesAccountID := o.AccountID

	joinedAccountID := swag.JoinByFormat(valuesAccountID, "multi")
	// query array param accountID
	if err := r.SetQueryParam("accountID", joinedAccountID...); err != nil {
		return err
	}

	if o.ExcludeChildren != nil {

		// query param exclude_children
		var qrExcludeChildren bool
		if o.ExcludeChildren != nil {
			qrExcludeChildren = *o.ExcludeChildren
		}
		qExcludeChildren := swag.FormatBool(qrExcludeChildren)
		if qExcludeChildren != "" {
			if err := r.SetQueryParam("exclude_children", qExcludeChildren); err != nil {
				return err
			}
		}

	}

	if o.ExcludeServiceEnded != nil {

		// query param exclude_service_ended
		var qrExcludeServiceEnded bool
		if o.ExcludeServiceEnded != nil {
			qrExcludeServiceEnded = *o.ExcludeServiceEnded
		}
		qExcludeServiceEnded := swag.FormatBool(qrExcludeServiceEnded)
		if qExcludeServiceEnded != "" {
			if err := r.SetQueryParam("exclude_service_ended", qExcludeServiceEnded); err != nil {
				return err
			}
		}

	}

	if o.IncludeRetired != nil {

		// query param include_retired
		var qrIncludeRetired bool
		if o.IncludeRetired != nil {
			qrIncludeRetired = *o.IncludeRetired
		}
		qIncludeRetired := swag.FormatBool(qrIncludeRetired)
		if qIncludeRetired != "" {
			if err := r.SetQueryParam("include_retired", qIncludeRetired); err != nil {
				return err
			}
		}

	}

	if o.Metadata != nil {

		// query param metadata
		var qrMetadata string
		if o.Metadata != nil {
			qrMetadata = *o.Metadata
		}
		qMetadata := qrMetadata
		if qMetadata != "" {
			if err := r.SetQueryParam("metadata", qMetadata); err != nil {
				return err
			}
		}

	}

	if o.Offset != nil {

		// query param offset
		var qrOffset int32
		if o.Offset != nil {
			qrOffset = *o.Offset
		}
		qOffset := swag.FormatInt32(qrOffset)
		if qOffset != "" {
			if err := r.SetQueryParam("offset", qOffset); err != nil {
				return err
			}
		}

	}

	if o.Order != nil {

		// query param order
		var qrOrder string
		if o.Order != nil {
			qrOrder = *o.Order
		}
		qOrder := qrOrder
		if qOrder != "" {
			if err := r.SetQueryParam("order", qOrder); err != nil {
				return err
			}
		}

	}

	if o.OrderBy != nil {

		// query param order_by
		var qrOrderBy string
		if o.OrderBy != nil {
			qrOrderBy = *o.OrderBy
		}
		qOrderBy := qrOrderBy
		if qOrderBy != "" {
			if err := r.SetQueryParam("order_by", qOrderBy); err != nil {
				return err
			}
		}

	}

	valuesOrganizations := o.Organizations

	joinedOrganizations := swag.JoinByFormat(valuesOrganizations, "multi")
	// query array param organizations
	if err := r.SetQueryParam("organizations", joinedOrganizations...); err != nil {
		return err
	}

	if o.Records != nil {

		// query param records
		var qrRecords int32
		if o.Records != nil {
			qrRecords = *o.Records
		}
		qRecords := swag.FormatInt32(qrRecords)
		if qRecords != "" {
			if err := r.SetQueryParam("records", qRecords); err != nil {
				return err
			}
		}

	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
// WriteToRequest writes these params to a swagger request
func (o *GetMatchingEntitiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

	var res []error

	if o.IncludeOrgs != nil {

		// query param includeOrgs
		var qrIncludeOrgs bool
		if o.IncludeOrgs != nil {
			qrIncludeOrgs = *o.IncludeOrgs
		}
		qIncludeOrgs := swag.FormatBool(qrIncludeOrgs)
		if qIncludeOrgs != "" {
			if err := r.SetQueryParam("includeOrgs", qIncludeOrgs); err != nil {
				return err
			}
		}

	}

	if o.IncludeTeams != nil {

		// query param includeTeams
		var qrIncludeTeams bool
		if o.IncludeTeams != nil {
			qrIncludeTeams = *o.IncludeTeams
		}
		qIncludeTeams := swag.FormatBool(qrIncludeTeams)
		if qIncludeTeams != "" {
			if err := r.SetQueryParam("includeTeams", qIncludeTeams); err != nil {
				return err
			}
		}

	}

	if o.Namespace != nil {

		// query param namespace
		var qrNamespace string
		if o.Namespace != nil {
			qrNamespace = *o.Namespace
		}
		qNamespace := qrNamespace
		if qNamespace != "" {
			if err := r.SetQueryParam("namespace", qNamespace); err != nil {
				return err
			}
		}

	}

	// path param prefix
	if err := r.SetPathParam("prefix", o.Prefix); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}