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

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"

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

// V1alpha1ApproveTokenRequest v1alpha1 approve token request
//
// swagger:model v1alpha1ApproveTokenRequest
type V1alpha1ApproveTokenRequest struct {

	// The action made by the user (true: allow the token, false: deny the token)
	Approve bool `json:"approve,omitempty"`

	// The device id used to handle the approval requestion
	DeviceID string `json:"deviceId,omitempty"`

	// The OTP sent to the device related to the request
	Otp string `json:"otp,omitempty"`

	// The session id related to the token that needs to be approved
	SessionID string `json:"sessionId,omitempty"`
}

// Validate validates this v1alpha1 approve token request
func (m *V1alpha1ApproveTokenRequest) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this v1alpha1 approve token request based on context it is used
func (m *V1alpha1ApproveTokenRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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