PageRenderTime 1655ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 1ms

/sdk/apimanagement/mgmt-v2019_01_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_01_01/SubscriptionContract.java

http://github.com/WindowsAzure/azure-sdk-for-java
Java | 360 lines | 94 code | 40 blank | 226 comment | 0 complexity | 9898f52de60dc90bfe29ffb3d8cc8a5b MD5 | raw file
Possible License(s): MIT
  1. /**
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Licensed under the MIT License. See License.txt in the project root for
  4. * license information.
  5. *
  6. * Code generated by Microsoft (R) AutoRest Code Generator.
  7. */
  8. package com.microsoft.azure.management.apimanagement.v2019_01_01;
  9. import com.microsoft.azure.arm.model.HasInner;
  10. import com.microsoft.azure.management.apimanagement.v2019_01_01.implementation.SubscriptionContractInner;
  11. import com.microsoft.azure.arm.model.Indexable;
  12. import com.microsoft.azure.arm.model.Creatable;
  13. import com.microsoft.azure.arm.model.Updatable;
  14. import com.microsoft.azure.arm.model.Appliable;
  15. import com.microsoft.azure.arm.resources.models.HasManager;
  16. import com.microsoft.azure.management.apimanagement.v2019_01_01.implementation.ApiManagementManager;
  17. import org.joda.time.DateTime;
  18. /**
  19. * Type representing SubscriptionContract.
  20. */
  21. public interface SubscriptionContract extends HasInner<SubscriptionContractInner>, Indexable, Updatable<SubscriptionContract.Update>, HasManager<ApiManagementManager> {
  22. /**
  23. * @return the allowTracing value.
  24. */
  25. Boolean allowTracing();
  26. /**
  27. * @return the createdDate value.
  28. */
  29. DateTime createdDate();
  30. /**
  31. * @return the displayName value.
  32. */
  33. String displayName();
  34. /**
  35. * @return the endDate value.
  36. */
  37. DateTime endDate();
  38. /**
  39. * @return the expirationDate value.
  40. */
  41. DateTime expirationDate();
  42. /**
  43. * @return the id value.
  44. */
  45. String id();
  46. /**
  47. * @return the name value.
  48. */
  49. String name();
  50. /**
  51. * @return the notificationDate value.
  52. */
  53. DateTime notificationDate();
  54. /**
  55. * @return the ownerId value.
  56. */
  57. String ownerId();
  58. /**
  59. * @return the primaryKey value.
  60. */
  61. String primaryKey();
  62. /**
  63. * @return the scope value.
  64. */
  65. String scope();
  66. /**
  67. * @return the secondaryKey value.
  68. */
  69. String secondaryKey();
  70. /**
  71. * @return the startDate value.
  72. */
  73. DateTime startDate();
  74. /**
  75. * @return the state value.
  76. */
  77. SubscriptionState state();
  78. /**
  79. * @return the stateComment value.
  80. */
  81. String stateComment();
  82. /**
  83. * @return the type value.
  84. */
  85. String type();
  86. /**
  87. * The entirety of the SubscriptionContract definition.
  88. */
  89. interface Definition extends DefinitionStages.Blank, DefinitionStages.WithResourceGroupName, DefinitionStages.WithServiceName, DefinitionStages.WithNotify, DefinitionStages.WithIfMatch, DefinitionStages.WithDisplayName, DefinitionStages.WithScope, DefinitionStages.WithCreate {
  90. }
  91. /**
  92. * Grouping of SubscriptionContract definition stages.
  93. */
  94. interface DefinitionStages {
  95. /**
  96. * The first stage of a SubscriptionContract definition.
  97. */
  98. interface Blank extends WithResourceGroupName {
  99. }
  100. /**
  101. * The stage of the subscriptioncontract definition allowing to specify ResourceGroupName.
  102. */
  103. interface WithResourceGroupName {
  104. /**
  105. * Specifies resourceGroupName.
  106. * @param resourceGroupName The name of the resource group
  107. * @return the next definition stage
  108. */
  109. WithServiceName withResourceGroupName(String resourceGroupName);
  110. }
  111. /**
  112. * The stage of the subscriptioncontract definition allowing to specify ServiceName.
  113. */
  114. interface WithServiceName {
  115. /**
  116. * Specifies serviceName.
  117. * @param serviceName The name of the API Management service
  118. * @return the next definition stage
  119. */
  120. WithNotify withServiceName(String serviceName);
  121. }
  122. /**
  123. * The stage of the subscriptioncontract definition allowing to specify Notify.
  124. */
  125. interface WithNotify {
  126. /**
  127. * Specifies notify.
  128. * @param notify Notify change in Subscription State.
  129. - If false, do not send any email notification for change of state of subscription
  130. - If true, send email notification of change of state of subscription
  131. * @return the next definition stage
  132. */
  133. WithIfMatch withNotify(Boolean notify);
  134. }
  135. /**
  136. * The stage of the subscriptioncontract definition allowing to specify IfMatch.
  137. */
  138. interface WithIfMatch {
  139. /**
  140. * Specifies ifMatch.
  141. * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity
  142. * @return the next definition stage
  143. */
  144. WithDisplayName withIfMatch(String ifMatch);
  145. }
  146. /**
  147. * The stage of the subscriptioncontract definition allowing to specify DisplayName.
  148. */
  149. interface WithDisplayName {
  150. /**
  151. * Specifies displayName.
  152. * @param displayName Subscription name
  153. * @return the next definition stage
  154. */
  155. WithScope withDisplayName(String displayName);
  156. }
  157. /**
  158. * The stage of the subscriptioncontract definition allowing to specify Scope.
  159. */
  160. interface WithScope {
  161. /**
  162. * Specifies scope.
  163. * @param scope Scope like /products/{productId} or /apis or /apis/{apiId}
  164. * @return the next definition stage
  165. */
  166. WithCreate withScope(String scope);
  167. }
  168. /**
  169. * The stage of the subscriptioncontract definition allowing to specify AllowTracing.
  170. */
  171. interface WithAllowTracing {
  172. /**
  173. * Specifies allowTracing.
  174. * @param allowTracing Determines whether tracing can be enabled
  175. * @return the next definition stage
  176. */
  177. WithCreate withAllowTracing(Boolean allowTracing);
  178. }
  179. /**
  180. * The stage of the subscriptioncontract definition allowing to specify OwnerId.
  181. */
  182. interface WithOwnerId {
  183. /**
  184. * Specifies ownerId.
  185. * @param ownerId User (user id path) for whom subscription is being created in form /users/{userId}
  186. * @return the next definition stage
  187. */
  188. WithCreate withOwnerId(String ownerId);
  189. }
  190. /**
  191. * The stage of the subscriptioncontract definition allowing to specify PrimaryKey.
  192. */
  193. interface WithPrimaryKey {
  194. /**
  195. * Specifies primaryKey.
  196. * @param primaryKey Primary subscription key. If not specified during request key will be generated automatically
  197. * @return the next definition stage
  198. */
  199. WithCreate withPrimaryKey(String primaryKey);
  200. }
  201. /**
  202. * The stage of the subscriptioncontract definition allowing to specify SecondaryKey.
  203. */
  204. interface WithSecondaryKey {
  205. /**
  206. * Specifies secondaryKey.
  207. * @param secondaryKey Secondary subscription key. If not specified during request key will be generated automatically
  208. * @return the next definition stage
  209. */
  210. WithCreate withSecondaryKey(String secondaryKey);
  211. }
  212. /**
  213. * The stage of the subscriptioncontract definition allowing to specify State.
  214. */
  215. interface WithState {
  216. /**
  217. * Specifies state.
  218. * @param state Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled'
  219. * @return the next definition stage
  220. */
  221. WithCreate withState(SubscriptionState state);
  222. }
  223. /**
  224. * The stage of the definition which contains all the minimum required inputs for
  225. * the resource to be created (via {@link WithCreate#create()}), but also allows
  226. * for any other optional settings to be specified.
  227. */
  228. interface WithCreate extends Creatable<SubscriptionContract>, DefinitionStages.WithAllowTracing, DefinitionStages.WithOwnerId, DefinitionStages.WithPrimaryKey, DefinitionStages.WithSecondaryKey, DefinitionStages.WithState {
  229. }
  230. }
  231. /**
  232. * The template for a SubscriptionContract update operation, containing all the settings that can be modified.
  233. */
  234. interface Update extends Appliable<SubscriptionContract>, UpdateStages.WithNotify, UpdateStages.WithIfMatch, UpdateStages.WithAllowTracing, UpdateStages.WithOwnerId, UpdateStages.WithPrimaryKey, UpdateStages.WithSecondaryKey, UpdateStages.WithState {
  235. }
  236. /**
  237. * Grouping of SubscriptionContract update stages.
  238. */
  239. interface UpdateStages {
  240. /**
  241. * The stage of the subscriptioncontract update allowing to specify Notify.
  242. */
  243. interface WithNotify {
  244. /**
  245. * Specifies notify.
  246. * @param notify Notify change in Subscription State.
  247. - If false, do not send any email notification for change of state of subscription
  248. - If true, send email notification of change of state of subscription
  249. * @return the next update stage
  250. */
  251. Update withNotify(Boolean notify);
  252. }
  253. /**
  254. * The stage of the subscriptioncontract update allowing to specify IfMatch.
  255. */
  256. interface WithIfMatch {
  257. /**
  258. * Specifies ifMatch.
  259. * @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity
  260. * @return the next update stage
  261. */
  262. Update withIfMatch(String ifMatch);
  263. }
  264. /**
  265. * The stage of the subscriptioncontract update allowing to specify AllowTracing.
  266. */
  267. interface WithAllowTracing {
  268. /**
  269. * Specifies allowTracing.
  270. * @param allowTracing Determines whether tracing can be enabled
  271. * @return the next update stage
  272. */
  273. Update withAllowTracing(Boolean allowTracing);
  274. }
  275. /**
  276. * The stage of the subscriptioncontract update allowing to specify OwnerId.
  277. */
  278. interface WithOwnerId {
  279. /**
  280. * Specifies ownerId.
  281. * @param ownerId User (user id path) for whom subscription is being created in form /users/{userId}
  282. * @return the next update stage
  283. */
  284. Update withOwnerId(String ownerId);
  285. }
  286. /**
  287. * The stage of the subscriptioncontract update allowing to specify PrimaryKey.
  288. */
  289. interface WithPrimaryKey {
  290. /**
  291. * Specifies primaryKey.
  292. * @param primaryKey Primary subscription key. If not specified during request key will be generated automatically
  293. * @return the next update stage
  294. */
  295. Update withPrimaryKey(String primaryKey);
  296. }
  297. /**
  298. * The stage of the subscriptioncontract update allowing to specify SecondaryKey.
  299. */
  300. interface WithSecondaryKey {
  301. /**
  302. * Specifies secondaryKey.
  303. * @param secondaryKey Secondary subscription key. If not specified during request key will be generated automatically
  304. * @return the next update stage
  305. */
  306. Update withSecondaryKey(String secondaryKey);
  307. }
  308. /**
  309. * The stage of the subscriptioncontract update allowing to specify State.
  310. */
  311. interface WithState {
  312. /**
  313. * Specifies state.
  314. * @param state Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'suspended', 'active', 'expired', 'submitted', 'rejected', 'cancelled'
  315. * @return the next update stage
  316. */
  317. Update withState(SubscriptionState state);
  318. }
  319. }
  320. }