SourceCreate.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * <<
  3. * Davinci
  4. * ==
  5. * Copyright (C) 2016 - 2019 EDP
  6. * ==
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. * >>
  17. *
  18. */
  19. package edp.davinci.dto.sourceDto;
  20. import lombok.Data;
  21. import javax.validation.constraints.Min;
  22. import javax.validation.constraints.NotBlank;
  23. import javax.validation.constraints.NotNull;
  24. @Data
  25. @NotNull(message = "Source info cannot be null")
  26. public class SourceCreate {
  27. @NotBlank(message = "Source name cannot be empty")
  28. private String name;
  29. private Long pId;
  30. private String description;
  31. @NotBlank(message = "Source type cannot be empty")
  32. private String type;
  33. @Min(value = 1L, message = "Invalid project id")
  34. private Long projectId;
  35. @NotNull(message = "Source config cannot be null")
  36. private SourceConfig config;
  37. }