杨锴
2024-10-09 e987bc09f955e01c2835f01e3a6af20723a579f9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
// Copyright 2019 Huawei Technologies Co.,Ltd.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License.  You may obtain a copy of the
// License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations under the License.
 
#ifndef OBSServiceRequestCommonEntity_h
#define OBSServiceRequestCommonEntity_h
#import "OBSBaseModel.h"
#import "OBSServiceConstDefinition.h"
#pragma mark encryption
@interface OBSAbstractEncryption: OBSBaseEntity
@end
 
/**
 KMS加密方式
 */
@interface OBSEncryptionTypeKMS: OBSAbstractEncryption
 
/**
 加密方式
 */
@property (nonatomic, strong, nonnull) NSString *serverSideEncryption;
 
/**
 主秘钥
 */
@property (nonatomic, strong, nullable) NSString *serverSideEncryptionAwsKmsKeyID;
 
/**
 初始化KMS加密方式
 
 @param keyID 主密钥
 @return KMS加密方式
 */
-(instancetype)initWithKeyID:(NSString*) keyID;
@end
 
/**
 SSE-C加密方式
 */
@interface OBSEncryptionTypeCustomer: OBSAbstractEncryption
 
/**
 加密方式
 */
@property (nonatomic, strong, nonnull) NSString *serverSideEncryptionCustomerAlgorithm;
 
/**
 秘钥
 */
@property (nonatomic, strong, nonnull) NSString *serverSideEncryptionCustomerKey;
 
/**
 秘钥的MD5
 */
@property (nonatomic, strong, nonnull) NSString *serverSideEncryptionCustomerMD5;
 
/**
 初始化SSE加密方式
 
 @param algorithm 加密算法
 @param key 秘钥
 @param keyMD5 秘钥的MD5
 @return SSE加密方式
 */
-(instancetype)initWithAlgorithm:(NSString*) algorithm key:(NSString*) key keyMD5:(NSString*) keyMD5;
@end
 
 
 
#pragma mark ACL
 
/**
 桶的访问权限控制
 */
@interface OBSUser: OBSBaseEntity
 
/**
 桶拥有者ID
 */
@property (nonatomic, strong, nonnull) NSString *ID;
 
/**
 显示名字
 */
@property (nonatomic, strong, nullable) NSString *displayName;
-(instancetype)initWithID:(NSString*) ID;
@end
 
@interface OBSAbstractACLGrantee :OBSBaseEntity
@end
 
/**
 被授权用户
 */
@interface OBSGrantee : OBSAbstractACLGrantee
 
/**
 被授权用户ID
 */
@property (nonatomic, strong, nonnull) NSString *ID;
 
@end
@interface OBSACLGranteeUser : OBSAbstractACLGrantee
 
/**
 被授权用户ID
 */
@property (nonatomic, strong, nonnull) NSString *ID;
 
/**
 显示名字
 */
@property (nonatomic, strong, nullable) NSString *displayName;
-(instancetype)initWithID:(NSString*) ID;
@end
 
@interface OBSACLGranteeAuthenciatedUsers: OBSAbstractACLGrantee
@end
 
@interface OBSACLGranteeAllUsers: OBSAbstractACLGrantee
@end
 
 
//桶日志设置
@interface OBSACLGranteeLogDelivery: OBSAbstractACLGrantee
@end
 
 
/**
 授权用户及权限
 */
@interface OBSACLGrant: OBSBaseEntity
 
/**
 授权用户对象
 */
@property (nonatomic, strong, nonnull) __kindof OBSAbstractACLGrantee *grantee;
 
 
 
/**
 授予的权限
 
 OBSACLRead 读权限,
 OBSACLWrite 写权限,
 OBSACLRead_ACP 读ACP权限,
 OBSACLWrite_ACP 写ACP权限,
 OBSACLFull_Control 所有权限,
 OBSACLRead_Object 读桶中的对象,
 OBSACLFull_Control_Object 拥有对象的所有权限,
 
 */
@property (nonatomic, assign) OBSACL permission;
 
/**
 初始化授权对象
 
 @param grantee 授权用户对象
 @param permission 权限对象
 @return 授权对象
 */
-(instancetype)initWithGrantee:(__kindof OBSAbstractACLGrantee*) grantee permission:(OBSACL) permission;
@end
 
 
/**
 用户访问权限控制
 */
@interface OBSAccessControlPolicy: OBSBaseEntity
 
/**
 用户对象
 */
@property (nonatomic, strong, nonnull) OBSUser *owner;
 
/**
 访问控制列表
 */
@property (nonatomic, strong, nonnull) NSMutableArray<OBSACLGrant*> *accessControlList;
 
/**
 初始化用户访问控制权限
 
 @param owner 拥有者对象
 @return 用户访问控制权限对象
 */
-(instancetype)initWithOwner:(OBSUser*) owner;
@end
 
 
#pragma mark - CORS
 
/**
 跨域资源共享规则
 */
@interface OBSCORSRule: OBSBaseEntity<OBSMTLDictionaryItemOrderProtocol>
 
/**
 一条Rule的标识
 */
@property (nonatomic, strong, nonnull) NSString *ID;
 
/**
 CORS规则允许的请求方法
 */
@property (nonatomic, strong, nonnull) NSArray<NSString*> *allowedMethodList;
 
/**
 CORS规则允许的域名字符串
 */
@property (nonatomic, strong, nonnull) NSArray<NSString*> *allowedOriginList;
 
/**
 CORS请求中允许携带的头域
 */
@property (nonatomic, strong, nonnull) NSArray<NSString*> *allowedHeaderList;
 
/**
 可以缓存的CORS响应时间
 */
@property (nonatomic, strong, nonnull) NSNumber *maxAgeSeconds;
 
/**
 CORS响应中带的附加头域
 */
@property (nonatomic, strong, nonnull) NSArray<NSString*> *exposeHeaderList;
@end
 
#pragma mark - storage policy
// 存储策略
@interface OBSStoragePolicy : OBSBaseEntity
@property (nonatomic, assign) OBSStorageClass defaultStorageClass;
/**
 存储策略初始化
 
 @param storageClass 存储种类
 OBSStorageClassNULL0,
 OBSStorageClassStandard(标准存储),
 OBSStorageClassStandardIA(低频访问存储),
 OBSStorageClassGlacier(归档存储)
 @return 存储策略对象
 */
-(instancetype)initWithStorageClass:(OBSStorageClass) storageClass;
@end
 
#pragma mark bucket location configuration
@interface OBSBucketConfiguration: OBSBaseEntity
@property (nonatomic, strong, nonnull) NSString *locationConstraint;
-(instancetype)initWithLocationConstraint:(NSString*) location;
@end
 
#pragma mark bucket replication rule
@interface OBSReplicateBucketRule: OBSBaseEntity
@property (nonatomic, strong, nonnull) NSString *replicateBucketRule;
@property (nonatomic, strong, nonnull) NSString *ID;
@property (nonatomic, strong, nonnull) NSString *prefix;
@property (nonatomic, assign) OBSReplicateStatus status;
@property (nonatomic, strong, nonnull) NSString *destination;
 
-(instancetype)initWithID:(NSString*) ID prefix:(NSString*) prefix status:(OBSReplicateStatus) status destination:(NSString*) destination;
 
@end
 
 
 
#pragma mark bucket quota
// 桶存储容量
@interface OBSQuota: OBSBaseEntity
 
/**
 存储容量
 */
@property (nonatomic, strong, nonnull) NSNumber *storageQuota;
 
/**
 初始化桶存储容量对象
 
 @param storageQuotaNumber 容量大小
 @return 桶存储容量对象
 */
-(instancetype)initWithQuotaNumber:(NSNumber*)storageQuotaNumber;
@end
#pragma mark bucket logging
@interface OBSLoggingEnabled: OBSBaseEntity<OBSMTLDictionaryItemOrderProtocol>
@property (nonatomic, strong, nonnull) NSString *targetBucket;
@property (nonatomic, strong, nonnull) NSString *targetPrefix;
/**
 产生logging日志桶Owner创建委托OBS上传logging日志的委托名
 */
@property (nonatomic, strong, nonnull) NSString *agency;
@property (nonatomic, strong, nonnull) NSMutableArray<OBSACLGrant*> *targetGrantsList;
-(instancetype)initWithTargetBucket:(NSString*)targetBucket targetPrefix:(NSString*) targetPrefix;
@end
 
#pragma mark bucket policy
 
/**
 被授权人
 */
@interface OBSPolicyPrincipal: OBSBaseEntity
 
/**
 账户类型
 */
@property (nonatomic, strong, nonnull) NSString *accountType;
 
/**
 Principal授权格式
 
 */
@property (nonatomic, strong, nonnull) NSArray<NSString*> *accountARNList;
@end
 
 
/**
 condition具体配置
 */
@interface OBSPolicyConditionItem: OBSBaseEntity
 
/**
 从左边开始匹配
 */
@property (nonatomic, strong, nonnull) NSString *leftExpression;
 
/**
 从右边开始匹配的字符串数组
 */
@property (nonatomic, strong, nonnull) NSArray<NSString*> *rightExpressionList;
@end
 
 
/**
 statement生效条件
 */
@interface OBSPolicyCondition: OBSBaseEntity
 
/**
 字符串匹配
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringEquals;
 
/**
 字符串不匹配
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringNotEquals;
 
/**
 忽略大小写的字符串匹配
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringEqualsIgnoreCase;
 
/**
 不忽略大小写的字符串匹配
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringEqualsNotIgnoreCase;
 
/**
 宽松的区分大小写的匹配
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringLike;
 
/**
 非宽松区别大小写的匹配
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringNotLike;
 
/**
 相等
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericEquals;
 
/**
 不相等
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericNotEquals;
 
/**
 小于
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericLessThan;
 
/**
 小于等于
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericLessThanEquals;
 
/**
 大于
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericGreaterThan;
 
/**
 大于等于
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericGreaterThanEquals;
 
 
 
/**
 日期时间相等
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateEquals;
 
/**
 日期时间不相等
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateNotEquals;
 
/**
 日期时间小于
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateLessThan;
 
/**
 日期时间小于等于
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateLessThanEquals;
 
/**
 日期时间大于
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateGreaterThan;
 
/**
 日期时间大于等于
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateGreaterThanEquals;
 
 
/**
 严格布尔值相等
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *booL;
 
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *binaryEquals;
 
 
/**
 指定的IP或IP范围
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *IpAddress;
 
/**
 不包含指定的IP或IP范围
 */
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *notIpaddress;
 
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *arnEquals;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *arnNotEquals;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *arnLike;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *arnNotLike;
 
 
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringEqualsIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringNotEqualsIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringEqualsIgnoreCaseIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringEqualsNotIgnoreCaseIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringLikeIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *stringNotLikeIfExists;
 
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericEqualsIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericNotEqualsIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericLessThanIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericLessThanEqualsIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericGreaterThanIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *numericGreaterThanEqualsIfExists;
 
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateEqualsIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateNotEqualsIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateLessThanIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateLessThanEqualsIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateGreaterThanIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *dateGreaterThanEqualsIfExists;
 
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *booLIfExists;
 
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *binaryEqualsIfExists;
 
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *IpAddressIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *notIpaddressIfExists;
 
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *arnEqualsIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *arnNotEqualsIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *arnLikeIfExists;
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *arnNotLikeIfExists;
 
@property (nonatomic, strong, nonnull) OBSPolicyConditionItem *nulL;
 
@end
 
/**
 策略声明
 */
@interface OBSPolicyStatement: OBSBaseEntity
 
/**
 statement ID 描述statement的字符串
 */
@property (nonatomic, strong, nonnull) NSString *sid;
 
/**
 本条statement的权限
 
 OBSPolicyEffectAllow,
 OBSPolicyEffectDeny,
 */
@property (nonatomic, assign) OBSPolicyEffect effect;
 
/**
 被授权人
 */
@property (nonatomic, strong, nonnull) OBSPolicyPrincipal *principal;
 
/**
 不被授权人
 */
@property (nonatomic, strong, nonnull) OBSPolicyPrincipal *notPrincipal;
 
/**
 本条statement生效条件
 */
@property (nonatomic, strong, nonnull) OBSPolicyCondition *condition;
 
/**
 本条statement作用的操作
 */
@property (nonatomic, strong, nonnull) NSMutableArray<NSString*> *actionList;
 
/**
 不被匹配的作用的操作
 */
@property (nonatomic, strong, nonnull) NSMutableArray<NSString*> *notActionList;
 
/**
 起作用的一组资源
 */
@property (nonatomic, strong, nonnull) NSMutableArray<NSString*> *resourceList;
 
/**
 不起作用的一组资源
 */
@property (nonatomic, strong, nonnull) NSMutableArray<NSString*> *notResourceList;
 
/**
 初始化策略声明
 
 @param sid statement ID
 @param effect 权限类型
 @return 策略声明对象
 */
-(instancetype)initWithSid:(NSString*) sid effect:(OBSPolicyEffect) effect;
@end
 
#pragma mark bucket lifecycle
 
/**
 生命周期配置中表示迁移时间和迁移后对象存储级别的元素(仅针对对象的最新版本)
 */
@interface OBSLifecycleTransition : OBSBaseEntity
 
/**
 对象创建时间后第几天时规则生效
 */
@property (nonatomic, strong, nonnull) NSNumber *days;
 
/**
 对象将被修改成的存储级别
 */
@property (nonatomic, assign) OBSStorageClass storageClass;
 
/**
 初始化生命周期迁移时间及对象存储级别
 
 @param days 第几天生效
 @param storageClass 修改成的存储级别
 @return 迁移时间及对象存储级别对象
 */
-(instancetype)initWithDays:(NSNumber*) days storageClass:(OBSStorageClass) storageClass;
@end
 
/**
 历史版本迁移时间和迁移后对象存储级别的元素
 */
@interface OBSLifecycleNoncurrentVersionTransition : OBSBaseEntity
 
/**
 第几天生效
 */
@property (nonatomic, strong, nonnull) NSNumber *noncurrentDays;
 
/**
 修改成的存储级别
 */
@property (nonatomic, assign) OBSStorageClass storageClass;
 
/**
 初始化历史版本迁移时间和迁移后对象存储级别的元素
 
 @param days 第几天生效
 @param storageClass 修改成的存储级别
 @return 历史版本迁移时间和迁移后对象存储级别对象
 */
-(instancetype)initWithDays:(NSNumber*) days storageClass:(OBSStorageClass) storageClass;
@end
 
/**
 生命周期配置中表示过期时间的Container
 */
@interface OBSLifecycleExpiration: OBSBaseEntity
 
/**
 过期时间
 */
@property (nonatomic, strong, nonnull) NSNumber *days;
 
/**
 初始化过期时间对象
 
 @param days 过期时间
 @return 过期时间对象
 */
-(instancetype)initWithDays:(NSNumber*) days;
@end
 
/**
 历史版本过期时间的Container
 */
@interface OBSLifecycleNoncurrentVersionExpiration: OBSBaseEntity
 
/**
 历史版本过期时间
 */
@property (nonatomic, strong, nonnull) NSNumber *noncurrentDays;
 
/**
 初始化历史版本过期时间的Container
 
 @param days 过期时间
 @return 历史版本过期时间的Container对象
 */
-(instancetype)initWithDays:(NSNumber*) days;
@end
 
/**
 生命周期配置
 */
@interface OBSLifecycleRule : OBSBaseEntity
 
/**
 ID
 */
@property (nonatomic, strong, nonnull) NSString *ID;
 
/**
 对象名前缀
 */
@property (nonatomic, strong, nonnull) NSString *prefix;
 
/**
 标识当前Rule是否启用
 */
@property (nonatomic, assign) OBSLifecycleStatus status;
 
/**
 生命周期配置中表示迁移时间和迁移后对象存储级别的元素(仅针对对象的最新版本)
 */
@property (nonatomic, strong, nonnull) NSMutableArray<OBSLifecycleTransition*> *transitionList;
 
/**
 生命周期配置中表示对象的历史版本迁移时间和迁移后对象存储级别的元素
 */
@property (nonatomic, strong, nonnull) NSMutableArray<OBSLifecycleNoncurrentVersionTransition*> *noncurrentVersionTransitionList;
 
/**
 生命周期配置中表示过期时间的Container (仅针对对象的最新版本)
 */
@property (nonatomic, strong, nonnull) OBSLifecycleExpiration *expiration;
 
/**
 生命周期配置中表示历史版本过期时间的Container。您可以将该动作设置在已启用多版本(或暂停)的桶,来让系统删除对象的满足特定生命周期的历史版本(仅针对历史版本)
 */
@property (nonatomic, strong, nonnull) OBSLifecycleNoncurrentVersionExpiration *noncurrentVersionExpiration;
 
/**
 初始化生命周期配置
 
 @param ID ID
 @param prefix 对象名前缀
 @param status 标识当前Rule的启用状态
 @return 生命周期配置对象
 */
-(instancetype)initWithID:(NSString*) ID prefix:(NSString*) prefix status:(OBSLifecycleStatus) status;
@end
 
#pragma mark bucket website
 
@interface OBSAbstractWebsiteConf: OBSBaseEntity
@end
 
 
/**
 配置所有请求重定向
 */
@interface OBSWebsiteConfRedirectAll : OBSAbstractWebsiteConf
 
/**
 重定向站点名
 */
@property (nonatomic, strong, nonnull) NSString *hostName;
 
/**
 请求种类
 */
@property (nonatomic, strong, nonnull) NSString *protocol;
 
/**
 初始化配置所有请求重定向
 
 @param hostName 重定向站点名
 @return 所有请求的重定向设置
 */
-(instancetype)initWithHostName:(NSString*)hostName;
@end
 
/**
 默认主页面
 */
@interface OBSWebsiteConfCustomIndexDocument: OBSBaseEntity
 
/**
 网页名
 */
@property (nonatomic, strong, nonnull) NSString *suffix;
 
/**
 初始化默认加载页面
 
 @param suffix 网页名
 @return 默认主页面
 */
-(instancetype)initWithSuffix:(NSString*)suffix;
@end
 
 
/**
 默认错误页面
 */
@interface OBSWebsiteConfCustomErrorDocument: OBSBaseEntity
 
/**
 网页名
 */
@property (nonatomic, strong, nonnull) NSString *key;
 
/**
 初始化错误加载页面
 
 @param key 网页名
 @return 错误加载页面
 */
-(instancetype)initWithKey:(NSString*)key;
@end
 
 
/**
 网站托管自定义规则设置
 */
@interface OBSWebsiteConfCustomRedirect: OBSBaseEntity
 
/**
 请求种类
 */
@property (nonatomic, strong, nonnull) NSString *protocol;
 
/**
 重定向站点
 */
@property (nonatomic, strong, nonnull) NSString *hostName;
 
/**
 重定向目录
 */
@property (nonatomic, strong, nonnull) NSString *replaceKeyPrefixWith;
 
/**
 重定向对象
 */
@property (nonatomic, strong, nonnull) NSString *replaceKeyWith;
 
/**
 重定向状态码
 */
@property (nonatomic, strong, nonnull) NSString *httpRedirectCode;
@end
 
 
/**
 重定向规则匹配的条件元素
 */
@interface OBSWebsiteConfCustomCondition: OBSBaseEntity
 
/**
 前缀名
 */
@property (nonatomic, strong, nonnull) NSString *keyPrefixEquals;
 
/**
 错误码
 */
@property (nonatomic, strong, nonnull) NSString *httpErrorCodeReturnedEquals;
 
/**
 初始化重定向规则匹配的元素
 
 @param keyPrefix 前缀名
 @return 重定向规则匹配的元素
 */
-(instancetype)initWithKeyPrefix:(NSString*) keyPrefix;
 
/**
 初始化重定向规则匹配的元素
 
 @param httpErrorCodeReturned 错误码
 @return 重定向规则匹配的元素
 */
-(instancetype)initWithKeyErrorCode:(NSString*) httpErrorCodeReturned;
@end
 
 
/**
 路由规则
 */
@interface OBSWebsiteConfCustomRoutingRule: OBSBaseEntity
 
/**
 重定向规则匹配的条件
 */
@property (nonatomic, strong, nonnull) OBSWebsiteConfCustomCondition *condition;
 
/**
 重定向配置
 */
@property (nonatomic, strong, nonnull) OBSWebsiteConfCustomRedirect *redirect;
 
/**
 初始化路由规则
 
 @param condition 重定向规则匹配的条件
 @param redirect 重定向配置
 @return 路由规则
 */
-(instancetype)initWithCondition:(OBSWebsiteConfCustomCondition*) condition redirect:(OBSWebsiteConfCustomRedirect*) redirect;
@end
 
/**
 自定义网站配置
 */
@interface OBSWebsiteConfCustom: OBSAbstractWebsiteConf
 
/**
 默认访问页面
 */
@property (nonatomic, strong, nonnull) NSMutableArray<OBSWebsiteConfCustomIndexDocument*> *indexDocumentList;
 
/**
 错误跳转页面
 */
@property (nonatomic, strong, nonnull) NSMutableArray<OBSWebsiteConfCustomErrorDocument*> *errorDocumentList;
 
/**
 路由规则表
 */
@property (nonatomic, strong, nonnull) NSMutableArray<OBSWebsiteConfCustomRoutingRule*> *routingRulesList;
@end
 
 
#pragma mark bucket versioning
// 桶多版本配置
@interface OBSBucketVersioningConfiguration : OBSBaseEntity
 
/**
 桶多版本状态
 */
@property (nonatomic, assign) OBSVersioningStatus status;
@end
 
#pragma mark bucket nofitication
 
/**
 定义过滤规则键值对的元素
 */
@interface OBSNotificationFilterRule : OBSBaseEntity<OBSMTLDictionaryItemOrderProtocol>
 
/**
 指定规则按对象名前缀或后缀进行过滤
 */
@property (nonatomic, strong, nonnull) NSString *name;
 
/**
 指定的对象名关键字
 */
@property (nonatomic, strong, nonnull) NSString *value;
 
/**
 初始化定义过滤规则键值对的元素
 
 @param name 指定规则按对象名前缀或后缀进行过滤
 @param value 指定的对象名关键字
 @return 过滤规则键值对的元素
 */
-(instancetype)initWithName:(NSString*) name value:(NSString*)value;
@end
 
/**
 通知设置
 */
@interface OBSNotificationFilter : OBSBaseEntity
 
/**
 通知设置的具体规则
 */
@property (nonatomic, strong, nonnull) NSMutableArray<OBSNotificationFilterRule*> *filterRuleList;
@end
 
 
/**
 配置事件通知元素的主题
 */
@interface OBSNotificationTopicConfiguration : OBSBaseEntity<OBSMTLDictionaryItemOrderProtocol>
 
/**
 每项事件通知配置的唯一标识
 */
@property (nonatomic, strong, nonnull) NSString *ID;
 
/**
 保存过滤对象名的一组规则
 */
@property (nonatomic, strong, nonnull) OBSNotificationFilter *filter;
 
/**
 事件通知主题的URN
 */
@property (nonatomic, strong, nonnull) NSString *topic;
 
/**
 事件列表
 */
@property (nonatomic, strong, nonnull) NSMutableArray<NSString*> *eventList;
@end
#pragma mark bucket tagging
@interface OBSBucketTag : OBSBaseEntity
@property (nonatomic, strong, nonnull) NSString *key;
@property (nonatomic, strong, nonnull) NSString *value;
-(instancetype)initWithKey:(NSString*) key value:(NSString*)value;
@end
 
#pragma mark part
@interface OBSPart: OBSBaseEntity
@property (nonatomic, strong, nonnull) NSNumber *partNumber;
@property (nonatomic, strong, nullable) NSDate *lastModified;
@property (nonatomic, strong, nonnull) NSString *etag;
@property (nonatomic, strong, nullable) NSNumber *size;
-(instancetype)initWithPartNumber:(NSNumber*) partNumber etag:(NSString*)etag;
@end
#endif  /* OBSServiceRequestCommonEntity_h */