Package com.azure.core.http
Class RequestConditions
- java.lang.Object
-
- com.azure.core.http.MatchConditions
-
- com.azure.core.http.RequestConditions
-
public class RequestConditions extends MatchConditions
Specifies HTTP options for conditional requests based on modification time.
-
-
Constructor Summary
Constructors Constructor Description RequestConditions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OffsetDateTime
getIfModifiedSince()
Gets thedatetime
that resources must have been modified since.OffsetDateTime
getIfUnmodifiedSince()
Gets thedatetime
that resources must have remained unmodified since.RequestConditions
setIfMatch(String ifMatch)
Optionally limit requests to resources that match the passed ETag.RequestConditions
setIfModifiedSince(OffsetDateTime ifModifiedSince)
Optionally limit requests to resources that have only been modified since the passeddatetime
.RequestConditions
setIfNoneMatch(String ifNoneMatch)
Optionally limit requests to resources that do not match the passed ETag.RequestConditions
setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSince)
Optionally limit requests to resources that have remained unmodified since the passeddatetime
.-
Methods inherited from class com.azure.core.http.MatchConditions
getIfMatch, getIfNoneMatch
-
-
-
-
Method Detail
-
setIfMatch
public RequestConditions setIfMatch(String ifMatch)
Optionally limit requests to resources that match the passed ETag.- Overrides:
setIfMatch
in classMatchConditions
- Parameters:
ifMatch
- ETag that resources must match.- Returns:
- The updated ResourceConditions object.
-
setIfNoneMatch
public RequestConditions setIfNoneMatch(String ifNoneMatch)
Optionally limit requests to resources that do not match the passed ETag.- Overrides:
setIfNoneMatch
in classMatchConditions
- Parameters:
ifNoneMatch
- ETag that resources must not match.- Returns:
- The updated ResourceConditions object.
-
getIfModifiedSince
public OffsetDateTime getIfModifiedSince()
Gets thedatetime
that resources must have been modified since.- Returns:
- The datetime that resources must have been modified since.
-
setIfModifiedSince
public RequestConditions setIfModifiedSince(OffsetDateTime ifModifiedSince)
Optionally limit requests to resources that have only been modified since the passeddatetime
.- Parameters:
ifModifiedSince
- The datetime that resources must have been modified since.- Returns:
- The updated ResourceConditions object.
-
getIfUnmodifiedSince
public OffsetDateTime getIfUnmodifiedSince()
Gets thedatetime
that resources must have remained unmodified since.- Returns:
- The datetime that resources must have remained unmodified since.
-
setIfUnmodifiedSince
public RequestConditions setIfUnmodifiedSince(OffsetDateTime ifUnmodifiedSince)
Optionally limit requests to resources that have remained unmodified since the passeddatetime
.- Parameters:
ifUnmodifiedSince
- The datetime that resources must have remained unmodified since.- Returns:
- The updated ResourceConditions object.
-
-