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

// Secrets20231128AppSync secrets 20231128 app sync
//
// swagger:model secrets_20231128AppSync
type Secrets20231128AppSync struct {

	// aggregated error code
	AggregatedErrorCode string `json:"aggregated_error_code,omitempty"`

	// aggregated status
	AggregatedStatus string `json:"aggregated_status,omitempty"`

	// last synced at
	// Format: date-time
	LastSyncedAt strfmt.DateTime `json:"last_synced_at,omitempty"`

	// num secrets
	NumSecrets string `json:"num_secrets,omitempty"`

	// sync name
	SyncName string `json:"sync_name,omitempty"`
}

// Validate validates this secrets 20231128 app sync
func (m *Secrets20231128AppSync) Validate(formats strfmt.Registry) error {
	var res []error

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

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

func (m *Secrets20231128AppSync) validateLastSyncedAt(formats strfmt.Registry) error {
	if swag.IsZero(m.LastSyncedAt) { // not required
		return nil
	}

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

	return nil
}

// ContextValidate validates this secrets 20231128 app sync based on context it is used
func (m *Secrets20231128AppSync) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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