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

// MatchPattern match pattern
//
// swagger:model MatchPattern
type MatchPattern struct {

	// The level of alert to trigger: warn | error | critical
	AlertLevel string `json:"alertLevel,omitempty"`

	// The regex or plain text to look for in the file and trigger alert if found
	Pattern string `json:"pattern,omitempty"`
}

// Validate validates this match pattern
func (m *MatchPattern) Validate(formats strfmt.Registry) error {
	return nil
}

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

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

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