// CastToMonthInterval takes an interface{} type or any Object type and
// attempts to convert it to the MonthInterval Object type.
CastToMonthInterval takes an interface{} type or any Object type and
attempts to convert it to the MonthInterval Object type.
// CastToMonthInterval takes an interface {} type or any Object type and // attempts to convert it to the MonthInterval Object type .
func CastToMonthInterval(v interface{}) (MonthInterval, bool) {
	switch pt := v.(type) {
	case *MonthInterval:
		return *pt, true
	case MonthInterval:
		return pt, true
	case *arrow.MonthInterval:
		t := *pt
		return MonthInterval(t), true
	case arrow.MonthInterval:
		t := pt
		return MonthInterval(t), true
	case *Boolean:
		t := *pt
		return func(t Boolean) MonthInterval {
			if t {
				return MonthInterval(1)
			}
			return MonthInterval(0)
		}(t), true
	case Boolean:
		t := pt
		return func(t Boolean) MonthInterval {
			if t {
				return MonthInterval(1)
			}
			return MonthInterval(0)
		}(t), true
	case *Int32:
		t := *pt
		return MonthInterval(arrow.MonthInterval(int32(t))), true
	case Int32:
		t := pt
		return MonthInterval(arrow.MonthInterval(int32(t))), true
	default:
		return 0, false
	}
}
func CastToMonthInterval ( v interface { } ) ( MonthInterval , bool ) { switch pt := v . ( type ) { case * MonthInterval : return * pt , true case MonthInterval : return pt , true case * arrow . MonthInterval : t := * pt return MonthInterval ( t ) , true case arrow . MonthInterval : t := pt return MonthInterval ( t ) , true case * Boolean : t := * pt return func ( t Boolean ) MonthInterval { if t { return MonthInterval ( 1 ) } return MonthInterval ( 0 ) } ( t ) , true case Boolean : t := pt return func ( t Boolean ) MonthInterval { if t { return MonthInterval ( 1 ) } return MonthInterval ( 0 ) } ( t ) , true case * Int32 : t := * pt return MonthInterval ( arrow . MonthInterval ( int32 ( t ) ) ) , true case Int32 : t := pt return MonthInterval ( arrow . MonthInterval ( int32 ( t ) ) ) , true default : return 0 , false } }
CastToMonthInterval takes an interface{} type or any Object type and
attempts to convert it to the MonthInterval Object type.
CastToMonthInterval takes an interface {} type or any Object type and attempts to convert it to the MonthInterval Object type .
// Also handles when v is nil