1 /*
2  * Copyright 2009-2017 Alibaba Cloud All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 #include <alibabacloud/oss/client/Error.h>
19 
20 namespace AlibabaCloud
21 {
22 namespace OSS
23 {
24 	const char * GetModelErrorMsg(const int code);
25 
26     /*Error For Argument Check*/
27     const int ARG_ERROR_BASE   = ERROR_CLIENT_BASE + 1000;
28     const int ARG_ERROR_START  = ARG_ERROR_BASE;
29     const int ARG_ERROR_END    = ARG_ERROR_START +  999;
30 
31     /*Default*/
32     const int ARG_ERROR_DEFAULT     = ARG_ERROR_BASE + 0;
33     /*Common*/
34     const int ARG_ERROR_BUCKET_NAME = ARG_ERROR_BASE + 1;
35     const int ARG_ERROR_OBJECT_NAME = ARG_ERROR_BASE + 2;
36     /*CORS*/
37     const int ARG_ERROR_CORS_RULE_LIMIT                    = ARG_ERROR_BASE + 3;
38     const int ARG_ERROR_CORS_ALLOWEDORIGINS_EMPTY          = ARG_ERROR_BASE + 4;
39     const int ARG_ERROR_CORS_ALLOWEDORIGINS_ASTERISK_COUNT = ARG_ERROR_BASE + 5;
40     const int ARG_ERROR_CORS_ALLOWEDMETHODS_EMPTY          = ARG_ERROR_BASE + 6;
41     const int ARG_ERROR_CORS_ALLOWEDMETHODS_VALUE          = ARG_ERROR_BASE + 7;
42     const int ARG_ERROR_CORS_ALLOWEDHEADERS_ASTERISK_COUNT = ARG_ERROR_BASE + 8;
43     const int ARG_ERROR_CORS_EXPOSEHEADERS_ASTERISK_COUNT  = ARG_ERROR_BASE + 9;
44     const int ARG_ERROR_CORS_MAXAGESECONDS_RANGE           = ARG_ERROR_BASE + 10;
45     /*Logging*/
46     const int ARG_ERROR_LOGGING_TARGETPREFIX_INVALID  = ARG_ERROR_BASE + 11;
47     /*StorageCapacity*/
48     const int ARG_ERROR_STORAGECAPACITY_INVALID = ARG_ERROR_BASE + 12;
49     /*WebSiet*/
50     const int ARG_ERROR_WEBSITE_INDEX_DOCCUMENT_EMPTY        = ARG_ERROR_BASE + 13;
51     const int ARG_ERROR_WEBSITE_INDEX_DOCCUMENT_NAME_INVALID = ARG_ERROR_BASE + 14;
52     const int ARG_ERROR_WEBSITE_ERROR_DOCCUMENT_NAME_INVALID = ARG_ERROR_BASE + 15;
53     /*iostream request body*/
54     const int ARG_ERROR_REQUEST_BODY_NULLPTR    = ARG_ERROR_BASE + 16;
55     const int ARG_ERROR_REQUEST_BODY_FAIL_STATE = ARG_ERROR_BASE + 17;
56     const int ARG_ERROR_REQUEST_BODY_BAD_STATE  = ARG_ERROR_BASE + 18;
57     /*MultipartUpload*/
58     const int ARG_ERROR_MULTIPARTUPLOAD_PARTLIST_EMPTY   = ARG_ERROR_BASE + 19;
59     const int ARG_ERROR_MULTIPARTUPLOAD_PARTSIZE_RANGE   = ARG_ERROR_BASE + 20;
60     const int ARG_ERROR_MULTIPARTUPLOAD_PARTNUMBER_RANGE = ARG_ERROR_BASE + 21;
61     /*Lifecycle Rules*/
62     const int ARG_ERROR_LIFECYCLE_RULE_LIMIT       = ARG_ERROR_BASE + 22;
63     const int ARG_ERROR_LIFECYCLE_RULE_EMPTY       = ARG_ERROR_BASE + 23;
64     const int ARG_ERROR_LIFECYCLE_RULE_EXPIRATION  = ARG_ERROR_BASE + 24;
65     const int ARG_ERROR_LIFECYCLE_RULE_ONLY_ONE_FOR_BUCKET = ARG_ERROR_BASE + 25;
66     const int ARG_ERROR_LIFECYCLE_RULE_CONFIG_EMPTY = ARG_ERROR_BASE + 26;
67 
68     /*Resumable Upload*/
69     const int ARG_ERROR_UPLOAD_FILE_PATH_EMPTY = ARG_ERROR_BASE + 27;
70     const int ARG_ERROR_OPEN_UPLOAD_FILE = ARG_ERROR_BASE + 28;
71     const int ARG_ERROR_CHECK_PART_SIZE_LOWER = ARG_ERROR_BASE + 29;
72     const int ARG_ERROR_CHECK_THREAD_NUM_LOWER = ARG_ERROR_BASE + 30;
73     const int ARG_ERROR_CHECK_POINT_DIR_NONEXIST = ARG_ERROR_BASE + 31;
74     const int ARG_ERROR_PARSE_UPLOAD_RECORD_FILE = ARG_ERROR_BASE + 32;
75     const int ARG_ERROR_UPLOAD_FILE_MODIFIED = ARG_ERROR_BASE + 33;
76     const int ARG_ERROR_UPLOAD_RECORD_INVALID = ARG_ERROR_BASE + 34;
77 
78     /*Resumable Copy*/
79     const int ARG_ERROR_PARSE_COPY_RECORD_FILE = ARG_ERROR_BASE + 35;
80     const int ARG_ERROR_COPY_SRC_OBJECT_MODIFIED = ARG_ERROR_BASE + 36;
81     const int ARG_ERROR_COPY_RECORD_INVALID = ARG_ERROR_BASE + 37;
82 
83     /*Resumable Download*/
84     const int ARG_ERROR_INVALID_RANGE = ARG_ERROR_BASE + 38;
85     const int ARG_ERROR_DOWNLOAD_FILE_PATH_EMPTY = ARG_ERROR_BASE + 39;
86     const int ARG_ERROR_DOWNLOAD_OBJECT_MODIFIED = ARG_ERROR_BASE + 40;
87     const int ARG_ERROR_PARSE_DOWNLOAD_RECORD_FILE = ARG_ERROR_BASE + 41;
88     const int ARG_ERROR_INVALID_RANGE_IN_DWONLOAD_RECORD = ARG_ERROR_BASE + 42;
89     const int ARG_ERROR_RANGE_HAS_BEEN_RESET = ARG_ERROR_BASE + 43;
90     const int ARG_ERROR_OPEN_DOWNLOAD_TEMP_FILE = ARG_ERROR_BASE + 44;
91 
92     /*GetObject*/
93     const int ARG_ERROR_OBJECT_RANGE_INVALID = ARG_ERROR_BASE + 45;
94     /*LiveChannel*/
95     const int ARG_ERROR_LIVECHANNEL_BAD_STATUS_PARAM = ARG_ERROR_BASE + 46;
96     const int ARG_ERROR_LIVECHANNEL_BAD_CHANNELNAME_PARAM = ARG_ERROR_BASE + 47;
97     const int ARG_ERROR_LIVECHANNEL_BAD_DEST_BUCKET_PARAM = ARG_ERROR_BASE + 48;
98     const int ARG_ERROR_LIVECHANNEL_BAD_DESCRIPTION_PARAM = ARG_ERROR_BASE + 49;
99     const int ARG_ERROR_LIVECHANNEL_BAD_CHANNEL_TYPE_PARAM = ARG_ERROR_BASE + 50;
100     const int ARG_ERROR_LIVECHANNEL_BAD_FRAGDURATION_PARAM = ARG_ERROR_BASE + 51;
101     const int ARG_ERROR_LIVECHANNEL_BAD_FRAGCOUNT_PARAM = ARG_ERROR_BASE + 52;
102     const int ARG_ERROR_LIVECHANNEL_BAD_PALYLIST_PARAM = ARG_ERROR_BASE + 53;
103     const int ARG_ERROR_LIVECHANNEL_BAD_SNAPSHOT_PARAM = ARG_ERROR_BASE + 54;
104     const int ARG_ERROR_LIVECHANNEL_BAD_TIME_PARAM = ARG_ERROR_BASE + 55;
105     const int ARG_ERROR_LIVECHANNEL_BAD_MAXKEY_PARAM = ARG_ERROR_BASE + 56;
106 
107     /*SelectObject*/
108     const int ARG_ERROR_SELECT_OBJECT_RANGE_INVALID = ARG_ERROR_BASE + 57;
109     const int ARG_ERROR_SELECT_OBJECT_LINE_RANGE_INVALID = ARG_ERROR_BASE + 58;
110     const int ARG_ERROR_SELECT_OBJECT_SPLIT_RANGE_INVALID = ARG_ERROR_BASE + 59;
111     const int ARG_ERROR_SELECT_OBJECT_NOT_SQL_EXPRESSION = ARG_ERROR_BASE + 60;
112     const int ARG_ERROR_SELECT_OBJECT_CHECK_SUM_FAILED = ARG_ERROR_BASE + 61;
113     const int ARG_ERROR_SELECT_OBJECT_NULL_POINT = ARG_ERROR_BASE + 62;
114     const int ARG_ERROR_SELECT_OBJECT_PROCESS_NOT_SAME = ARG_ERROR_BASE + 63;
115 
116     /*CreateSelectObjectMeta*/
117     const int ARG_ERROR_CREATE_SELECT_OBJECT_META_NULL_POINT = ARG_ERROR_BASE + 64;
118 
119     /*Tagging*/
120     const int ARG_ERROR_TAGGING_TAGS_LIMIT = ARG_ERROR_BASE + 65;
121     const int ARG_ERROR_TAGGING_TAG_KEY_LIMIT = ARG_ERROR_BASE + 66;
122     const int ARG_ERROR_TAGGING_TAG_VALUE_LIMIT = ARG_ERROR_BASE + 67;
123 
124     /*Resumable for wstring path*/
125     const int ARG_ERROR_PATH_NOT_SUPPORT_WSTRING_TYPE = ARG_ERROR_BASE + 68;
126     const int ARG_ERROR_PATH_NOT_SAME_TYPE = ARG_ERROR_BASE + 69;
127 }
128 }
129 
130