// Code generated by protoc-gen-gogo.
// source: user/user.proto
// DO NOT EDIT!

/*
Package user is a generated protocol buffer package.

It is generated from these files:
	user/user.proto

It has these top-level messages:
	User
	CreateUserRequest
	GetUserRequest
	ListUsersRequest
	ListUsersResponse
	DeleteUserRequest
*/
package user

import regexp "regexp"
import fmt "fmt"
import github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
import proto "github.com/golang/protobuf/proto"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import _ "github.com/mwitkow/go-proto-validators"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

func (this *User) Validate() error {
	return nil
}

var _regex_CreateUserRequest_Name = regexp.MustCompile("^[A-Za-z0-9]+")

func (this *CreateUserRequest) Validate() error {
	if !_regex_CreateUserRequest_Name.MatchString(this.Name) {
		return github_com_mwitkow_go_proto_validators.FieldError("Name", fmt.Errorf(`value '%v' must be a string conforming to regex "^[A-Za-z0-9]+"`, this.Name))
	}
	return nil
}

var _regex_GetUserRequest_Id = regexp.MustCompile("^[A-Za-z0-9]+")

func (this *GetUserRequest) Validate() error {
	if !_regex_GetUserRequest_Id.MatchString(this.Id) {
		return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`value '%v' must be a string conforming to regex "^[A-Za-z0-9]+"`, this.Id))
	}
	return nil
}
func (this *ListUsersRequest) Validate() error {
	return nil
}
func (this *ListUsersResponse) Validate() error {
	for _, item := range this.Users {
		if item != nil {
			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
				return github_com_mwitkow_go_proto_validators.FieldError("Users", err)
			}
		}
	}
	return nil
}

var _regex_DeleteUserRequest_Id = regexp.MustCompile("^[A-Za-z0-9]+")

func (this *DeleteUserRequest) Validate() error {
	if !_regex_DeleteUserRequest_Id.MatchString(this.Id) {
		return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`value '%v' must be a string conforming to regex "^[A-Za-z0-9]+"`, this.Id))
	}
	return nil
}
