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

// InstanceConfigurationPolls InstanceConfigurationPolls models instance poll config parameters.
//
// swagger:model InstanceConfigurationPolls
type InstanceConfigurationPolls struct {

	// Number of characters allowed per option in the poll.
	// Example: 50
	MaxCharactersPerOption int64 `json:"max_characters_per_option,omitempty"`

	// Maximum expiration time of the poll in seconds.
	// Example: 2629746
	MaxExpiration int64 `json:"max_expiration,omitempty"`

	// Number of options permitted in a poll on this instance.
	// Example: 4
	MaxOptions int64 `json:"max_options,omitempty"`

	// Minimum expiration time of the poll in seconds.
	// Example: 300
	MinExpiration int64 `json:"min_expiration,omitempty"`
}

// Validate validates this instance configuration polls
func (m *InstanceConfigurationPolls) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this instance configuration polls based on context it is used
func (m *InstanceConfigurationPolls) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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