// Valid returns true if the X coordinates of the curve points are non-strictly monotonic
487630
func (pwl PieceWiseLinear) Valid() bool {
	var lastX uint64
	for _, i := range pwl {
		if i.X < lastX {
			return false
		}
		lastX = i.X
	}
	return true
}
796839
func Valid(json string) bool {
	_, ok := validpayload(stringBytes(json), 0)
	return ok
}
1266232
func (l PendingTransactionList) Valid() (bool, error) {
	var emptyDate Date
	if l.DtAsOf.Equal(emptyDate) {
		return false, errors.New("PendingTransactionList.DtAsOf not filled")
	}
	for _, t := range l.Transactions {
		if ok, err := t.Valid(); !ok {
			return false, err
		}
	}

	return true, nil
}
793695
func (r Rect) IsValid() bool {
	return r.X.IsEmpty() == r.Y.IsEmpty()
}
1239220
func (ut UserType) Valid() (err error) {
	switch ut {
	case Owner: // 1
	case Member: // 2
	default:
		err = ErrInvalidUserType
	}

	return err
}
254529
func (c *Client) Valid() bool {
	if c == nil {
		return false
	}

	if c.Client == nil {
		return false
	}

	// Use arbitrary pointer field in the service content.
	// Doesn't matter which one, as long as it is populated by default.
	if c.ServiceContent.SessionManager == nil {
		return false
	}

	return true
}
851994
func (config *Config) valid() error {
	// check minlevel validation
	if "" != config.MinLevel && !LevelFromString(config.MinLevel).valid() {
		return ErrConfigBadAttributes
	}

	// check filters len
	if len(config.Filters) < 1 {
		return ErrConfigFiltersNotFound
	}

	// check filter one by one
	for _, filter := range config.Filters {
		if "" == filter.Levels {
			return ErrConfigLevelsNotFound
		}

		if (file{}) != filter.File {
			// seem not needed now
			//if "" == filter.File.Path {
			//return ErrConfigFilePathNotFound
			//}
		} else if (rotateFile{}) != filter.RotateFile {
			if "" == filter.RotateFile.Path {
				return ErrConfigFilePathNotFound
			}

			if "" == filter.RotateFile.Type {
				return ErrConfigFileRotateTypeNotFound
			}
		} else if (socket{}) != filter.Socket {
			if "" == filter.Socket.Address {
				return ErrConfigSocketAddressNotFound
			}

			if "" == filter.Socket.Network {
				return ErrConfigSocketNetworkNotFound
			}
		}
	}

	return nil
}
683014
func (ou UID) Valid() (bool, error) {
	if len(ou) == 0 || len(ou) > 36 {
		return false, errors.New("UID invalid length")
	}
	return true, nil
}
87991
func (m *MachineLogin) Valid() bool {
	return m.TokenID != nil && m.Secret != nil && m.Secret.String() != ""
}
990575
func (t Tile) Valid() bool {
	maxIndex := uint32(1) << uint32(t.Z)
	return t.X < maxIndex && t.Y < maxIndex
}
879584
func (level LevelType) valid() bool {
	if TRACE > level || CRITICAL < level {
		return false
	}
	return true
}
189771
func (c Currency) Valid() (bool, error) {
	if c.CurRate.IsInt() && c.CurRate.Num().Int64() == 0 {
		return false, errors.New("CurRate may not be zero")
	} else if ok, err := c.CurSym.Valid(); !ok {
		return false, err
	}
	return true, nil
}
480412
func Valid(arg string) bool {
	_, err := Parse(arg)
	return err == nil
}
366665
func Valid(cpf string) bool {
	isValid, err := AssertValid(cpf)
	if err != nil {
		return false
	}
	return isValid
}
1336425
func (m *GopenGraph) IsValid() bool {
	for _, attr := range m.MandatoryAttrs {
		_, isPresent := m.OgAttrs[attr]

		if !isPresent {
			return false
		}
	}

	return true
}
337570
func (r Resource) Valid() (err error) {
	switch r {
	case AuthorizationsResource: // 0
	case BucketsResource: // 1
	case DashboardsResource: // 2
	case OrgsResource: // 3
	case TasksResource: // 4
	case TelegrafsResource: // 5
	case SourcesResource: // 6
	case UsersResource: //7
	default:
		err = ErrInvalidResource
	}

	return err
}
58488
func (c Cap) IsValid() bool {
	return c.center.Vector.IsUnit() && c.radius <= s1.StraightChordAngle
}