// Code generated by go-swagger; DO NOT EDIT.

// Copyright Authors of Cilium
// SPDX-License-Identifier: Apache-2.0

package models

import (
	"context"

	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)

// StateDBQuery StateDB query
//
// swagger:model StateDBQuery
type StateDBQuery struct {

	// Index to query against
	Index string `json:"index,omitempty"`

	// Key to query with. Base64 encoded.
	Key string `json:"key,omitempty"`

	// LowerBound prefix search or full-matching Get
	Lowerbound bool `json:"lowerbound,omitempty"`

	// Name of the table to query
	Table string `json:"table,omitempty"`
}

// Validate validates this state d b query
func (m *StateDBQuery) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this state d b query based on context it is used
func (m *StateDBQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *StateDBQuery) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *StateDBQuery) UnmarshalBinary(b []byte) error {
	var res StateDBQuery
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
