func (o *GetPetByIDParams) bindPetID(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("petId", "path", "int64", raw) } o.PetID = value return nil }
func (o *AddCommentToTaskParams) bindID(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("id", "path", "int64", raw) } o.ID = value return nil }
func (o *ListTasksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response header X-Last-Task-Id xLastTaskId, err := swag.ConvertInt64(response.GetHeader("X-Last-Task-Id")) if err != nil { return errors.InvalidType("X-Last-Task-Id", "header", "int64", response.GetHeader("X-Last-Task-Id")) } o.XLastTaskID = xLastTaskId // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } return nil }
func (o *FindTodosParams) bindSince(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } if raw == "" { // empty values pass all other validations return nil } value, err := swag.ConvertInt64(raw) if err != nil { return errors.InvalidType("since", "query", "int64", raw) } o.Since = &value return nil }