/sdk/education/azure-resourcemanager-education/src/main/java/com/azure/resourcemanager/education/fluent/models/StudentProperties.java

http://github.com/WindowsAzure/azure-sdk-for-java · Java · 312 lines · 133 code · 34 blank · 145 comment · 13 complexity · 213e58476883fe66a0586e4764c07c73 MD5 · raw file

  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License.
  3. // Code generated by Microsoft (R) AutoRest Code Generator.
  4. package com.azure.resourcemanager.education.fluent.models;
  5. import com.azure.core.annotation.Fluent;
  6. import com.azure.core.util.logging.ClientLogger;
  7. import com.azure.resourcemanager.education.models.StudentLabStatus;
  8. import com.azure.resourcemanager.education.models.StudentRole;
  9. import com.fasterxml.jackson.annotation.JsonProperty;
  10. import java.time.OffsetDateTime;
  11. /** Student detail properties. */
  12. @Fluent
  13. public final class StudentProperties {
  14. /*
  15. * First Name
  16. */
  17. @JsonProperty(value = "firstName", required = true)
  18. private String firstName;
  19. /*
  20. * Last Name
  21. */
  22. @JsonProperty(value = "lastName", required = true)
  23. private String lastName;
  24. /*
  25. * Student Email
  26. */
  27. @JsonProperty(value = "email", required = true)
  28. private String email;
  29. /*
  30. * Student Role
  31. */
  32. @JsonProperty(value = "role", required = true)
  33. private StudentRole role;
  34. /*
  35. * Student Budget
  36. */
  37. @JsonProperty(value = "budget", required = true)
  38. private Amount budget;
  39. /*
  40. * Subscription Id
  41. */
  42. @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
  43. private String subscriptionId;
  44. /*
  45. * Date this student is set to expire from the lab.
  46. */
  47. @JsonProperty(value = "expirationDate", required = true)
  48. private OffsetDateTime expirationDate;
  49. /*
  50. * Student Lab Status
  51. */
  52. @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
  53. private StudentLabStatus status;
  54. /*
  55. * Date student was added to the lab
  56. */
  57. @JsonProperty(value = "effectiveDate", access = JsonProperty.Access.WRITE_ONLY)
  58. private OffsetDateTime effectiveDate;
  59. /*
  60. * Subscription alias
  61. */
  62. @JsonProperty(value = "subscriptionAlias")
  63. private String subscriptionAlias;
  64. /*
  65. * subscription invite last sent date
  66. */
  67. @JsonProperty(value = "subscriptionInviteLastSentDate")
  68. private OffsetDateTime subscriptionInviteLastSentDate;
  69. /**
  70. * Get the firstName property: First Name.
  71. *
  72. * @return the firstName value.
  73. */
  74. public String firstName() {
  75. return this.firstName;
  76. }
  77. /**
  78. * Set the firstName property: First Name.
  79. *
  80. * @param firstName the firstName value to set.
  81. * @return the StudentProperties object itself.
  82. */
  83. public StudentProperties withFirstName(String firstName) {
  84. this.firstName = firstName;
  85. return this;
  86. }
  87. /**
  88. * Get the lastName property: Last Name.
  89. *
  90. * @return the lastName value.
  91. */
  92. public String lastName() {
  93. return this.lastName;
  94. }
  95. /**
  96. * Set the lastName property: Last Name.
  97. *
  98. * @param lastName the lastName value to set.
  99. * @return the StudentProperties object itself.
  100. */
  101. public StudentProperties withLastName(String lastName) {
  102. this.lastName = lastName;
  103. return this;
  104. }
  105. /**
  106. * Get the email property: Student Email.
  107. *
  108. * @return the email value.
  109. */
  110. public String email() {
  111. return this.email;
  112. }
  113. /**
  114. * Set the email property: Student Email.
  115. *
  116. * @param email the email value to set.
  117. * @return the StudentProperties object itself.
  118. */
  119. public StudentProperties withEmail(String email) {
  120. this.email = email;
  121. return this;
  122. }
  123. /**
  124. * Get the role property: Student Role.
  125. *
  126. * @return the role value.
  127. */
  128. public StudentRole role() {
  129. return this.role;
  130. }
  131. /**
  132. * Set the role property: Student Role.
  133. *
  134. * @param role the role value to set.
  135. * @return the StudentProperties object itself.
  136. */
  137. public StudentProperties withRole(StudentRole role) {
  138. this.role = role;
  139. return this;
  140. }
  141. /**
  142. * Get the budget property: Student Budget.
  143. *
  144. * @return the budget value.
  145. */
  146. public Amount budget() {
  147. return this.budget;
  148. }
  149. /**
  150. * Set the budget property: Student Budget.
  151. *
  152. * @param budget the budget value to set.
  153. * @return the StudentProperties object itself.
  154. */
  155. public StudentProperties withBudget(Amount budget) {
  156. this.budget = budget;
  157. return this;
  158. }
  159. /**
  160. * Get the subscriptionId property: Subscription Id.
  161. *
  162. * @return the subscriptionId value.
  163. */
  164. public String subscriptionId() {
  165. return this.subscriptionId;
  166. }
  167. /**
  168. * Get the expirationDate property: Date this student is set to expire from the lab.
  169. *
  170. * @return the expirationDate value.
  171. */
  172. public OffsetDateTime expirationDate() {
  173. return this.expirationDate;
  174. }
  175. /**
  176. * Set the expirationDate property: Date this student is set to expire from the lab.
  177. *
  178. * @param expirationDate the expirationDate value to set.
  179. * @return the StudentProperties object itself.
  180. */
  181. public StudentProperties withExpirationDate(OffsetDateTime expirationDate) {
  182. this.expirationDate = expirationDate;
  183. return this;
  184. }
  185. /**
  186. * Get the status property: Student Lab Status.
  187. *
  188. * @return the status value.
  189. */
  190. public StudentLabStatus status() {
  191. return this.status;
  192. }
  193. /**
  194. * Get the effectiveDate property: Date student was added to the lab.
  195. *
  196. * @return the effectiveDate value.
  197. */
  198. public OffsetDateTime effectiveDate() {
  199. return this.effectiveDate;
  200. }
  201. /**
  202. * Get the subscriptionAlias property: Subscription alias.
  203. *
  204. * @return the subscriptionAlias value.
  205. */
  206. public String subscriptionAlias() {
  207. return this.subscriptionAlias;
  208. }
  209. /**
  210. * Set the subscriptionAlias property: Subscription alias.
  211. *
  212. * @param subscriptionAlias the subscriptionAlias value to set.
  213. * @return the StudentProperties object itself.
  214. */
  215. public StudentProperties withSubscriptionAlias(String subscriptionAlias) {
  216. this.subscriptionAlias = subscriptionAlias;
  217. return this;
  218. }
  219. /**
  220. * Get the subscriptionInviteLastSentDate property: subscription invite last sent date.
  221. *
  222. * @return the subscriptionInviteLastSentDate value.
  223. */
  224. public OffsetDateTime subscriptionInviteLastSentDate() {
  225. return this.subscriptionInviteLastSentDate;
  226. }
  227. /**
  228. * Set the subscriptionInviteLastSentDate property: subscription invite last sent date.
  229. *
  230. * @param subscriptionInviteLastSentDate the subscriptionInviteLastSentDate value to set.
  231. * @return the StudentProperties object itself.
  232. */
  233. public StudentProperties withSubscriptionInviteLastSentDate(OffsetDateTime subscriptionInviteLastSentDate) {
  234. this.subscriptionInviteLastSentDate = subscriptionInviteLastSentDate;
  235. return this;
  236. }
  237. /**
  238. * Validates the instance.
  239. *
  240. * @throws IllegalArgumentException thrown if the instance is not valid.
  241. */
  242. public void validate() {
  243. if (firstName() == null) {
  244. throw LOGGER
  245. .logExceptionAsError(
  246. new IllegalArgumentException("Missing required property firstName in model StudentProperties"));
  247. }
  248. if (lastName() == null) {
  249. throw LOGGER
  250. .logExceptionAsError(
  251. new IllegalArgumentException("Missing required property lastName in model StudentProperties"));
  252. }
  253. if (email() == null) {
  254. throw LOGGER
  255. .logExceptionAsError(
  256. new IllegalArgumentException("Missing required property email in model StudentProperties"));
  257. }
  258. if (role() == null) {
  259. throw LOGGER
  260. .logExceptionAsError(
  261. new IllegalArgumentException("Missing required property role in model StudentProperties"));
  262. }
  263. if (budget() == null) {
  264. throw LOGGER
  265. .logExceptionAsError(
  266. new IllegalArgumentException("Missing required property budget in model StudentProperties"));
  267. } else {
  268. budget().validate();
  269. }
  270. if (expirationDate() == null) {
  271. throw LOGGER
  272. .logExceptionAsError(
  273. new IllegalArgumentException(
  274. "Missing required property expirationDate in model StudentProperties"));
  275. }
  276. }
  277. private static final ClientLogger LOGGER = new ClientLogger(StudentProperties.class);
  278. }