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

package types

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

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

// IndexInfo IndexInfo contains information about a registry.
// swagger:model IndexInfo
type IndexInfo struct {

	// List of mirrors, expressed as URIs.
	//
	Mirrors []string `json:"Mirrors"`

	// Name of the registry.
	//
	Name string `json:"Name,omitempty"`

	// Indicates whether this is an official registry.
	//
	Official bool `json:"Official,omitempty"`

	// Indicates if the the registry is part of the list of insecure
	// registries.
	//
	// If `false`, the registry is insecure. Insecure registries accept
	// un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from
	// unknown CAs) communication.
	//
	// > **Warning**: Insecure registries can be useful when running a local
	// > registry. However, because its use creates security vulnerabilities
	// > it should ONLY be enabled for testing purposes. For increased
	// > security, users should add their CA to their system's list of
	// > trusted CAs instead of enabling this option.
	//
	Secure bool `json:"Secure,omitempty"`
}

// Validate validates this index info
func (m *IndexInfo) Validate(formats strfmt.Registry) error {
	return nil
}

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

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