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

// SlackField SlackField configures a single Slack field that is sent with each notification.
//
// Each field must contain a title, value, and optionally, a boolean value to indicate if the field
// is short enough to be displayed next to other fields designated as short.
// See https://api.slack.com/docs/message-attachments#fields for more information.
//
// swagger:model SlackField
type SlackField struct {

	// short
	Short bool `json:"short,omitempty"`

	// title
	Title string `json:"title,omitempty"`

	// value
	Value string `json:"value,omitempty"`
}

// Validate validates this slack field
func (m *SlackField) Validate(formats strfmt.Registry) error {
	return nil
}

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

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

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