12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using COSXML.Common;
- using COSXML.Utils;
- using COSXML.Model.Tag;
- namespace COSXML.Model.Object
- {
-
-
-
-
- public sealed class PutObjectACLRequest : ObjectRequest
- {
- public PutObjectACLRequest(string bucket, string key)
- : base(bucket, key)
- {
- this.method = CosRequestMethod.PUT;
- this.queryParameters.Add("acl", null);
- }
-
-
-
-
-
- public void SetCosACL(string cosACL)
- {
- if (cosACL != null)
- {
- SetRequestHeader(CosRequestHeaderKey.X_COS_ACL, cosACL);
- }
- }
-
-
-
-
-
- public void SetCosACL(CosACL cosACL)
- {
- SetCosACL(EnumUtils.GetValue(cosACL));
- }
-
-
-
-
-
- public void SetXCosGrantRead(GrantAccount grantAccount)
- {
- if (grantAccount != null)
- {
- SetRequestHeader(CosRequestHeaderKey.X_COS_GRANT_READ, grantAccount.GetGrantAccounts());
- }
- }
-
-
-
-
-
- public void SetXCosReadWrite(GrantAccount grantAccount)
- {
- if (grantAccount != null)
- {
- SetRequestHeader(CosRequestHeaderKey.X_COS_GRANT_FULL_CONTROL, grantAccount.GetGrantAccounts());
- }
- }
- }
- }
|