/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
- // Copyright (c) Microsoft Corporation. All rights reserved.
- // Licensed under the MIT License.
- // Code generated by Microsoft (R) AutoRest Code Generator.
- package com.azure.resourcemanager.education.fluent.models;
- import com.azure.core.annotation.Fluent;
- import com.azure.core.util.logging.ClientLogger;
- import com.azure.resourcemanager.education.models.StudentLabStatus;
- import com.azure.resourcemanager.education.models.StudentRole;
- import com.fasterxml.jackson.annotation.JsonProperty;
- import java.time.OffsetDateTime;
- /** Student detail properties. */
- @Fluent
- public final class StudentProperties {
- /*
- * First Name
- */
- @JsonProperty(value = "firstName", required = true)
- private String firstName;
- /*
- * Last Name
- */
- @JsonProperty(value = "lastName", required = true)
- private String lastName;
- /*
- * Student Email
- */
- @JsonProperty(value = "email", required = true)
- private String email;
- /*
- * Student Role
- */
- @JsonProperty(value = "role", required = true)
- private StudentRole role;
- /*
- * Student Budget
- */
- @JsonProperty(value = "budget", required = true)
- private Amount budget;
- /*
- * Subscription Id
- */
- @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
- private String subscriptionId;
- /*
- * Date this student is set to expire from the lab.
- */
- @JsonProperty(value = "expirationDate", required = true)
- private OffsetDateTime expirationDate;
- /*
- * Student Lab Status
- */
- @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
- private StudentLabStatus status;
- /*
- * Date student was added to the lab
- */
- @JsonProperty(value = "effectiveDate", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime effectiveDate;
- /*
- * Subscription alias
- */
- @JsonProperty(value = "subscriptionAlias")
- private String subscriptionAlias;
- /*
- * subscription invite last sent date
- */
- @JsonProperty(value = "subscriptionInviteLastSentDate")
- private OffsetDateTime subscriptionInviteLastSentDate;
- /**
- * Get the firstName property: First Name.
- *
- * @return the firstName value.
- */
- public String firstName() {
- return this.firstName;
- }
- /**
- * Set the firstName property: First Name.
- *
- * @param firstName the firstName value to set.
- * @return the StudentProperties object itself.
- */
- public StudentProperties withFirstName(String firstName) {
- this.firstName = firstName;
- return this;
- }
- /**
- * Get the lastName property: Last Name.
- *
- * @return the lastName value.
- */
- public String lastName() {
- return this.lastName;
- }
- /**
- * Set the lastName property: Last Name.
- *
- * @param lastName the lastName value to set.
- * @return the StudentProperties object itself.
- */
- public StudentProperties withLastName(String lastName) {
- this.lastName = lastName;
- return this;
- }
- /**
- * Get the email property: Student Email.
- *
- * @return the email value.
- */
- public String email() {
- return this.email;
- }
- /**
- * Set the email property: Student Email.
- *
- * @param email the email value to set.
- * @return the StudentProperties object itself.
- */
- public StudentProperties withEmail(String email) {
- this.email = email;
- return this;
- }
- /**
- * Get the role property: Student Role.
- *
- * @return the role value.
- */
- public StudentRole role() {
- return this.role;
- }
- /**
- * Set the role property: Student Role.
- *
- * @param role the role value to set.
- * @return the StudentProperties object itself.
- */
- public StudentProperties withRole(StudentRole role) {
- this.role = role;
- return this;
- }
- /**
- * Get the budget property: Student Budget.
- *
- * @return the budget value.
- */
- public Amount budget() {
- return this.budget;
- }
- /**
- * Set the budget property: Student Budget.
- *
- * @param budget the budget value to set.
- * @return the StudentProperties object itself.
- */
- public StudentProperties withBudget(Amount budget) {
- this.budget = budget;
- return this;
- }
- /**
- * Get the subscriptionId property: Subscription Id.
- *
- * @return the subscriptionId value.
- */
- public String subscriptionId() {
- return this.subscriptionId;
- }
- /**
- * Get the expirationDate property: Date this student is set to expire from the lab.
- *
- * @return the expirationDate value.
- */
- public OffsetDateTime expirationDate() {
- return this.expirationDate;
- }
- /**
- * Set the expirationDate property: Date this student is set to expire from the lab.
- *
- * @param expirationDate the expirationDate value to set.
- * @return the StudentProperties object itself.
- */
- public StudentProperties withExpirationDate(OffsetDateTime expirationDate) {
- this.expirationDate = expirationDate;
- return this;
- }
- /**
- * Get the status property: Student Lab Status.
- *
- * @return the status value.
- */
- public StudentLabStatus status() {
- return this.status;
- }
- /**
- * Get the effectiveDate property: Date student was added to the lab.
- *
- * @return the effectiveDate value.
- */
- public OffsetDateTime effectiveDate() {
- return this.effectiveDate;
- }
- /**
- * Get the subscriptionAlias property: Subscription alias.
- *
- * @return the subscriptionAlias value.
- */
- public String subscriptionAlias() {
- return this.subscriptionAlias;
- }
- /**
- * Set the subscriptionAlias property: Subscription alias.
- *
- * @param subscriptionAlias the subscriptionAlias value to set.
- * @return the StudentProperties object itself.
- */
- public StudentProperties withSubscriptionAlias(String subscriptionAlias) {
- this.subscriptionAlias = subscriptionAlias;
- return this;
- }
- /**
- * Get the subscriptionInviteLastSentDate property: subscription invite last sent date.
- *
- * @return the subscriptionInviteLastSentDate value.
- */
- public OffsetDateTime subscriptionInviteLastSentDate() {
- return this.subscriptionInviteLastSentDate;
- }
- /**
- * Set the subscriptionInviteLastSentDate property: subscription invite last sent date.
- *
- * @param subscriptionInviteLastSentDate the subscriptionInviteLastSentDate value to set.
- * @return the StudentProperties object itself.
- */
- public StudentProperties withSubscriptionInviteLastSentDate(OffsetDateTime subscriptionInviteLastSentDate) {
- this.subscriptionInviteLastSentDate = subscriptionInviteLastSentDate;
- return this;
- }
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (firstName() == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property firstName in model StudentProperties"));
- }
- if (lastName() == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property lastName in model StudentProperties"));
- }
- if (email() == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property email in model StudentProperties"));
- }
- if (role() == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property role in model StudentProperties"));
- }
- if (budget() == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property budget in model StudentProperties"));
- } else {
- budget().validate();
- }
- if (expirationDate() == null) {
- throw LOGGER
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property expirationDate in model StudentProperties"));
- }
- }
- private static final ClientLogger LOGGER = new ClientLogger(StudentProperties.class);
- }