OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis_beta.logging.v1beta3; | 3 library googleapis_beta.logging.v1beta3; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:crypto/crypto.dart' as crypto; |
10 import 'package:http/http.dart' as http; | 11 import 'package:http/http.dart' as http; |
11 | 12 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
13 ApiRequestError, DetailedApiRequestError; | 14 ApiRequestError, DetailedApiRequestError; |
14 | 15 |
15 const core.String USER_AGENT = 'dart-api-client logging/v1beta3'; | 16 const core.String USER_AGENT = 'dart-api-client logging/v1beta3'; |
16 | 17 |
17 /** | 18 /** |
18 * Google Cloud Logging API lets you create logs, ingest log entries, and manage | 19 * Google Cloud Logging API lets you create logs, ingest log entries, and manage |
19 * log sinks. | 20 * log sinks. |
20 */ | 21 */ |
21 class LoggingApi { | 22 class LoggingApi { |
22 /** View and manage your data across Google Cloud Platform services */ | 23 /** View and manage your data across Google Cloud Platform services */ |
23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
24 | 25 |
| 26 /** Administrate log data for your projects */ |
| 27 static const LoggingAdminScope = "https://www.googleapis.com/auth/logging.admi
n"; |
| 28 |
| 29 /** View log data for your projects */ |
| 30 static const LoggingReadScope = "https://www.googleapis.com/auth/logging.read"
; |
| 31 |
| 32 /** Submit log data for your projects */ |
| 33 static const LoggingWriteScope = "https://www.googleapis.com/auth/logging.writ
e"; |
| 34 |
25 | 35 |
26 final commons.ApiRequester _requester; | 36 final commons.ApiRequester _requester; |
27 | 37 |
28 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 38 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
29 | 39 |
30 LoggingApi(http.Client client, {core.String rootUrl: "https://logging.googleap
is.com/", core.String servicePath: ""}) : | 40 LoggingApi(http.Client client, {core.String rootUrl: "https://logging.googleap
is.com/", core.String servicePath: ""}) : |
31 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 41 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
32 } | 42 } |
33 | 43 |
34 | 44 |
35 class ProjectsResourceApi { | 45 class ProjectsResourceApi { |
36 final commons.ApiRequester _requester; | 46 final commons.ApiRequester _requester; |
37 | 47 |
38 ProjectsLogServicesResourceApi get logServices => new ProjectsLogServicesResou
rceApi(_requester); | 48 ProjectsLogServicesResourceApi get logServices => new ProjectsLogServicesResou
rceApi(_requester); |
39 ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester); | 49 ProjectsLogsResourceApi get logs => new ProjectsLogsResourceApi(_requester); |
| 50 ProjectsSinksResourceApi get sinks => new ProjectsSinksResourceApi(_requester)
; |
40 | 51 |
41 ProjectsResourceApi(commons.ApiRequester client) : | 52 ProjectsResourceApi(commons.ApiRequester client) : |
42 _requester = client; | 53 _requester = client; |
43 } | 54 } |
44 | 55 |
45 | 56 |
46 class ProjectsLogServicesResourceApi { | 57 class ProjectsLogServicesResourceApi { |
47 final commons.ApiRequester _requester; | 58 final commons.ApiRequester _requester; |
48 | 59 |
49 ProjectsLogServicesIndexesResourceApi get indexes => new ProjectsLogServicesIn
dexesResourceApi(_requester); | 60 ProjectsLogServicesIndexesResourceApi get indexes => new ProjectsLogServicesIn
dexesResourceApi(_requester); |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 queryParams: _queryParams, | 921 queryParams: _queryParams, |
911 uploadOptions: _uploadOptions, | 922 uploadOptions: _uploadOptions, |
912 uploadMedia: _uploadMedia, | 923 uploadMedia: _uploadMedia, |
913 downloadOptions: _downloadOptions); | 924 downloadOptions: _downloadOptions); |
914 return _response.then((data) => new LogSink.fromJson(data)); | 925 return _response.then((data) => new LogSink.fromJson(data)); |
915 } | 926 } |
916 | 927 |
917 } | 928 } |
918 | 929 |
919 | 930 |
| 931 class ProjectsSinksResourceApi { |
| 932 final commons.ApiRequester _requester; |
| 933 |
| 934 ProjectsSinksResourceApi(commons.ApiRequester client) : |
| 935 _requester = client; |
| 936 |
| 937 /** |
| 938 * Creates the specified sink resource. |
| 939 * |
| 940 * [request] - The metadata request object. |
| 941 * |
| 942 * Request parameters: |
| 943 * |
| 944 * [projectsId] - Part of `projectName`. The name of the project in which to |
| 945 * create a sink. |
| 946 * |
| 947 * Completes with a [LogSink]. |
| 948 * |
| 949 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 950 * error. |
| 951 * |
| 952 * If the used [http.Client] completes with an error when making a REST call, |
| 953 * this method will complete with the same error. |
| 954 */ |
| 955 async.Future<LogSink> create(LogSink request, core.String projectsId) { |
| 956 var _url = null; |
| 957 var _queryParams = new core.Map(); |
| 958 var _uploadMedia = null; |
| 959 var _uploadOptions = null; |
| 960 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 961 var _body = null; |
| 962 |
| 963 if (request != null) { |
| 964 _body = convert.JSON.encode((request).toJson()); |
| 965 } |
| 966 if (projectsId == null) { |
| 967 throw new core.ArgumentError("Parameter projectsId is required."); |
| 968 } |
| 969 |
| 970 _url = 'v1beta3/projects/' + commons.Escaper.ecapeVariable('$projectsId') +
'/sinks'; |
| 971 |
| 972 var _response = _requester.request(_url, |
| 973 "POST", |
| 974 body: _body, |
| 975 queryParams: _queryParams, |
| 976 uploadOptions: _uploadOptions, |
| 977 uploadMedia: _uploadMedia, |
| 978 downloadOptions: _downloadOptions); |
| 979 return _response.then((data) => new LogSink.fromJson(data)); |
| 980 } |
| 981 |
| 982 /** |
| 983 * Deletes the specified sink. |
| 984 * |
| 985 * Request parameters: |
| 986 * |
| 987 * [projectsId] - Part of `sinkName`. The name of the sink to delete. |
| 988 * |
| 989 * [sinksId] - Part of `sinkName`. See documentation of `projectsId`. |
| 990 * |
| 991 * Completes with a [Empty]. |
| 992 * |
| 993 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 994 * error. |
| 995 * |
| 996 * If the used [http.Client] completes with an error when making a REST call, |
| 997 * this method will complete with the same error. |
| 998 */ |
| 999 async.Future<Empty> delete(core.String projectsId, core.String sinksId) { |
| 1000 var _url = null; |
| 1001 var _queryParams = new core.Map(); |
| 1002 var _uploadMedia = null; |
| 1003 var _uploadOptions = null; |
| 1004 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1005 var _body = null; |
| 1006 |
| 1007 if (projectsId == null) { |
| 1008 throw new core.ArgumentError("Parameter projectsId is required."); |
| 1009 } |
| 1010 if (sinksId == null) { |
| 1011 throw new core.ArgumentError("Parameter sinksId is required."); |
| 1012 } |
| 1013 |
| 1014 _url = 'v1beta3/projects/' + commons.Escaper.ecapeVariable('$projectsId') +
'/sinks/' + commons.Escaper.ecapeVariable('$sinksId'); |
| 1015 |
| 1016 var _response = _requester.request(_url, |
| 1017 "DELETE", |
| 1018 body: _body, |
| 1019 queryParams: _queryParams, |
| 1020 uploadOptions: _uploadOptions, |
| 1021 uploadMedia: _uploadMedia, |
| 1022 downloadOptions: _downloadOptions); |
| 1023 return _response.then((data) => new Empty.fromJson(data)); |
| 1024 } |
| 1025 |
| 1026 /** |
| 1027 * Gets the specified sink resource. |
| 1028 * |
| 1029 * Request parameters: |
| 1030 * |
| 1031 * [projectsId] - Part of `sinkName`. The name of the sink to return. |
| 1032 * |
| 1033 * [sinksId] - Part of `sinkName`. See documentation of `projectsId`. |
| 1034 * |
| 1035 * Completes with a [LogSink]. |
| 1036 * |
| 1037 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1038 * error. |
| 1039 * |
| 1040 * If the used [http.Client] completes with an error when making a REST call, |
| 1041 * this method will complete with the same error. |
| 1042 */ |
| 1043 async.Future<LogSink> get(core.String projectsId, core.String sinksId) { |
| 1044 var _url = null; |
| 1045 var _queryParams = new core.Map(); |
| 1046 var _uploadMedia = null; |
| 1047 var _uploadOptions = null; |
| 1048 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1049 var _body = null; |
| 1050 |
| 1051 if (projectsId == null) { |
| 1052 throw new core.ArgumentError("Parameter projectsId is required."); |
| 1053 } |
| 1054 if (sinksId == null) { |
| 1055 throw new core.ArgumentError("Parameter sinksId is required."); |
| 1056 } |
| 1057 |
| 1058 _url = 'v1beta3/projects/' + commons.Escaper.ecapeVariable('$projectsId') +
'/sinks/' + commons.Escaper.ecapeVariable('$sinksId'); |
| 1059 |
| 1060 var _response = _requester.request(_url, |
| 1061 "GET", |
| 1062 body: _body, |
| 1063 queryParams: _queryParams, |
| 1064 uploadOptions: _uploadOptions, |
| 1065 uploadMedia: _uploadMedia, |
| 1066 downloadOptions: _downloadOptions); |
| 1067 return _response.then((data) => new LogSink.fromJson(data)); |
| 1068 } |
| 1069 |
| 1070 /** |
| 1071 * Lists sinks associated with the specified project. |
| 1072 * |
| 1073 * Request parameters: |
| 1074 * |
| 1075 * [projectsId] - Part of `projectName`. The name of the project for which to |
| 1076 * list sinks. |
| 1077 * |
| 1078 * Completes with a [ListSinksResponse]. |
| 1079 * |
| 1080 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1081 * error. |
| 1082 * |
| 1083 * If the used [http.Client] completes with an error when making a REST call, |
| 1084 * this method will complete with the same error. |
| 1085 */ |
| 1086 async.Future<ListSinksResponse> list(core.String projectsId) { |
| 1087 var _url = null; |
| 1088 var _queryParams = new core.Map(); |
| 1089 var _uploadMedia = null; |
| 1090 var _uploadOptions = null; |
| 1091 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1092 var _body = null; |
| 1093 |
| 1094 if (projectsId == null) { |
| 1095 throw new core.ArgumentError("Parameter projectsId is required."); |
| 1096 } |
| 1097 |
| 1098 _url = 'v1beta3/projects/' + commons.Escaper.ecapeVariable('$projectsId') +
'/sinks'; |
| 1099 |
| 1100 var _response = _requester.request(_url, |
| 1101 "GET", |
| 1102 body: _body, |
| 1103 queryParams: _queryParams, |
| 1104 uploadOptions: _uploadOptions, |
| 1105 uploadMedia: _uploadMedia, |
| 1106 downloadOptions: _downloadOptions); |
| 1107 return _response.then((data) => new ListSinksResponse.fromJson(data)); |
| 1108 } |
| 1109 |
| 1110 /** |
| 1111 * Creates or update the specified sink resource. |
| 1112 * |
| 1113 * [request] - The metadata request object. |
| 1114 * |
| 1115 * Request parameters: |
| 1116 * |
| 1117 * [projectsId] - Part of `sinkName`. The name of the sink to update. |
| 1118 * |
| 1119 * [sinksId] - Part of `sinkName`. See documentation of `projectsId`. |
| 1120 * |
| 1121 * Completes with a [LogSink]. |
| 1122 * |
| 1123 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1124 * error. |
| 1125 * |
| 1126 * If the used [http.Client] completes with an error when making a REST call, |
| 1127 * this method will complete with the same error. |
| 1128 */ |
| 1129 async.Future<LogSink> update(LogSink request, core.String projectsId, core.Str
ing sinksId) { |
| 1130 var _url = null; |
| 1131 var _queryParams = new core.Map(); |
| 1132 var _uploadMedia = null; |
| 1133 var _uploadOptions = null; |
| 1134 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1135 var _body = null; |
| 1136 |
| 1137 if (request != null) { |
| 1138 _body = convert.JSON.encode((request).toJson()); |
| 1139 } |
| 1140 if (projectsId == null) { |
| 1141 throw new core.ArgumentError("Parameter projectsId is required."); |
| 1142 } |
| 1143 if (sinksId == null) { |
| 1144 throw new core.ArgumentError("Parameter sinksId is required."); |
| 1145 } |
| 1146 |
| 1147 _url = 'v1beta3/projects/' + commons.Escaper.ecapeVariable('$projectsId') +
'/sinks/' + commons.Escaper.ecapeVariable('$sinksId'); |
| 1148 |
| 1149 var _response = _requester.request(_url, |
| 1150 "PUT", |
| 1151 body: _body, |
| 1152 queryParams: _queryParams, |
| 1153 uploadOptions: _uploadOptions, |
| 1154 uploadMedia: _uploadMedia, |
| 1155 downloadOptions: _downloadOptions); |
| 1156 return _response.then((data) => new LogSink.fromJson(data)); |
| 1157 } |
| 1158 |
| 1159 } |
| 1160 |
| 1161 |
| 1162 |
| 1163 /** BigQuery request and response messages for audit log. */ |
| 1164 class AuditData { |
| 1165 /** Dataset insert request. */ |
| 1166 DatasetInsertRequest datasetInsertRequest; |
| 1167 /** Dataset insert response. */ |
| 1168 DatasetInsertResponse datasetInsertResponse; |
| 1169 /** Dataset list request. */ |
| 1170 DatasetListRequest datasetListRequest; |
| 1171 /** Dataset update request. */ |
| 1172 DatasetUpdateRequest datasetUpdateRequest; |
| 1173 /** Dataset update response. */ |
| 1174 DatasetUpdateResponse datasetUpdateResponse; |
| 1175 /** Job get query results request. */ |
| 1176 JobGetQueryResultsRequest jobGetQueryResultsRequest; |
| 1177 /** Job get query results response. */ |
| 1178 JobGetQueryResultsResponse jobGetQueryResultsResponse; |
| 1179 /** Job insert request. */ |
| 1180 JobInsertRequest jobInsertRequest; |
| 1181 /** Job query-done response. Use this information for usage analysis. */ |
| 1182 JobQueryDoneResponse jobQueryDoneResponse; |
| 1183 /** Job query request. */ |
| 1184 JobQueryRequest jobQueryRequest; |
| 1185 /** Job query response. */ |
| 1186 JobQueryResponse jobQueryResponse; |
| 1187 /** Table data-list request. */ |
| 1188 TableDataListRequest tableDataListRequest; |
| 1189 /** Table insert request. */ |
| 1190 TableInsertRequest tableInsertRequest; |
| 1191 /** Table insert response. */ |
| 1192 TableInsertResponse tableInsertResponse; |
| 1193 /** Table update request. */ |
| 1194 TableUpdateRequest tableUpdateRequest; |
| 1195 /** Table update response. */ |
| 1196 TableUpdateResponse tableUpdateResponse; |
| 1197 |
| 1198 AuditData(); |
| 1199 |
| 1200 AuditData.fromJson(core.Map _json) { |
| 1201 if (_json.containsKey("datasetInsertRequest")) { |
| 1202 datasetInsertRequest = new DatasetInsertRequest.fromJson(_json["datasetIns
ertRequest"]); |
| 1203 } |
| 1204 if (_json.containsKey("datasetInsertResponse")) { |
| 1205 datasetInsertResponse = new DatasetInsertResponse.fromJson(_json["datasetI
nsertResponse"]); |
| 1206 } |
| 1207 if (_json.containsKey("datasetListRequest")) { |
| 1208 datasetListRequest = new DatasetListRequest.fromJson(_json["datasetListReq
uest"]); |
| 1209 } |
| 1210 if (_json.containsKey("datasetUpdateRequest")) { |
| 1211 datasetUpdateRequest = new DatasetUpdateRequest.fromJson(_json["datasetUpd
ateRequest"]); |
| 1212 } |
| 1213 if (_json.containsKey("datasetUpdateResponse")) { |
| 1214 datasetUpdateResponse = new DatasetUpdateResponse.fromJson(_json["datasetU
pdateResponse"]); |
| 1215 } |
| 1216 if (_json.containsKey("jobGetQueryResultsRequest")) { |
| 1217 jobGetQueryResultsRequest = new JobGetQueryResultsRequest.fromJson(_json["
jobGetQueryResultsRequest"]); |
| 1218 } |
| 1219 if (_json.containsKey("jobGetQueryResultsResponse")) { |
| 1220 jobGetQueryResultsResponse = new JobGetQueryResultsResponse.fromJson(_json
["jobGetQueryResultsResponse"]); |
| 1221 } |
| 1222 if (_json.containsKey("jobInsertRequest")) { |
| 1223 jobInsertRequest = new JobInsertRequest.fromJson(_json["jobInsertRequest"]
); |
| 1224 } |
| 1225 if (_json.containsKey("jobQueryDoneResponse")) { |
| 1226 jobQueryDoneResponse = new JobQueryDoneResponse.fromJson(_json["jobQueryDo
neResponse"]); |
| 1227 } |
| 1228 if (_json.containsKey("jobQueryRequest")) { |
| 1229 jobQueryRequest = new JobQueryRequest.fromJson(_json["jobQueryRequest"]); |
| 1230 } |
| 1231 if (_json.containsKey("jobQueryResponse")) { |
| 1232 jobQueryResponse = new JobQueryResponse.fromJson(_json["jobQueryResponse"]
); |
| 1233 } |
| 1234 if (_json.containsKey("tableDataListRequest")) { |
| 1235 tableDataListRequest = new TableDataListRequest.fromJson(_json["tableDataL
istRequest"]); |
| 1236 } |
| 1237 if (_json.containsKey("tableInsertRequest")) { |
| 1238 tableInsertRequest = new TableInsertRequest.fromJson(_json["tableInsertReq
uest"]); |
| 1239 } |
| 1240 if (_json.containsKey("tableInsertResponse")) { |
| 1241 tableInsertResponse = new TableInsertResponse.fromJson(_json["tableInsertR
esponse"]); |
| 1242 } |
| 1243 if (_json.containsKey("tableUpdateRequest")) { |
| 1244 tableUpdateRequest = new TableUpdateRequest.fromJson(_json["tableUpdateReq
uest"]); |
| 1245 } |
| 1246 if (_json.containsKey("tableUpdateResponse")) { |
| 1247 tableUpdateResponse = new TableUpdateResponse.fromJson(_json["tableUpdateR
esponse"]); |
| 1248 } |
| 1249 } |
| 1250 |
| 1251 core.Map toJson() { |
| 1252 var _json = new core.Map(); |
| 1253 if (datasetInsertRequest != null) { |
| 1254 _json["datasetInsertRequest"] = (datasetInsertRequest).toJson(); |
| 1255 } |
| 1256 if (datasetInsertResponse != null) { |
| 1257 _json["datasetInsertResponse"] = (datasetInsertResponse).toJson(); |
| 1258 } |
| 1259 if (datasetListRequest != null) { |
| 1260 _json["datasetListRequest"] = (datasetListRequest).toJson(); |
| 1261 } |
| 1262 if (datasetUpdateRequest != null) { |
| 1263 _json["datasetUpdateRequest"] = (datasetUpdateRequest).toJson(); |
| 1264 } |
| 1265 if (datasetUpdateResponse != null) { |
| 1266 _json["datasetUpdateResponse"] = (datasetUpdateResponse).toJson(); |
| 1267 } |
| 1268 if (jobGetQueryResultsRequest != null) { |
| 1269 _json["jobGetQueryResultsRequest"] = (jobGetQueryResultsRequest).toJson(); |
| 1270 } |
| 1271 if (jobGetQueryResultsResponse != null) { |
| 1272 _json["jobGetQueryResultsResponse"] = (jobGetQueryResultsResponse).toJson(
); |
| 1273 } |
| 1274 if (jobInsertRequest != null) { |
| 1275 _json["jobInsertRequest"] = (jobInsertRequest).toJson(); |
| 1276 } |
| 1277 if (jobQueryDoneResponse != null) { |
| 1278 _json["jobQueryDoneResponse"] = (jobQueryDoneResponse).toJson(); |
| 1279 } |
| 1280 if (jobQueryRequest != null) { |
| 1281 _json["jobQueryRequest"] = (jobQueryRequest).toJson(); |
| 1282 } |
| 1283 if (jobQueryResponse != null) { |
| 1284 _json["jobQueryResponse"] = (jobQueryResponse).toJson(); |
| 1285 } |
| 1286 if (tableDataListRequest != null) { |
| 1287 _json["tableDataListRequest"] = (tableDataListRequest).toJson(); |
| 1288 } |
| 1289 if (tableInsertRequest != null) { |
| 1290 _json["tableInsertRequest"] = (tableInsertRequest).toJson(); |
| 1291 } |
| 1292 if (tableInsertResponse != null) { |
| 1293 _json["tableInsertResponse"] = (tableInsertResponse).toJson(); |
| 1294 } |
| 1295 if (tableUpdateRequest != null) { |
| 1296 _json["tableUpdateRequest"] = (tableUpdateRequest).toJson(); |
| 1297 } |
| 1298 if (tableUpdateResponse != null) { |
| 1299 _json["tableUpdateResponse"] = (tableUpdateResponse).toJson(); |
| 1300 } |
| 1301 return _json; |
| 1302 } |
| 1303 } |
| 1304 |
| 1305 /** Common audit log format for Google Cloud Platform API calls. */ |
| 1306 class AuditLog { |
| 1307 /** Authentication information about the call. */ |
| 1308 AuthenticationInfo authenticationInfo; |
| 1309 /** |
| 1310 * Authorization information about the call. If there are multiple resources |
| 1311 * or permissions involved in authorizing the request, there will be one |
| 1312 * AuthorizationInfo element for each {resource, permission} tuple. |
| 1313 */ |
| 1314 core.List<AuthorizationInfo> authorizationInfo; |
| 1315 /** Service-specific data for BigQuery. */ |
| 1316 AuditData bigqueryData; |
| 1317 /** |
| 1318 * Name of the service method or operation. Defined by the service. For API |
| 1319 * call events, should match the name of the API method. For example, |
| 1320 * `google.datastore.v1.Datastore.RunQuery` |
| 1321 * `google.logging.v1.LoggingService.DeleteLog` |
| 1322 */ |
| 1323 core.String methodName; |
| 1324 /** |
| 1325 * If applicable, the number of items returned from a List or Query API |
| 1326 * method. |
| 1327 */ |
| 1328 core.String numResponseItems; |
| 1329 /** Metadata about the request. */ |
| 1330 RequestMetadata requestMetadata; |
| 1331 /** |
| 1332 * Resource name of the resource or collection that is the target of this |
| 1333 * request, as a scheme-less URI, not including the API service name. For |
| 1334 * example: shelves/shelf_id/books shelves/shelf_id/books/book_id |
| 1335 */ |
| 1336 core.String resourceName; |
| 1337 /** |
| 1338 * Service specific data about the request, response, and other event data. |
| 1339 * This should include all request parameters or response elements, except for |
| 1340 * parameters that are large or privacy-sensitive. It should never contain |
| 1341 * user-generated data (such as file contents). |
| 1342 * |
| 1343 * The values for Object must be JSON objects. It can consist of `num`, |
| 1344 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1345 */ |
| 1346 core.Map<core.String, core.Object> serviceData; |
| 1347 /** |
| 1348 * Name of the API service for the request. e.g., datastore.googleapis.com |
| 1349 */ |
| 1350 core.String serviceName; |
| 1351 /** The status of the overall API call. */ |
| 1352 Status status; |
| 1353 |
| 1354 AuditLog(); |
| 1355 |
| 1356 AuditLog.fromJson(core.Map _json) { |
| 1357 if (_json.containsKey("authenticationInfo")) { |
| 1358 authenticationInfo = new AuthenticationInfo.fromJson(_json["authentication
Info"]); |
| 1359 } |
| 1360 if (_json.containsKey("authorizationInfo")) { |
| 1361 authorizationInfo = _json["authorizationInfo"].map((value) => new Authoriz
ationInfo.fromJson(value)).toList(); |
| 1362 } |
| 1363 if (_json.containsKey("bigqueryData")) { |
| 1364 bigqueryData = new AuditData.fromJson(_json["bigqueryData"]); |
| 1365 } |
| 1366 if (_json.containsKey("methodName")) { |
| 1367 methodName = _json["methodName"]; |
| 1368 } |
| 1369 if (_json.containsKey("numResponseItems")) { |
| 1370 numResponseItems = _json["numResponseItems"]; |
| 1371 } |
| 1372 if (_json.containsKey("requestMetadata")) { |
| 1373 requestMetadata = new RequestMetadata.fromJson(_json["requestMetadata"]); |
| 1374 } |
| 1375 if (_json.containsKey("resourceName")) { |
| 1376 resourceName = _json["resourceName"]; |
| 1377 } |
| 1378 if (_json.containsKey("serviceData")) { |
| 1379 serviceData = _json["serviceData"]; |
| 1380 } |
| 1381 if (_json.containsKey("serviceName")) { |
| 1382 serviceName = _json["serviceName"]; |
| 1383 } |
| 1384 if (_json.containsKey("status")) { |
| 1385 status = new Status.fromJson(_json["status"]); |
| 1386 } |
| 1387 } |
| 1388 |
| 1389 core.Map toJson() { |
| 1390 var _json = new core.Map(); |
| 1391 if (authenticationInfo != null) { |
| 1392 _json["authenticationInfo"] = (authenticationInfo).toJson(); |
| 1393 } |
| 1394 if (authorizationInfo != null) { |
| 1395 _json["authorizationInfo"] = authorizationInfo.map((value) => (value).toJs
on()).toList(); |
| 1396 } |
| 1397 if (bigqueryData != null) { |
| 1398 _json["bigqueryData"] = (bigqueryData).toJson(); |
| 1399 } |
| 1400 if (methodName != null) { |
| 1401 _json["methodName"] = methodName; |
| 1402 } |
| 1403 if (numResponseItems != null) { |
| 1404 _json["numResponseItems"] = numResponseItems; |
| 1405 } |
| 1406 if (requestMetadata != null) { |
| 1407 _json["requestMetadata"] = (requestMetadata).toJson(); |
| 1408 } |
| 1409 if (resourceName != null) { |
| 1410 _json["resourceName"] = resourceName; |
| 1411 } |
| 1412 if (serviceData != null) { |
| 1413 _json["serviceData"] = serviceData; |
| 1414 } |
| 1415 if (serviceName != null) { |
| 1416 _json["serviceName"] = serviceName; |
| 1417 } |
| 1418 if (status != null) { |
| 1419 _json["status"] = (status).toJson(); |
| 1420 } |
| 1421 return _json; |
| 1422 } |
| 1423 } |
| 1424 |
| 1425 /** Authentication information for the call. */ |
| 1426 class AuthenticationInfo { |
| 1427 /** Email address of the authenticated user making the request */ |
| 1428 core.String principalEmail; |
| 1429 |
| 1430 AuthenticationInfo(); |
| 1431 |
| 1432 AuthenticationInfo.fromJson(core.Map _json) { |
| 1433 if (_json.containsKey("principalEmail")) { |
| 1434 principalEmail = _json["principalEmail"]; |
| 1435 } |
| 1436 } |
| 1437 |
| 1438 core.Map toJson() { |
| 1439 var _json = new core.Map(); |
| 1440 if (principalEmail != null) { |
| 1441 _json["principalEmail"] = principalEmail; |
| 1442 } |
| 1443 return _json; |
| 1444 } |
| 1445 } |
| 1446 |
| 1447 /** Authorization information for the call. */ |
| 1448 class AuthorizationInfo { |
| 1449 /** |
| 1450 * Whether or not authorization for this resource and permission was granted. |
| 1451 */ |
| 1452 core.bool granted; |
| 1453 /** The required IAM permission. */ |
| 1454 core.String permission; |
| 1455 /** |
| 1456 * The resource being accessed, as a REST-style string. For example: |
| 1457 * `bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID` |
| 1458 */ |
| 1459 core.String resource; |
| 1460 |
| 1461 AuthorizationInfo(); |
| 1462 |
| 1463 AuthorizationInfo.fromJson(core.Map _json) { |
| 1464 if (_json.containsKey("granted")) { |
| 1465 granted = _json["granted"]; |
| 1466 } |
| 1467 if (_json.containsKey("permission")) { |
| 1468 permission = _json["permission"]; |
| 1469 } |
| 1470 if (_json.containsKey("resource")) { |
| 1471 resource = _json["resource"]; |
| 1472 } |
| 1473 } |
| 1474 |
| 1475 core.Map toJson() { |
| 1476 var _json = new core.Map(); |
| 1477 if (granted != null) { |
| 1478 _json["granted"] = granted; |
| 1479 } |
| 1480 if (permission != null) { |
| 1481 _json["permission"] = permission; |
| 1482 } |
| 1483 if (resource != null) { |
| 1484 _json["resource"] = resource; |
| 1485 } |
| 1486 return _json; |
| 1487 } |
| 1488 } |
| 1489 |
| 1490 /** Access control list. */ |
| 1491 class BigQueryAcl { |
| 1492 /** Access control entry list. */ |
| 1493 core.List<Entry> entries; |
| 1494 |
| 1495 BigQueryAcl(); |
| 1496 |
| 1497 BigQueryAcl.fromJson(core.Map _json) { |
| 1498 if (_json.containsKey("entries")) { |
| 1499 entries = _json["entries"].map((value) => new Entry.fromJson(value)).toLis
t(); |
| 1500 } |
| 1501 } |
| 1502 |
| 1503 core.Map toJson() { |
| 1504 var _json = new core.Map(); |
| 1505 if (entries != null) { |
| 1506 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 1507 } |
| 1508 return _json; |
| 1509 } |
| 1510 } |
| 1511 |
| 1512 /** BigQuery dataset information. */ |
| 1513 class Dataset { |
| 1514 /** Access contol list for this dataset. */ |
| 1515 BigQueryAcl acl; |
| 1516 /** The creation time for this dataset. */ |
| 1517 core.String createTime; |
| 1518 /** The name of this dataset. */ |
| 1519 DatasetName datasetName; |
| 1520 /** |
| 1521 * The number of milliseconds which should be added to the creation time to |
| 1522 * determine the expiration time for newly created tables. If this value is |
| 1523 * null then no expiration time will be set for new tables. |
| 1524 */ |
| 1525 core.String defaultTableExpireDuration; |
| 1526 /** User-modifiable metadata for this dataset. */ |
| 1527 DatasetInfo info; |
| 1528 /** The last modified time for this dataset. */ |
| 1529 core.String updateTime; |
| 1530 |
| 1531 Dataset(); |
| 1532 |
| 1533 Dataset.fromJson(core.Map _json) { |
| 1534 if (_json.containsKey("acl")) { |
| 1535 acl = new BigQueryAcl.fromJson(_json["acl"]); |
| 1536 } |
| 1537 if (_json.containsKey("createTime")) { |
| 1538 createTime = _json["createTime"]; |
| 1539 } |
| 1540 if (_json.containsKey("datasetName")) { |
| 1541 datasetName = new DatasetName.fromJson(_json["datasetName"]); |
| 1542 } |
| 1543 if (_json.containsKey("defaultTableExpireDuration")) { |
| 1544 defaultTableExpireDuration = _json["defaultTableExpireDuration"]; |
| 1545 } |
| 1546 if (_json.containsKey("info")) { |
| 1547 info = new DatasetInfo.fromJson(_json["info"]); |
| 1548 } |
| 1549 if (_json.containsKey("updateTime")) { |
| 1550 updateTime = _json["updateTime"]; |
| 1551 } |
| 1552 } |
| 1553 |
| 1554 core.Map toJson() { |
| 1555 var _json = new core.Map(); |
| 1556 if (acl != null) { |
| 1557 _json["acl"] = (acl).toJson(); |
| 1558 } |
| 1559 if (createTime != null) { |
| 1560 _json["createTime"] = createTime; |
| 1561 } |
| 1562 if (datasetName != null) { |
| 1563 _json["datasetName"] = (datasetName).toJson(); |
| 1564 } |
| 1565 if (defaultTableExpireDuration != null) { |
| 1566 _json["defaultTableExpireDuration"] = defaultTableExpireDuration; |
| 1567 } |
| 1568 if (info != null) { |
| 1569 _json["info"] = (info).toJson(); |
| 1570 } |
| 1571 if (updateTime != null) { |
| 1572 _json["updateTime"] = updateTime; |
| 1573 } |
| 1574 return _json; |
| 1575 } |
| 1576 } |
| 1577 |
| 1578 /** User-provided metadata for a dataset, primarily for display in the UI. */ |
| 1579 class DatasetInfo { |
| 1580 /** |
| 1581 * The description of a dataset. This can be several sentences or paragraphs |
| 1582 * describing the dataset contents in detail. |
| 1583 */ |
| 1584 core.String description; |
| 1585 /** |
| 1586 * The human-readable name of a dataset. This should be a short phrase |
| 1587 * identifying the dataset (e.g., "Analytics Data 2011"). |
| 1588 */ |
| 1589 core.String friendlyName; |
| 1590 |
| 1591 DatasetInfo(); |
| 1592 |
| 1593 DatasetInfo.fromJson(core.Map _json) { |
| 1594 if (_json.containsKey("description")) { |
| 1595 description = _json["description"]; |
| 1596 } |
| 1597 if (_json.containsKey("friendlyName")) { |
| 1598 friendlyName = _json["friendlyName"]; |
| 1599 } |
| 1600 } |
| 1601 |
| 1602 core.Map toJson() { |
| 1603 var _json = new core.Map(); |
| 1604 if (description != null) { |
| 1605 _json["description"] = description; |
| 1606 } |
| 1607 if (friendlyName != null) { |
| 1608 _json["friendlyName"] = friendlyName; |
| 1609 } |
| 1610 return _json; |
| 1611 } |
| 1612 } |
| 1613 |
| 1614 /** Dataset insert request. */ |
| 1615 class DatasetInsertRequest { |
| 1616 /** Dataset insert payload. */ |
| 1617 Dataset resource; |
| 1618 |
| 1619 DatasetInsertRequest(); |
| 1620 |
| 1621 DatasetInsertRequest.fromJson(core.Map _json) { |
| 1622 if (_json.containsKey("resource")) { |
| 1623 resource = new Dataset.fromJson(_json["resource"]); |
| 1624 } |
| 1625 } |
| 1626 |
| 1627 core.Map toJson() { |
| 1628 var _json = new core.Map(); |
| 1629 if (resource != null) { |
| 1630 _json["resource"] = (resource).toJson(); |
| 1631 } |
| 1632 return _json; |
| 1633 } |
| 1634 } |
| 1635 |
| 1636 /** Dataset insert response. */ |
| 1637 class DatasetInsertResponse { |
| 1638 /** Final state of inserted dataset. */ |
| 1639 Dataset resource; |
| 1640 |
| 1641 DatasetInsertResponse(); |
| 1642 |
| 1643 DatasetInsertResponse.fromJson(core.Map _json) { |
| 1644 if (_json.containsKey("resource")) { |
| 1645 resource = new Dataset.fromJson(_json["resource"]); |
| 1646 } |
| 1647 } |
| 1648 |
| 1649 core.Map toJson() { |
| 1650 var _json = new core.Map(); |
| 1651 if (resource != null) { |
| 1652 _json["resource"] = (resource).toJson(); |
| 1653 } |
| 1654 return _json; |
| 1655 } |
| 1656 } |
| 1657 |
| 1658 /** Dataset list request. */ |
| 1659 class DatasetListRequest { |
| 1660 /** Whether to list all datasets, including hidden ones. */ |
| 1661 core.bool listAll; |
| 1662 |
| 1663 DatasetListRequest(); |
| 1664 |
| 1665 DatasetListRequest.fromJson(core.Map _json) { |
| 1666 if (_json.containsKey("listAll")) { |
| 1667 listAll = _json["listAll"]; |
| 1668 } |
| 1669 } |
| 1670 |
| 1671 core.Map toJson() { |
| 1672 var _json = new core.Map(); |
| 1673 if (listAll != null) { |
| 1674 _json["listAll"] = listAll; |
| 1675 } |
| 1676 return _json; |
| 1677 } |
| 1678 } |
| 1679 |
| 1680 /** Fully qualified name for a dataset. */ |
| 1681 class DatasetName { |
| 1682 /** The ID of the dataset (scoped to the project above). */ |
| 1683 core.String datasetId; |
| 1684 /** |
| 1685 * A string containing the id of this project. The id may be the alphanumeric |
| 1686 * project ID, or the project number. |
| 1687 */ |
| 1688 core.String projectId; |
| 1689 |
| 1690 DatasetName(); |
| 1691 |
| 1692 DatasetName.fromJson(core.Map _json) { |
| 1693 if (_json.containsKey("datasetId")) { |
| 1694 datasetId = _json["datasetId"]; |
| 1695 } |
| 1696 if (_json.containsKey("projectId")) { |
| 1697 projectId = _json["projectId"]; |
| 1698 } |
| 1699 } |
| 1700 |
| 1701 core.Map toJson() { |
| 1702 var _json = new core.Map(); |
| 1703 if (datasetId != null) { |
| 1704 _json["datasetId"] = datasetId; |
| 1705 } |
| 1706 if (projectId != null) { |
| 1707 _json["projectId"] = projectId; |
| 1708 } |
| 1709 return _json; |
| 1710 } |
| 1711 } |
| 1712 |
| 1713 /** Dataset update request. */ |
| 1714 class DatasetUpdateRequest { |
| 1715 /** Dataset update payload. */ |
| 1716 Dataset resource; |
| 1717 |
| 1718 DatasetUpdateRequest(); |
| 1719 |
| 1720 DatasetUpdateRequest.fromJson(core.Map _json) { |
| 1721 if (_json.containsKey("resource")) { |
| 1722 resource = new Dataset.fromJson(_json["resource"]); |
| 1723 } |
| 1724 } |
| 1725 |
| 1726 core.Map toJson() { |
| 1727 var _json = new core.Map(); |
| 1728 if (resource != null) { |
| 1729 _json["resource"] = (resource).toJson(); |
| 1730 } |
| 1731 return _json; |
| 1732 } |
| 1733 } |
| 1734 |
| 1735 /** Dataset update response. */ |
| 1736 class DatasetUpdateResponse { |
| 1737 /** Final state of updated dataset. */ |
| 1738 Dataset resource; |
| 1739 |
| 1740 DatasetUpdateResponse(); |
| 1741 |
| 1742 DatasetUpdateResponse.fromJson(core.Map _json) { |
| 1743 if (_json.containsKey("resource")) { |
| 1744 resource = new Dataset.fromJson(_json["resource"]); |
| 1745 } |
| 1746 } |
| 1747 |
| 1748 core.Map toJson() { |
| 1749 var _json = new core.Map(); |
| 1750 if (resource != null) { |
| 1751 _json["resource"] = (resource).toJson(); |
| 1752 } |
| 1753 return _json; |
| 1754 } |
| 1755 } |
920 | 1756 |
921 /** | 1757 /** |
922 * A generic empty message that you can re-use to avoid defining duplicated | 1758 * A generic empty message that you can re-use to avoid defining duplicated |
923 * empty messages in your APIs. A typical example is to use it as the request or | 1759 * empty messages in your APIs. A typical example is to use it as the request or |
924 * the response type of an API method. For instance: service Foo { rpc | 1760 * the response type of an API method. For instance: service Foo { rpc |
925 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } | 1761 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON |
| 1762 * representation for `Empty` is empty JSON object `{}`. |
926 */ | 1763 */ |
927 class Empty { | 1764 class Empty { |
928 | 1765 |
929 Empty(); | 1766 Empty(); |
930 | 1767 |
931 Empty.fromJson(core.Map _json) { | 1768 Empty.fromJson(core.Map _json) { |
932 } | 1769 } |
933 | 1770 |
934 core.Map toJson() { | 1771 core.Map toJson() { |
935 var _json = new core.Map(); | 1772 var _json = new core.Map(); |
936 return _json; | 1773 return _json; |
937 } | 1774 } |
938 } | 1775 } |
939 | 1776 |
| 1777 /** Access control entry. */ |
| 1778 class Entry { |
| 1779 /** Grants access to all members of a domain. */ |
| 1780 core.String domain; |
| 1781 /** Grants access to a group, by e-mail. */ |
| 1782 core.String groupEmail; |
| 1783 /** Granted role. Valid roles are READER, WRITER, OWNER. */ |
| 1784 core.String role; |
| 1785 /** |
| 1786 * Grants access to special groups. Valid groups are PROJECT_OWNERS, |
| 1787 * PROJECT_READERS, PROJECT_WRITERS and ALL_AUTHENTICATED_USERS. |
| 1788 */ |
| 1789 core.String specialGroup; |
| 1790 /** Grants access to a user, by e-mail. */ |
| 1791 core.String userEmail; |
| 1792 /** Grants access to a BigQuery View. */ |
| 1793 TableName viewName; |
| 1794 |
| 1795 Entry(); |
| 1796 |
| 1797 Entry.fromJson(core.Map _json) { |
| 1798 if (_json.containsKey("domain")) { |
| 1799 domain = _json["domain"]; |
| 1800 } |
| 1801 if (_json.containsKey("groupEmail")) { |
| 1802 groupEmail = _json["groupEmail"]; |
| 1803 } |
| 1804 if (_json.containsKey("role")) { |
| 1805 role = _json["role"]; |
| 1806 } |
| 1807 if (_json.containsKey("specialGroup")) { |
| 1808 specialGroup = _json["specialGroup"]; |
| 1809 } |
| 1810 if (_json.containsKey("userEmail")) { |
| 1811 userEmail = _json["userEmail"]; |
| 1812 } |
| 1813 if (_json.containsKey("viewName")) { |
| 1814 viewName = new TableName.fromJson(_json["viewName"]); |
| 1815 } |
| 1816 } |
| 1817 |
| 1818 core.Map toJson() { |
| 1819 var _json = new core.Map(); |
| 1820 if (domain != null) { |
| 1821 _json["domain"] = domain; |
| 1822 } |
| 1823 if (groupEmail != null) { |
| 1824 _json["groupEmail"] = groupEmail; |
| 1825 } |
| 1826 if (role != null) { |
| 1827 _json["role"] = role; |
| 1828 } |
| 1829 if (specialGroup != null) { |
| 1830 _json["specialGroup"] = specialGroup; |
| 1831 } |
| 1832 if (userEmail != null) { |
| 1833 _json["userEmail"] = userEmail; |
| 1834 } |
| 1835 if (viewName != null) { |
| 1836 _json["viewName"] = (viewName).toJson(); |
| 1837 } |
| 1838 return _json; |
| 1839 } |
| 1840 } |
| 1841 |
| 1842 /** |
| 1843 * Describes an extract job, which exports data to an external source via the |
| 1844 * export pipeline. |
| 1845 */ |
| 1846 class Extract { |
| 1847 /** |
| 1848 * URI or URIs where extracted data should be written. Currently, only |
| 1849 * Bigstore URIs are supported (e.g., "gs://bucket/object"). If more than one |
| 1850 * URI given, output will be divided into 'partitions' of data, with each |
| 1851 * partition containing one or more files. If more than one URI is given, each |
| 1852 * URI must contain exactly one '*' which will be replaced with the file |
| 1853 * number (within the partition) padded out to 9 digits. |
| 1854 */ |
| 1855 core.List<core.String> destinationUris; |
| 1856 /** Source table. */ |
| 1857 TableName sourceTable; |
| 1858 |
| 1859 Extract(); |
| 1860 |
| 1861 Extract.fromJson(core.Map _json) { |
| 1862 if (_json.containsKey("destinationUris")) { |
| 1863 destinationUris = _json["destinationUris"]; |
| 1864 } |
| 1865 if (_json.containsKey("sourceTable")) { |
| 1866 sourceTable = new TableName.fromJson(_json["sourceTable"]); |
| 1867 } |
| 1868 } |
| 1869 |
| 1870 core.Map toJson() { |
| 1871 var _json = new core.Map(); |
| 1872 if (destinationUris != null) { |
| 1873 _json["destinationUris"] = destinationUris; |
| 1874 } |
| 1875 if (sourceTable != null) { |
| 1876 _json["sourceTable"] = (sourceTable).toJson(); |
| 1877 } |
| 1878 return _json; |
| 1879 } |
| 1880 } |
| 1881 |
| 1882 /** BigQuery field schema. */ |
| 1883 class FieldSchema { |
| 1884 /** Column mode */ |
| 1885 core.String mode; |
| 1886 /** Column name Matches: [A-Za-z_][A-Za-z_0-9]{0,127} */ |
| 1887 core.String name; |
| 1888 /** Present iff type == RECORD. */ |
| 1889 TableSchema schema; |
| 1890 /** Column type */ |
| 1891 core.String type; |
| 1892 |
| 1893 FieldSchema(); |
| 1894 |
| 1895 FieldSchema.fromJson(core.Map _json) { |
| 1896 if (_json.containsKey("mode")) { |
| 1897 mode = _json["mode"]; |
| 1898 } |
| 1899 if (_json.containsKey("name")) { |
| 1900 name = _json["name"]; |
| 1901 } |
| 1902 if (_json.containsKey("schema")) { |
| 1903 schema = new TableSchema.fromJson(_json["schema"]); |
| 1904 } |
| 1905 if (_json.containsKey("type")) { |
| 1906 type = _json["type"]; |
| 1907 } |
| 1908 } |
| 1909 |
| 1910 core.Map toJson() { |
| 1911 var _json = new core.Map(); |
| 1912 if (mode != null) { |
| 1913 _json["mode"] = mode; |
| 1914 } |
| 1915 if (name != null) { |
| 1916 _json["name"] = name; |
| 1917 } |
| 1918 if (schema != null) { |
| 1919 _json["schema"] = (schema).toJson(); |
| 1920 } |
| 1921 if (type != null) { |
| 1922 _json["type"] = type; |
| 1923 } |
| 1924 return _json; |
| 1925 } |
| 1926 } |
| 1927 |
| 1928 /** A common proto for logging HTTP requests. */ |
| 1929 class HttpRequest { |
| 1930 /** |
| 1931 * Referer (a.k.a. referrer) URL of request, as defined in |
| 1932 * http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html. |
| 1933 */ |
| 1934 core.String referer; |
| 1935 /** |
| 1936 * IP address of the client who issues the HTTP request. Could be either IPv4 |
| 1937 * or IPv6. |
| 1938 */ |
| 1939 core.String remoteIp; |
| 1940 /** Request method, such as `GET`, `HEAD`, `PUT` or `POST`. */ |
| 1941 core.String requestMethod; |
| 1942 /** |
| 1943 * Size of the HTTP request message in bytes, including request headers and |
| 1944 * the request body. |
| 1945 */ |
| 1946 core.String requestSize; |
| 1947 /** |
| 1948 * Contains the scheme (http|https), the host name, the path and the query |
| 1949 * portion of the URL that was requested. |
| 1950 */ |
| 1951 core.String requestUrl; |
| 1952 /** |
| 1953 * Size of the HTTP response message in bytes sent back to the client, |
| 1954 * including response headers and response body. |
| 1955 */ |
| 1956 core.String responseSize; |
| 1957 /** A response code indicates the status of response, e.g., 200. */ |
| 1958 core.int status; |
| 1959 /** |
| 1960 * User agent sent by the client, e.g., "Mozilla/4.0 (compatible; MSIE 6.0; |
| 1961 * Windows 98; Q312461; .NET CLR 1.0.3705)". |
| 1962 */ |
| 1963 core.String userAgent; |
| 1964 |
| 1965 HttpRequest(); |
| 1966 |
| 1967 HttpRequest.fromJson(core.Map _json) { |
| 1968 if (_json.containsKey("referer")) { |
| 1969 referer = _json["referer"]; |
| 1970 } |
| 1971 if (_json.containsKey("remoteIp")) { |
| 1972 remoteIp = _json["remoteIp"]; |
| 1973 } |
| 1974 if (_json.containsKey("requestMethod")) { |
| 1975 requestMethod = _json["requestMethod"]; |
| 1976 } |
| 1977 if (_json.containsKey("requestSize")) { |
| 1978 requestSize = _json["requestSize"]; |
| 1979 } |
| 1980 if (_json.containsKey("requestUrl")) { |
| 1981 requestUrl = _json["requestUrl"]; |
| 1982 } |
| 1983 if (_json.containsKey("responseSize")) { |
| 1984 responseSize = _json["responseSize"]; |
| 1985 } |
| 1986 if (_json.containsKey("status")) { |
| 1987 status = _json["status"]; |
| 1988 } |
| 1989 if (_json.containsKey("userAgent")) { |
| 1990 userAgent = _json["userAgent"]; |
| 1991 } |
| 1992 } |
| 1993 |
| 1994 core.Map toJson() { |
| 1995 var _json = new core.Map(); |
| 1996 if (referer != null) { |
| 1997 _json["referer"] = referer; |
| 1998 } |
| 1999 if (remoteIp != null) { |
| 2000 _json["remoteIp"] = remoteIp; |
| 2001 } |
| 2002 if (requestMethod != null) { |
| 2003 _json["requestMethod"] = requestMethod; |
| 2004 } |
| 2005 if (requestSize != null) { |
| 2006 _json["requestSize"] = requestSize; |
| 2007 } |
| 2008 if (requestUrl != null) { |
| 2009 _json["requestUrl"] = requestUrl; |
| 2010 } |
| 2011 if (responseSize != null) { |
| 2012 _json["responseSize"] = responseSize; |
| 2013 } |
| 2014 if (status != null) { |
| 2015 _json["status"] = status; |
| 2016 } |
| 2017 if (userAgent != null) { |
| 2018 _json["userAgent"] = userAgent; |
| 2019 } |
| 2020 return _json; |
| 2021 } |
| 2022 } |
| 2023 |
| 2024 /** Combines all of the information about a job. */ |
| 2025 class Job { |
| 2026 /** Job configuration. */ |
| 2027 JobConfiguration jobConfiguration; |
| 2028 /** Job name. */ |
| 2029 JobName jobName; |
| 2030 /** Job statistics. */ |
| 2031 JobStatistics jobStatistics; |
| 2032 /** Job status. */ |
| 2033 JobStatus jobStatus; |
| 2034 |
| 2035 Job(); |
| 2036 |
| 2037 Job.fromJson(core.Map _json) { |
| 2038 if (_json.containsKey("jobConfiguration")) { |
| 2039 jobConfiguration = new JobConfiguration.fromJson(_json["jobConfiguration"]
); |
| 2040 } |
| 2041 if (_json.containsKey("jobName")) { |
| 2042 jobName = new JobName.fromJson(_json["jobName"]); |
| 2043 } |
| 2044 if (_json.containsKey("jobStatistics")) { |
| 2045 jobStatistics = new JobStatistics.fromJson(_json["jobStatistics"]); |
| 2046 } |
| 2047 if (_json.containsKey("jobStatus")) { |
| 2048 jobStatus = new JobStatus.fromJson(_json["jobStatus"]); |
| 2049 } |
| 2050 } |
| 2051 |
| 2052 core.Map toJson() { |
| 2053 var _json = new core.Map(); |
| 2054 if (jobConfiguration != null) { |
| 2055 _json["jobConfiguration"] = (jobConfiguration).toJson(); |
| 2056 } |
| 2057 if (jobName != null) { |
| 2058 _json["jobName"] = (jobName).toJson(); |
| 2059 } |
| 2060 if (jobStatistics != null) { |
| 2061 _json["jobStatistics"] = (jobStatistics).toJson(); |
| 2062 } |
| 2063 if (jobStatus != null) { |
| 2064 _json["jobStatus"] = (jobStatus).toJson(); |
| 2065 } |
| 2066 return _json; |
| 2067 } |
| 2068 } |
| 2069 |
| 2070 /** Job configuration information. */ |
| 2071 class JobConfiguration { |
| 2072 /** If set, don't actually run the job. Just check that it would run. */ |
| 2073 core.bool dryRun; |
| 2074 /** Extract job information. */ |
| 2075 Extract extract; |
| 2076 /** Load job information. */ |
| 2077 Load load; |
| 2078 /** Query job information. */ |
| 2079 Query query; |
| 2080 /** TableCopy job information. */ |
| 2081 TableCopy tableCopy; |
| 2082 |
| 2083 JobConfiguration(); |
| 2084 |
| 2085 JobConfiguration.fromJson(core.Map _json) { |
| 2086 if (_json.containsKey("dryRun")) { |
| 2087 dryRun = _json["dryRun"]; |
| 2088 } |
| 2089 if (_json.containsKey("extract")) { |
| 2090 extract = new Extract.fromJson(_json["extract"]); |
| 2091 } |
| 2092 if (_json.containsKey("load")) { |
| 2093 load = new Load.fromJson(_json["load"]); |
| 2094 } |
| 2095 if (_json.containsKey("query")) { |
| 2096 query = new Query.fromJson(_json["query"]); |
| 2097 } |
| 2098 if (_json.containsKey("tableCopy")) { |
| 2099 tableCopy = new TableCopy.fromJson(_json["tableCopy"]); |
| 2100 } |
| 2101 } |
| 2102 |
| 2103 core.Map toJson() { |
| 2104 var _json = new core.Map(); |
| 2105 if (dryRun != null) { |
| 2106 _json["dryRun"] = dryRun; |
| 2107 } |
| 2108 if (extract != null) { |
| 2109 _json["extract"] = (extract).toJson(); |
| 2110 } |
| 2111 if (load != null) { |
| 2112 _json["load"] = (load).toJson(); |
| 2113 } |
| 2114 if (query != null) { |
| 2115 _json["query"] = (query).toJson(); |
| 2116 } |
| 2117 if (tableCopy != null) { |
| 2118 _json["tableCopy"] = (tableCopy).toJson(); |
| 2119 } |
| 2120 return _json; |
| 2121 } |
| 2122 } |
| 2123 |
| 2124 /** Job get-query-results request. */ |
| 2125 class JobGetQueryResultsRequest { |
| 2126 /** Maximum number of results to return. */ |
| 2127 core.int maxResults; |
| 2128 /** Row number to start returning results from. */ |
| 2129 core.String startRow; |
| 2130 |
| 2131 JobGetQueryResultsRequest(); |
| 2132 |
| 2133 JobGetQueryResultsRequest.fromJson(core.Map _json) { |
| 2134 if (_json.containsKey("maxResults")) { |
| 2135 maxResults = _json["maxResults"]; |
| 2136 } |
| 2137 if (_json.containsKey("startRow")) { |
| 2138 startRow = _json["startRow"]; |
| 2139 } |
| 2140 } |
| 2141 |
| 2142 core.Map toJson() { |
| 2143 var _json = new core.Map(); |
| 2144 if (maxResults != null) { |
| 2145 _json["maxResults"] = maxResults; |
| 2146 } |
| 2147 if (startRow != null) { |
| 2148 _json["startRow"] = startRow; |
| 2149 } |
| 2150 return _json; |
| 2151 } |
| 2152 } |
| 2153 |
| 2154 /** Job get-query-results response. */ |
| 2155 class JobGetQueryResultsResponse { |
| 2156 /** |
| 2157 * Job that was created to run the query. Includes job state, job statistics, |
| 2158 * and job errors (if any). To determine whether the job has completed, check |
| 2159 * that job.status.state == DONE. If job.status.error_result is set, then the |
| 2160 * job failed. If the job has not yet completed, call GetQueryResults again. |
| 2161 */ |
| 2162 Job job; |
| 2163 /** Total number of results in query results. */ |
| 2164 core.String totalResults; |
| 2165 |
| 2166 JobGetQueryResultsResponse(); |
| 2167 |
| 2168 JobGetQueryResultsResponse.fromJson(core.Map _json) { |
| 2169 if (_json.containsKey("job")) { |
| 2170 job = new Job.fromJson(_json["job"]); |
| 2171 } |
| 2172 if (_json.containsKey("totalResults")) { |
| 2173 totalResults = _json["totalResults"]; |
| 2174 } |
| 2175 } |
| 2176 |
| 2177 core.Map toJson() { |
| 2178 var _json = new core.Map(); |
| 2179 if (job != null) { |
| 2180 _json["job"] = (job).toJson(); |
| 2181 } |
| 2182 if (totalResults != null) { |
| 2183 _json["totalResults"] = totalResults; |
| 2184 } |
| 2185 return _json; |
| 2186 } |
| 2187 } |
| 2188 |
| 2189 /** Job insert request. */ |
| 2190 class JobInsertRequest { |
| 2191 /** Job insert payload. */ |
| 2192 Job resource; |
| 2193 |
| 2194 JobInsertRequest(); |
| 2195 |
| 2196 JobInsertRequest.fromJson(core.Map _json) { |
| 2197 if (_json.containsKey("resource")) { |
| 2198 resource = new Job.fromJson(_json["resource"]); |
| 2199 } |
| 2200 } |
| 2201 |
| 2202 core.Map toJson() { |
| 2203 var _json = new core.Map(); |
| 2204 if (resource != null) { |
| 2205 _json["resource"] = (resource).toJson(); |
| 2206 } |
| 2207 return _json; |
| 2208 } |
| 2209 } |
| 2210 |
| 2211 /** Fully-qualified name for a job. */ |
| 2212 class JobName { |
| 2213 /** The ID of the job (scoped to the project above). */ |
| 2214 core.String jobId; |
| 2215 /** A string containing the id of this project. */ |
| 2216 core.String projectId; |
| 2217 |
| 2218 JobName(); |
| 2219 |
| 2220 JobName.fromJson(core.Map _json) { |
| 2221 if (_json.containsKey("jobId")) { |
| 2222 jobId = _json["jobId"]; |
| 2223 } |
| 2224 if (_json.containsKey("projectId")) { |
| 2225 projectId = _json["projectId"]; |
| 2226 } |
| 2227 } |
| 2228 |
| 2229 core.Map toJson() { |
| 2230 var _json = new core.Map(); |
| 2231 if (jobId != null) { |
| 2232 _json["jobId"] = jobId; |
| 2233 } |
| 2234 if (projectId != null) { |
| 2235 _json["projectId"] = projectId; |
| 2236 } |
| 2237 return _json; |
| 2238 } |
| 2239 } |
| 2240 |
| 2241 /** Job get query-done response. */ |
| 2242 class JobQueryDoneResponse { |
| 2243 /** Usage information about completed job. */ |
| 2244 Job job; |
| 2245 |
| 2246 JobQueryDoneResponse(); |
| 2247 |
| 2248 JobQueryDoneResponse.fromJson(core.Map _json) { |
| 2249 if (_json.containsKey("job")) { |
| 2250 job = new Job.fromJson(_json["job"]); |
| 2251 } |
| 2252 } |
| 2253 |
| 2254 core.Map toJson() { |
| 2255 var _json = new core.Map(); |
| 2256 if (job != null) { |
| 2257 _json["job"] = (job).toJson(); |
| 2258 } |
| 2259 return _json; |
| 2260 } |
| 2261 } |
| 2262 |
| 2263 /** Job query request. */ |
| 2264 class JobQueryRequest { |
| 2265 /** |
| 2266 * Default dataset to use when tables in a query do not have a dataset |
| 2267 * specified. |
| 2268 */ |
| 2269 DatasetName defaultDataset; |
| 2270 /** If set, don't actually run the query. */ |
| 2271 core.bool dryRun; |
| 2272 /** Maximum number of results to return. */ |
| 2273 core.int maxResults; |
| 2274 /** Project that the query should be charged to. */ |
| 2275 core.String projectId; |
| 2276 /** The query to execute. */ |
| 2277 core.String query; |
| 2278 |
| 2279 JobQueryRequest(); |
| 2280 |
| 2281 JobQueryRequest.fromJson(core.Map _json) { |
| 2282 if (_json.containsKey("defaultDataset")) { |
| 2283 defaultDataset = new DatasetName.fromJson(_json["defaultDataset"]); |
| 2284 } |
| 2285 if (_json.containsKey("dryRun")) { |
| 2286 dryRun = _json["dryRun"]; |
| 2287 } |
| 2288 if (_json.containsKey("maxResults")) { |
| 2289 maxResults = _json["maxResults"]; |
| 2290 } |
| 2291 if (_json.containsKey("projectId")) { |
| 2292 projectId = _json["projectId"]; |
| 2293 } |
| 2294 if (_json.containsKey("query")) { |
| 2295 query = _json["query"]; |
| 2296 } |
| 2297 } |
| 2298 |
| 2299 core.Map toJson() { |
| 2300 var _json = new core.Map(); |
| 2301 if (defaultDataset != null) { |
| 2302 _json["defaultDataset"] = (defaultDataset).toJson(); |
| 2303 } |
| 2304 if (dryRun != null) { |
| 2305 _json["dryRun"] = dryRun; |
| 2306 } |
| 2307 if (maxResults != null) { |
| 2308 _json["maxResults"] = maxResults; |
| 2309 } |
| 2310 if (projectId != null) { |
| 2311 _json["projectId"] = projectId; |
| 2312 } |
| 2313 if (query != null) { |
| 2314 _json["query"] = query; |
| 2315 } |
| 2316 return _json; |
| 2317 } |
| 2318 } |
| 2319 |
| 2320 /** Job query response. */ |
| 2321 class JobQueryResponse { |
| 2322 /** Information about queried job. */ |
| 2323 Job job; |
| 2324 /** The total number of rows in the complete query result set. */ |
| 2325 core.String totalResults; |
| 2326 |
| 2327 JobQueryResponse(); |
| 2328 |
| 2329 JobQueryResponse.fromJson(core.Map _json) { |
| 2330 if (_json.containsKey("job")) { |
| 2331 job = new Job.fromJson(_json["job"]); |
| 2332 } |
| 2333 if (_json.containsKey("totalResults")) { |
| 2334 totalResults = _json["totalResults"]; |
| 2335 } |
| 2336 } |
| 2337 |
| 2338 core.Map toJson() { |
| 2339 var _json = new core.Map(); |
| 2340 if (job != null) { |
| 2341 _json["job"] = (job).toJson(); |
| 2342 } |
| 2343 if (totalResults != null) { |
| 2344 _json["totalResults"] = totalResults; |
| 2345 } |
| 2346 return _json; |
| 2347 } |
| 2348 } |
| 2349 |
| 2350 /** Job statistics that may change after a job starts. */ |
| 2351 class JobStatistics { |
| 2352 /** Time when the job was created (in milliseconds since the POSIX epoch). */ |
| 2353 core.String createTime; |
| 2354 /** Time when the job ended. */ |
| 2355 core.String endTime; |
| 2356 /** Time when the job started. */ |
| 2357 core.String startTime; |
| 2358 /** Total bytes processed for a job. */ |
| 2359 core.String totalProcessedBytes; |
| 2360 |
| 2361 JobStatistics(); |
| 2362 |
| 2363 JobStatistics.fromJson(core.Map _json) { |
| 2364 if (_json.containsKey("createTime")) { |
| 2365 createTime = _json["createTime"]; |
| 2366 } |
| 2367 if (_json.containsKey("endTime")) { |
| 2368 endTime = _json["endTime"]; |
| 2369 } |
| 2370 if (_json.containsKey("startTime")) { |
| 2371 startTime = _json["startTime"]; |
| 2372 } |
| 2373 if (_json.containsKey("totalProcessedBytes")) { |
| 2374 totalProcessedBytes = _json["totalProcessedBytes"]; |
| 2375 } |
| 2376 } |
| 2377 |
| 2378 core.Map toJson() { |
| 2379 var _json = new core.Map(); |
| 2380 if (createTime != null) { |
| 2381 _json["createTime"] = createTime; |
| 2382 } |
| 2383 if (endTime != null) { |
| 2384 _json["endTime"] = endTime; |
| 2385 } |
| 2386 if (startTime != null) { |
| 2387 _json["startTime"] = startTime; |
| 2388 } |
| 2389 if (totalProcessedBytes != null) { |
| 2390 _json["totalProcessedBytes"] = totalProcessedBytes; |
| 2391 } |
| 2392 return _json; |
| 2393 } |
| 2394 } |
| 2395 |
| 2396 /** Running state of a job (whether it is running, failed, etc). */ |
| 2397 class JobStatus { |
| 2398 /** If the job did not complete successfully, this will contain an error. */ |
| 2399 Status error; |
| 2400 /** |
| 2401 * State of a job: PENDING, RUNNING, DONE. Includes no information about |
| 2402 * whether the job was successful or not. |
| 2403 */ |
| 2404 core.String state; |
| 2405 |
| 2406 JobStatus(); |
| 2407 |
| 2408 JobStatus.fromJson(core.Map _json) { |
| 2409 if (_json.containsKey("error")) { |
| 2410 error = new Status.fromJson(_json["error"]); |
| 2411 } |
| 2412 if (_json.containsKey("state")) { |
| 2413 state = _json["state"]; |
| 2414 } |
| 2415 } |
| 2416 |
| 2417 core.Map toJson() { |
| 2418 var _json = new core.Map(); |
| 2419 if (error != null) { |
| 2420 _json["error"] = (error).toJson(); |
| 2421 } |
| 2422 if (state != null) { |
| 2423 _json["state"] = state; |
| 2424 } |
| 2425 return _json; |
| 2426 } |
| 2427 } |
| 2428 |
940 /** Result returned from ListLogServiceIndexesRequest. */ | 2429 /** Result returned from ListLogServiceIndexesRequest. */ |
941 class ListLogServiceIndexesResponse { | 2430 class ListLogServiceIndexesResponse { |
942 /** | 2431 /** |
943 * If there are more results, then `nextPageToken` is returned in the | 2432 * If there are more results, then `nextPageToken` is returned in the |
944 * response. To get the next batch of indexes, use the value of | 2433 * response. To get the next batch of indexes, use the value of |
945 * `nextPageToken` as `pageToken` in the next call of | 2434 * `nextPageToken` as `pageToken` in the next call of `ListLogServiceIndexes`. |
946 * `ListLogServiceIndexess`. If `nextPageToken` is empty, then there are no | 2435 * If `nextPageToken` is empty, then there are no more results. |
947 * more results. | |
948 */ | 2436 */ |
949 core.String nextPageToken; | 2437 core.String nextPageToken; |
950 /** A list of log service index prefixes. */ | 2438 /** A list of log service index prefixes. */ |
951 core.List<core.String> serviceIndexPrefixes; | 2439 core.List<core.String> serviceIndexPrefixes; |
952 | 2440 |
953 ListLogServiceIndexesResponse(); | 2441 ListLogServiceIndexesResponse(); |
954 | 2442 |
955 ListLogServiceIndexesResponse.fromJson(core.Map _json) { | 2443 ListLogServiceIndexesResponse.fromJson(core.Map _json) { |
956 if (_json.containsKey("nextPageToken")) { | 2444 if (_json.containsKey("nextPageToken")) { |
957 nextPageToken = _json["nextPageToken"]; | 2445 nextPageToken = _json["nextPageToken"]; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 if (logs != null) { | 2576 if (logs != null) { |
1089 _json["logs"] = logs.map((value) => (value).toJson()).toList(); | 2577 _json["logs"] = logs.map((value) => (value).toJson()).toList(); |
1090 } | 2578 } |
1091 if (nextPageToken != null) { | 2579 if (nextPageToken != null) { |
1092 _json["nextPageToken"] = nextPageToken; | 2580 _json["nextPageToken"] = nextPageToken; |
1093 } | 2581 } |
1094 return _json; | 2582 return _json; |
1095 } | 2583 } |
1096 } | 2584 } |
1097 | 2585 |
| 2586 /** Result returned from `ListSinks`. */ |
| 2587 class ListSinksResponse { |
| 2588 /** The requested sinks. */ |
| 2589 core.List<LogSink> sinks; |
| 2590 |
| 2591 ListSinksResponse(); |
| 2592 |
| 2593 ListSinksResponse.fromJson(core.Map _json) { |
| 2594 if (_json.containsKey("sinks")) { |
| 2595 sinks = _json["sinks"].map((value) => new LogSink.fromJson(value)).toList(
); |
| 2596 } |
| 2597 } |
| 2598 |
| 2599 core.Map toJson() { |
| 2600 var _json = new core.Map(); |
| 2601 if (sinks != null) { |
| 2602 _json["sinks"] = sinks.map((value) => (value).toJson()).toList(); |
| 2603 } |
| 2604 return _json; |
| 2605 } |
| 2606 } |
| 2607 |
| 2608 /** |
| 2609 * Describes a load job, which loads data from an external source via the import |
| 2610 * pipeline. |
| 2611 */ |
| 2612 class Load { |
| 2613 /** Describes when a job should create a table. */ |
| 2614 core.String createDisposition; |
| 2615 /** table where the imported data should be written. */ |
| 2616 TableName destinationTable; |
| 2617 /** Schema for the data to be imported. */ |
| 2618 TableSchema schema; |
| 2619 /** |
| 2620 * URIs for the data to be imported. Only Bigstore URIs are supported (e.g., |
| 2621 * "gs://bucket/object"). |
| 2622 */ |
| 2623 core.List<core.String> sourceUris; |
| 2624 /** Describes how writes should affect the table associated with the job. */ |
| 2625 core.String writeDisposition; |
| 2626 |
| 2627 Load(); |
| 2628 |
| 2629 Load.fromJson(core.Map _json) { |
| 2630 if (_json.containsKey("createDisposition")) { |
| 2631 createDisposition = _json["createDisposition"]; |
| 2632 } |
| 2633 if (_json.containsKey("destinationTable")) { |
| 2634 destinationTable = new TableName.fromJson(_json["destinationTable"]); |
| 2635 } |
| 2636 if (_json.containsKey("schema")) { |
| 2637 schema = new TableSchema.fromJson(_json["schema"]); |
| 2638 } |
| 2639 if (_json.containsKey("sourceUris")) { |
| 2640 sourceUris = _json["sourceUris"]; |
| 2641 } |
| 2642 if (_json.containsKey("writeDisposition")) { |
| 2643 writeDisposition = _json["writeDisposition"]; |
| 2644 } |
| 2645 } |
| 2646 |
| 2647 core.Map toJson() { |
| 2648 var _json = new core.Map(); |
| 2649 if (createDisposition != null) { |
| 2650 _json["createDisposition"] = createDisposition; |
| 2651 } |
| 2652 if (destinationTable != null) { |
| 2653 _json["destinationTable"] = (destinationTable).toJson(); |
| 2654 } |
| 2655 if (schema != null) { |
| 2656 _json["schema"] = (schema).toJson(); |
| 2657 } |
| 2658 if (sourceUris != null) { |
| 2659 _json["sourceUris"] = sourceUris; |
| 2660 } |
| 2661 if (writeDisposition != null) { |
| 2662 _json["writeDisposition"] = writeDisposition; |
| 2663 } |
| 2664 return _json; |
| 2665 } |
| 2666 } |
| 2667 |
1098 /** A log object. */ | 2668 /** A log object. */ |
1099 class Log { | 2669 class Log { |
1100 /** | 2670 /** |
1101 * Name used when displaying the log to the user (for example, in a UI). | 2671 * Name used when displaying the log to the user (for example, in a UI). |
1102 * Example: `"activity_log"` | 2672 * Example: `"activity_log"` |
1103 */ | 2673 */ |
1104 core.String displayName; | 2674 core.String displayName; |
1105 /** | 2675 /** |
1106 * REQUIRED: The log's name name. Example: | 2676 * REQUIRED: The log's name. Example: `"compute.googleapis.com/activity_log"`. |
1107 * `"compute.googleapis.com/activity_log"`. | |
1108 */ | 2677 */ |
1109 core.String name; | 2678 core.String name; |
1110 /** Type URL describing the expected payload type for the log. */ | 2679 /** Type URL describing the expected payload type for the log. */ |
1111 core.String payloadType; | 2680 core.String payloadType; |
1112 | 2681 |
1113 Log(); | 2682 Log(); |
1114 | 2683 |
1115 Log.fromJson(core.Map _json) { | 2684 Log.fromJson(core.Map _json) { |
1116 if (_json.containsKey("displayName")) { | 2685 if (_json.containsKey("displayName")) { |
1117 displayName = _json["displayName"]; | 2686 displayName = _json["displayName"]; |
(...skipping 17 matching lines...) Expand all Loading... |
1135 if (payloadType != null) { | 2704 if (payloadType != null) { |
1136 _json["payloadType"] = payloadType; | 2705 _json["payloadType"] = payloadType; |
1137 } | 2706 } |
1138 return _json; | 2707 return _json; |
1139 } | 2708 } |
1140 } | 2709 } |
1141 | 2710 |
1142 /** An individual entry in a log. */ | 2711 /** An individual entry in a log. */ |
1143 class LogEntry { | 2712 class LogEntry { |
1144 /** | 2713 /** |
| 2714 * Information about the HTTP request associated with this log entry, if |
| 2715 * applicable. |
| 2716 */ |
| 2717 HttpRequest httpRequest; |
| 2718 /** |
1145 * A unique ID for the log entry. If you provide this field, the logging | 2719 * A unique ID for the log entry. If you provide this field, the logging |
1146 * service considers other log entries in the same log with the same ID as | 2720 * service considers other log entries in the same log with the same ID as |
1147 * duplicates which can be removed. | 2721 * duplicates which can be removed. |
1148 */ | 2722 */ |
1149 core.String insertId; | 2723 core.String insertId; |
1150 /** | 2724 /** |
1151 * The log to which this entry belongs. When a log entry is ingested, the | 2725 * The log to which this entry belongs. When a log entry is ingested, the |
1152 * value of this field is set by the logging system. | 2726 * value of this field is set by the logging system. |
1153 */ | 2727 */ |
1154 core.String log; | 2728 core.String log; |
(...skipping 15 matching lines...) Expand all Loading... |
1170 * The values for Object must be JSON objects. It can consist of `num`, | 2744 * The values for Object must be JSON objects. It can consist of `num`, |
1171 * `String`, `bool` and `null` as well as `Map` and `List` values. | 2745 * `String`, `bool` and `null` as well as `Map` and `List` values. |
1172 */ | 2746 */ |
1173 core.Map<core.String, core.Object> structPayload; | 2747 core.Map<core.String, core.Object> structPayload; |
1174 /** The log entry payload, represented as a text string. */ | 2748 /** The log entry payload, represented as a text string. */ |
1175 core.String textPayload; | 2749 core.String textPayload; |
1176 | 2750 |
1177 LogEntry(); | 2751 LogEntry(); |
1178 | 2752 |
1179 LogEntry.fromJson(core.Map _json) { | 2753 LogEntry.fromJson(core.Map _json) { |
| 2754 if (_json.containsKey("httpRequest")) { |
| 2755 httpRequest = new HttpRequest.fromJson(_json["httpRequest"]); |
| 2756 } |
1180 if (_json.containsKey("insertId")) { | 2757 if (_json.containsKey("insertId")) { |
1181 insertId = _json["insertId"]; | 2758 insertId = _json["insertId"]; |
1182 } | 2759 } |
1183 if (_json.containsKey("log")) { | 2760 if (_json.containsKey("log")) { |
1184 log = _json["log"]; | 2761 log = _json["log"]; |
1185 } | 2762 } |
1186 if (_json.containsKey("metadata")) { | 2763 if (_json.containsKey("metadata")) { |
1187 metadata = new LogEntryMetadata.fromJson(_json["metadata"]); | 2764 metadata = new LogEntryMetadata.fromJson(_json["metadata"]); |
1188 } | 2765 } |
1189 if (_json.containsKey("protoPayload")) { | 2766 if (_json.containsKey("protoPayload")) { |
1190 protoPayload = _json["protoPayload"]; | 2767 protoPayload = _json["protoPayload"]; |
1191 } | 2768 } |
1192 if (_json.containsKey("structPayload")) { | 2769 if (_json.containsKey("structPayload")) { |
1193 structPayload = _json["structPayload"]; | 2770 structPayload = _json["structPayload"]; |
1194 } | 2771 } |
1195 if (_json.containsKey("textPayload")) { | 2772 if (_json.containsKey("textPayload")) { |
1196 textPayload = _json["textPayload"]; | 2773 textPayload = _json["textPayload"]; |
1197 } | 2774 } |
1198 } | 2775 } |
1199 | 2776 |
1200 core.Map toJson() { | 2777 core.Map toJson() { |
1201 var _json = new core.Map(); | 2778 var _json = new core.Map(); |
| 2779 if (httpRequest != null) { |
| 2780 _json["httpRequest"] = (httpRequest).toJson(); |
| 2781 } |
1202 if (insertId != null) { | 2782 if (insertId != null) { |
1203 _json["insertId"] = insertId; | 2783 _json["insertId"] = insertId; |
1204 } | 2784 } |
1205 if (log != null) { | 2785 if (log != null) { |
1206 _json["log"] = log; | 2786 _json["log"] = log; |
1207 } | 2787 } |
1208 if (metadata != null) { | 2788 if (metadata != null) { |
1209 _json["metadata"] = (metadata).toJson(); | 2789 _json["metadata"] = (metadata).toJson(); |
1210 } | 2790 } |
1211 if (protoPayload != null) { | 2791 if (protoPayload != null) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 */ | 2836 */ |
1257 core.String serviceName; | 2837 core.String serviceName; |
1258 /** | 2838 /** |
1259 * The severity of the log entry. | 2839 * The severity of the log entry. |
1260 * Possible string values are: | 2840 * Possible string values are: |
1261 * - "DEFAULT" : A DEFAULT. | 2841 * - "DEFAULT" : A DEFAULT. |
1262 * - "DEBUG" : A DEBUG. | 2842 * - "DEBUG" : A DEBUG. |
1263 * - "INFO" : A INFO. | 2843 * - "INFO" : A INFO. |
1264 * - "NOTICE" : A NOTICE. | 2844 * - "NOTICE" : A NOTICE. |
1265 * - "WARNING" : A WARNING. | 2845 * - "WARNING" : A WARNING. |
| 2846 * - "ERROR" : A ERROR. |
| 2847 * - "CRITICAL" : A CRITICAL. |
| 2848 * - "ALERT" : A ALERT. |
| 2849 * - "EMERGENCY" : A EMERGENCY. |
| 2850 */ |
| 2851 core.String severity; |
| 2852 /** |
| 2853 * The time the event described by the log entry occurred. Timestamps must be |
| 2854 * later than January 1, 1970. |
| 2855 */ |
| 2856 core.String timestamp; |
| 2857 /** |
| 2858 * The fully-qualified email address of the authenticated user that performed |
| 2859 * or requested the action represented by the log entry. If the log entry does |
| 2860 * not apply to an action taken by an authenticated user, then the field |
| 2861 * should be empty. |
| 2862 */ |
| 2863 core.String userId; |
| 2864 /** |
| 2865 * The zone of the Google Cloud Platform service that created the log entry. |
| 2866 * For example, `"us-central1-a"`. |
| 2867 */ |
| 2868 core.String zone; |
| 2869 |
| 2870 LogEntryMetadata(); |
| 2871 |
| 2872 LogEntryMetadata.fromJson(core.Map _json) { |
| 2873 if (_json.containsKey("labels")) { |
| 2874 labels = _json["labels"]; |
| 2875 } |
| 2876 if (_json.containsKey("projectId")) { |
| 2877 projectId = _json["projectId"]; |
| 2878 } |
| 2879 if (_json.containsKey("region")) { |
| 2880 region = _json["region"]; |
| 2881 } |
| 2882 if (_json.containsKey("serviceName")) { |
| 2883 serviceName = _json["serviceName"]; |
| 2884 } |
| 2885 if (_json.containsKey("severity")) { |
| 2886 severity = _json["severity"]; |
| 2887 } |
| 2888 if (_json.containsKey("timestamp")) { |
| 2889 timestamp = _json["timestamp"]; |
| 2890 } |
| 2891 if (_json.containsKey("userId")) { |
| 2892 userId = _json["userId"]; |
| 2893 } |
| 2894 if (_json.containsKey("zone")) { |
| 2895 zone = _json["zone"]; |
| 2896 } |
| 2897 } |
| 2898 |
| 2899 core.Map toJson() { |
| 2900 var _json = new core.Map(); |
| 2901 if (labels != null) { |
| 2902 _json["labels"] = labels; |
| 2903 } |
| 2904 if (projectId != null) { |
| 2905 _json["projectId"] = projectId; |
| 2906 } |
| 2907 if (region != null) { |
| 2908 _json["region"] = region; |
| 2909 } |
| 2910 if (serviceName != null) { |
| 2911 _json["serviceName"] = serviceName; |
| 2912 } |
| 2913 if (severity != null) { |
| 2914 _json["severity"] = severity; |
| 2915 } |
| 2916 if (timestamp != null) { |
| 2917 _json["timestamp"] = timestamp; |
| 2918 } |
| 2919 if (userId != null) { |
| 2920 _json["userId"] = userId; |
| 2921 } |
| 2922 if (zone != null) { |
| 2923 _json["zone"] = zone; |
| 2924 } |
| 2925 return _json; |
| 2926 } |
| 2927 } |
| 2928 |
| 2929 /** A problem in a sink or the sink's configuration. */ |
| 2930 class LogError { |
| 2931 /** |
| 2932 * The resource associated with the error. It may be different from the sink |
| 2933 * destination. For example, the sink may point to a BigQuery dataset, but the |
| 2934 * error may refer to a table resource inside the dataset. |
| 2935 */ |
| 2936 core.String resource; |
| 2937 /** The description of the last error observed. */ |
| 2938 Status status; |
| 2939 /** |
| 2940 * The last time the error was observed, in nanoseconds since the Unix epoch. |
| 2941 */ |
| 2942 core.String timeNanos; |
| 2943 |
| 2944 LogError(); |
| 2945 |
| 2946 LogError.fromJson(core.Map _json) { |
| 2947 if (_json.containsKey("resource")) { |
| 2948 resource = _json["resource"]; |
| 2949 } |
| 2950 if (_json.containsKey("status")) { |
| 2951 status = new Status.fromJson(_json["status"]); |
| 2952 } |
| 2953 if (_json.containsKey("timeNanos")) { |
| 2954 timeNanos = _json["timeNanos"]; |
| 2955 } |
| 2956 } |
| 2957 |
| 2958 core.Map toJson() { |
| 2959 var _json = new core.Map(); |
| 2960 if (resource != null) { |
| 2961 _json["resource"] = resource; |
| 2962 } |
| 2963 if (status != null) { |
| 2964 _json["status"] = (status).toJson(); |
| 2965 } |
| 2966 if (timeNanos != null) { |
| 2967 _json["timeNanos"] = timeNanos; |
| 2968 } |
| 2969 return _json; |
| 2970 } |
| 2971 } |
| 2972 |
| 2973 /** Application log line emitted while processing a request. */ |
| 2974 class LogLine { |
| 2975 /** App provided log message. */ |
| 2976 core.String logMessage; |
| 2977 /** |
| 2978 * Severity of log. |
| 2979 * Possible string values are: |
| 2980 * - "DEFAULT" : A DEFAULT. |
| 2981 * - "DEBUG" : A DEBUG. |
| 2982 * - "INFO" : A INFO. |
| 2983 * - "NOTICE" : A NOTICE. |
| 2984 * - "WARNING" : A WARNING. |
1266 * - "ERROR" : A ERROR. | 2985 * - "ERROR" : A ERROR. |
1267 * - "CRITICAL" : A CRITICAL. | 2986 * - "CRITICAL" : A CRITICAL. |
1268 * - "ALERT" : A ALERT. | 2987 * - "ALERT" : A ALERT. |
1269 * - "EMERGENCY" : A EMERGENCY. | 2988 * - "EMERGENCY" : A EMERGENCY. |
1270 */ | 2989 */ |
1271 core.String severity; | 2990 core.String severity; |
1272 /** | 2991 /** Line of code that generated this log message. */ |
1273 * The time the event described by the log entry occurred. Timestamps must be | 2992 SourceLocation sourceLocation; |
1274 * later than January 1, 1970. | 2993 /** Time when log entry was made. May be inaccurate. */ |
1275 */ | 2994 core.String time; |
1276 core.String timestamp; | 2995 |
1277 /** | 2996 LogLine(); |
1278 * The fully-qualified email address of the authenticated user that performed | 2997 |
1279 * or requested the action represented by the log entry. If the log entry does | 2998 LogLine.fromJson(core.Map _json) { |
1280 * not apply to an action taken by an authenticated user, then the field | 2999 if (_json.containsKey("logMessage")) { |
1281 * should be empty. | 3000 logMessage = _json["logMessage"]; |
1282 */ | |
1283 core.String userId; | |
1284 /** | |
1285 * The zone of the Google Cloud Platform service that created the log entry. | |
1286 * For example, `"us-central1-a"`. | |
1287 */ | |
1288 core.String zone; | |
1289 | |
1290 LogEntryMetadata(); | |
1291 | |
1292 LogEntryMetadata.fromJson(core.Map _json) { | |
1293 if (_json.containsKey("labels")) { | |
1294 labels = _json["labels"]; | |
1295 } | |
1296 if (_json.containsKey("projectId")) { | |
1297 projectId = _json["projectId"]; | |
1298 } | |
1299 if (_json.containsKey("region")) { | |
1300 region = _json["region"]; | |
1301 } | |
1302 if (_json.containsKey("serviceName")) { | |
1303 serviceName = _json["serviceName"]; | |
1304 } | 3001 } |
1305 if (_json.containsKey("severity")) { | 3002 if (_json.containsKey("severity")) { |
1306 severity = _json["severity"]; | 3003 severity = _json["severity"]; |
1307 } | 3004 } |
1308 if (_json.containsKey("timestamp")) { | 3005 if (_json.containsKey("sourceLocation")) { |
1309 timestamp = _json["timestamp"]; | 3006 sourceLocation = new SourceLocation.fromJson(_json["sourceLocation"]); |
1310 } | 3007 } |
1311 if (_json.containsKey("userId")) { | 3008 if (_json.containsKey("time")) { |
1312 userId = _json["userId"]; | 3009 time = _json["time"]; |
1313 } | 3010 } |
1314 if (_json.containsKey("zone")) { | 3011 } |
1315 zone = _json["zone"]; | 3012 |
1316 } | 3013 core.Map toJson() { |
1317 } | 3014 var _json = new core.Map(); |
1318 | 3015 if (logMessage != null) { |
1319 core.Map toJson() { | 3016 _json["logMessage"] = logMessage; |
1320 var _json = new core.Map(); | |
1321 if (labels != null) { | |
1322 _json["labels"] = labels; | |
1323 } | |
1324 if (projectId != null) { | |
1325 _json["projectId"] = projectId; | |
1326 } | |
1327 if (region != null) { | |
1328 _json["region"] = region; | |
1329 } | |
1330 if (serviceName != null) { | |
1331 _json["serviceName"] = serviceName; | |
1332 } | 3017 } |
1333 if (severity != null) { | 3018 if (severity != null) { |
1334 _json["severity"] = severity; | 3019 _json["severity"] = severity; |
1335 } | 3020 } |
1336 if (timestamp != null) { | 3021 if (sourceLocation != null) { |
1337 _json["timestamp"] = timestamp; | 3022 _json["sourceLocation"] = (sourceLocation).toJson(); |
1338 } | 3023 } |
1339 if (userId != null) { | 3024 if (time != null) { |
1340 _json["userId"] = userId; | 3025 _json["time"] = time; |
1341 } | |
1342 if (zone != null) { | |
1343 _json["zone"] = zone; | |
1344 } | |
1345 return _json; | |
1346 } | |
1347 } | |
1348 | |
1349 /** A problem in a sink or the sink's configuration. */ | |
1350 class LogError { | |
1351 /** | |
1352 * The resource associated with the error. It may be different from the sink | |
1353 * destination. For example, the sink may point to a BigQuery dataset, but the | |
1354 * error may refer to a table resource inside the dataset. | |
1355 */ | |
1356 core.String resource; | |
1357 /** The description of the last error observed. */ | |
1358 Status status; | |
1359 /** | |
1360 * The last time the error was observed, in nanoseconds since the Unix epoch. | |
1361 */ | |
1362 core.String timeNanos; | |
1363 | |
1364 LogError(); | |
1365 | |
1366 LogError.fromJson(core.Map _json) { | |
1367 if (_json.containsKey("resource")) { | |
1368 resource = _json["resource"]; | |
1369 } | |
1370 if (_json.containsKey("status")) { | |
1371 status = new Status.fromJson(_json["status"]); | |
1372 } | |
1373 if (_json.containsKey("timeNanos")) { | |
1374 timeNanos = _json["timeNanos"]; | |
1375 } | |
1376 } | |
1377 | |
1378 core.Map toJson() { | |
1379 var _json = new core.Map(); | |
1380 if (resource != null) { | |
1381 _json["resource"] = resource; | |
1382 } | |
1383 if (status != null) { | |
1384 _json["status"] = (status).toJson(); | |
1385 } | |
1386 if (timeNanos != null) { | |
1387 _json["timeNanos"] = timeNanos; | |
1388 } | 3026 } |
1389 return _json; | 3027 return _json; |
1390 } | 3028 } |
1391 } | 3029 } |
1392 | 3030 |
1393 /** A log service object. */ | 3031 /** A log service object. */ |
1394 class LogService { | 3032 class LogService { |
1395 /** | 3033 /** |
1396 * Label keys used when labeling log entries for this service. The order of | 3034 * Label keys used when labeling log entries for this service. The order of |
1397 * the keys is significant, with higher priority keys coming earlier in the | 3035 * the keys is significant, with higher priority keys coming earlier in the |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 * + Google Cloud Storage: `storage.googleapis.com/BUCKET` or | 3069 * + Google Cloud Storage: `storage.googleapis.com/BUCKET` or |
1432 * `BUCKET.storage.googleapis.com/` + Google BigQuery: | 3070 * `BUCKET.storage.googleapis.com/` + Google BigQuery: |
1433 * `bigquery.googleapis.com/projects/PROJECT/datasets/DATASET` Currently the | 3071 * `bigquery.googleapis.com/projects/PROJECT/datasets/DATASET` Currently the |
1434 * Cloud Logging API supports at most one sink for each resource type per log | 3072 * Cloud Logging API supports at most one sink for each resource type per log |
1435 * or log service resource. | 3073 * or log service resource. |
1436 */ | 3074 */ |
1437 core.String destination; | 3075 core.String destination; |
1438 /** _Output only._ All active errors found for this sink. */ | 3076 /** _Output only._ All active errors found for this sink. */ |
1439 core.List<LogError> errors; | 3077 core.List<LogError> errors; |
1440 /** | 3078 /** |
| 3079 * One Platform filter expression. If provided, only the messages matching the |
| 3080 * filter will be published. |
| 3081 */ |
| 3082 core.String filter; |
| 3083 /** |
1441 * The name of this sink. This is a client-assigned identifier for the | 3084 * The name of this sink. This is a client-assigned identifier for the |
1442 * resource. This is ignored by UpdateLogSink and UpdateLogServicesSink. | 3085 * resource. This is ignored by UpdateLogSink and UpdateLogServicesSink. |
1443 */ | 3086 */ |
1444 core.String name; | 3087 core.String name; |
1445 | 3088 |
1446 LogSink(); | 3089 LogSink(); |
1447 | 3090 |
1448 LogSink.fromJson(core.Map _json) { | 3091 LogSink.fromJson(core.Map _json) { |
1449 if (_json.containsKey("destination")) { | 3092 if (_json.containsKey("destination")) { |
1450 destination = _json["destination"]; | 3093 destination = _json["destination"]; |
1451 } | 3094 } |
1452 if (_json.containsKey("errors")) { | 3095 if (_json.containsKey("errors")) { |
1453 errors = _json["errors"].map((value) => new LogError.fromJson(value)).toLi
st(); | 3096 errors = _json["errors"].map((value) => new LogError.fromJson(value)).toLi
st(); |
1454 } | 3097 } |
| 3098 if (_json.containsKey("filter")) { |
| 3099 filter = _json["filter"]; |
| 3100 } |
1455 if (_json.containsKey("name")) { | 3101 if (_json.containsKey("name")) { |
1456 name = _json["name"]; | 3102 name = _json["name"]; |
1457 } | 3103 } |
1458 } | 3104 } |
1459 | 3105 |
1460 core.Map toJson() { | 3106 core.Map toJson() { |
1461 var _json = new core.Map(); | 3107 var _json = new core.Map(); |
1462 if (destination != null) { | 3108 if (destination != null) { |
1463 _json["destination"] = destination; | 3109 _json["destination"] = destination; |
1464 } | 3110 } |
1465 if (errors != null) { | 3111 if (errors != null) { |
1466 _json["errors"] = errors.map((value) => (value).toJson()).toList(); | 3112 _json["errors"] = errors.map((value) => (value).toJson()).toList(); |
1467 } | 3113 } |
| 3114 if (filter != null) { |
| 3115 _json["filter"] = filter; |
| 3116 } |
1468 if (name != null) { | 3117 if (name != null) { |
1469 _json["name"] = name; | 3118 _json["name"] = name; |
1470 } | 3119 } |
1471 return _json; | 3120 return _json; |
1472 } | 3121 } |
1473 } | 3122 } |
1474 | 3123 |
| 3124 /** Represents an amount of money with its currency type. */ |
| 3125 class Money { |
| 3126 /** The 3-letter currency code defined in ISO 4217. */ |
| 3127 core.String currencyCode; |
| 3128 /** |
| 3129 * Number of nano (10^-9) units of the amount. The value must be between |
| 3130 * -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` |
| 3131 * must be positive or zero. If `units` is zero, `nanos` can be positive, |
| 3132 * zero, or negative. If `units` is negative, `nanos` must be negative or |
| 3133 * zero. For example $-1.75 is represented as `units`=-1 and |
| 3134 * `nanos`=-750,000,000. |
| 3135 */ |
| 3136 core.int nanos; |
| 3137 /** |
| 3138 * The whole units of the amount. For example if `currencyCode` is `"USD"`, |
| 3139 * then 1 unit is one US dollar. |
| 3140 */ |
| 3141 core.String units; |
| 3142 |
| 3143 Money(); |
| 3144 |
| 3145 Money.fromJson(core.Map _json) { |
| 3146 if (_json.containsKey("currencyCode")) { |
| 3147 currencyCode = _json["currencyCode"]; |
| 3148 } |
| 3149 if (_json.containsKey("nanos")) { |
| 3150 nanos = _json["nanos"]; |
| 3151 } |
| 3152 if (_json.containsKey("units")) { |
| 3153 units = _json["units"]; |
| 3154 } |
| 3155 } |
| 3156 |
| 3157 core.Map toJson() { |
| 3158 var _json = new core.Map(); |
| 3159 if (currencyCode != null) { |
| 3160 _json["currencyCode"] = currencyCode; |
| 3161 } |
| 3162 if (nanos != null) { |
| 3163 _json["nanos"] = nanos; |
| 3164 } |
| 3165 if (units != null) { |
| 3166 _json["units"] = units; |
| 3167 } |
| 3168 return _json; |
| 3169 } |
| 3170 } |
| 3171 |
| 3172 /** Describes a query job, which executes a SQL-like query. */ |
| 3173 class Query { |
| 3174 /** Describe when a job should create a table. */ |
| 3175 core.String createDisposition; |
| 3176 /** |
| 3177 * If a table name is specified without a dataset in a query, this dataset |
| 3178 * will be added to table name. |
| 3179 */ |
| 3180 DatasetName defaultDataset; |
| 3181 /** table where results should be written. */ |
| 3182 TableName destinationTable; |
| 3183 /** SQL query to run. */ |
| 3184 core.String query; |
| 3185 /** |
| 3186 * Additional tables that this query might reference beyond the tables already |
| 3187 * defined in BigQuery. This is typically used to provide external data |
| 3188 * references for this query. |
| 3189 */ |
| 3190 core.List<TableDefinition> tableDefinitions; |
| 3191 /** Describes how writes should affect the table associated with the job. */ |
| 3192 core.String writeDisposition; |
| 3193 |
| 3194 Query(); |
| 3195 |
| 3196 Query.fromJson(core.Map _json) { |
| 3197 if (_json.containsKey("createDisposition")) { |
| 3198 createDisposition = _json["createDisposition"]; |
| 3199 } |
| 3200 if (_json.containsKey("defaultDataset")) { |
| 3201 defaultDataset = new DatasetName.fromJson(_json["defaultDataset"]); |
| 3202 } |
| 3203 if (_json.containsKey("destinationTable")) { |
| 3204 destinationTable = new TableName.fromJson(_json["destinationTable"]); |
| 3205 } |
| 3206 if (_json.containsKey("query")) { |
| 3207 query = _json["query"]; |
| 3208 } |
| 3209 if (_json.containsKey("tableDefinitions")) { |
| 3210 tableDefinitions = _json["tableDefinitions"].map((value) => new TableDefin
ition.fromJson(value)).toList(); |
| 3211 } |
| 3212 if (_json.containsKey("writeDisposition")) { |
| 3213 writeDisposition = _json["writeDisposition"]; |
| 3214 } |
| 3215 } |
| 3216 |
| 3217 core.Map toJson() { |
| 3218 var _json = new core.Map(); |
| 3219 if (createDisposition != null) { |
| 3220 _json["createDisposition"] = createDisposition; |
| 3221 } |
| 3222 if (defaultDataset != null) { |
| 3223 _json["defaultDataset"] = (defaultDataset).toJson(); |
| 3224 } |
| 3225 if (destinationTable != null) { |
| 3226 _json["destinationTable"] = (destinationTable).toJson(); |
| 3227 } |
| 3228 if (query != null) { |
| 3229 _json["query"] = query; |
| 3230 } |
| 3231 if (tableDefinitions != null) { |
| 3232 _json["tableDefinitions"] = tableDefinitions.map((value) => (value).toJson
()).toList(); |
| 3233 } |
| 3234 if (writeDisposition != null) { |
| 3235 _json["writeDisposition"] = writeDisposition; |
| 3236 } |
| 3237 return _json; |
| 3238 } |
| 3239 } |
| 3240 |
| 3241 /** Complete log information about a single request to an application. */ |
| 3242 class RequestLog { |
| 3243 /** App Engine release version string. */ |
| 3244 core.String appEngineRelease; |
| 3245 /** Identifies the application that handled this request. */ |
| 3246 core.String appId; |
| 3247 /** An indication of the relative cost of serving this request. */ |
| 3248 core.double cost; |
| 3249 /** Time at which request was known to end processing. */ |
| 3250 core.String endTime; |
| 3251 /** |
| 3252 * If true, represents a finished request. Otherwise, the request is active. |
| 3253 */ |
| 3254 core.bool finished; |
| 3255 /** The Internet host and port number of the resource being requested. */ |
| 3256 core.String host; |
| 3257 /** HTTP version of request. */ |
| 3258 core.String httpVersion; |
| 3259 /** An opaque identifier for the instance that handled the request. */ |
| 3260 core.String instanceId; |
| 3261 core.List<core.int> get instanceIdAsBytes { |
| 3262 return crypto.CryptoUtils.base64StringToBytes(instanceId); |
| 3263 } |
| 3264 |
| 3265 void set instanceIdAsBytes(core.List<core.int> _bytes) { |
| 3266 instanceId = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 3267 } |
| 3268 /** |
| 3269 * If the instance that processed this request was individually addressable |
| 3270 * (i.e. belongs to a manually scaled module), this is the index of the |
| 3271 * instance. |
| 3272 */ |
| 3273 core.int instanceIndex; |
| 3274 /** Origin IP address. */ |
| 3275 core.String ip; |
| 3276 /** Latency of the request. */ |
| 3277 core.String latency; |
| 3278 /** |
| 3279 * List of log lines emitted by the application while serving this request, if |
| 3280 * requested. |
| 3281 */ |
| 3282 core.List<LogLine> line; |
| 3283 /** Number of CPU megacycles used to process request. */ |
| 3284 core.String megaCycles; |
| 3285 /** Request method, such as `GET`, `HEAD`, `PUT`, `POST`, or `DELETE`. */ |
| 3286 core.String method; |
| 3287 /** Identifies the module of the application that handled this request. */ |
| 3288 core.String moduleId; |
| 3289 /** |
| 3290 * A string that identifies a logged-in user who made this request, or empty |
| 3291 * if the user is not logged in. Most likely, this is the part of the user's |
| 3292 * email before the '@' sign. The field value is the same for different |
| 3293 * requests from the same user, but different users may have a similar name. |
| 3294 * This information is also available to the application via Users API. This |
| 3295 * field will be populated starting with App Engine 1.9.21. |
| 3296 */ |
| 3297 core.String nickname; |
| 3298 /** |
| 3299 * Time this request spent in the pending request queue, if it was pending at |
| 3300 * all. |
| 3301 */ |
| 3302 core.String pendingTime; |
| 3303 /** Referrer URL of request. */ |
| 3304 core.String referrer; |
| 3305 /** |
| 3306 * Globally unique identifier for a request, based on request start time. |
| 3307 * Request IDs for requests which started later will compare greater as binary |
| 3308 * strings than those for requests which started earlier. |
| 3309 */ |
| 3310 core.String requestId; |
| 3311 core.List<core.int> get requestIdAsBytes { |
| 3312 return crypto.CryptoUtils.base64StringToBytes(requestId); |
| 3313 } |
| 3314 |
| 3315 void set requestIdAsBytes(core.List<core.int> _bytes) { |
| 3316 requestId = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 3317 } |
| 3318 /** |
| 3319 * Contains the path and query portion of the URL that was requested. For |
| 3320 * example, if the URL was "http://example.com/app?name=val", the resource |
| 3321 * would be "/app?name=val". Any trailing fragment (separated by a '#' |
| 3322 * character) will not be included. |
| 3323 */ |
| 3324 core.String resource; |
| 3325 /** Size in bytes sent back to client by request. */ |
| 3326 core.String responseSize; |
| 3327 /** |
| 3328 * Source code for the application that handled this request. There can be |
| 3329 * more than one source reference per deployed application if source code is |
| 3330 * distributed among multiple repositories. |
| 3331 */ |
| 3332 core.List<SourceReference> sourceReference; |
| 3333 /** Time at which request was known to have begun processing. */ |
| 3334 core.String startTime; |
| 3335 /** Response status of request. */ |
| 3336 core.int status; |
| 3337 /** Task name of the request (for an offline request). */ |
| 3338 core.String taskName; |
| 3339 /** Queue name of the request (for an offline request). */ |
| 3340 core.String taskQueueName; |
| 3341 /** Cloud Trace identifier of the trace for this request. */ |
| 3342 core.String traceId; |
| 3343 /** |
| 3344 * File or class within URL mapping used for request. Useful for tracking down |
| 3345 * the source code which was responsible for managing request. Especially for |
| 3346 * multiply mapped handlers. |
| 3347 */ |
| 3348 core.String urlMapEntry; |
| 3349 /** User agent used for making request. */ |
| 3350 core.String userAgent; |
| 3351 /** Version of the application that handled this request. */ |
| 3352 core.String versionId; |
| 3353 /** Was this request a loading request for this instance? */ |
| 3354 core.bool wasLoadingRequest; |
| 3355 |
| 3356 RequestLog(); |
| 3357 |
| 3358 RequestLog.fromJson(core.Map _json) { |
| 3359 if (_json.containsKey("appEngineRelease")) { |
| 3360 appEngineRelease = _json["appEngineRelease"]; |
| 3361 } |
| 3362 if (_json.containsKey("appId")) { |
| 3363 appId = _json["appId"]; |
| 3364 } |
| 3365 if (_json.containsKey("cost")) { |
| 3366 cost = _json["cost"]; |
| 3367 } |
| 3368 if (_json.containsKey("endTime")) { |
| 3369 endTime = _json["endTime"]; |
| 3370 } |
| 3371 if (_json.containsKey("finished")) { |
| 3372 finished = _json["finished"]; |
| 3373 } |
| 3374 if (_json.containsKey("host")) { |
| 3375 host = _json["host"]; |
| 3376 } |
| 3377 if (_json.containsKey("httpVersion")) { |
| 3378 httpVersion = _json["httpVersion"]; |
| 3379 } |
| 3380 if (_json.containsKey("instanceId")) { |
| 3381 instanceId = _json["instanceId"]; |
| 3382 } |
| 3383 if (_json.containsKey("instanceIndex")) { |
| 3384 instanceIndex = _json["instanceIndex"]; |
| 3385 } |
| 3386 if (_json.containsKey("ip")) { |
| 3387 ip = _json["ip"]; |
| 3388 } |
| 3389 if (_json.containsKey("latency")) { |
| 3390 latency = _json["latency"]; |
| 3391 } |
| 3392 if (_json.containsKey("line")) { |
| 3393 line = _json["line"].map((value) => new LogLine.fromJson(value)).toList(); |
| 3394 } |
| 3395 if (_json.containsKey("megaCycles")) { |
| 3396 megaCycles = _json["megaCycles"]; |
| 3397 } |
| 3398 if (_json.containsKey("method")) { |
| 3399 method = _json["method"]; |
| 3400 } |
| 3401 if (_json.containsKey("moduleId")) { |
| 3402 moduleId = _json["moduleId"]; |
| 3403 } |
| 3404 if (_json.containsKey("nickname")) { |
| 3405 nickname = _json["nickname"]; |
| 3406 } |
| 3407 if (_json.containsKey("pendingTime")) { |
| 3408 pendingTime = _json["pendingTime"]; |
| 3409 } |
| 3410 if (_json.containsKey("referrer")) { |
| 3411 referrer = _json["referrer"]; |
| 3412 } |
| 3413 if (_json.containsKey("requestId")) { |
| 3414 requestId = _json["requestId"]; |
| 3415 } |
| 3416 if (_json.containsKey("resource")) { |
| 3417 resource = _json["resource"]; |
| 3418 } |
| 3419 if (_json.containsKey("responseSize")) { |
| 3420 responseSize = _json["responseSize"]; |
| 3421 } |
| 3422 if (_json.containsKey("sourceReference")) { |
| 3423 sourceReference = _json["sourceReference"].map((value) => new SourceRefere
nce.fromJson(value)).toList(); |
| 3424 } |
| 3425 if (_json.containsKey("startTime")) { |
| 3426 startTime = _json["startTime"]; |
| 3427 } |
| 3428 if (_json.containsKey("status")) { |
| 3429 status = _json["status"]; |
| 3430 } |
| 3431 if (_json.containsKey("taskName")) { |
| 3432 taskName = _json["taskName"]; |
| 3433 } |
| 3434 if (_json.containsKey("taskQueueName")) { |
| 3435 taskQueueName = _json["taskQueueName"]; |
| 3436 } |
| 3437 if (_json.containsKey("traceId")) { |
| 3438 traceId = _json["traceId"]; |
| 3439 } |
| 3440 if (_json.containsKey("urlMapEntry")) { |
| 3441 urlMapEntry = _json["urlMapEntry"]; |
| 3442 } |
| 3443 if (_json.containsKey("userAgent")) { |
| 3444 userAgent = _json["userAgent"]; |
| 3445 } |
| 3446 if (_json.containsKey("versionId")) { |
| 3447 versionId = _json["versionId"]; |
| 3448 } |
| 3449 if (_json.containsKey("wasLoadingRequest")) { |
| 3450 wasLoadingRequest = _json["wasLoadingRequest"]; |
| 3451 } |
| 3452 } |
| 3453 |
| 3454 core.Map toJson() { |
| 3455 var _json = new core.Map(); |
| 3456 if (appEngineRelease != null) { |
| 3457 _json["appEngineRelease"] = appEngineRelease; |
| 3458 } |
| 3459 if (appId != null) { |
| 3460 _json["appId"] = appId; |
| 3461 } |
| 3462 if (cost != null) { |
| 3463 _json["cost"] = cost; |
| 3464 } |
| 3465 if (endTime != null) { |
| 3466 _json["endTime"] = endTime; |
| 3467 } |
| 3468 if (finished != null) { |
| 3469 _json["finished"] = finished; |
| 3470 } |
| 3471 if (host != null) { |
| 3472 _json["host"] = host; |
| 3473 } |
| 3474 if (httpVersion != null) { |
| 3475 _json["httpVersion"] = httpVersion; |
| 3476 } |
| 3477 if (instanceId != null) { |
| 3478 _json["instanceId"] = instanceId; |
| 3479 } |
| 3480 if (instanceIndex != null) { |
| 3481 _json["instanceIndex"] = instanceIndex; |
| 3482 } |
| 3483 if (ip != null) { |
| 3484 _json["ip"] = ip; |
| 3485 } |
| 3486 if (latency != null) { |
| 3487 _json["latency"] = latency; |
| 3488 } |
| 3489 if (line != null) { |
| 3490 _json["line"] = line.map((value) => (value).toJson()).toList(); |
| 3491 } |
| 3492 if (megaCycles != null) { |
| 3493 _json["megaCycles"] = megaCycles; |
| 3494 } |
| 3495 if (method != null) { |
| 3496 _json["method"] = method; |
| 3497 } |
| 3498 if (moduleId != null) { |
| 3499 _json["moduleId"] = moduleId; |
| 3500 } |
| 3501 if (nickname != null) { |
| 3502 _json["nickname"] = nickname; |
| 3503 } |
| 3504 if (pendingTime != null) { |
| 3505 _json["pendingTime"] = pendingTime; |
| 3506 } |
| 3507 if (referrer != null) { |
| 3508 _json["referrer"] = referrer; |
| 3509 } |
| 3510 if (requestId != null) { |
| 3511 _json["requestId"] = requestId; |
| 3512 } |
| 3513 if (resource != null) { |
| 3514 _json["resource"] = resource; |
| 3515 } |
| 3516 if (responseSize != null) { |
| 3517 _json["responseSize"] = responseSize; |
| 3518 } |
| 3519 if (sourceReference != null) { |
| 3520 _json["sourceReference"] = sourceReference.map((value) => (value).toJson()
).toList(); |
| 3521 } |
| 3522 if (startTime != null) { |
| 3523 _json["startTime"] = startTime; |
| 3524 } |
| 3525 if (status != null) { |
| 3526 _json["status"] = status; |
| 3527 } |
| 3528 if (taskName != null) { |
| 3529 _json["taskName"] = taskName; |
| 3530 } |
| 3531 if (taskQueueName != null) { |
| 3532 _json["taskQueueName"] = taskQueueName; |
| 3533 } |
| 3534 if (traceId != null) { |
| 3535 _json["traceId"] = traceId; |
| 3536 } |
| 3537 if (urlMapEntry != null) { |
| 3538 _json["urlMapEntry"] = urlMapEntry; |
| 3539 } |
| 3540 if (userAgent != null) { |
| 3541 _json["userAgent"] = userAgent; |
| 3542 } |
| 3543 if (versionId != null) { |
| 3544 _json["versionId"] = versionId; |
| 3545 } |
| 3546 if (wasLoadingRequest != null) { |
| 3547 _json["wasLoadingRequest"] = wasLoadingRequest; |
| 3548 } |
| 3549 return _json; |
| 3550 } |
| 3551 } |
| 3552 |
| 3553 /** Metadata about the request. */ |
| 3554 class RequestMetadata { |
| 3555 /** IP address of the caller */ |
| 3556 core.String callerIp; |
| 3557 /** |
| 3558 * User-Agent of the caller. This is not authenticated, so a malicious caller |
| 3559 * could provide a misleading value. For example: |
| 3560 * `google-api-python-client/1.4.0` The request was made by the Google API |
| 3561 * client for Python. `Cloud SDK Command Line Tool apitools-client/1.0 |
| 3562 * gcloud/0.9.62` The request was made by the Google Cloud SDK CLI (gcloud). |
| 3563 * `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project` |
| 3564 * The request was made from the `my-project` App Engine app. |
| 3565 */ |
| 3566 core.String callerSuppliedUserAgent; |
| 3567 |
| 3568 RequestMetadata(); |
| 3569 |
| 3570 RequestMetadata.fromJson(core.Map _json) { |
| 3571 if (_json.containsKey("callerIp")) { |
| 3572 callerIp = _json["callerIp"]; |
| 3573 } |
| 3574 if (_json.containsKey("callerSuppliedUserAgent")) { |
| 3575 callerSuppliedUserAgent = _json["callerSuppliedUserAgent"]; |
| 3576 } |
| 3577 } |
| 3578 |
| 3579 core.Map toJson() { |
| 3580 var _json = new core.Map(); |
| 3581 if (callerIp != null) { |
| 3582 _json["callerIp"] = callerIp; |
| 3583 } |
| 3584 if (callerSuppliedUserAgent != null) { |
| 3585 _json["callerSuppliedUserAgent"] = callerSuppliedUserAgent; |
| 3586 } |
| 3587 return _json; |
| 3588 } |
| 3589 } |
| 3590 |
| 3591 /** Specifies a location in a source file. */ |
| 3592 class SourceLocation { |
| 3593 /** |
| 3594 * Source file name. May or may not be a fully qualified name, depending on |
| 3595 * the runtime environment. |
| 3596 */ |
| 3597 core.String file; |
| 3598 /** |
| 3599 * Human-readable name of the function or method being invoked, with optional |
| 3600 * context such as the class or package name, for use in contexts such as the |
| 3601 * logs viewer where file:line number is less meaningful. This may vary by |
| 3602 * language, for example: in Java: qual.if.ied.Class.method in Go: |
| 3603 * dir/package.func in Python: function ... |
| 3604 */ |
| 3605 core.String functionName; |
| 3606 /** Line within the source file. */ |
| 3607 core.String line; |
| 3608 |
| 3609 SourceLocation(); |
| 3610 |
| 3611 SourceLocation.fromJson(core.Map _json) { |
| 3612 if (_json.containsKey("file")) { |
| 3613 file = _json["file"]; |
| 3614 } |
| 3615 if (_json.containsKey("functionName")) { |
| 3616 functionName = _json["functionName"]; |
| 3617 } |
| 3618 if (_json.containsKey("line")) { |
| 3619 line = _json["line"]; |
| 3620 } |
| 3621 } |
| 3622 |
| 3623 core.Map toJson() { |
| 3624 var _json = new core.Map(); |
| 3625 if (file != null) { |
| 3626 _json["file"] = file; |
| 3627 } |
| 3628 if (functionName != null) { |
| 3629 _json["functionName"] = functionName; |
| 3630 } |
| 3631 if (line != null) { |
| 3632 _json["line"] = line; |
| 3633 } |
| 3634 return _json; |
| 3635 } |
| 3636 } |
| 3637 |
1475 /** | 3638 /** |
1476 * Represents the RPC error status for Google APIs. See http://go/errormodel for | 3639 * A reference to a particular snapshot of the source tree used to build and |
1477 * details. | 3640 * deploy an application. |
| 3641 */ |
| 3642 class SourceReference { |
| 3643 /** |
| 3644 * Optional. A URI string identifying the repository. Example: |
| 3645 * "https://github.com/GoogleCloudPlatform/kubernetes.git" |
| 3646 */ |
| 3647 core.String repository; |
| 3648 /** |
| 3649 * The canonical (and persistent) identifier of the deployed revision. Example |
| 3650 * (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" |
| 3651 */ |
| 3652 core.String revisionId; |
| 3653 |
| 3654 SourceReference(); |
| 3655 |
| 3656 SourceReference.fromJson(core.Map _json) { |
| 3657 if (_json.containsKey("repository")) { |
| 3658 repository = _json["repository"]; |
| 3659 } |
| 3660 if (_json.containsKey("revisionId")) { |
| 3661 revisionId = _json["revisionId"]; |
| 3662 } |
| 3663 } |
| 3664 |
| 3665 core.Map toJson() { |
| 3666 var _json = new core.Map(); |
| 3667 if (repository != null) { |
| 3668 _json["repository"] = repository; |
| 3669 } |
| 3670 if (revisionId != null) { |
| 3671 _json["revisionId"] = revisionId; |
| 3672 } |
| 3673 return _json; |
| 3674 } |
| 3675 } |
| 3676 |
| 3677 /** |
| 3678 * The `Status` type defines a logical error model that is suitable for |
| 3679 * different programming environments, including REST APIs and RPC APIs. It is |
| 3680 * used by [gRPC](https://github.com/grpc). The error model is designed to be: - |
| 3681 * Simple to use and understand for most users - Flexible enough to meet |
| 3682 * unexpected needs # Overview The `Status` message contains three pieces of |
| 3683 * data: error code, error message, and error details. The error code should be |
| 3684 * an enum value of [google.rpc.Code][], but it may accept additional error |
| 3685 * codes if needed. The error message should be a developer-facing English |
| 3686 * message that helps developers *understand* and *resolve* the error. If a |
| 3687 * localized user-facing error message is needed, put the localized message in |
| 3688 * the error details or localize it in the client. The optional error details |
| 3689 * may contain arbitrary information about the error. There is a predefined set |
| 3690 * of error detail types in the package `google.rpc` which can be used for |
| 3691 * common error conditions. # Language mapping The `Status` message is the |
| 3692 * logical representation of the error model, but it is not necessarily the |
| 3693 * actual wire format. When the `Status` message is exposed in different client |
| 3694 * libraries and different wire protocols, it can be mapped differently. For |
| 3695 * example, it will likely be mapped to some exceptions in Java, but more likely |
| 3696 * mapped to some error codes in C. # Other uses The error model and the |
| 3697 * `Status` message can be used in a variety of environments, either with or |
| 3698 * without APIs, to provide a consistent developer experience across different |
| 3699 * environments. Example uses of this error model include: - Partial errors. If |
| 3700 * a service needs to return partial errors to the client, it may embed the |
| 3701 * `Status` in the normal response to indicate the partial errors. - Workflow |
| 3702 * errors. A typical workflow has multiple steps. Each step may have a `Status` |
| 3703 * message for error reporting purpose. - Batch operations. If a client uses |
| 3704 * batch request and batch response, the `Status` message should be used |
| 3705 * directly inside batch response, one for each error sub-response. - |
| 3706 * Asynchronous operations. If an API call embeds asynchronous operation results |
| 3707 * in its response, the status of those operations should be represented |
| 3708 * directly using the `Status` message. - Logging. If some API errors are stored |
| 3709 * in logs, the message `Status` could be used directly after any stripping |
| 3710 * needed for security/privacy reasons. |
1478 */ | 3711 */ |
1479 class Status { | 3712 class Status { |
1480 /** The status code, which should be an enum value of [google.rpc.Code][]. */ | 3713 /** The status code, which should be an enum value of [google.rpc.Code][]. */ |
1481 core.int code; | 3714 core.int code; |
1482 /** | 3715 /** |
1483 * A list of messages that carry the error details. There will be a common set | 3716 * A list of messages that carry the error details. There will be a common set |
1484 * of message types for APIs to use. | 3717 * of message types for APIs to use. |
1485 * | 3718 * |
1486 * The values for Object must be JSON objects. It can consist of `num`, | 3719 * The values for Object must be JSON objects. It can consist of `num`, |
1487 * `String`, `bool` and `null` as well as `Map` and `List` values. | 3720 * `String`, `bool` and `null` as well as `Map` and `List` values. |
1488 */ | 3721 */ |
1489 core.List<core.Map<core.String, core.Object>> details; | 3722 core.List<core.Map<core.String, core.Object>> details; |
1490 /** | 3723 /** |
1491 * A developer-facing error message, which should be in English. The | 3724 * A developer-facing error message, which should be in English. Any |
1492 * user-facing error message should be localized and stored in the | 3725 * user-facing error message should be localized and sent in the |
1493 * [google.rpc.Status.details][google.rpc.Status.details] field. | 3726 * [google.rpc.Status.details][google.rpc.Status.details] field, or localized |
| 3727 * by the client. |
1494 */ | 3728 */ |
1495 core.String message; | 3729 core.String message; |
1496 | 3730 |
1497 Status(); | 3731 Status(); |
1498 | 3732 |
1499 Status.fromJson(core.Map _json) { | 3733 Status.fromJson(core.Map _json) { |
1500 if (_json.containsKey("code")) { | 3734 if (_json.containsKey("code")) { |
1501 code = _json["code"]; | 3735 code = _json["code"]; |
1502 } | 3736 } |
1503 if (_json.containsKey("details")) { | 3737 if (_json.containsKey("details")) { |
(...skipping 10 matching lines...) Expand all Loading... |
1514 _json["code"] = code; | 3748 _json["code"] = code; |
1515 } | 3749 } |
1516 if (details != null) { | 3750 if (details != null) { |
1517 _json["details"] = details; | 3751 _json["details"] = details; |
1518 } | 3752 } |
1519 if (message != null) { | 3753 if (message != null) { |
1520 _json["message"] = message; | 3754 _json["message"] = message; |
1521 } | 3755 } |
1522 return _json; | 3756 return _json; |
1523 } | 3757 } |
| 3758 } |
| 3759 |
| 3760 /** Message containing BigQuery table information. */ |
| 3761 class Table { |
| 3762 /** The creation time for this table. */ |
| 3763 core.String createTime; |
| 3764 /** |
| 3765 * The expiration date for this table. After this time, the table will not be |
| 3766 * externally visible and all storage associated with the table may be garbage |
| 3767 * collected. If this field is not present, the |
| 3768 * HelixDataset.default_table_expiration_ms value will be used to calculate |
| 3769 * the expiration time. Otherwise, the table will live until explicitly |
| 3770 * deleted. |
| 3771 */ |
| 3772 core.String expireTime; |
| 3773 /** User-modifiable metadata for this table. */ |
| 3774 TableInfo info; |
| 3775 /** The table schema. */ |
| 3776 TableSchema schema; |
| 3777 /** The table and dataset IDs uniquely describing this table. */ |
| 3778 TableName tableName; |
| 3779 /** |
| 3780 * The last truncation time for this table. This will only be updated when |
| 3781 * operation specified with WRITE_TRUNCATE. |
| 3782 */ |
| 3783 core.String truncateTime; |
| 3784 /** |
| 3785 * The table provides a Database View behavior and functionality based on a |
| 3786 * query. |
| 3787 */ |
| 3788 TableViewDefinition view; |
| 3789 |
| 3790 Table(); |
| 3791 |
| 3792 Table.fromJson(core.Map _json) { |
| 3793 if (_json.containsKey("createTime")) { |
| 3794 createTime = _json["createTime"]; |
| 3795 } |
| 3796 if (_json.containsKey("expireTime")) { |
| 3797 expireTime = _json["expireTime"]; |
| 3798 } |
| 3799 if (_json.containsKey("info")) { |
| 3800 info = new TableInfo.fromJson(_json["info"]); |
| 3801 } |
| 3802 if (_json.containsKey("schema")) { |
| 3803 schema = new TableSchema.fromJson(_json["schema"]); |
| 3804 } |
| 3805 if (_json.containsKey("tableName")) { |
| 3806 tableName = new TableName.fromJson(_json["tableName"]); |
| 3807 } |
| 3808 if (_json.containsKey("truncateTime")) { |
| 3809 truncateTime = _json["truncateTime"]; |
| 3810 } |
| 3811 if (_json.containsKey("view")) { |
| 3812 view = new TableViewDefinition.fromJson(_json["view"]); |
| 3813 } |
| 3814 } |
| 3815 |
| 3816 core.Map toJson() { |
| 3817 var _json = new core.Map(); |
| 3818 if (createTime != null) { |
| 3819 _json["createTime"] = createTime; |
| 3820 } |
| 3821 if (expireTime != null) { |
| 3822 _json["expireTime"] = expireTime; |
| 3823 } |
| 3824 if (info != null) { |
| 3825 _json["info"] = (info).toJson(); |
| 3826 } |
| 3827 if (schema != null) { |
| 3828 _json["schema"] = (schema).toJson(); |
| 3829 } |
| 3830 if (tableName != null) { |
| 3831 _json["tableName"] = (tableName).toJson(); |
| 3832 } |
| 3833 if (truncateTime != null) { |
| 3834 _json["truncateTime"] = truncateTime; |
| 3835 } |
| 3836 if (view != null) { |
| 3837 _json["view"] = (view).toJson(); |
| 3838 } |
| 3839 return _json; |
| 3840 } |
| 3841 } |
| 3842 |
| 3843 /** Describes a copy job, which copies an existing table to another table. */ |
| 3844 class TableCopy { |
| 3845 /** Describe when a job should create a table. */ |
| 3846 core.String createDisposition; |
| 3847 /** Destination table. */ |
| 3848 TableName destinationTable; |
| 3849 /** Source tables. */ |
| 3850 core.List<TableName> sourceTables; |
| 3851 /** Describe whether the copy operation should append or not. */ |
| 3852 core.String writeDisposition; |
| 3853 |
| 3854 TableCopy(); |
| 3855 |
| 3856 TableCopy.fromJson(core.Map _json) { |
| 3857 if (_json.containsKey("createDisposition")) { |
| 3858 createDisposition = _json["createDisposition"]; |
| 3859 } |
| 3860 if (_json.containsKey("destinationTable")) { |
| 3861 destinationTable = new TableName.fromJson(_json["destinationTable"]); |
| 3862 } |
| 3863 if (_json.containsKey("sourceTables")) { |
| 3864 sourceTables = _json["sourceTables"].map((value) => new TableName.fromJson
(value)).toList(); |
| 3865 } |
| 3866 if (_json.containsKey("writeDisposition")) { |
| 3867 writeDisposition = _json["writeDisposition"]; |
| 3868 } |
| 3869 } |
| 3870 |
| 3871 core.Map toJson() { |
| 3872 var _json = new core.Map(); |
| 3873 if (createDisposition != null) { |
| 3874 _json["createDisposition"] = createDisposition; |
| 3875 } |
| 3876 if (destinationTable != null) { |
| 3877 _json["destinationTable"] = (destinationTable).toJson(); |
| 3878 } |
| 3879 if (sourceTables != null) { |
| 3880 _json["sourceTables"] = sourceTables.map((value) => (value).toJson()).toLi
st(); |
| 3881 } |
| 3882 if (writeDisposition != null) { |
| 3883 _json["writeDisposition"] = writeDisposition; |
| 3884 } |
| 3885 return _json; |
| 3886 } |
| 3887 } |
| 3888 |
| 3889 /** Table data-list request. */ |
| 3890 class TableDataListRequest { |
| 3891 /** Maximum number of results to return. */ |
| 3892 core.int maxResults; |
| 3893 /** Starting row offset. */ |
| 3894 core.String startRow; |
| 3895 |
| 3896 TableDataListRequest(); |
| 3897 |
| 3898 TableDataListRequest.fromJson(core.Map _json) { |
| 3899 if (_json.containsKey("maxResults")) { |
| 3900 maxResults = _json["maxResults"]; |
| 3901 } |
| 3902 if (_json.containsKey("startRow")) { |
| 3903 startRow = _json["startRow"]; |
| 3904 } |
| 3905 } |
| 3906 |
| 3907 core.Map toJson() { |
| 3908 var _json = new core.Map(); |
| 3909 if (maxResults != null) { |
| 3910 _json["maxResults"] = maxResults; |
| 3911 } |
| 3912 if (startRow != null) { |
| 3913 _json["startRow"] = startRow; |
| 3914 } |
| 3915 return _json; |
| 3916 } |
| 3917 } |
| 3918 |
| 3919 /** |
| 3920 * Per Query external tables. These tables can be referenced with 'name' in the |
| 3921 * query and can be read just like any other table. |
| 3922 */ |
| 3923 class TableDefinition { |
| 3924 /** |
| 3925 * Name of the table. This will be used to reference this table in the query. |
| 3926 */ |
| 3927 core.String name; |
| 3928 /** URIs for the data to be imported. */ |
| 3929 core.List<core.String> sourceUris; |
| 3930 |
| 3931 TableDefinition(); |
| 3932 |
| 3933 TableDefinition.fromJson(core.Map _json) { |
| 3934 if (_json.containsKey("name")) { |
| 3935 name = _json["name"]; |
| 3936 } |
| 3937 if (_json.containsKey("sourceUris")) { |
| 3938 sourceUris = _json["sourceUris"]; |
| 3939 } |
| 3940 } |
| 3941 |
| 3942 core.Map toJson() { |
| 3943 var _json = new core.Map(); |
| 3944 if (name != null) { |
| 3945 _json["name"] = name; |
| 3946 } |
| 3947 if (sourceUris != null) { |
| 3948 _json["sourceUris"] = sourceUris; |
| 3949 } |
| 3950 return _json; |
| 3951 } |
| 3952 } |
| 3953 |
| 3954 /** User-provided metadata for a table, primarily for display in the UI. */ |
| 3955 class TableInfo { |
| 3956 /** |
| 3957 * The description of a table. This can be several sentences or paragraphs |
| 3958 * describing the table contents in detail. |
| 3959 */ |
| 3960 core.String description; |
| 3961 /** |
| 3962 * The human-readable name of a table. This should be a short phrase |
| 3963 * identifying the table (e.g., "Analytics Data - Jan 2011"). |
| 3964 */ |
| 3965 core.String friendlyName; |
| 3966 |
| 3967 TableInfo(); |
| 3968 |
| 3969 TableInfo.fromJson(core.Map _json) { |
| 3970 if (_json.containsKey("description")) { |
| 3971 description = _json["description"]; |
| 3972 } |
| 3973 if (_json.containsKey("friendlyName")) { |
| 3974 friendlyName = _json["friendlyName"]; |
| 3975 } |
| 3976 } |
| 3977 |
| 3978 core.Map toJson() { |
| 3979 var _json = new core.Map(); |
| 3980 if (description != null) { |
| 3981 _json["description"] = description; |
| 3982 } |
| 3983 if (friendlyName != null) { |
| 3984 _json["friendlyName"] = friendlyName; |
| 3985 } |
| 3986 return _json; |
| 3987 } |
| 3988 } |
| 3989 |
| 3990 /** ==== Table =======// Table insert request. */ |
| 3991 class TableInsertRequest { |
| 3992 /** Table insert payload. */ |
| 3993 Table resource; |
| 3994 |
| 3995 TableInsertRequest(); |
| 3996 |
| 3997 TableInsertRequest.fromJson(core.Map _json) { |
| 3998 if (_json.containsKey("resource")) { |
| 3999 resource = new Table.fromJson(_json["resource"]); |
| 4000 } |
| 4001 } |
| 4002 |
| 4003 core.Map toJson() { |
| 4004 var _json = new core.Map(); |
| 4005 if (resource != null) { |
| 4006 _json["resource"] = (resource).toJson(); |
| 4007 } |
| 4008 return _json; |
| 4009 } |
| 4010 } |
| 4011 |
| 4012 /** Table insert response. */ |
| 4013 class TableInsertResponse { |
| 4014 /** Final state of inserted table. */ |
| 4015 Table resource; |
| 4016 |
| 4017 TableInsertResponse(); |
| 4018 |
| 4019 TableInsertResponse.fromJson(core.Map _json) { |
| 4020 if (_json.containsKey("resource")) { |
| 4021 resource = new Table.fromJson(_json["resource"]); |
| 4022 } |
| 4023 } |
| 4024 |
| 4025 core.Map toJson() { |
| 4026 var _json = new core.Map(); |
| 4027 if (resource != null) { |
| 4028 _json["resource"] = (resource).toJson(); |
| 4029 } |
| 4030 return _json; |
| 4031 } |
| 4032 } |
| 4033 |
| 4034 /** Fully-qualified name for a table -- referenced through a dataset. */ |
| 4035 class TableName { |
| 4036 /** The ID of the dataset (scoped to the project above). */ |
| 4037 core.String datasetId; |
| 4038 /** |
| 4039 * A string containing the id of this project. The id be the alphanumeric |
| 4040 * project ID, or the project number. |
| 4041 */ |
| 4042 core.String projectId; |
| 4043 /** The ID of the table (scoped to the dataset above). */ |
| 4044 core.String tableId; |
| 4045 |
| 4046 TableName(); |
| 4047 |
| 4048 TableName.fromJson(core.Map _json) { |
| 4049 if (_json.containsKey("datasetId")) { |
| 4050 datasetId = _json["datasetId"]; |
| 4051 } |
| 4052 if (_json.containsKey("projectId")) { |
| 4053 projectId = _json["projectId"]; |
| 4054 } |
| 4055 if (_json.containsKey("tableId")) { |
| 4056 tableId = _json["tableId"]; |
| 4057 } |
| 4058 } |
| 4059 |
| 4060 core.Map toJson() { |
| 4061 var _json = new core.Map(); |
| 4062 if (datasetId != null) { |
| 4063 _json["datasetId"] = datasetId; |
| 4064 } |
| 4065 if (projectId != null) { |
| 4066 _json["projectId"] = projectId; |
| 4067 } |
| 4068 if (tableId != null) { |
| 4069 _json["tableId"] = tableId; |
| 4070 } |
| 4071 return _json; |
| 4072 } |
| 4073 } |
| 4074 |
| 4075 /** BigQuery table schema. */ |
| 4076 class TableSchema { |
| 4077 /** One field per column in the table */ |
| 4078 core.List<FieldSchema> fields; |
| 4079 |
| 4080 TableSchema(); |
| 4081 |
| 4082 TableSchema.fromJson(core.Map _json) { |
| 4083 if (_json.containsKey("fields")) { |
| 4084 fields = _json["fields"].map((value) => new FieldSchema.fromJson(value)).t
oList(); |
| 4085 } |
| 4086 } |
| 4087 |
| 4088 core.Map toJson() { |
| 4089 var _json = new core.Map(); |
| 4090 if (fields != null) { |
| 4091 _json["fields"] = fields.map((value) => (value).toJson()).toList(); |
| 4092 } |
| 4093 return _json; |
| 4094 } |
| 4095 } |
| 4096 |
| 4097 /** Table update request. */ |
| 4098 class TableUpdateRequest { |
| 4099 /** Table update payload. */ |
| 4100 Table resource; |
| 4101 |
| 4102 TableUpdateRequest(); |
| 4103 |
| 4104 TableUpdateRequest.fromJson(core.Map _json) { |
| 4105 if (_json.containsKey("resource")) { |
| 4106 resource = new Table.fromJson(_json["resource"]); |
| 4107 } |
| 4108 } |
| 4109 |
| 4110 core.Map toJson() { |
| 4111 var _json = new core.Map(); |
| 4112 if (resource != null) { |
| 4113 _json["resource"] = (resource).toJson(); |
| 4114 } |
| 4115 return _json; |
| 4116 } |
| 4117 } |
| 4118 |
| 4119 /** Table update response. */ |
| 4120 class TableUpdateResponse { |
| 4121 /** Final state of updated table. */ |
| 4122 Table resource; |
| 4123 |
| 4124 TableUpdateResponse(); |
| 4125 |
| 4126 TableUpdateResponse.fromJson(core.Map _json) { |
| 4127 if (_json.containsKey("resource")) { |
| 4128 resource = new Table.fromJson(_json["resource"]); |
| 4129 } |
| 4130 } |
| 4131 |
| 4132 core.Map toJson() { |
| 4133 var _json = new core.Map(); |
| 4134 if (resource != null) { |
| 4135 _json["resource"] = (resource).toJson(); |
| 4136 } |
| 4137 return _json; |
| 4138 } |
| 4139 } |
| 4140 |
| 4141 /** |
| 4142 * Metadata for a table to become like a Database View based on a SQL-like |
| 4143 * query. |
| 4144 */ |
| 4145 class TableViewDefinition { |
| 4146 /** Sql query to run. */ |
| 4147 core.String query; |
| 4148 |
| 4149 TableViewDefinition(); |
| 4150 |
| 4151 TableViewDefinition.fromJson(core.Map _json) { |
| 4152 if (_json.containsKey("query")) { |
| 4153 query = _json["query"]; |
| 4154 } |
| 4155 } |
| 4156 |
| 4157 core.Map toJson() { |
| 4158 var _json = new core.Map(); |
| 4159 if (query != null) { |
| 4160 _json["query"] = query; |
| 4161 } |
| 4162 return _json; |
| 4163 } |
1524 } | 4164 } |
1525 | 4165 |
1526 /** The parameters to WriteLogEntries. */ | 4166 /** The parameters to WriteLogEntries. */ |
1527 class WriteLogEntriesRequest { | 4167 class WriteLogEntriesRequest { |
1528 /** | 4168 /** |
1529 * Metadata labels that apply to all entries in this request. If one of the | 4169 * Metadata labels that apply to all log entries in this request, so that you |
1530 * log entries contains a (key, value) with the same key that is in | 4170 * don't have to repeat them in each log entry's `metadata.labels` field. If |
| 4171 * any of the log entries contains a (key, value) with the same key that is in |
1531 * `commonLabels`, then the entry's (key, value) overrides the one in | 4172 * `commonLabels`, then the entry's (key, value) overrides the one in |
1532 * `commonLabels`. | 4173 * `commonLabels`. |
1533 */ | 4174 */ |
1534 core.Map<core.String, core.String> commonLabels; | 4175 core.Map<core.String, core.String> commonLabels; |
1535 /** Log entries to insert. */ | 4176 /** Log entries to insert. */ |
1536 core.List<LogEntry> entries; | 4177 core.List<LogEntry> entries; |
1537 | 4178 |
1538 WriteLogEntriesRequest(); | 4179 WriteLogEntriesRequest(); |
1539 | 4180 |
1540 WriteLogEntriesRequest.fromJson(core.Map _json) { | 4181 WriteLogEntriesRequest.fromJson(core.Map _json) { |
(...skipping 23 matching lines...) Expand all Loading... |
1564 WriteLogEntriesResponse(); | 4205 WriteLogEntriesResponse(); |
1565 | 4206 |
1566 WriteLogEntriesResponse.fromJson(core.Map _json) { | 4207 WriteLogEntriesResponse.fromJson(core.Map _json) { |
1567 } | 4208 } |
1568 | 4209 |
1569 core.Map toJson() { | 4210 core.Map toJson() { |
1570 var _json = new core.Map(); | 4211 var _json = new core.Map(); |
1571 return _json; | 4212 return _json; |
1572 } | 4213 } |
1573 } | 4214 } |
OLD | NEW |