
com.aliyun.oss.model.HeadObjectRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-sdk-oss-shade Show documentation
Show all versions of aliyun-sdk-oss-shade Show documentation
The Aliyun OSS SDK for Java used for accessing Aliyun Object Storage Service, includes all service and dependent JARs.
The newest version!
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.aliyun.oss.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* Options for checking if the object key exists under the specified bucket.
*/
public class HeadObjectRequest extends WebServiceRequest {
private String bucketName;
private String key;
private List matchingETagConstraints = new ArrayList();
private List nonmatchingETagConstraints = new ArrayList();
private Date unmodifiedSinceConstraint;
private Date modifiedSinceConstraint;
// The object version id
private String versionId;
// The one who pays for the request
private Payer payer;
public HeadObjectRequest(String bucketName, String key, String versionId) {
this.bucketName = bucketName;
this.key = key;
this.versionId = versionId;
}
public HeadObjectRequest(String bucketName, String key) {
this.bucketName = bucketName;
this.key = key;
}
public String getBucketName() {
return bucketName;
}
public void setBucketName(String bucketName) {
this.bucketName = bucketName;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public List getMatchingETagConstraints() {
return matchingETagConstraints;
}
public void setMatchingETagConstraints(List matchingETagConstraints) {
this.matchingETagConstraints.clear();
if (matchingETagConstraints != null && !matchingETagConstraints.isEmpty()) {
this.matchingETagConstraints.addAll(matchingETagConstraints);
}
}
public List getNonmatchingETagConstraints() {
return nonmatchingETagConstraints;
}
public void setNonmatchingETagConstraints(List nonmatchingETagConstraints) {
this.nonmatchingETagConstraints.clear();
if (nonmatchingETagConstraints != null && !nonmatchingETagConstraints.isEmpty()) {
this.nonmatchingETagConstraints.addAll(nonmatchingETagConstraints);
}
}
public Date getUnmodifiedSinceConstraint() {
return unmodifiedSinceConstraint;
}
public void setUnmodifiedSinceConstraint(Date unmodifiedSinceConstraint) {
this.unmodifiedSinceConstraint = unmodifiedSinceConstraint;
}
public Date getModifiedSinceConstraint() {
return modifiedSinceConstraint;
}
public void setModifiedSinceConstraint(Date modifiedSinceConstraint) {
this.modifiedSinceConstraint = modifiedSinceConstraint;
}
/**
* Gets version id.
*
* @return version id.
*/
public String getVersionId() {
return versionId;
}
/**
* Sets version id.
*
* @param versionId version id
*/
public void setVersionId(String versionId) {
this.versionId = versionId;
}
/**
* *
* Sets the one who pays for the request
* The Third party should set request payer when requesting resources.
*
* @param payer
* The one who pays for the request
* */
public void setRequestPayer(Payer payer) {
this.payer = payer;
}
/**
* *
* Gets the one who pays for the request
*
* @return The one who pays for the request
* */
public Payer getRequestPayer() {
return payer;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy