PageRenderTime 29ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserInner.java

http://github.com/WindowsAzure/azure-sdk-for-java
Java | 171 lines | 73 code | 18 blank | 80 comment | 15 complexity | dcd6dc67e44f890fa27b6990f717043c MD5 | raw file
Possible License(s): MIT
  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.labservices.fluent.models;
  5. import com.azure.core.annotation.Fluent;
  6. import com.azure.core.management.ProxyResource;
  7. import com.azure.core.management.SystemData;
  8. import com.azure.core.util.logging.ClientLogger;
  9. import com.azure.resourcemanager.labservices.models.InvitationState;
  10. import com.azure.resourcemanager.labservices.models.ProvisioningState;
  11. import com.azure.resourcemanager.labservices.models.RegistrationState;
  12. import com.fasterxml.jackson.annotation.JsonIgnore;
  13. import com.fasterxml.jackson.annotation.JsonProperty;
  14. import java.time.Duration;
  15. import java.time.OffsetDateTime;
  16. /** User of a lab that can register for and use virtual machines within the lab. */
  17. @Fluent
  18. public final class UserInner extends ProxyResource {
  19. @JsonIgnore private final ClientLogger logger = new ClientLogger(UserInner.class);
  20. /*
  21. * Metadata pertaining to creation and last modification of the user
  22. * resource.
  23. */
  24. @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
  25. private SystemData systemData;
  26. /*
  27. * User resource properties
  28. */
  29. @JsonProperty(value = "properties", required = true)
  30. private UserProperties innerProperties = new UserProperties();
  31. /**
  32. * Get the systemData property: Metadata pertaining to creation and last modification of the user resource.
  33. *
  34. * @return the systemData value.
  35. */
  36. public SystemData systemData() {
  37. return this.systemData;
  38. }
  39. /**
  40. * Get the innerProperties property: User resource properties.
  41. *
  42. * @return the innerProperties value.
  43. */
  44. private UserProperties innerProperties() {
  45. return this.innerProperties;
  46. }
  47. /**
  48. * Get the provisioningState property: Current provisioning state of the user resource.
  49. *
  50. * @return the provisioningState value.
  51. */
  52. public ProvisioningState provisioningState() {
  53. return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
  54. }
  55. /**
  56. * Get the displayName property: Display name of the user, for example user's full name.
  57. *
  58. * @return the displayName value.
  59. */
  60. public String displayName() {
  61. return this.innerProperties() == null ? null : this.innerProperties().displayName();
  62. }
  63. /**
  64. * Get the email property: Email address of the user.
  65. *
  66. * @return the email value.
  67. */
  68. public String email() {
  69. return this.innerProperties() == null ? null : this.innerProperties().email();
  70. }
  71. /**
  72. * Set the email property: Email address of the user.
  73. *
  74. * @param email the email value to set.
  75. * @return the UserInner object itself.
  76. */
  77. public UserInner withEmail(String email) {
  78. if (this.innerProperties() == null) {
  79. this.innerProperties = new UserProperties();
  80. }
  81. this.innerProperties().withEmail(email);
  82. return this;
  83. }
  84. /**
  85. * Get the registrationState property: State of the user's registration within the lab.
  86. *
  87. * @return the registrationState value.
  88. */
  89. public RegistrationState registrationState() {
  90. return this.innerProperties() == null ? null : this.innerProperties().registrationState();
  91. }
  92. /**
  93. * Get the invitationState property: State of the invitation message for the user.
  94. *
  95. * @return the invitationState value.
  96. */
  97. public InvitationState invitationState() {
  98. return this.innerProperties() == null ? null : this.innerProperties().invitationState();
  99. }
  100. /**
  101. * Get the invitationSent property: Date and time when the invitation message was sent to the user.
  102. *
  103. * @return the invitationSent value.
  104. */
  105. public OffsetDateTime invitationSent() {
  106. return this.innerProperties() == null ? null : this.innerProperties().invitationSent();
  107. }
  108. /**
  109. * Get the totalUsage property: How long the user has used their virtual machines in this lab.
  110. *
  111. * @return the totalUsage value.
  112. */
  113. public Duration totalUsage() {
  114. return this.innerProperties() == null ? null : this.innerProperties().totalUsage();
  115. }
  116. /**
  117. * Get the additionalUsageQuota property: The amount of usage quota time the user gets in addition to the lab usage
  118. * quota.
  119. *
  120. * @return the additionalUsageQuota value.
  121. */
  122. public Duration additionalUsageQuota() {
  123. return this.innerProperties() == null ? null : this.innerProperties().additionalUsageQuota();
  124. }
  125. /**
  126. * Set the additionalUsageQuota property: The amount of usage quota time the user gets in addition to the lab usage
  127. * quota.
  128. *
  129. * @param additionalUsageQuota the additionalUsageQuota value to set.
  130. * @return the UserInner object itself.
  131. */
  132. public UserInner withAdditionalUsageQuota(Duration additionalUsageQuota) {
  133. if (this.innerProperties() == null) {
  134. this.innerProperties = new UserProperties();
  135. }
  136. this.innerProperties().withAdditionalUsageQuota(additionalUsageQuota);
  137. return this;
  138. }
  139. /**
  140. * Validates the instance.
  141. *
  142. * @throws IllegalArgumentException thrown if the instance is not valid.
  143. */
  144. public void validate() {
  145. if (innerProperties() == null) {
  146. throw logger
  147. .logExceptionAsError(
  148. new IllegalArgumentException("Missing required property innerProperties in model UserInner"));
  149. } else {
  150. innerProperties().validate();
  151. }
  152. }
  153. }