├── .gitignore ├── app.config ├── packages.config ├── esdk_obs_.net.csproj.user ├── esdk_obs_.net_core.csproj.user ├── Log4Net.config ├── Internal ├── ObsCallback.cs ├── Negotiation │ ├── GetApiVersionResponse.cs │ ├── GetApiVersionRequest.cs │ └── LocksHolder.cs ├── Auth │ ├── V2Signer.cs │ └── ObsSigner.cs └── SecurityProvider.cs ├── Model ├── Grantee.cs ├── CreateBucketResponse.cs ├── DeleteBucketResponse.cs ├── SetBucketCorsResponse.cs ├── SetObjectAclResponse.cs ├── DeleteBucketTaggingResponse.cs ├── RestoreObjectResponse.cs ├── SetBucketAclResponse.cs ├── SetBucketPolicyResponse.cs ├── SetBucketTaggingResponse.cs ├── SetBucketQuotaResponse.cs ├── SseHeader.cs ├── DeleteBucketPolicyResponse.cs ├── SetBucketLoggingResponse.cs ├── SetBucketVersioningResponse.cs ├── DeleteBucketCorsResponse.cs ├── SetBucketLifecycleResponse.cs ├── SetBucketNotificationResponse.cs ├── SetBucketWebsiteResponse.cs ├── AbortMultipartUploadResponse.cs ├── DeleteBucketLifecycleResponse.cs ├── DeleteBucketWebsiteResponse.cs ├── SetBucketReplicationResponse.cs ├── SetBucketStoragePolicyResponse.cs ├── DeleteBucketReplicationResponse.cs ├── GetBucketAclRequest.cs ├── DeleteBucketRequest.cs ├── HeadBucketRequest.cs ├── GetBucketLocationRequest.cs ├── GetBucketQuotaRequest.cs ├── DeleteBucketTaggingRequest.cs ├── GetBucketPolicyRequest.cs ├── GetBucketTaggingRequest.cs ├── GetBucketCorsRequest.cs ├── DeleteBucketCorsRequest.cs ├── DeleteBucketLifecycleRequest.cs ├── DeleteBucketPolicyRequest.cs ├── GetBucketLifecycleRequest.cs ├── GetBucketLoggingRequest.cs ├── GetBucketWebsiteRequest.cs ├── DeleteBucketWebsiteRequest.cs ├── GetBucketPolicyResponse.cs ├── GetBucketStorageInfoRequest.cs ├── GetBucketVersioningRequest.cs ├── GetBucketStoragePolicyRequest.cs ├── GetBucketNotificationRequest.cs ├── GetBucketAclResponse.cs ├── GetObjectAclResponse.cs ├── GetBucketReplicationRequest.cs ├── DeleteBucketReplicationRequest.cs ├── GetBucketQuotaResponse.cs ├── GetBucketLocationResponse.cs ├── GetBucketCorsResponse.cs ├── GetBucketStoragePolicyResponse.cs ├── GetBucketLoggingResponse.cs ├── GetBucketLifecycleResponse.cs ├── Owner.cs ├── GetBucketVersioningResponse.cs ├── GetBucketWebsiteResponse.cs ├── CreatePostSignatureResponse.cs ├── GetBucketNotificationResponse.cs ├── GetBucketReplicationResponse.cs ├── VersioningConfiguration.cs ├── KeyVersion.cs ├── PartDetail.cs ├── Initiator.cs ├── UploadPartResponse.cs ├── GetBucketTaggingResponse.cs ├── ExpirationDetail.cs ├── DeleteObjectsRequest.ext.cs ├── SetBucketLoggingRequest.cs ├── NoncurrentVersionExpiration.cs ├── GetBucketStorageInfoResponse.cs ├── DeleteObjectResponse.cs ├── RestoreStatus.cs ├── SetBucketCorsRequest.cs ├── CorsConfiguration.cs ├── InitiateMultipartUploadRequest.cs ├── SetBucketLifecycleRequest.cs ├── SetBucketStoragePolicyRequest.cs ├── LifecycleConfiguration.cs ├── SetBucketVersioningRequest.cs ├── AccessControlList.cs ├── AppendObjectRequest.cs ├── HeadObjectRequest.cs ├── SetBucketNotificationRequest.cs ├── SetBucketWebsiteRequest.cs ├── SetBucketReplicationRequest.cs ├── ListBucketsRequest.cs ├── SseKmsHeader.cs ├── ListBucketsResponse.cs ├── ObsObjectVersion.cs ├── RoutingRule.cs ├── InitiateMultipartUploadResponse.cs ├── Grant.cs ├── CopyPartResponse.cs ├── GetObjectAclRequest.cs ├── FilterRule.cs ├── FunctionGraphConfiguration.cs ├── SetBucketQuotaRequest.cs ├── RedirectBasic.cs ├── Condition.cs ├── SetBucketPolicyRequest.cs ├── SetBucketTaggingRequest.cs ├── ObsBucket.cs ├── CreateV4PostSignatureResponse.cs ├── Expiration.cs ├── GetBucketMetadataResponse.cs ├── AbortMultipartUploadRequest.cs ├── DeleteError.cs ├── DeleteObjectRequest.cs ├── CreateTemporarySignatureResponse.cs ├── NoncurrentVersionTransition.cs ├── SetBucketAclRequest.cs ├── DeletedObject.cs ├── PutObjectResponse.cs ├── Tag.cs ├── DeleteObjectsResponse.cs ├── ReplicationConfiguration.cs ├── ByteRange.cs ├── LoggingConfiguration.cs ├── NotificationConfiguration.cs ├── AppendObjectResponse.cs └── Redirect.cs ├── esdk_obs_.net.sln ├── esdk_obs_.net_core.sln ├── README_CN.MD ├── Enumerations.cs ├── ObsWebServiceRequest.cs ├── ObsBucketWebServiceRequest.cs ├── Properties └── AssemblyInfo.cs ├── esdk_obs_.net_core_for_test.csproj ├── esdk_obs_.net_core.csproj └── Help on License /.gitignore: -------------------------------------------------------------------------------- 1 | /API_DOC/ 2 | /Help/ 3 | /bin/ 4 | /obj/ 5 | /packages/ 6 | /doc/ 7 | /.vs/ -------------------------------------------------------------------------------- /app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /esdk_obs_.net.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ProjectFiles 5 | 6 | -------------------------------------------------------------------------------- /esdk_obs_.net_core.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | -------------------------------------------------------------------------------- /Log4Net.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Internal/ObsCallback.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS.Internal 19 | { 20 | internal delegate void ObsCallback(); 21 | } 22 | -------------------------------------------------------------------------------- /Model/Grantee.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Grantee information in the ACL 19 | /// 20 | public interface Grantee 21 | { 22 | 23 | } 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /Internal/Negotiation/GetApiVersionResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS.Internal.Negotiation 19 | { 20 | class GetApiVersionResponse : ObsWebServiceResponse 21 | { 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Model/CreateBucketResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | namespace OBS.Model 15 | { 16 | /// 17 | /// Response to a bucket creation request 18 | /// 19 | public class CreateBucketResponse : ObsWebServiceResponse 20 | { 21 | 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/DeleteBucketResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a bucket deletion request 19 | /// 20 | public class DeleteBucketResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketCorsResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for configuring bucket CORS 19 | /// 20 | public class SetBucketCorsResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetObjectAclResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting an object ACL 19 | /// 20 | public class SetObjectAclResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/DeleteBucketTaggingResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a bucket tag deletion request 19 | /// 20 | public class DeleteBucketTaggingResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/RestoreObjectResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for restoring an Archive object 19 | /// 20 | public class RestoreObjectResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketAclResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting bucket ACLs 19 | /// 20 | public partial class SetBucketAclResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketPolicyResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting bucket policies 19 | /// 20 | public class SetBucketPolicyResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketTaggingResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting bucket tags 19 | /// 20 | public class SetBucketTaggingResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketQuotaResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting bucket quotas 19 | /// 20 | public class SetBucketQuotaResponse : ObsWebServiceResponse 21 | { 22 | 23 | } 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Model/SseHeader.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS.Model 19 | { 20 | /// 21 | /// SSE encryption headers 22 | /// 23 | public interface SseHeader 24 | { 25 | 26 | } 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /Model/DeleteBucketPolicyResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for deleting bucket policies 19 | /// 20 | public class DeleteBucketPolicyResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketLoggingResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting bucket logging 19 | /// 20 | public partial class SetBucketLoggingResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketVersioningResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting bucket versioning 19 | /// 20 | public class SetBucketVersioningResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/DeleteBucketCorsResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for deleting bucket CORS configuration 19 | /// 20 | public class DeleteBucketCorsResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketLifecycleResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting bucket lifecycle rules 19 | /// 20 | public class SetBucketLifecycleResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketNotificationResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting bucket notification 19 | /// 20 | public class SetBucketNotificationResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketWebsiteResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting bucket website hosting rules 19 | /// 20 | public class SetBucketWebsiteResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/AbortMultipartUploadResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for aborting a multipart upload 19 | /// 20 | public class AbortMultipartUploadResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Model/DeleteBucketLifecycleResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for deleting bucket lifecycle rules 19 | /// 20 | public class DeleteBucketLifecycleResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/DeleteBucketWebsiteResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for deleting bucket website hosting rules 19 | /// 20 | public class DeleteBucketWebsiteResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketReplicationResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting cross-region replication of a bucket 19 | /// 20 | public class SetBucketReplicationResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Model/SetBucketStoragePolicyResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for setting a bucket storage class 19 | /// 20 | public class SetBucketStoragePolicyResponse : ObsWebServiceResponse 21 | { 22 | 23 | } 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Model/DeleteBucketReplicationResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for deleting the cross-region copy configuration of a bucket 19 | /// 20 | public class DeleteBucketReplicationResponse : ObsWebServiceResponse 21 | { 22 | } 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /esdk_obs_.net.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2018 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "esdk_obs_.net", "esdk_obs_.net.csproj", "{96DAED81-80C1-4DF1-8731-6A93CD01F93E}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {96DAED81-80C1-4DF1-8731-6A93CD01F93E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {96DAED81-80C1-4DF1-8731-6A93CD01F93E}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {96DAED81-80C1-4DF1-8731-6A93CD01F93E}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {96DAED81-80C1-4DF1-8731-6A93CD01F93E}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5938B185-BAFB-4B02-B489-B1D1749255EF} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Model/GetBucketAclRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket ACLs 19 | /// 20 | public class GetBucketAclRequest : ObsBucketWebServiceRequest 21 | { 22 | internal override string GetAction() 23 | { 24 | return "GetBucketAcl"; 25 | } 26 | } 27 | } 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Model/DeleteBucketRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a bucket deletion request 19 | /// 20 | public class DeleteBucketRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "DeleteBucket"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/HeadBucketRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for querying whether a bucket exists 19 | /// 20 | public class HeadBucketRequest : ObsBucketWebServiceRequest 21 | { 22 | internal override string GetAction() 23 | { 24 | return "HeadBucket"; 25 | } 26 | } 27 | } 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Model/GetBucketLocationRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining the bucket location 19 | /// 20 | public class GetBucketLocationRequest : ObsBucketWebServiceRequest 21 | { 22 | internal override string GetAction() 23 | { 24 | return "GetBucketLocation"; 25 | } 26 | } 27 | } 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Model/GetBucketQuotaRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket quotas 19 | /// 20 | public class GetBucketQuotaRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketQuota"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/DeleteBucketTaggingRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a bucket tag deletion request 19 | /// 20 | public class DeleteBucketTaggingRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "DeleteBucketTagging"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketPolicyRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket policies 19 | /// 20 | public class GetBucketPolicyRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketPolicy"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketTaggingRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket tags 19 | /// 20 | public class GetBucketTaggingRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketTagging"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketCorsRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket CORS configuration 19 | /// 20 | public class GetBucketCorsRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketCors"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/DeleteBucketCorsRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for deleting bucket CORS configuration 19 | /// 20 | public class DeleteBucketCorsRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "DeleteBucketCors"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/DeleteBucketLifecycleRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for deleting bucket lifecycle rules 19 | /// 20 | public class DeleteBucketLifecycleRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "DeleteLifecycle"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/DeleteBucketPolicyRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for deleting bucket policies 19 | /// 20 | public partial class DeleteBucketPolicyRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "DeleteBucketPolicy"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketLifecycleRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket lifecycle rules 19 | /// 20 | public class GetBucketLifecycleRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketLifecycle"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketLoggingRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket logging configuration 19 | /// 20 | public class GetBucketLoggingRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketLogging"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketWebsiteRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket website hosting rules 19 | /// 20 | public class GetBucketWebsiteRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketWebsite"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/DeleteBucketWebsiteRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for deleting bucket website hosting rules 19 | /// 20 | public class DeleteBucketWebsiteRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "DeleteBucketWebsite"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketPolicyResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining bucket policies 19 | /// 20 | public class GetBucketPolicyResponse : ObsWebServiceResponse 21 | { 22 | /// 23 | /// Policy content in the JSON format 24 | /// 25 | public string Policy { get; internal set; } 26 | 27 | } 28 | } 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Model/GetBucketStorageInfoRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket storage information 19 | /// 20 | public class GetBucketStorageInfoRequest: ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketStorageInfo"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketVersioningRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket versioning configuration 19 | /// 20 | public class GetBucketVersioningRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketVersioning"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketStoragePolicyRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket storage policies 19 | /// 20 | public class GetBucketStoragePolicyRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketStoragePolicy"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketNotificationRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket notification configuration 19 | /// 20 | public class GetBucketNotificationRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketNotification"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/GetBucketAclResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining bucket ACLs 19 | /// 20 | public class GetBucketAclResponse : ObsWebServiceResponse 21 | { 22 | /// 23 | /// List of grantees' permission information 24 | /// 25 | public AccessControlList AccessControlList { get; internal set; } 26 | } 27 | } 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Model/GetObjectAclResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining object ACLs 19 | /// 20 | public class GetObjectAclResponse : ObsWebServiceResponse 21 | { 22 | /// 23 | /// List of grantees' permission information 24 | /// 25 | public AccessControlList AccessControlList { get; internal set; } 26 | } 27 | } 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Model/GetBucketReplicationRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining the cross-region copy configuration of a bucket 19 | /// 20 | public class GetBucketReplicationRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetBucketReplication"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Model/DeleteBucketReplicationRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters of a request for deleting the cross-region copy configuration of a bucket 19 | /// 20 | public class DeleteBucketReplicationRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "DeleteBucketReplication"; 26 | } 27 | 28 | } 29 | } 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Internal/Negotiation/GetApiVersionRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS.Internal.Negotiation 19 | { 20 | internal class GetApiVersionRequest : ObsWebServiceRequest 21 | { 22 | internal override string GetAction() 23 | { 24 | return "GetApiVersion"; 25 | } 26 | 27 | public string BucketName 28 | { 29 | get; 30 | set; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Model/GetBucketQuotaResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining bucket quotas 19 | /// 20 | public class GetBucketQuotaResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Bucket quota 25 | /// 26 | public long StorageQuota 27 | { 28 | get; 29 | internal set; 30 | } 31 | 32 | } 33 | } 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Model/GetBucketLocationResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining the bucket location 19 | /// 20 | public class GetBucketLocationResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Bucket location 25 | /// 26 | public string Location 27 | { 28 | get; 29 | internal set; 30 | } 31 | } 32 | } 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Internal/Auth/V2Signer.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | namespace OBS.Internal.Auth 15 | { 16 | internal class V2Signer : AbstractSigner 17 | { 18 | 19 | private static V2Signer instance = new V2Signer(); 20 | 21 | private V2Signer() 22 | { 23 | 24 | } 25 | 26 | public static Signer GetInstance() 27 | { 28 | return instance; 29 | } 30 | 31 | protected override string GetAuthPrefix() 32 | { 33 | return "AWS"; 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Internal/SecurityProvider.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS.Internal 19 | { 20 | internal class SecurityProvider 21 | { 22 | public string Ak 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | public string Sk 29 | { 30 | get; 31 | set; 32 | } 33 | 34 | public string Token 35 | { 36 | get; 37 | set; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Model/GetBucketCorsResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining bucket CORS configuration 19 | /// 20 | public class GetBucketCorsResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Bucket CORS configuration 25 | /// 26 | public CorsConfiguration Configuration 27 | { 28 | get; 29 | internal set; 30 | } 31 | 32 | } 33 | } 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Model/GetBucketStoragePolicyResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining bucket storage policies 19 | /// 20 | public class GetBucketStoragePolicyResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Bucket storage class 25 | /// 26 | public StorageClassEnum? StorageClass 27 | { 28 | get; 29 | internal set; 30 | } 31 | } 32 | } 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Model/GetBucketLoggingResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining bucket logging configuration 19 | /// 20 | public class GetBucketLoggingResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Bucket logging configuration 25 | /// 26 | public LoggingConfiguration Configuration 27 | { 28 | get; 29 | internal set; 30 | } 31 | } 32 | } 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Model/GetBucketLifecycleResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining bucket lifecycle rules 19 | /// 20 | public class GetBucketLifecycleResponse : ObsWebServiceResponse 21 | { 22 | 23 | 24 | /// 25 | /// Bucket lifecycle rules 26 | /// 27 | public LifecycleConfiguration Configuration 28 | { 29 | get; 30 | internal set; 31 | } 32 | } 33 | } 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Model/Owner.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | using System; 16 | 17 | namespace OBS.Model 18 | { 19 | /// 20 | /// Bucket or object owner information 21 | /// 22 | public class Owner 23 | { 24 | /// 25 | /// Owner name 26 | /// 27 | [Obsolete] 28 | public string DisplayName { set; get; } 29 | 30 | /// 31 | /// ID of the domain to which the owner belongs 32 | /// 33 | public string Id { get; set; } 34 | } 35 | } 36 | 37 | 38 | -------------------------------------------------------------------------------- /Model/GetBucketVersioningResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining bucket versioning configuration 19 | /// 20 | public class GetBucketVersioningResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Bucket versioning configuration 25 | /// 26 | public VersioningConfiguration Configuration 27 | { 28 | get; 29 | internal set; 30 | } 31 | } 32 | } 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Model/GetBucketWebsiteResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining bucket website hosting rules 19 | /// 20 | public class GetBucketWebsiteResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Website hosting configuration of a bucket 25 | /// 26 | public WebsiteConfiguration Configuration 27 | { 28 | get; 29 | internal set; 30 | } 31 | 32 | } 33 | } 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Model/CreatePostSignatureResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | 17 | namespace OBS.Model 18 | { 19 | /// 20 | /// Response to a browser-based authentication request 21 | /// 22 | public class CreatePostSignatureResponse 23 | { 24 | 25 | /// 26 | /// Signature string, which is set in the form 27 | /// 28 | public string Signature 29 | { 30 | get; 31 | internal set; 32 | } 33 | 34 | } 35 | } 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Model/GetBucketNotificationResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | 18 | /// 19 | /// Response to a request for obtaining bucket notification configuration 20 | /// 21 | public class GetBucketNotificationReponse : ObsWebServiceResponse 22 | { 23 | 24 | /// 25 | /// Bucket notification configuration 26 | /// 27 | public NotificationConfiguration Configuration 28 | { 29 | get; 30 | internal set; 31 | } 32 | 33 | } 34 | } 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Model/GetBucketReplicationResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining the cross-region copy configuration of a bucket 19 | /// 20 | public class GetBucketReplicationResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Cross-region copy configuration of a bucket 25 | /// 26 | public ReplicationConfiguration Configuration 27 | { 28 | get; 29 | internal set; 30 | } 31 | } 32 | } 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /esdk_obs_.net_core.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2018 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "esdk_obs_.net_core", "esdk_obs_.net_core.csproj", "{14AB9B89-1559-48FB-82C0-F7319DF828E0}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | test|Any CPU = test|Any CPU 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {14AB9B89-1559-48FB-82C0-F7319DF828E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 16 | {14AB9B89-1559-48FB-82C0-F7319DF828E0}.Debug|Any CPU.Build.0 = Debug|Any CPU 17 | {14AB9B89-1559-48FB-82C0-F7319DF828E0}.Release|Any CPU.ActiveCfg = Release|Any CPU 18 | {14AB9B89-1559-48FB-82C0-F7319DF828E0}.Release|Any CPU.Build.0 = Release|Any CPU 19 | {14AB9B89-1559-48FB-82C0-F7319DF828E0}.test|Any CPU.ActiveCfg = test|Any CPU 20 | {14AB9B89-1559-48FB-82C0-F7319DF828E0}.test|Any CPU.Build.0 = test|Any CPU 21 | EndGlobalSection 22 | GlobalSection(SolutionProperties) = preSolution 23 | HideSolutionNode = FALSE 24 | EndGlobalSection 25 | GlobalSection(ExtensibilityGlobals) = postSolution 26 | SolutionGuid = {9E2CEAF1-8F0B-41BA-A49C-0B4E28401803} 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Internal/Auth/ObsSigner.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS.Internal.Auth 19 | { 20 | internal class ObsSigner : AbstractSigner 21 | { 22 | 23 | private static ObsSigner instance = new ObsSigner(); 24 | 25 | private ObsSigner() 26 | { 27 | 28 | } 29 | 30 | public static Signer GetInstance() 31 | { 32 | return instance; 33 | } 34 | 35 | protected override string GetAuthPrefix() 36 | { 37 | return "OBS"; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Model/VersioningConfiguration.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Bucket versioning configuration 19 | /// 20 | 21 | public class VersioningConfiguration 22 | { 23 | 24 | 25 | /// 26 | /// Bucket versioning status 27 | /// 28 | /// 29 | /// 30 | /// Mandatory parameter 31 | /// 32 | /// 33 | public VersionStatusEnum? Status 34 | { 35 | get; 36 | set; 37 | } 38 | } 39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /Model/KeyVersion.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Information about the object to be deleted 19 | /// 20 | public class KeyVersion 21 | { 22 | 23 | 24 | /// 25 | /// Object name 26 | /// 27 | public string Key 28 | { 29 | get; 30 | set; 31 | } 32 | 33 | 34 | 35 | /// 36 | /// Object version ID 37 | /// 38 | public string VersionId 39 | { 40 | get; 41 | set; 42 | } 43 | 44 | 45 | } 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /README_CN.MD: -------------------------------------------------------------------------------- 1 | Version 3.22.3 2 | 3 | 新特性: 4 | 1.支持Content-Disposition标准元数据接口; 5 | 6 | ----------------------------------------------------------------------------------- 7 | 8 | Version 3.20.7 9 | 10 | 新特性: 11 | 1.判断对象是否存在的接口(ObsClient.HeadObject/ObsClient.BeginHeadObject/ObsClient.EndHeadObject); 12 | 13 | 资料&demo: 14 | 1. 添加判断对象是否存在的接口的章节; 15 | 16 | 修复问题: 17 | 1. 修复ObsClient在.Net Framework框架下不能及时释放TCP连接的问题; 18 | 2. 修复断点续传下载场景下,较差的网络环境导致的低概率问题; 19 | 3. 修复某些情况下报错异常信息中,message和code为空的问题; 20 | 21 | ----------------------------------------------------------------------------------- 22 | 23 | Version 3.19.7.1 24 | 25 | 修复问题: 26 | 1. 修复ObsClient.CreateTemporarySignature生成操作对象的链接对于含特殊字符对象名时会报错签名不匹配的问题; 27 | 28 | ----------------------------------------------------------------------------------- 29 | 30 | Version 3.19.7 31 | 32 | 修复问题: 33 | 1. 修改异步下载对象接口(ObsClient.EndGetObject)的空指针问题; 34 | 35 | ----------------------------------------------------------------------------------- 36 | 37 | Version 3.1.3 38 | 39 | 修复问题: 40 | 1. 修改上传对象接口(ObsClient.PutObject),在上传本地文件时不使用chunk模式上传,避免服务端不支持chunk模式时出现问题; 41 | 42 | ----------------------------------------------------------------------------------- 43 | 44 | Version 3.1.2 45 | 46 | 新特性: 47 | 1. 桶事件通知接口(ObsClient.SetBucketNotification/ObsClient.GetBucketNotification)新增对函数工作流服务配置和查询的支持; 48 | 49 | 资料&demo: 50 | 1. 开发指南事件通知章节,新增对函数工作流服务配置的介绍; 51 | 52 | 53 | 修复问题: 54 | 1. 修复创建桶接口(ObsClient.CreateBucket)由于协议协商导致报错信息不准确的问题; 55 | 2. 修复示例代码BucketOperationsSample.cs中的错误; 56 | 57 | -------------------------------------------------------------------------------- /Model/PartDetail.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Part details 20 | /// 21 | public class PartDetail : PartETag 22 | { 23 | 24 | 25 | /// 26 | /// Last modification time of the part 27 | /// 28 | public DateTime? LastModified 29 | { 30 | get; 31 | internal set; 32 | } 33 | 34 | /// 35 | /// Part size 36 | /// 37 | public long Size 38 | { 39 | get; 40 | internal set; 41 | } 42 | 43 | } 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /Model/Initiator.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Creator of the multipart upload 20 | /// 21 | public class Initiator 22 | { 23 | 24 | 25 | /// 26 | /// Username 27 | /// 28 | [Obsolete] 29 | public string DisplayName 30 | { 31 | get; 32 | set; 33 | } 34 | 35 | /// 36 | /// ID of the domain to which the user belongs 37 | /// 38 | public string Id 39 | { 40 | get; 41 | set; 42 | } 43 | 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /Model/UploadPartResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a part upload request 19 | /// 20 | public class UploadPartResponse : ObsWebServiceResponse 21 | { 22 | 23 | 24 | /// 25 | /// Part ETag 26 | /// 27 | public string ETag 28 | { 29 | get; 30 | internal set; 31 | } 32 | 33 | /// 34 | /// Part number 35 | /// 36 | public int PartNumber 37 | { 38 | get; 39 | internal set; 40 | } 41 | 42 | 43 | } 44 | } 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Model/GetBucketTaggingResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | 17 | namespace OBS.Model 18 | { 19 | /// 20 | /// Response to a request for obtaining bucket tags 21 | /// 22 | public class GetBucketTaggingResponse : ObsWebServiceResponse 23 | { 24 | 25 | private IList tags; 26 | /// 27 | /// Bucket tag set 28 | /// 29 | public IList Tags 30 | { 31 | get { 32 | 33 | return this.tags ?? (this.tags = new List()); } 34 | internal set { this.tags = value; } 35 | } 36 | 37 | } 38 | } 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Enumerations.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | 16 | namespace OBS 17 | { 18 | 19 | /// 20 | /// Authentication type 21 | /// 22 | public enum AuthTypeEnum 23 | { 24 | /// 25 | /// V2 protocol 26 | /// 27 | V2, 28 | 29 | /// 30 | /// V4 protocol 31 | /// 32 | [Obsolete] 33 | V4, 34 | 35 | /// 36 | /// OBS protocol 37 | /// 38 | OBS 39 | } 40 | 41 | 42 | 43 | public enum ErrorType 44 | { 45 | 46 | Sender, 47 | 48 | Receiver, 49 | 50 | Unknown 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /Model/ExpirationDetail.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Globalization; 16 | using System.Text.RegularExpressions; 17 | 18 | namespace OBS.Model 19 | { 20 | /// 21 | /// Expiration details of an object 22 | /// 23 | public class ExpirationDetail 24 | { 25 | 26 | /// 27 | /// Expiration time 28 | /// 29 | public DateTime? ExpiryDate 30 | { 31 | get; 32 | set; 33 | } 34 | 35 | /// 36 | /// ID 37 | /// 38 | public string RuleId 39 | { 40 | get; 41 | set; 42 | } 43 | } 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /ObsWebServiceRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using OBS.Internal; 15 | using System.Collections.Generic; 16 | 17 | namespace OBS 18 | { 19 | /// 20 | /// Base class of service request parameters 21 | /// 22 | public abstract class ObsWebServiceRequest 23 | { 24 | 25 | internal virtual string GetAction() 26 | { 27 | return "ObsWebServiceRequest"; 28 | } 29 | 30 | internal object Sender 31 | { 32 | get; 33 | set; 34 | } 35 | 36 | /// 37 | /// Constructor 38 | /// 39 | protected ObsWebServiceRequest() 40 | { 41 | } 42 | 43 | } 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /Model/DeleteObjectsRequest.ext.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | namespace OBS.Model 17 | { 18 | public partial class DeleteObjectsRequest : ObsBucketWebServiceRequest 19 | { 20 | 21 | public void AddKey(string key) 22 | { 23 | AddKey(new KeyVersion { Key = key }); 24 | } 25 | 26 | public void AddKey(string key, string versionId) 27 | { 28 | KeyVersion kv = new KeyVersion(); 29 | kv.Key = key; 30 | kv.VersionId = versionId; 31 | AddKey(kv); 32 | } 33 | 34 | private void AddKey(KeyVersion keyVersion) 35 | { 36 | this.Objects.Add(keyVersion); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ObsBucketWebServiceRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS 19 | { 20 | /// 21 | /// Base class of service request parameters (with bucket name) 22 | /// 23 | public abstract class ObsBucketWebServiceRequest : ObsWebServiceRequest 24 | { 25 | /// 26 | /// Bucket name 27 | /// 28 | /// 29 | /// 30 | /// Mandatory parameter 31 | /// 32 | /// 33 | public virtual string BucketName 34 | { 35 | get; 36 | set; 37 | } 38 | 39 | 40 | } 41 | } 42 | 43 | 44 | -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using OBS.Internal; 15 | using System.Reflection; 16 | using System.Runtime.InteropServices; 17 | 18 | 19 | [assembly: AssemblyTitle("eSDK_Storage_OBS_.NET.dll")] 20 | [assembly: AssemblyDescription("OBS SDK for C#")] 21 | [assembly: AssemblyConfiguration("")] 22 | [assembly: AssemblyCompany("")] 23 | [assembly: AssemblyProduct("OBS SDK for C#")] 24 | [assembly: AssemblyCopyright("")] 25 | [assembly: AssemblyTrademark("")] 26 | [assembly: AssemblyCulture("")] 27 | 28 | 29 | [assembly: ComVisible(false)] 30 | 31 | [assembly: Guid("58439d74-c580-459d-ad66-69f938bd7551")] 32 | 33 | 34 | [assembly: AssemblyVersion(Constants.ObsSdkVersion)] 35 | [assembly: AssemblyFileVersion(Constants.ObsSdkVersion)] 36 | 37 | -------------------------------------------------------------------------------- /Model/SetBucketLoggingRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for setting bucket logging 19 | /// 20 | public class SetBucketLoggingRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketLogging"; 26 | } 27 | 28 | /// 29 | /// Bucket logging configuration 30 | /// 31 | /// 32 | /// 33 | /// Mandatory parameter 34 | /// 35 | /// 36 | public LoggingConfiguration Configuration { get; set; } 37 | 38 | } 39 | } 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Model/NoncurrentVersionExpiration.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Expiration time of an object noncurrent version 19 | /// 20 | public class NoncurrentVersionExpiration 21 | { 22 | 23 | /// 24 | /// Expiration time of the noncurrent object version, which indicates the number of days after which the object expires since it becomes a noncurrent version 25 | /// 26 | /// 27 | /// 28 | /// Mandatory parameter 29 | /// 30 | /// 31 | public int NoncurrentDays 32 | { 33 | get; 34 | set; 35 | } 36 | 37 | } 38 | 39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /Model/GetBucketStorageInfoResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for obtaining bucket storage information 19 | /// 20 | public class GetBucketStorageInfoResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Bucket size 25 | /// 26 | public long Size 27 | { 28 | get; 29 | internal set; 30 | } 31 | 32 | /// 33 | /// Number of objects in the bucket 34 | /// 35 | public long ObjectNumber 36 | { 37 | get; 38 | internal set; 39 | } 40 | 41 | } 42 | } 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Model/DeleteObjectResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to an object deletion request 19 | /// 20 | public class DeleteObjectResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Identifier specifying whether the deleted object is a delete marker 25 | /// 26 | public bool DeleteMarker 27 | { 28 | get; 29 | internal set; 30 | } 31 | 32 | /// 33 | /// Version ID of the to-be-deleted object 34 | /// 35 | public string VersionId 36 | { 37 | get; 38 | internal set; 39 | } 40 | 41 | } 42 | } 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Model/RestoreStatus.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Globalization; 16 | using System.Text.RegularExpressions; 17 | 18 | namespace OBS.Model 19 | { 20 | /// 21 | /// Restore status of an object 22 | /// 23 | public class RestoreStatus 24 | { 25 | 26 | /// 27 | /// Expiration time of the restored object 28 | /// 29 | public DateTime? ExpiryDate 30 | { 31 | get; 32 | set; 33 | } 34 | 35 | /// 36 | /// Identifier specifying the restore status of the object 37 | /// 38 | public bool Restored 39 | { 40 | get; 41 | set; 42 | } 43 | } 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /Model/SetBucketCorsRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for configuring bucket CORS 19 | /// 20 | public class SetBucketCorsRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketCors"; 26 | } 27 | 28 | /// 29 | /// Bucket CORS configuration 30 | /// 31 | /// 32 | /// 33 | /// Mandatory parameter 34 | /// 35 | /// 36 | public CorsConfiguration Configuration 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | } 43 | } 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Model/CorsConfiguration.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Bucket CORS configuration 20 | /// 21 | public class CorsConfiguration 22 | { 23 | 24 | private IList rules; 25 | 26 | /// 27 | /// Bucket CORS rule list 28 | /// 29 | /// 30 | /// 31 | /// Mandatory parameter 32 | /// 33 | /// 34 | public IList Rules 35 | { 36 | get { 37 | 38 | return this.rules ?? (this.rules = new List()); } 39 | set { this.rules = value; } 40 | } 41 | 42 | } 43 | } 44 | 45 | 46 | -------------------------------------------------------------------------------- /Model/InitiateMultipartUploadRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for initializing a multipart upload 19 | /// 20 | public class InitiateMultipartUploadRequest : PutObjectBasicRequest 21 | { 22 | internal override string GetAction() 23 | { 24 | return "InitiateMultipartUpload"; 25 | } 26 | 27 | /// 28 | /// Expiration time of the generated object 29 | /// 30 | /// 31 | /// 32 | /// Optional parameter 33 | /// 34 | /// 35 | public int? Expires 36 | { 37 | get; 38 | set; 39 | } 40 | 41 | } 42 | } 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Model/SetBucketLifecycleRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for setting bucket lifecycle rules 19 | /// 20 | public class SetBucketLifecycleRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketLifecycle"; 26 | } 27 | 28 | /// 29 | /// Bucket lifecycle rules 30 | /// 31 | /// 32 | /// 33 | /// Mandatory parameter 34 | /// 35 | /// 36 | public LifecycleConfiguration Configuration 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | } 43 | } 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Model/SetBucketStoragePolicyRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for setting a bucket storage class 19 | /// 20 | public class SetBucketStoragePolicyRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketStoragePolicy"; 26 | } 27 | 28 | /// 29 | /// Bucket storage class 30 | /// 31 | /// 32 | /// 33 | /// Mandatory parameter 34 | /// 35 | /// 36 | public StorageClassEnum? StorageClass 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | } 43 | } 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Model/LifecycleConfiguration.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Bucket lifecycle rules 20 | /// 21 | public class LifecycleConfiguration 22 | { 23 | 24 | private IList rules; 25 | 26 | /// 27 | /// List of bucket lifecycle rules 28 | /// 29 | /// 30 | /// 31 | /// Mandatory parameter 32 | /// 33 | /// 34 | public IList Rules 35 | { 36 | get { 37 | 38 | return this.rules ?? (this.rules = new List()); } 39 | set { this.rules = value; } 40 | } 41 | 42 | } 43 | } 44 | 45 | 46 | -------------------------------------------------------------------------------- /Model/SetBucketVersioningRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for setting bucket versioning 19 | /// 20 | public class SetBucketVersioningRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketVersioning"; 26 | } 27 | 28 | /// 29 | /// Bucket versioning configuration 30 | /// 31 | /// 32 | /// 33 | /// Mandatory parameter 34 | /// 35 | /// 36 | public VersioningConfiguration Configuration 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | } 43 | } 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Model/AccessControlList.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | 17 | namespace OBS.Model 18 | { 19 | /// 20 | /// ACL 21 | /// 22 | public class AccessControlList : AbstractAccessControlList 23 | { 24 | 25 | /// 26 | /// Owner 27 | /// 28 | /// 29 | /// 30 | /// Mandatory parameter 31 | /// 32 | /// 33 | public Owner Owner { get; set; } 34 | 35 | 36 | /// 37 | /// Identifier specifying whether to deliver the object ACL. (This is only applicable to object ACLs.) 38 | /// 39 | public bool Delivered 40 | { 41 | get; 42 | set; 43 | } 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /Model/AppendObjectRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | using System.IO; 16 | 17 | namespace OBS.Model 18 | { 19 | /// 20 | /// Parameters in an appendable upload request 21 | /// 22 | public class AppendObjectRequest : PutObjectRequest 23 | { 24 | 25 | internal override string GetAction() 26 | { 27 | return "AppendObject"; 28 | } 29 | 30 | /// 31 | /// Start postion for the appendable upload 32 | /// 33 | /// 34 | /// 35 | /// Mandatory parameter 36 | /// 37 | /// 38 | public long Position 39 | { 40 | get; 41 | set; 42 | } 43 | 44 | } 45 | } 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Model/HeadObjectRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS.Model 19 | { 20 | /// 21 | /// Parameters in a request for querying whether a object exists. 22 | /// 23 | public class HeadObjectRequest : ObsBucketWebServiceRequest 24 | { 25 | internal override string GetAction() 26 | { 27 | return "HeadObject"; 28 | } 29 | 30 | /// 31 | /// Object name. 32 | /// 33 | public string ObjectKey 34 | { 35 | get; 36 | set; 37 | } 38 | 39 | /// 40 | /// Object version. 41 | /// 42 | public string VersionId 43 | { 44 | get; 45 | set; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Model/SetBucketNotificationRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for setting bucket notification 19 | /// 20 | public class SetBucketNotificationRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketNotification"; 26 | } 27 | 28 | /// 29 | /// Bucket notification configuration 30 | /// 31 | /// 32 | /// 33 | /// Mandatory parameter 34 | /// 35 | /// 36 | public NotificationConfiguration Configuration 37 | { 38 | get; 39 | set; 40 | } 41 | } 42 | } 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Model/SetBucketWebsiteRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for configuring bucket website hosting rules 19 | /// 20 | public class SetBucketWebsiteRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketWebsite"; 26 | } 27 | 28 | /// 29 | /// Website hosting configuration of a bucket 30 | /// 31 | /// 32 | /// 33 | /// Mandatory parameter 34 | /// 35 | /// 36 | public WebsiteConfiguration Configuration 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | } 43 | } 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /esdk_obs_.net_core_for_test.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Library 5 | netcoreapp2.0 6 | 7 | 8 | 3.0.0 9 | Debug;Release;test 10 | 11 | 12 | 13 | donetcore 14 | bin\Release\netcoreapp2.0\esdk_obs_.net_core.xml 15 | 16 | 17 | 18 | donetcore 19 | bin\Debug\netcoreapp2.0\esdk_obs_.net_core.xml 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Model/SetBucketReplicationRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for setting cross-region replication of a bucket 19 | /// 20 | public class SetBucketReplicationRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketReplication"; 26 | } 27 | 28 | /// 29 | /// Cross-region replication configuration of a bucket 30 | /// 31 | /// 32 | /// 33 | /// Mandatory parameter 34 | /// 35 | /// 36 | public ReplicationConfiguration Configuration 37 | { 38 | get; 39 | set; 40 | } 41 | } 42 | } 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Model/ListBucketsRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining bucket list 19 | /// 20 | public class ListBucketsRequest : ObsWebServiceRequest 21 | { 22 | private bool queryLocation = true; 23 | /// 24 | /// Whether to list the region information of all buckets. The default value is "true". 25 | /// 26 | public bool IsQueryLocation 27 | { 28 | get 29 | { 30 | return this.queryLocation; 31 | } 32 | set 33 | { 34 | this.queryLocation = value; 35 | } 36 | } 37 | 38 | internal override string GetAction() 39 | { 40 | return "ListBuckets"; 41 | } 42 | 43 | } 44 | } 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Model/SseKmsHeader.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS.Model 19 | { 20 | /// 21 | /// SSE-KMS encryption headers 22 | /// 23 | public class SseKmsHeader : SseHeader 24 | { 25 | /// 26 | /// SSE-KMS encryption algorithm 27 | /// 28 | public SseKmsAlgorithmEnum Algorithm 29 | { 30 | get; 31 | set; 32 | } 33 | 34 | /// 35 | /// Master key used in the SSE-KMS encryption mode 36 | /// 37 | /// 38 | /// 39 | /// Optional parameter 40 | /// 41 | /// 42 | public string Key 43 | { 44 | get; 45 | set; 46 | } 47 | } 48 | } 49 | 50 | 51 | -------------------------------------------------------------------------------- /Model/ListBucketsResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Response to a request for obtaining bucket list 20 | /// 21 | public class ListBucketsResponse : ObsWebServiceResponse 22 | { 23 | private IList buckets; 24 | 25 | /// 26 | /// Bucket list 27 | /// 28 | public IList Buckets 29 | { 30 | get { 31 | 32 | return this.buckets ?? (this.buckets = new List()); } 33 | internal set { this.buckets = value; } 34 | } 35 | 36 | /// 37 | /// Bucket owner 38 | /// 39 | public Owner Owner 40 | { 41 | get; 42 | internal set; 43 | } 44 | 45 | } 46 | } 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Model/ObsObjectVersion.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Versioning object information 19 | /// 20 | public class ObsObjectVersion : ObsObject 21 | { 22 | 23 | /// 24 | /// Whether the object is of the current version 25 | /// 26 | public bool IsLatest 27 | { 28 | get; 29 | internal set; 30 | } 31 | 32 | /// 33 | /// Version number 34 | /// 35 | public string VersionId 36 | { 37 | get; 38 | internal set; 39 | } 40 | 41 | /// 42 | /// Whether object delete markers are configured 43 | /// 44 | public bool IsDeleteMarker 45 | { 46 | get; 47 | internal set; 48 | } 49 | } 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /Model/RoutingRule.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Request redirection rule 19 | /// 20 | public class RoutingRule 21 | { 22 | /// 23 | /// Request redirection conditions 24 | /// 25 | /// 26 | /// 27 | /// Optional parameter 28 | /// 29 | /// 30 | public Condition Condition 31 | { 32 | get; 33 | set; 34 | } 35 | 36 | 37 | /// 38 | /// Redirection configuration 39 | /// 40 | /// 41 | /// 42 | /// Optional parameter 43 | /// 44 | /// 45 | public Redirect Redirect 46 | { 47 | get; 48 | set; 49 | } 50 | 51 | } 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /esdk_obs_.net_core.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Library 5 | netcoreapp2.0 6 | 7 | 8 | 3.0.3 9 | Debug;Release;test 10 | 11 | 12 | 13 | donetcore 14 | bin\Release\netcoreapp2.0\esdk_obs_.net_core.xml 15 | 16 | 17 | 18 | donetcore 19 | bin\Debug\netcoreapp2.0\esdk_obs_.net_core.xml 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Model/InitiateMultipartUploadResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to a request for initializing a multipart upload 19 | /// 20 | public class InitiateMultipartUploadResponse : ObsWebServiceResponse 21 | { 22 | 23 | /// 24 | /// Bucket name 25 | /// 26 | public string BucketName 27 | { 28 | get; 29 | internal set; 30 | } 31 | 32 | /// 33 | /// Object name 34 | /// 35 | public string ObjectKey 36 | { 37 | get; 38 | internal set; 39 | } 40 | 41 | /// 42 | /// Multipart upload ID 43 | /// 44 | public string UploadId 45 | { 46 | get; 47 | internal set; 48 | } 49 | 50 | } 51 | } 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Model/Grant.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Authorized user/user group (grantee) and permission information 19 | /// 20 | public class Grant 21 | { 22 | 23 | 24 | /// 25 | /// Grantee (group) name 26 | /// 27 | public Grantee Grantee 28 | { 29 | get; 30 | set; 31 | } 32 | 33 | /// 34 | /// Permission information 35 | /// 36 | public PermissionEnum? Permission 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | /// 43 | /// Identifier specifying whether to deliver the bucket ACL. (This is only applicable to bucket ACLs.) 44 | /// 45 | public bool Delivered 46 | { 47 | set; 48 | get; 49 | } 50 | 51 | } 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /Model/CopyPartResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | 16 | 17 | namespace OBS.Model 18 | { 19 | /// 20 | /// Response to the request for copying parts 21 | /// 22 | public class CopyPartResponse : ObsWebServiceResponse 23 | { 24 | 25 | /// 26 | /// ETag value of the target part 27 | /// 28 | public string ETag 29 | { 30 | get; 31 | internal set; 32 | } 33 | 34 | /// 35 | /// Last modification time of the target part 36 | /// 37 | public DateTime? LastModified 38 | { 39 | get; 40 | internal set; 41 | } 42 | 43 | /// 44 | /// Target part number 45 | /// 46 | public int PartNumber 47 | { 48 | get; 49 | internal set; 50 | } 51 | 52 | 53 | } 54 | } 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Model/GetObjectAclRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for obtaining object ACLs 19 | /// 20 | public class GetObjectAclRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "GetObjectAcl"; 26 | } 27 | 28 | /// 29 | /// Object name 30 | /// 31 | /// 32 | /// 33 | /// Mandatory parameter 34 | /// 35 | /// 36 | public string ObjectKey { get; set; } 37 | 38 | /// 39 | /// Object version ID 40 | /// 41 | /// 42 | /// 43 | /// Optional parameter 44 | /// 45 | /// 46 | public string VersionId { get; set; } 47 | 48 | 49 | } 50 | } 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Model/FilterRule.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | namespace OBS.Model 15 | { 16 | /// 17 | /// Filtering rules configured for event notification 18 | /// 19 | public class FilterRule 20 | { 21 | 22 | 23 | /// 24 | /// Filtering identifier that specifies objects are filtered by object name prefix or suffix 25 | /// 26 | /// 27 | /// 28 | /// Optional parameter 29 | /// 30 | /// 31 | public FilterNameEnum? Name 32 | { 33 | get; 34 | set; 35 | } 36 | 37 | /// 38 | /// Object name keyword 39 | /// 40 | /// 41 | /// 42 | /// Optional parameter 43 | /// 44 | /// 45 | public string Value 46 | { 47 | get; 48 | set; 49 | } 50 | 51 | } 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /Model/FunctionGraphConfiguration.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | namespace OBS.Model 17 | { 18 | 19 | public class FunctionGraphConfiguration 20 | { 21 | List _events; 22 | List _filterRules; 23 | 24 | 25 | public string Id { get; set; } 26 | 27 | 28 | 29 | public string FunctionGraph { get; set; } 30 | 31 | 32 | 33 | public List Events 34 | { 35 | get 36 | { 37 | return this._events ?? (this._events = new List()); 38 | } 39 | set { this._events = value; } 40 | } 41 | 42 | 43 | 44 | public List FilterRules 45 | { 46 | get 47 | { 48 | return this._filterRules ?? (this._filterRules = new List()); 49 | } 50 | set { this._filterRules = value; } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Internal/Negotiation/LocksHolder.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS.Internal.Negotiation 19 | { 20 | internal class LocksHolder 21 | { 22 | private object[] locks; 23 | private int lockNum; 24 | 25 | public LocksHolder() :this(16) 26 | { 27 | } 28 | 29 | public LocksHolder(int lockNum) 30 | { 31 | this.lockNum = lockNum; 32 | locks = new object[this.lockNum]; 33 | for(int i = 0; i < this.lockNum; i++) 34 | { 35 | locks[i] = new object(); 36 | } 37 | } 38 | 39 | public object GetLock(string key) 40 | { 41 | if(key == null) 42 | { 43 | throw new ArgumentNullException("key"); 44 | } 45 | int index = Math.Abs("".GetHashCode()) % this.lockNum; 46 | return this.locks[index]; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Model/SetBucketQuotaRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for setting bucket quotas 19 | /// 20 | public class SetBucketQuotaRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketQuota"; 26 | } 27 | 28 | /// 29 | /// Quota 30 | /// 31 | /// 32 | /// 33 | /// Optional parameter. The value must be a character string and thus an integer must be converted to be a character string. 34 | /// A bucket quota must be expressed in bytes and the maximum value is 263-1. Value "0" indicates that no upper limit is set for the bucket quota. 35 | /// 36 | /// 37 | public long StorageQuota 38 | { 39 | get; 40 | set; 41 | } 42 | 43 | } 44 | } 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Model/RedirectBasic.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Basic redirection configuration 19 | /// 20 | public class RedirectBasic 21 | { 22 | 23 | 24 | /// 25 | /// Host name used for redirecting the request 26 | /// 27 | /// 28 | /// 29 | /// Optional parameter 30 | /// 31 | /// 32 | public string HostName 33 | { 34 | get; 35 | set; 36 | } 37 | 38 | 39 | 40 | /// 41 | /// Protocol used for redirecting the request 42 | /// 43 | /// 44 | /// 45 | /// Optional parameter 46 | /// 47 | /// 48 | public ProtocolEnum? Protocol 49 | { 50 | get; 51 | set; 52 | } 53 | 54 | 55 | 56 | 57 | } 58 | } 59 | 60 | 61 | -------------------------------------------------------------------------------- /Model/Condition.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Request redirection conditions 19 | /// 20 | public class Condition 21 | { 22 | 23 | 24 | /// 25 | /// HTTP error code configuration when the redirection takes effect 26 | /// 27 | /// 28 | /// 29 | /// Optional parameter 30 | /// 31 | /// 32 | public string HttpErrorCodeReturnedEquals 33 | { 34 | get; 35 | set; 36 | } 37 | 38 | 39 | 40 | /// 41 | /// Object name prefix when the redirection takes effect 42 | /// 43 | /// 44 | /// 45 | /// Optional parameter 46 | /// 47 | /// 48 | public string KeyPrefixEquals 49 | { 50 | get; 51 | set; 52 | } 53 | 54 | 55 | } 56 | } 57 | 58 | 59 | -------------------------------------------------------------------------------- /Model/SetBucketPolicyRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for setting bucket policies 19 | /// 20 | public class SetBucketPolicyRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketPolicy"; 26 | } 27 | 28 | /// 29 | /// MD5 value of the bucket policy content 30 | /// 31 | /// 32 | /// 33 | /// Optional parameter 34 | /// 35 | /// 36 | public string ContentMD5 { get; set; } 37 | 38 | 39 | /// 40 | /// Policy content, in the JSON format 41 | /// 42 | /// 43 | /// 44 | /// Mandatory parameter 45 | /// 46 | /// 47 | public string Policy { get; set; } 48 | 49 | } 50 | } 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Model/SetBucketTaggingRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Parameters in a request for setting bucket tags 20 | /// 21 | public class SetBucketTaggingRequest : ObsBucketWebServiceRequest 22 | { 23 | private IList tags; 24 | 25 | internal override string GetAction() 26 | { 27 | return "SetBucketTagging"; 28 | } 29 | 30 | /// 31 | /// Bucket tag set 32 | /// 33 | /// 34 | /// 35 | /// Mandatory parameter 36 | /// You can add 10 tags to a bucket at the maximum. 37 | /// 38 | /// 39 | public IList Tags 40 | { 41 | get { 42 | 43 | return this.tags ?? (this.tags = new List()); 44 | } 45 | set { this.tags = value; } 46 | } 47 | 48 | } 49 | } 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Model/ObsBucket.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Bucket information 20 | /// 21 | public class ObsBucket 22 | { 23 | 24 | 25 | /// 26 | /// Creation time of the bucket 27 | /// 28 | public DateTime? CreationDate 29 | { 30 | get; 31 | internal set; 32 | } 33 | 34 | /// 35 | /// Bucket name 36 | /// 37 | public string BucketName 38 | { 39 | get; 40 | internal set; 41 | } 42 | 43 | /// 44 | /// Bucket location 45 | /// 46 | public string Location 47 | { 48 | get; 49 | internal set; 50 | } 51 | 52 | public override string ToString() 53 | { 54 | return "BucketName:" + BucketName + ", CreationDate:" + CreationDate + ", Location:" + Location; 55 | } 56 | 57 | } 58 | } 59 | 60 | 61 | -------------------------------------------------------------------------------- /Model/CreateV4PostSignatureResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | 17 | namespace OBS.Model 18 | { 19 | /// 20 | /// Response to a browser-based authentication request 21 | /// 22 | public class CreateV4PostSignatureResponse : CreatePostSignatureResponse 23 | { 24 | /// 25 | /// Signature algorithm, which is set in the form 26 | /// 27 | public string Algorithm 28 | { 29 | get; 30 | internal set; 31 | } 32 | 33 | /// 34 | /// Credential information, which is set in the form 35 | /// 36 | public string Credential 37 | { 38 | get; 39 | internal set; 40 | } 41 | 42 | /// 43 | /// Date in the ISO 8601 format, which is set in the form 44 | /// 45 | public string Date 46 | { 47 | get; 48 | internal set; 49 | } 50 | 51 | } 52 | } 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Help on License: -------------------------------------------------------------------------------- 1 | This help guides Huawei engineers to add or modify the license announcement 2 | during the development. 3 | 4 | In the case that you add a new file, the text below should be added in the head. 5 | Copyright 2019 Huawei Technologies Co.,Ltd. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 8 | this file except in compliance with the License. You may obtain a copy of the 9 | License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software distributed 14 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 15 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations under the License. 17 | 18 | 19 | In the case that you modify one existing file, the text below should be added after 20 | the exiting license. 21 | Huawei has modified this source file. 22 | 23 | Copyright 2019 Huawei Technologies Co., Ltd. 24 | 25 | Licensed under the Apache License, Version 2.0 (the "License"); you may not 26 | use this file except in compliance with the License. You may obtain a copy of 27 | the License at 28 | 29 | http://www.apache.org/licenses/LICENSE-2.0 30 | 31 | Unless required by applicable law or agreed to in writing, software 32 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 33 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 34 | License for the specific language governing permissions and limitations under 35 | the License. 36 | -------------------------------------------------------------------------------- /Model/Expiration.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Expiration time of an object 20 | /// 21 | public class Expiration 22 | { 23 | 24 | /// 25 | /// A specified date in which the object will expire 26 | /// 27 | /// 28 | /// 29 | /// If this parameter is not set, the "Days" parameter is mandatory. 30 | /// 31 | /// 32 | public DateTime? Date 33 | { 34 | get; 35 | set; 36 | } 37 | 38 | /// 39 | /// Object expiration time, specifying how many days after creation will the object expire 40 | /// 41 | /// 42 | /// 43 | /// If this parameter is not set, the "Date" parameter is mandatory. 44 | /// 45 | /// 46 | public int? Days 47 | { 48 | get; 49 | set; 50 | } 51 | } 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /Model/GetBucketMetadataResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Response to a request for obtaining bucket metadata 20 | /// 21 | public class GetBucketMetadataResponse : ObsWebServiceResponse 22 | { 23 | /// 24 | /// Bucket storage class 25 | /// 26 | public StorageClassEnum? StorageClass 27 | { 28 | get; 29 | internal set; 30 | } 31 | 32 | /// 33 | /// Bucket location 34 | /// 35 | public string Location 36 | { 37 | get; 38 | internal set; 39 | } 40 | 41 | /// 42 | /// OBS version 43 | /// 44 | public string ObsVersion 45 | { 46 | get; 47 | internal set; 48 | } 49 | 50 | public AvailableZoneEnum AvailableZone 51 | { 52 | get; 53 | internal set; 54 | } 55 | 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /Model/AbortMultipartUploadRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for aborting a multipart upload 19 | /// 20 | public class AbortMultipartUploadRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "AbortMultipartUpload"; 26 | } 27 | 28 | /// 29 | /// Object name 30 | /// 31 | /// 32 | /// 33 | /// Mandatory parameter 34 | /// 35 | /// 36 | public string ObjectKey 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | /// 43 | /// Multipart upload ID 44 | /// 45 | /// 46 | /// 47 | /// Mandatory parameter 48 | /// 49 | /// 50 | public string UploadId 51 | { 52 | get; 53 | set; 54 | } 55 | 56 | } 57 | } 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Model/DeleteError.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Results about objects failed to be deleted 19 | /// 20 | public class DeleteError 21 | { 22 | 23 | 24 | /// 25 | /// Object name 26 | /// 27 | public string ObjectKey 28 | { 29 | get; 30 | internal set; 31 | } 32 | 33 | /// 34 | /// Object version ID 35 | /// 36 | public string VersionId 37 | { 38 | get; 39 | internal set; 40 | } 41 | 42 | /// 43 | /// Error code returned after a deletion failure 44 | /// 45 | public string Code 46 | { 47 | get; 48 | internal set; 49 | } 50 | 51 | /// 52 | /// Error information of a deletion failure 53 | /// 54 | public string Message 55 | { 56 | get; 57 | internal set; 58 | } 59 | } 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /Model/DeleteObjectRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Parameters in an object deletion request 20 | /// 21 | public class DeleteObjectRequest : ObsBucketWebServiceRequest 22 | { 23 | 24 | internal override string GetAction() 25 | { 26 | return "DeleteObject"; 27 | } 28 | 29 | /// 30 | /// Object name 31 | /// 32 | /// 33 | /// 34 | /// Mandatory parameter 35 | /// 36 | /// 37 | public string ObjectKey 38 | { 39 | get; 40 | set; 41 | } 42 | 43 | /// 44 | /// Version ID of the to-be-deleted object 45 | /// 46 | /// 47 | /// 48 | /// Optional parameter 49 | /// 50 | /// 51 | public string VersionId 52 | { 53 | get; 54 | set; 55 | } 56 | 57 | } 58 | } 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /Model/CreateTemporarySignatureResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | 17 | namespace OBS.Model 18 | { 19 | /// 20 | /// Response to a temporary authentication request 21 | /// 22 | public class CreateTemporarySignatureResponse 23 | { 24 | private IDictionary actualSignedRequestHeaders; 25 | 26 | /// 27 | /// Temporarily signed URL 28 | /// 29 | public string SignUrl 30 | { 31 | get; 32 | internal set; 33 | } 34 | 35 | /// 36 | /// Headers used for authentication 37 | /// 38 | public IDictionary ActualSignedRequestHeaders 39 | { 40 | get { 41 | 42 | return this.actualSignedRequestHeaders ?? (this.actualSignedRequestHeaders = new Dictionary(StringComparer.OrdinalIgnoreCase)); } 43 | internal set { this.actualSignedRequestHeaders = value; } 44 | } 45 | 46 | } 47 | } 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Model/NoncurrentVersionTransition.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Transition policy for noncurrent versions 19 | /// 20 | public class NoncurrentVersionTransition 21 | { 22 | 23 | /// 24 | /// Transition time of the noncurrent object version, which indicates the number of days after which the object will be transit since it becomes a noncurrent version 25 | /// 26 | /// 27 | /// 28 | /// Mandatory parameter 29 | /// 30 | /// 31 | public int NoncurrentDays 32 | { 33 | get; 34 | set; 35 | } 36 | 37 | 38 | /// 39 | /// Storage class of the noncurrent object version after transition 40 | /// 41 | /// 42 | /// 43 | /// Mandatory parameter 44 | /// 45 | /// 46 | public StorageClassEnum? StorageClass 47 | { 48 | get; 49 | set; 50 | } 51 | 52 | 53 | } 54 | } 55 | 56 | 57 | -------------------------------------------------------------------------------- /Model/SetBucketAclRequest.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Parameters in a request for setting bucket ACLs 19 | /// 20 | public class SetBucketAclRequest : ObsBucketWebServiceRequest 21 | { 22 | 23 | internal override string GetAction() 24 | { 25 | return "SetBucketAcl"; 26 | } 27 | 28 | /// 29 | /// Pre-defined access control policy 30 | /// 31 | /// 32 | /// 33 | /// Optional parameter 34 | /// 35 | /// 36 | public CannedAclEnum? CannedAcl 37 | { 38 | get; 39 | set; 40 | } 41 | 42 | 43 | /// 44 | /// Authorized user and ACL 45 | /// 46 | /// 47 | /// 48 | /// Optional parameter 49 | /// 50 | /// 51 | public AccessControlList AccessControlList 52 | { 53 | get; 54 | set; 55 | } 56 | 57 | } 58 | } 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /Model/DeletedObject.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Objects that have been successfully deleted in a batch 19 | /// 20 | public class DeletedObject 21 | { 22 | 23 | 24 | /// 25 | /// Identifier specifying whether an object is deleted 26 | /// 27 | public bool DeleteMarker 28 | { 29 | get; 30 | internal set; 31 | } 32 | 33 | /// 34 | /// Version ID of the delete marker 35 | /// 36 | public string DeleteMarkerVersionId 37 | { 38 | get; 39 | internal set; 40 | } 41 | 42 | /// 43 | /// Object name 44 | /// 45 | public string ObjectKey 46 | { 47 | get; 48 | internal set; 49 | } 50 | 51 | /// 52 | /// Object version ID 53 | /// 54 | public string VersionId 55 | { 56 | get; 57 | internal set; 58 | } 59 | 60 | } 61 | } 62 | 63 | 64 | -------------------------------------------------------------------------------- /Model/PutObjectResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to an object upload request 19 | /// 20 | public class PutObjectResponse : ObsWebServiceResponse 21 | { 22 | 23 | 24 | /// 25 | /// ETag of the object 26 | /// 27 | public string ETag 28 | { 29 | get; 30 | internal set; 31 | } 32 | 33 | /// 34 | /// Object version ID 35 | /// 36 | public string VersionId 37 | { 38 | get; 39 | internal set; 40 | } 41 | 42 | 43 | /// 44 | /// Object storage class 45 | /// 46 | public StorageClassEnum? StorageClass 47 | { 48 | get; 49 | internal set; 50 | } 51 | 52 | /// 53 | /// Full path to the object 54 | /// 55 | public string ObjectUrl 56 | { 57 | get; 58 | internal set; 59 | } 60 | 61 | 62 | } 63 | } 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /Model/Tag.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Bucket tagging 19 | /// 20 | public class Tag 21 | { 22 | 23 | 24 | /// 25 | /// Tag key 26 | /// 27 | /// 28 | /// 29 | /// Mandatory parameter 30 | /// A tag key consists of up to 36 characters, chosen from A-Z, a-z, 0-9, underscores (_), hyphens (-), and Unicode (\u4E00-\u9FFF) characters. The tag keys in one bucket must be unique. 31 | /// 32 | /// 33 | public string Key 34 | { 35 | get; 36 | set; 37 | } 38 | 39 | /// 40 | /// Tag value 41 | /// 42 | /// 43 | /// 44 | /// Mandatory parameter 45 | /// A tag value consists of up to 43 characters, chosen from A-Z, a-z, 0-9, underscores (_), hyphens (-), and Unicode (\u4E00-\u9FFF) characters. 46 | /// 47 | /// 48 | public string Value 49 | { 50 | get; 51 | set; 52 | } 53 | 54 | } 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /Model/DeleteObjectsResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Response to an object batch deletion request 20 | /// 21 | public class DeleteObjectsResponse : ObsWebServiceResponse 22 | { 23 | private IList deleted; 24 | private IList errors; 25 | 26 | /// 27 | /// List of objects that have been deleted successfully 28 | /// 29 | public IList DeletedObjects 30 | { 31 | get { 32 | 33 | return this.deleted ?? (this.deleted = new List()); 34 | } 35 | internal set { this.deleted = value; } 36 | } 37 | 38 | /// 39 | /// List of objects failed to be deleted 40 | /// 41 | public IList DeleteErrors 42 | { 43 | get { 44 | 45 | return this.errors ?? (this.errors = new List()); 46 | } 47 | internal set { this.errors = value; } 48 | } 49 | 50 | } 51 | } 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Model/ReplicationConfiguration.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System; 15 | using System.Collections.Generic; 16 | using System.Text; 17 | 18 | namespace OBS.Model 19 | { 20 | /// 21 | /// Cross-region replication configuration of a bucket 22 | /// 23 | public class ReplicationConfiguration 24 | { 25 | /// 26 | /// Agent name 27 | /// 28 | /// 29 | /// 30 | /// Mandatory parameter 31 | /// 32 | /// 33 | public string Agency 34 | { 35 | get; 36 | set; 37 | } 38 | 39 | private IList rules; 40 | 41 | /// 42 | /// List of cross-region replication configuration rules 43 | /// 44 | /// 45 | /// 46 | /// Mandatory parameter 47 | /// 48 | /// 49 | public IList Rules 50 | { 51 | get 52 | { 53 | 54 | return this.rules ?? (this.rules = new List()); 55 | } 56 | set { this.rules = value; } 57 | } 58 | } 59 | } 60 | 61 | 62 | -------------------------------------------------------------------------------- /Model/ByteRange.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Content range of the object to be downloaded or copied 19 | /// 20 | public class ByteRange 21 | { 22 | /// 23 | /// Default constructor 24 | /// 25 | public ByteRange() 26 | { 27 | } 28 | 29 | /// 30 | /// Constructor 31 | /// 32 | /// Start position 33 | /// End position 34 | public ByteRange(long start, long end) 35 | { 36 | this.Start = start; 37 | this.End = end; 38 | } 39 | 40 | /// 41 | /// Start position, that is the sequence number of the byte from which the download or copy starts 42 | /// 43 | public long Start 44 | { 45 | get; 46 | set; 47 | } 48 | 49 | /// 50 | /// End position, that is the sequence number of the byte from which the download or copy ends 51 | /// 52 | public long End 53 | { 54 | get; 55 | set; 56 | } 57 | 58 | } 59 | } 60 | 61 | 62 | -------------------------------------------------------------------------------- /Model/LoggingConfiguration.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | 17 | namespace OBS.Model 18 | { 19 | /// 20 | /// Bucket logging configuration 21 | /// 22 | public class LoggingConfiguration : AbstractAccessControlList 23 | { 24 | 25 | 26 | /// 27 | /// Target bucket for which logs are generated 28 | /// 29 | /// 30 | /// 31 | /// Mandatory parameter 32 | /// 33 | /// 34 | public string TargetBucketName { get; set; } 35 | 36 | /// 37 | /// Name prefix of to-be-logged objects in the target bucket 38 | /// 39 | /// 40 | /// 41 | /// Mandatory parameter 42 | /// 43 | /// 44 | public string TargetPrefix { get; set; } 45 | 46 | /// 47 | /// Agent name 48 | /// 49 | /// 50 | /// 51 | /// Mandatory parameter 52 | /// 53 | /// 54 | public string Agency 55 | { 56 | get; 57 | set; 58 | } 59 | 60 | } 61 | } 62 | 63 | 64 | -------------------------------------------------------------------------------- /Model/NotificationConfiguration.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | using System.Collections.Generic; 15 | 16 | namespace OBS.Model 17 | { 18 | /// 19 | /// Bucket notification configuration 20 | /// 21 | public class NotificationConfiguration 22 | { 23 | 24 | private IList topicConfigurations; 25 | 26 | private IList functionGraphConfigurations; 27 | 28 | /// 29 | /// List of bucket event notification settings 30 | /// 31 | /// 32 | /// 33 | /// Optional parameter 34 | /// 35 | /// 36 | public IList TopicConfigurations 37 | { 38 | get 39 | { 40 | 41 | return this.topicConfigurations ?? (this.topicConfigurations = new List()); 42 | } 43 | set { this.topicConfigurations = value; } 44 | } 45 | 46 | 47 | public IList FunctionGraphConfigurations 48 | { 49 | get 50 | { 51 | 52 | return this.functionGraphConfigurations ?? (this.functionGraphConfigurations = new List()); 53 | } 54 | set { this.functionGraphConfigurations = value; } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Model/AppendObjectResponse.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Response to an appendable upload request 19 | /// 20 | public class AppendObjectResponse : ObsWebServiceResponse 21 | { 22 | 23 | private long _nextPosition = -1; 24 | 25 | /// 26 | /// ETag verification value of the appended data 27 | /// 28 | public string ETag 29 | { 30 | get; 31 | internal set; 32 | } 33 | 34 | /// 35 | /// Start postion for next appendable upload 36 | /// 37 | public long NextPosition 38 | { 39 | get 40 | { 41 | return _nextPosition; 42 | } 43 | internal set 44 | { 45 | this._nextPosition = value; 46 | } 47 | } 48 | 49 | /// 50 | /// Object storage class 51 | /// 52 | public StorageClassEnum? StorageClass 53 | { 54 | get; 55 | internal set; 56 | } 57 | 58 | /// 59 | /// Full path to the object 60 | /// 61 | public string ObjectUrl 62 | { 63 | get; 64 | internal set; 65 | } 66 | 67 | 68 | } 69 | } 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /Model/Redirect.cs: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------------- 2 | // Copyright 2019 Huawei Technologies Co.,Ltd. 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | // this file except in compliance with the License. You may obtain a copy of the 5 | // License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software distributed 10 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | // specific language governing permissions and limitations under the License. 13 | //----------------------------------------------------------------------------------*/ 14 | 15 | namespace OBS.Model 16 | { 17 | /// 18 | /// Redirection configuration 19 | /// 20 | public class Redirect : RedirectBasic 21 | { 22 | 23 | /// 24 | /// Configuration of the HTTP status code 25 | /// 26 | /// 27 | /// 28 | /// Optional parameter 29 | /// 30 | /// 31 | public string HttpRedirectCode 32 | { 33 | get; 34 | set; 35 | } 36 | 37 | 38 | 39 | /// 40 | /// Object name prefix used for redirecting the request 41 | /// 42 | /// 43 | /// 44 | /// Optional parameter 45 | /// 46 | /// 47 | public string ReplaceKeyPrefixWith 48 | { 49 | get; 50 | set; 51 | } 52 | 53 | 54 | 55 | /// 56 | /// Object name used for redirecting the request 57 | /// 58 | /// 59 | /// 60 | /// Optional parameter, which is exclusive with "ReplaceKeyPrefixWith". 61 | /// 62 | /// 63 | public string ReplaceKeyWith 64 | { 65 | get; 66 | set; 67 | } 68 | 69 | 70 | } 71 | } 72 | 73 | 74 | --------------------------------------------------------------------------------