View Javadoc
1   // Copyright (c) Microsoft Corporation. All rights reserved.
2   // Licensed under the MIT License.
3   // Code generated by Microsoft (R) AutoRest Code Generator.
4   
5   package com.azure.storage.blob.models;
6   
7   import com.fasterxml.jackson.annotation.JsonProperty;
8   import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
9   import java.time.OffsetDateTime;
10  
11  /**
12   * An Access policy.
13   */
14  @JacksonXmlRootElement(localName = "AccessPolicy")
15  public final class AccessPolicy {
16      /*
17       * the date-time the policy is active
18       */
19      @JsonProperty(value = "Start", required = true)
20      private OffsetDateTime start;
21  
22      /*
23       * the date-time the policy expires
24       */
25      @JsonProperty(value = "Expiry", required = true)
26      private OffsetDateTime expiry;
27  
28      /*
29       * the permissions for the acl policy
30       */
31      @JsonProperty(value = "Permission", required = true)
32      private String permission;
33  
34      /**
35       * Get the start property: the date-time the policy is active.
36       *
37       * @return the start value.
38       */
39      public OffsetDateTime start() {
40          return this.start;
41      }
42  
43      /**
44       * Set the start property: the date-time the policy is active.
45       *
46       * @param start the start value to set.
47       * @return the AccessPolicy object itself.
48       */
49      public AccessPolicy start(OffsetDateTime start) {
50          this.start = start;
51          return this;
52      }
53  
54      /**
55       * Get the expiry property: the date-time the policy expires.
56       *
57       * @return the expiry value.
58       */
59      public OffsetDateTime expiry() {
60          return this.expiry;
61      }
62  
63      /**
64       * Set the expiry property: the date-time the policy expires.
65       *
66       * @param expiry the expiry value to set.
67       * @return the AccessPolicy object itself.
68       */
69      public AccessPolicy expiry(OffsetDateTime expiry) {
70          this.expiry = expiry;
71          return this;
72      }
73  
74      /**
75       * Get the permission property: the permissions for the acl policy.
76       *
77       * @return the permission value.
78       */
79      public String permission() {
80          return this.permission;
81      }
82  
83      /**
84       * Set the permission property: the permissions for the acl policy.
85       *
86       * @param permission the permission value to set.
87       * @return the AccessPolicy object itself.
88       */
89      public AccessPolicy permission(String permission) {
90          this.permission = permission;
91          return this;
92      }
93  }