// 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"
)

// APICertificate Api certificate
//
// swagger:model ApiCertificate
type APICertificate struct {

	// expires on
	ExpiresOn int64 `json:"expiresOn,omitempty"`

	// fingerprint
	Fingerprint string `json:"fingerprint,omitempty"`

	// id
	ID string `json:"id,omitempty"`

	// issued on
	IssuedOn int64 `json:"issuedOn,omitempty"`

	// issuer common name
	IssuerCommonName string `json:"issuerCommonName,omitempty"`

	// issuer organization
	IssuerOrganization string `json:"issuerOrganization,omitempty"`

	// issuer organizational unit
	IssuerOrganizationalUnit string `json:"issuerOrganizationalUnit,omitempty"`

	// pem
	Pem string `json:"pem,omitempty"`

	// serial number
	SerialNumber string `json:"serialNumber,omitempty"`

	// subject common name
	SubjectCommonName string `json:"subjectCommonName,omitempty"`

	// subject organization
	SubjectOrganization string `json:"subjectOrganization,omitempty"`

	// subject organizational unit
	SubjectOrganizationalUnit string `json:"subjectOrganizationalUnit,omitempty"`
}

// Validate validates this Api certificate
func (m *APICertificate) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this Api certificate based on context it is used
func (m *APICertificate) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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