func (v Products) Ptr() *Products {
	return &v
}
Ptr returns reference to Products value
package plaid
import (
	"encoding/json"
	"fmt"
)
type Products string
const (
	PRODUCTS_ASSETS Products = "assets"
	PRODUCTS_AUTH Products = "auth"
	PRODUCTS_BALANCE Products = "balance"
	PRODUCTS_IDENTITY Products = "identity"
	PRODUCTS_INVESTMENTS Products = "investments"
	PRODUCTS_LIABILITIES Products = "liabilities"
	PRODUCTS_PAYMENT_INITIATION Products = "payment_initiation"
	PRODUCTS_TRANSACTIONS Products = "transactions"
	PRODUCTS_CREDIT_DETAILS Products = "credit_details"
	PRODUCTS_INCOME Products = "income"
	PRODUCTS_INCOME_VERIFICATION Products = "income_verification"
	PRODUCTS_DEPOSIT_SWITCH Products = "deposit_switch"
	PRODUCTS_STANDING_ORDERS Products = "standing_orders"
	PRODUCTS_TRANSFER Products = "transfer"
)
var allowedProductsEnumValues = []Products{
	"assets",
	"auth",
	"balance",
	"identity",
	"investments",
	"liabilities",
	"payment_initiation",
	"transactions",
	"credit_details",
	"income",
	"income_verification",
	"deposit_switch",
	"standing_orders",
	"transfer",
}
func (v *Products) UnmarshalJSON(src []byte) error {
	var value string
	err := json.Unmarshal(src, &value)
	if err != nil {
		return err
	}
	enumTypeValue := Products(value)
	for _, existing := range allowedProductsEnumValues {
		if existing == enumTypeValue {
			*v = enumTypeValue
			return nil
		}
	}
	return fmt.Errorf("%+v is not a valid Products", value)
}
func NewProductsFromValue(v string) (*Products, error) {
	ev := Products(v)
	if ev.IsValid() {
		return &ev, nil
	} else {
		return nil, fmt.Errorf("invalid value '%v' for Products: valid values are %v", v, allowedProductsEnumValues)
	}
}
func (v Products) IsValid() bool {
	for _, existing := range allowedProductsEnumValues {
		if existing == v {
			return true
		}
	}
	return false
}