func NewCodebaseContent(value map[string]interface{}) (CodebaseContent, error) {
	cb := CodebaseContent{}
	validKeys := []string{RepositoryKey, BranchKey, FileNameKey, LineNumberKey}
	for _, key := range validKeys {
		if v, ok := value[key]; ok {
			switch key {
			case RepositoryKey:
				cb.Repository = v.(string)
			case BranchKey:
				cb.Branch = v.(string)
			case FileNameKey:
				cb.FileName = v.(string)
			case LineNumberKey:
				switch v.(type) {
				case int:
					cb.LineNumber = v.(int)
				case float64:
					y := v.(float64)
					cb.LineNumber = int(y)
				}
			}
		}
	}
	err := cb.IsValid()
	if err != nil {
		return cb, err
	}
	return cb, nil
}
// NewCodebaseContent builds CodebaseContent instance from input Map.
NewCodebaseContent builds CodebaseContent instance from input Map.
// NewCodebaseContent builds CodebaseContent instance from input Map .
func NewCodebaseContent(value map[string]interface{}) (CodebaseContent, error) {
	cb := CodebaseContent{}
	validKeys := []string{RepositoryKey, BranchKey, FileNameKey, LineNumberKey}
	for _, key := range validKeys {
		if v, ok := value[key]; ok {
			switch key {
			case RepositoryKey:
				cb.Repository = v.(string)
			case BranchKey:
				cb.Branch = v.(string)
			case FileNameKey:
				cb.FileName = v.(string)
			case LineNumberKey:
				switch v.(type) {
				case int:
					cb.LineNumber = v.(int)
				case float64:
					y := v.(float64)
					cb.LineNumber = int(y)
				}
			}
		}
	}
	err := cb.IsValid()
	if err != nil {
		return cb, err
	}
	return cb, nil
}
func NewCodebaseContent ( value map [ string ] interface { } ) ( CodebaseContent , error ) { cb := CodebaseContent { } validKeys := [ ] string { RepositoryKey , BranchKey , FileNameKey , LineNumberKey } for _ , key := range validKeys { if v , ok := value [ key ] ; ok { switch key { case RepositoryKey : cb . Repository = v . ( string ) case BranchKey : cb . Branch = v . ( string ) case FileNameKey : cb . FileName = v . ( string ) case LineNumberKey : switch v . ( type ) { case int : cb . LineNumber = v . ( int ) case float64 : y := v . ( float64 ) cb . LineNumber = int ( y ) } } } } err := cb . IsValid ( ) if err != nil { return cb , err } return cb , nil }
NewCodebaseContent builds CodebaseContent instance from input Map.
NewCodebaseContent builds CodebaseContent instance from input Map .