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.azure.core.implementation.DateTimeRfc1123; 8 import com.fasterxml.jackson.annotation.JsonProperty; 9 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; 10 import java.time.OffsetDateTime; 11 12 /** 13 * Additional parameters for a set of operations. 14 */ 15 @JacksonXmlRootElement(localName = "modified-access-conditions") 16 public final class ModifiedAccessConditions { 17 /* 18 * Specify this header value to operate only on a blob if it has been 19 * modified since the specified date/time. 20 */ 21 @JsonProperty(value = "ifModifiedSince") 22 private DateTimeRfc1123 ifModifiedSince; 23 24 /* 25 * Specify this header value to operate only on a blob if it has not been 26 * modified since the specified date/time. 27 */ 28 @JsonProperty(value = "ifUnmodifiedSince") 29 private DateTimeRfc1123 ifUnmodifiedSince; 30 31 /* 32 * Specify an ETag value to operate only on blobs with a matching value. 33 */ 34 @JsonProperty(value = "ifMatch") 35 private String ifMatch; 36 37 /* 38 * Specify an ETag value to operate only on blobs without a matching value. 39 */ 40 @JsonProperty(value = "ifNoneMatch") 41 private String ifNoneMatch; 42 43 /** 44 * Get the ifModifiedSince property: Specify this header value to operate 45 * only on a blob if it has been modified since the specified date/time. 46 * 47 * @return the ifModifiedSince value. 48 */ 49 public OffsetDateTime ifModifiedSince() { 50 if (this.ifModifiedSince == null) { 51 return null; 52 } 53 return this.ifModifiedSince.dateTime(); 54 } 55 56 /** 57 * Set the ifModifiedSince property: Specify this header value to operate 58 * only on a blob if it has been modified since the specified date/time. 59 * 60 * @param ifModifiedSince the ifModifiedSince value to set. 61 * @return the ModifiedAccessConditions object itself. 62 */ 63 public ModifiedAccessConditions ifModifiedSince(OffsetDateTime ifModifiedSince) { 64 if (ifModifiedSince == null) { 65 this.ifModifiedSince = null; 66 } else { 67 this.ifModifiedSince = new DateTimeRfc1123(ifModifiedSince); 68 } 69 return this; 70 } 71 72 /** 73 * Get the ifUnmodifiedSince property: Specify this header value to operate 74 * only on a blob if it has not been modified since the specified 75 * date/time. 76 * 77 * @return the ifUnmodifiedSince value. 78 */ 79 public OffsetDateTime ifUnmodifiedSince() { 80 if (this.ifUnmodifiedSince == null) { 81 return null; 82 } 83 return this.ifUnmodifiedSince.dateTime(); 84 } 85 86 /** 87 * Set the ifUnmodifiedSince property: Specify this header value to operate 88 * only on a blob if it has not been modified since the specified 89 * date/time. 90 * 91 * @param ifUnmodifiedSince the ifUnmodifiedSince value to set. 92 * @return the ModifiedAccessConditions object itself. 93 */ 94 public ModifiedAccessConditions ifUnmodifiedSince(OffsetDateTime ifUnmodifiedSince) { 95 if (ifUnmodifiedSince == null) { 96 this.ifUnmodifiedSince = null; 97 } else { 98 this.ifUnmodifiedSince = new DateTimeRfc1123(ifUnmodifiedSince); 99 } 100 return this; 101 } 102 103 /** 104 * Get the ifMatch property: Specify an ETag value to operate only on blobs 105 * with a matching value. 106 * 107 * @return the ifMatch value. 108 */ 109 public String ifMatch() { 110 return this.ifMatch; 111 } 112 113 /** 114 * Set the ifMatch property: Specify an ETag value to operate only on blobs 115 * with a matching value. 116 * 117 * @param ifMatch the ifMatch value to set. 118 * @return the ModifiedAccessConditions object itself. 119 */ 120 public ModifiedAccessConditions ifMatch(String ifMatch) { 121 this.ifMatch = ifMatch; 122 return this; 123 } 124 125 /** 126 * Get the ifNoneMatch property: Specify an ETag value to operate only on 127 * blobs without a matching value. 128 * 129 * @return the ifNoneMatch value. 130 */ 131 public String ifNoneMatch() { 132 return this.ifNoneMatch; 133 } 134 135 /** 136 * Set the ifNoneMatch property: Specify an ETag value to operate only on 137 * blobs without a matching value. 138 * 139 * @param ifNoneMatch the ifNoneMatch value to set. 140 * @return the ModifiedAccessConditions object itself. 141 */ 142 public ModifiedAccessConditions ifNoneMatch(String ifNoneMatch) { 143 this.ifNoneMatch = ifNoneMatch; 144 return this; 145 } 146 }