// 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/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// VaultRadar20230501TenantGetResponse For now, we only want to send back type and state
//
// swagger:model vault_radar_20230501TenantGetResponse
type VaultRadar20230501TenantGetResponse struct {

	// state
	State string `json:"state,omitempty"`

	// trial expires at
	// Format: date-time
	TrialExpiresAt strfmt.DateTime `json:"trial_expires_at,omitempty"`

	// type
	Type string `json:"type,omitempty"`
}

// Validate validates this vault radar 20230501 tenant get response
func (m *VaultRadar20230501TenantGetResponse) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateTrialExpiresAt(formats); err != nil {
		res = append(res, err)
	}

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

func (m *VaultRadar20230501TenantGetResponse) validateTrialExpiresAt(formats strfmt.Registry) error {
	if swag.IsZero(m.TrialExpiresAt) { // not required
		return nil
	}

	if err := validate.FormatOf("trial_expires_at", "body", "date-time", m.TrialExpiresAt.String(), formats); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this vault radar 20230501 tenant get response based on context it is used
func (m *VaultRadar20230501TenantGetResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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