From 6e70e8954ae25b572671f33bb57e11a9a57179d5 Mon Sep 17 00:00:00 2001 From: Bryn Ryans Date: Sat, 8 Jan 2022 22:51:38 +0000 Subject: [PATCH 1/8] feat: Looker SDK generator for the Dart language Description: A generator for the Dart language. Note, only supports Looker SDK 4.0. Changes: 1. Dart generator. 2. Tests for dart generator. 3. Generated dart methods and models. 4. Runtime librart for dart. 5. Example dart implementation. 6. Unit tests, 7. End to end test. --- dart/looker_sdk/.gitignore | 12 + dart/looker_sdk/README.md | 74 + dart/looker_sdk/analysis_options.yaml | 3 + dart/looker_sdk/example/main.dart | 100 + dart/looker_sdk/lib/looker_sdk.dart | 10 + dart/looker_sdk/lib/src/rtl/api_methods.dart | 104 + dart/looker_sdk/lib/src/rtl/api_settings.dart | 55 + dart/looker_sdk/lib/src/rtl/api_types.dart | 18 + dart/looker_sdk/lib/src/rtl/auth_session.dart | 94 + dart/looker_sdk/lib/src/rtl/auth_token.dart | 42 + dart/looker_sdk/lib/src/rtl/constants.dart | 5 + dart/looker_sdk/lib/src/rtl/sdk.dart | 21 + dart/looker_sdk/lib/src/rtl/transport.dart | 147 + dart/looker_sdk/lib/src/sdk/methods.dart | 11088 +++ dart/looker_sdk/lib/src/sdk/models.dart | 66228 ++++++++++++++++ dart/looker_sdk/package.json | 12 + dart/looker_sdk/pubspec.yaml | 10 + dart/looker_sdk/test/e2e/boards_test.dart | 21 + .../looker_sdk/test/e2e/connections_test.dart | 62 + dart/looker_sdk/test/e2e/dashboards_test.dart | 22 + dart/looker_sdk/test/e2e/looks_test.dart | 23 + dart/looker_sdk/test/e2e/utils.dart | 25 + .../looker_sdk/test/unit/looker_sdk_test.dart | 189 + .../sdk-codegen-scripts/src/reformatter.ts | 59 + packages/sdk-codegen/src/codeGen.ts | 4 + packages/sdk-codegen/src/codeGenerators.ts | 7 + packages/sdk-codegen/src/dart.gen.spec.ts | 379 + packages/sdk-codegen/src/dart.gen.ts | 669 + spec/Looker.3.1.json | 1627 +- spec/Looker.3.1.oas.json | 1540 +- spec/Looker.4.0.json | 2442 +- spec/Looker.4.0.oas.json | 2553 +- 32 files changed, 85942 insertions(+), 1703 deletions(-) create mode 100644 dart/looker_sdk/.gitignore create mode 100644 dart/looker_sdk/README.md create mode 100644 dart/looker_sdk/analysis_options.yaml create mode 100644 dart/looker_sdk/example/main.dart create mode 100644 dart/looker_sdk/lib/looker_sdk.dart create mode 100644 dart/looker_sdk/lib/src/rtl/api_methods.dart create mode 100644 dart/looker_sdk/lib/src/rtl/api_settings.dart create mode 100644 dart/looker_sdk/lib/src/rtl/api_types.dart create mode 100644 dart/looker_sdk/lib/src/rtl/auth_session.dart create mode 100644 dart/looker_sdk/lib/src/rtl/auth_token.dart create mode 100644 dart/looker_sdk/lib/src/rtl/constants.dart create mode 100644 dart/looker_sdk/lib/src/rtl/sdk.dart create mode 100644 dart/looker_sdk/lib/src/rtl/transport.dart create mode 100644 dart/looker_sdk/lib/src/sdk/methods.dart create mode 100644 dart/looker_sdk/lib/src/sdk/models.dart create mode 100644 dart/looker_sdk/package.json create mode 100644 dart/looker_sdk/pubspec.yaml create mode 100644 dart/looker_sdk/test/e2e/boards_test.dart create mode 100644 dart/looker_sdk/test/e2e/connections_test.dart create mode 100644 dart/looker_sdk/test/e2e/dashboards_test.dart create mode 100644 dart/looker_sdk/test/e2e/looks_test.dart create mode 100644 dart/looker_sdk/test/e2e/utils.dart create mode 100644 dart/looker_sdk/test/unit/looker_sdk_test.dart create mode 100644 packages/sdk-codegen/src/dart.gen.spec.ts create mode 100644 packages/sdk-codegen/src/dart.gen.ts diff --git a/dart/looker_sdk/.gitignore b/dart/looker_sdk/.gitignore new file mode 100644 index 000000000..5cdfc5d7a --- /dev/null +++ b/dart/looker_sdk/.gitignore @@ -0,0 +1,12 @@ +# the dart lib needs to be included in source control +!lib/** + +# the following are excluded from source control. +.env* +temp/ +.dart_tool/ +.packages +build/ +# recommendation is NOT to commit for library packages. +pubspec.lock + diff --git a/dart/looker_sdk/README.md b/dart/looker_sdk/README.md new file mode 100644 index 000000000..2384a08cf --- /dev/null +++ b/dart/looker_sdk/README.md @@ -0,0 +1,74 @@ +# Looker API for Dart SDK + +A dart implementation of the Looker API. Note that only the Looker 4.0 API is generated. + +## Usage + +See examples and tests. + +Create a `.env` file in the same directory as this `README.md`. The format is as follows: + +``` +URL=looker_instance_api_endpoint +CLIENT_ID=client_id_from_looker_instance +CLIENT_SECRET=client_secret_from_looker_instance +``` + +## Add to project + +Add following to project `pubspec.yaml` dependencies. Replace `{SHA}` with the sha of the version of the SDK you want to use (a more permanent solution may be added in the future). + +``` + looker_sdk: + git: + url: https://github.com/looker-open-source/sdk-codegen + ref: {SHA} + path: dart/looker_sdk +``` + +## Developing + +Relies on `yarn` and `dart` being installed. This was developed with `dart` version `2.15.1` so the recommendation is to have a version of dart that is at least at that version. + +### Generate + +Run `yarn sdk Gen` from the `{reporoot}`. Note that the SDK generator needs to be built `yarn build`. If changing the generator run 'yarn watch` in a separate window. This command generates two files: + +1. `{reporoot}/dart/looker_sdk/lib/src/sdk/methods.dart` +2. `{reporoot}/dart/looker_sdk/lib/src/sdk/models.dart` + +The files are automatically formatted using `dart` tooling. Ensure that the `dart` binary is available on your path. + +### Run example + +Run `yarn example` from `{reporoot}/dart/looker_sdk` + +### Run tests + +Run `yarn test:e2e` from `{reporoot}/dart/looker_sdk` to run end to end tests. Note that this test requires that a `.env` file has been created (see above) and that the Looker instance is running. + +Run `yarn test:unit` from `{reporoot}/dart/looker_sdk` to run unit tests. These tests do not require a Looker instance to be running. + +Run `yarn test` from `{reporoot}/dart/looker_sdk` to run all tests. + +### Run format + +Run `yarn format` from `{reporoot}/dart/looker_sdk` to format the `dart` files correctly. This should be run if you change any of the run time library `dart` files. The repo CI will run the linter and will fail if the files have not been correctly formatted. + +### Run format + +Run `yarn format` from `{reporoot}/dart/looker_sdk` to lint the `dart` files. + +## TODOs + +1. Make enum mappers private to package. They are currently public as some enums are not used by by the models and a warning for unused class is diaplayed by visual code. It could also be a bug in either the generator or the spec generator (why are enums being generated if they are not being used?). +2. Add optional timeout option to methods. +3. Add additional authorization methods to api keys. +4. Revisit auth session. There is some duplication of methods in generated methods. +5. Add base class for models. Move common props to base class. Maybe add some utility methods for primitive types. Should reduce size of models.dart file. +6. More and better generator tests. They are a bit hacky at that moment. +7. Generate dart documentation. + +## Notes + +1. Region folding: Dart does not currently support region folding. visual studio code has a generic extension that supports region folding for dart. [Install](https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder) if you wish the generated regions to be honored. diff --git a/dart/looker_sdk/analysis_options.yaml b/dart/looker_sdk/analysis_options.yaml new file mode 100644 index 000000000..3872f5d52 --- /dev/null +++ b/dart/looker_sdk/analysis_options.yaml @@ -0,0 +1,3 @@ +include: package:pedantic/analysis_options.yaml + +analyzer: diff --git a/dart/looker_sdk/example/main.dart b/dart/looker_sdk/example/main.dart new file mode 100644 index 000000000..bc6e508c6 --- /dev/null +++ b/dart/looker_sdk/example/main.dart @@ -0,0 +1,100 @@ +import 'dart:io'; +import 'dart:typed_data'; +import 'package:looker_sdk/looker_sdk.dart'; +import 'package:dotenv/dotenv.dart' show load, env; + +void main() async { + load(); + var sdk = await createSdk(); + await runLooks(sdk); + await runDashboardApis(sdk); + await runConnectionApis(sdk); +} + +Future createSdk() async { + return await Sdk.createSdk({ + 'base_url': env['URL'], + 'verify_ssl': false, + 'credentials_callback': credentialsCallback + }); +} + +Future runLooks(LookerSDK sdk) async { + try { + var looks = await sdk.ok(sdk.all_looks()); + if (looks.isNotEmpty) { + looks.forEach((look) => print(look.title)); + var look = await sdk.ok(sdk.run_look(looks[looks.length - 1].id, 'png')); + var dir = Directory('./temp'); + if (!dir.existsSync()) { + dir.createSync(); + } + File('./temp/look.png').writeAsBytesSync(look as Uint8List); + look = await sdk.ok(sdk.run_look(looks[looks.length - 1].id, 'csv')); + File('./temp/look.csv').writeAsStringSync(look as String); + } + } catch (error, stacktrace) { + print(error); + print(stacktrace); + } +} + +Future runDashboardApis(LookerSDK sdk) async { + try { + var dashboards = await sdk.ok(sdk.all_dashboards()); + dashboards.forEach((dashboard) => print(dashboard.title)); + var dashboard = await sdk.ok(sdk.dashboard(dashboards[0].id)); + print(dashboard.toJson()); + } catch (error, stacktrace) { + print(error); + print(stacktrace); + } +} + +Future runConnectionApis(LookerSDK sdk) async { + try { + var connections = await sdk.ok(sdk.all_connections()); + connections.forEach((connection) => print(connection.name)); + var connection = await sdk + .ok(sdk.connection(connections[0].name, fields: 'name,host,port')); + print( + 'name=${connection.name} host=${connection.host} port=${connection.port}'); + var newConnection = WriteDBConnection(); + SDKResponse resp = await sdk.connection('TestConnection'); + if (resp.statusCode == 200) { + print('TestConnection already exists'); + } else { + newConnection.name = 'TestConnection'; + newConnection.dialectName = 'mysql'; + newConnection.host = 'db1.looker.com'; + newConnection.port = '3306'; + newConnection.username = 'looker_demoX'; + newConnection.password = 'look_your_data'; + newConnection.database = 'demo_db2'; + newConnection.tmpDbName = 'looker_demo_scratch'; + connection = await sdk.ok(sdk.create_connection(newConnection)); + print('created ${connection.name}'); + } + var updateConnection = WriteDBConnection(); + updateConnection.username = 'looker_demo'; + connection = + await sdk.ok(sdk.update_connection('TestConnection', updateConnection)); + print('Connection updated: username=${connection.username}'); + var testResults = await sdk.ok( + sdk.test_connection('TestConnection', tests: DelimList(['connect']))); + if (testResults.isEmpty) { + print('No connection tests run'); + } else { + testResults.forEach((i) => print('test result: ${i.name}=${i.message}')); + } + var deleteResult = await sdk.ok(sdk.delete_connection('TestConnection')); + print('Delete result $deleteResult'); + } catch (error, stacktrace) { + print(error); + print(stacktrace); + } +} + +Map credentialsCallback() { + return {'client_id': env['CLIENT_ID'], 'client_secret': env['CLIENT_SECRET']}; +} diff --git a/dart/looker_sdk/lib/looker_sdk.dart b/dart/looker_sdk/lib/looker_sdk.dart new file mode 100644 index 000000000..c1c3ae074 --- /dev/null +++ b/dart/looker_sdk/lib/looker_sdk.dart @@ -0,0 +1,10 @@ +export 'src/rtl/api_types.dart'; +export 'src/rtl/api_methods.dart'; +export 'src/rtl/api_settings.dart'; +export 'src/rtl/auth_session.dart'; +export 'src/rtl/auth_token.dart'; +export 'src/rtl/constants.dart'; +export 'src/rtl/sdk.dart'; +export 'src/rtl/transport.dart'; +export 'src/sdk/methods.dart'; +export 'src/sdk/models.dart'; diff --git a/dart/looker_sdk/lib/src/rtl/api_methods.dart b/dart/looker_sdk/lib/src/rtl/api_methods.dart new file mode 100644 index 000000000..a1478101f --- /dev/null +++ b/dart/looker_sdk/lib/src/rtl/api_methods.dart @@ -0,0 +1,104 @@ +import 'dart:convert'; +import 'auth_session.dart'; +import 'transport.dart'; + +class APIMethods { + final AuthSession _authSession; + + APIMethods(this._authSession); + + Future ok(Future> future) async { + var response = await future; + if (response.ok) { + return response.result; + } else { + throw Exception( + 'Invalid SDK response ${response.statusCode}/${response.statusText}/${response.decodedRawResult}'); + } + } + + Future> get( + T Function(dynamic responseData, String contentType) responseHandler, + String path, + [dynamic queryParams, + dynamic body]) async { + var headers = await _getHeaders(); + return _authSession.transport.request( + responseHandler, + HttpMethod.get, + '${_authSession.apiPath}$path', + queryParams, + body, + headers, + ); + } + + Future head(String path, + [dynamic queryParams, dynamic body]) async { + var headers = await _getHeaders(); + dynamic responseHandler(dynamic responseData, String contentType) { + return null; + } + + return _authSession.transport.request(responseHandler, HttpMethod.head, + '${_authSession.apiPath}$path', queryParams, body, headers); + } + + Future> delete( + T Function(dynamic responseData, String contentType) responseHandler, + String path, + [dynamic queryParams, + dynamic body, + T responseInstance]) async { + var headers = await _getHeaders(); + return _authSession.transport.request(responseHandler, HttpMethod.delete, + '${_authSession.apiPath}$path', queryParams, body, headers); + } + + Future> post( + T Function(dynamic responseData, String contentType) responseHandler, + String path, + [dynamic queryParams, + dynamic body, + T responseInstance]) async { + var headers = await _getHeaders(); + var requestBody = body == null ? null : jsonEncode(body); + return _authSession.transport.request(responseHandler, HttpMethod.post, + '${_authSession.apiPath}$path', queryParams, requestBody, headers); + } + + Future> put( + T Function(dynamic responseData, String contentType) responseHandler, + String path, + [dynamic queryParams, + dynamic body, + T responseInstance]) async { + var headers = await _getHeaders(); + return _authSession.transport.request(responseHandler, HttpMethod.put, + '${_authSession.apiPath}$path', queryParams, body, headers); + } + + Future> patch( + T Function(dynamic responseData, String contentType) responseHandler, + String path, + [dynamic queryParams, + dynamic body, + T responseInstance]) async { + var headers = await _getHeaders(); + var requestBody; + if (body != null) { + body.removeWhere((key, value) => value == null); + requestBody = jsonEncode(body); + } + return _authSession.transport.request(responseHandler, HttpMethod.patch, + '${_authSession.apiPath}$path', queryParams, requestBody, headers); + } + + Future> _getHeaders() async { + var headers = { + 'x-looker-appid': _authSession.transport.settings.agentTag + }; + headers.addAll(_authSession.authenticate()); + return headers; + } +} diff --git a/dart/looker_sdk/lib/src/rtl/api_settings.dart b/dart/looker_sdk/lib/src/rtl/api_settings.dart new file mode 100644 index 000000000..73d907bcb --- /dev/null +++ b/dart/looker_sdk/lib/src/rtl/api_settings.dart @@ -0,0 +1,55 @@ +import 'constants.dart'; + +class ApiSettings { + String _baseUrl; + bool _verifySsl; + int _timeout; + String _agentTag; + Function _credentialsCallback; + + ApiSettings.fromMap(Map settings) { + _baseUrl = settings.containsKey('base_url') ? settings['base_url'] : ''; + _verifySsl = + settings.containsKey('verify_ssl') ? settings['verify_ssl'] : true; + _timeout = + settings.containsKey('timeout') ? settings['timeout'] : defaultTimeout; + _agentTag = settings.containsKey('agent_tag') + ? settings['agent_tag'] + : '$agentPrefix $lookerVersion'; + _credentialsCallback = settings.containsKey(('credentials_callback')) + ? settings['credentials_callback'] + : null; + } + + bool isConfigured() { + return _baseUrl != null; + } + + void readConfig(String section) { + throw UnimplementedError('readConfig'); + } + + String get version { + return apiVersion; + } + + String get baseUrl { + return _baseUrl; + } + + bool get verifySsl { + return _verifySsl; + } + + int get timeout { + return _timeout; + } + + String get agentTag { + return _agentTag; + } + + Function get credentialsCallback { + return _credentialsCallback; + } +} diff --git a/dart/looker_sdk/lib/src/rtl/api_types.dart b/dart/looker_sdk/lib/src/rtl/api_types.dart new file mode 100644 index 000000000..f62daa8e5 --- /dev/null +++ b/dart/looker_sdk/lib/src/rtl/api_types.dart @@ -0,0 +1,18 @@ +class DelimList { + final List _items; + final String _separator; + final String _prefix; + final String _suffix; + + DelimList(List items, + [String separator = ',', String prefix = '', String suffix = '']) + : _items = items, + _separator = separator, + _prefix = prefix, + _suffix = suffix; + + @override + String toString() { + return '$_prefix${_items.join((_separator))}$_suffix'; + } +} diff --git a/dart/looker_sdk/lib/src/rtl/auth_session.dart b/dart/looker_sdk/lib/src/rtl/auth_session.dart new file mode 100644 index 000000000..1f2baddf2 --- /dev/null +++ b/dart/looker_sdk/lib/src/rtl/auth_session.dart @@ -0,0 +1,94 @@ +import 'package:looker_sdk/looker_sdk.dart'; + +class AuthSession { + Transport transport; + final AuthToken _authToken = AuthToken(); + String _apiPath; + + AuthSession(this.transport) { + _apiPath = '/api/${transport.settings.version}'; + } + + String get apiPath { + return _apiPath; + } + + Map authenticate() { + var headers = {}; + if (isAuthenticated()) { + headers['Authorization'] = 'Bearer ${_authToken.accessToken.accessToken}'; + } + return headers; + } + + bool isAuthenticated() { + return _authToken.isActive(); + } + + Future getToken() async { + if (!isAuthenticated()) { + await login(); + } + return _authToken; + } + + Future login([dynamic sudoId]) async { + if (sudoId != null) { + throw UnimplementedError('support for sudo'); + } + if (!_authToken.isActive()) { + reset(); + if (transport.settings.credentialsCallback == null) { + throw Exception('credentials callback required'); + } + Map credentials = transport.settings.credentialsCallback(); + if (credentials['client_id'] == null || + credentials['client_secret'] == null) { + throw Exception('credentials required'); + } + + AuthAccessToken jsonHandler(dynamic json, String contentType) { + return AuthAccessToken.fromResponse(json, contentType); + } + + var token = await ok(transport.request(jsonHandler, HttpMethod.post, + '/api/${transport.settings.version}/login', null, credentials, null)); + _authToken.setAccessToken(token); + } + } + + Future logout() async { + Function jsonHandler = (Map json) => json; + try { + await ok(transport.request( + jsonHandler, + HttpMethod.delete, + '/logout', + null, + null, + {'Authorization': 'Bearer ${_authToken.accessToken.accessToken}'})); + return true; + } catch (exception) { + return false; + } finally { + reset(); + } + } + + bool isSudo() { + throw UnimplementedError('support for sudo'); + } + + void reset() { + _authToken.reset(); + } + + Future ok(Future> future) async { + var response = await future; + if (response.ok) { + return response.result; + } else { + throw Exception(response); + } + } +} diff --git a/dart/looker_sdk/lib/src/rtl/auth_token.dart b/dart/looker_sdk/lib/src/rtl/auth_token.dart new file mode 100644 index 000000000..56d548069 --- /dev/null +++ b/dart/looker_sdk/lib/src/rtl/auth_token.dart @@ -0,0 +1,42 @@ +class AuthAccessToken { + final String _accessToken; + final String _tokenType; + final int _expiresIn; + + AuthAccessToken.fromResponse(Map map, String contentType) + : _accessToken = map['access_token'], + _tokenType = map['token_type'], + _expiresIn = map['expires_in']; + + String get accessToken { + return _accessToken; + } + + String get tokenType { + return _tokenType; + } + + int get expiresIn { + return _expiresIn; + } +} + +class AuthToken { + AuthAccessToken accessToken; + + AuthToken(); + + AuthToken.withToken(this.accessToken); + + bool isActive() { + return accessToken != null; + } + + void setAccessToken(AuthAccessToken accessToken) { + this.accessToken = accessToken; + } + + void reset() { + accessToken = null; + } +} diff --git a/dart/looker_sdk/lib/src/rtl/constants.dart b/dart/looker_sdk/lib/src/rtl/constants.dart new file mode 100644 index 000000000..5e5380da2 --- /dev/null +++ b/dart/looker_sdk/lib/src/rtl/constants.dart @@ -0,0 +1,5 @@ +const agentPrefix = 'DART-SDK'; +const defaultApiVersion = '3.1'; +const lookerVersion = '21.21'; +const defaultTimeout = 120; +final apiVersion = '4.0'; diff --git a/dart/looker_sdk/lib/src/rtl/sdk.dart b/dart/looker_sdk/lib/src/rtl/sdk.dart new file mode 100644 index 000000000..bd6c41367 --- /dev/null +++ b/dart/looker_sdk/lib/src/rtl/sdk.dart @@ -0,0 +1,21 @@ +import 'package:looker_sdk/looker_sdk.dart'; + +class Sdk { + static LookerSDK _sdk; + + static Future createSdk(Map config) async { + var settings = ApiSettings.fromMap(config); + var transport = Transport(settings); + var authSession = AuthSession(transport); + await authSession.login(); + _sdk = LookerSDK(authSession); + return _sdk; + } + + static LookerSDK getSdk() { + if (_sdk == null) { + throw Exception('SDK not initialized'); + } + return _sdk; + } +} diff --git a/dart/looker_sdk/lib/src/rtl/transport.dart b/dart/looker_sdk/lib/src/rtl/transport.dart new file mode 100644 index 000000000..f6893da44 --- /dev/null +++ b/dart/looker_sdk/lib/src/rtl/transport.dart @@ -0,0 +1,147 @@ +import 'dart:convert'; +import 'dart:io'; +import 'package:http/http.dart' as http; +import 'package:looker_sdk/looker_sdk.dart'; +import 'api_settings.dart'; + +enum HttpMethod { get, head, delete, post, put, patch } + +String encodeParam(dynamic param) { + return param.toString(); +} + +class DevHttpOverrides extends HttpOverrides { + @override + HttpClient createHttpClient(SecurityContext context) { + return super.createHttpClient(context) + ..badCertificateCallback = + (X509Certificate cert, String host, int port) => true; + } +} + +class SDKResponse { + final bool _ok; + final T _result; + final int _statusCode; + final String _statusText; + final dynamic _rawResult; + + SDKResponse(bool ok, int statusCode, String statusText, + [dynamic result, dynamic rawResult]) + : _ok = ok, + _statusCode = statusCode, + _statusText = statusText, + _result = result as T, + _rawResult = rawResult; + + bool get ok { + return _ok; + } + + T get result { + return _result; + } + + int get statusCode { + return _statusCode; + } + + String get statusText { + return _statusText; + } + + dynamic get rawResult { + return _rawResult; + } + + dynamic get decodedRawResult { + return _rawResult == null ? null : json.decode(_rawResult); + } +} + +class Transport { + ApiSettings settings; + + Transport(this.settings) { + if (!settings.verifySsl) { + HttpOverrides.global = DevHttpOverrides(); + } + } + + Future rawRequest(HttpMethod method, String path, + Map queryParams, Map body, Map options) async { + throw UnimplementedError('rawRequest'); + } + + Future> request( + T Function(dynamic json, String contentType) responseHandler, + HttpMethod method, + String path, + [Map queryParams, + dynamic body, + Map headers]) async { + var fullPath = makePath(path, queryParams); + switch (method) { + case HttpMethod.get: + var response = await http.get(fullPath, headers: headers); + return handleResponse(response, responseHandler); + case HttpMethod.post: + var response = await http.post(fullPath, headers: headers, body: body); + return handleResponse(response, responseHandler); + case HttpMethod.patch: + var response = await http.patch(fullPath, headers: headers, body: body); + return handleResponse(response, responseHandler); + case HttpMethod.delete: + var response = await http.delete(fullPath, headers: headers); + return handleResponse(response, responseHandler); + case HttpMethod.put: + var response = await http.put(fullPath, headers: headers, body: body); + return handleResponse(response, responseHandler); + case HttpMethod.head: + throw UnimplementedError('head'); + } + throw UnimplementedError('how did I get here?'); + } + + String makePath(String path, [Map queryParams]) { + var queryString = ''; + if (queryParams != null) { + var params = []; + queryParams.forEach((name, value) { + if (value != null) { + params.add( + '${Uri.encodeComponent(name)}=${Uri.encodeComponent(value.toString())}'); + } + }); + if (params.isNotEmpty) { + queryString = '?${params.join("&")}'; + } + } + return '${settings.baseUrl}$path$queryString'; + } + + Future stream(Function callback, HttpMethod method, String path, + [Map queryParams, Map body, Map options]) async { + throw UnimplementedError('stream'); + } + + SDKResponse handleResponse(http.Response response, + T Function(dynamic response, String contentType) responseHandler) { + var ok = response.statusCode >= 200 && response.statusCode <= 299; + var result; + var responseBody; + var contentType = response.headers['content-type'] ?? ''; + if (contentType.startsWith('application/json')) { + responseBody = jsonDecode(response.body); + } else if (contentType.startsWith('image/')) { + responseBody = response.bodyBytes; + } else { + responseBody = response.body; + } + if (ok) { + result = responseHandler(responseBody, response.headers['content-type']); + } + return SDKResponse( + ok, response.statusCode, response.reasonPhrase, result, responseBody); + } +} diff --git a/dart/looker_sdk/lib/src/sdk/methods.dart b/dart/looker_sdk/lib/src/sdk/methods.dart new file mode 100644 index 000000000..2bdf2219e --- /dev/null +++ b/dart/looker_sdk/lib/src/sdk/methods.dart @@ -0,0 +1,11088 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + */ + +/// 437 API methods + +// NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 +import 'package:looker_sdk/looker_sdk.dart'; + +class LookerSDK extends APIMethods { + LookerSDK(AuthSession authSession) : super(authSession); + + // #region Alert: Alert + + /// ### Search Alerts + /// + /// GET /alerts/search -> List + Future>> search_alerts( + { + + /// @param {int} limit (Optional) Number of results to return (used with `offset`). + int limit, + + /// @param {int} offset (Optional) Number of results to skip before returning any (used with `limit`). + int offset, + + /// @param {String} group_by (Optional) Dimension by which to order the results(`dashboard` | `owner`) + String group_by, + + /// @param {String} fields (Optional) Requested fields. + String fields, + + /// @param {bool} disabled (Optional) Filter on returning only enabled or disabled alerts. + bool disabled, + + /// @param {String} frequency (Optional) Filter on alert frequency, such as: monthly, weekly, daily, hourly, minutes + String frequency, + + /// @param {bool} condition_met (Optional) Filter on whether the alert has met its condition when it last executed + bool condition_met, + + /// @param {String} last_run_start (Optional) Filter on the start range of the last time the alerts were run. Example: 2021-01-01T01:01:01-08:00. + String last_run_start, + + /// @param {String} last_run_end (Optional) Filter on the start range of the last time the alerts were run. Example: 2021-01-01T01:01:01-08:00. + String last_run_end, + + /// @param {bool} all_owners (Admin only) (Optional) Filter for all owners. + bool all_owners}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Alert.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/alerts/search', { + 'limit': limit, + 'offset': offset, + 'group_by': group_by, + 'fields': fields, + 'disabled': disabled, + 'frequency': frequency, + 'condition_met': condition_met, + 'last_run_start': last_run_start, + 'last_run_end': last_run_end, + 'all_owners': all_owners + }); + } + + /// ### Get an alert by a given alert ID + /// + /// GET /alerts/{alert_id} -> Alert + Future> get_alert( + + /// @param {int} alert_id ID of an alert + int alert_id) async { + var path_alert_id = encodeParam(alert_id); + + Alert responseHandler(dynamic json, String contentType) { + return Alert.fromResponse(json, contentType); + } + + return get(responseHandler, '/alerts/$path_alert_id'); + } + + /// ### Update an alert + /// # Required fields: `owner_id`, `field`, `destinations`, `comparison_type`, `threshold`, `cron` + /// # + /// + /// PUT /alerts/{alert_id} -> Alert + Future> update_alert( + + /// @param {int} alert_id ID of an alert + int alert_id, + + /// @param {WriteAlert} body + WriteAlert body) async { + var path_alert_id = encodeParam(alert_id); + + Alert responseHandler(dynamic json, String contentType) { + return Alert.fromResponse(json, contentType); + } + + return put(responseHandler, '/alerts/$path_alert_id', null, + body == null ? null : body.toJson()); + } + + /// ### Update select alert fields + /// # Available fields: `owner_id`, `is_disabled`, `disabled_reason`, `is_public`, `threshold` + /// # + /// + /// PATCH /alerts/{alert_id} -> Alert + Future> update_alert_field( + + /// @param {int} alert_id ID of an alert + int alert_id, + + /// @param {AlertPatch} body + AlertPatch body) async { + var path_alert_id = encodeParam(alert_id); + + Alert responseHandler(dynamic json, String contentType) { + return Alert.fromResponse(json, contentType); + } + + return patch(responseHandler, '/alerts/$path_alert_id', null, + body == null ? null : body.toJson()); + } + + /// ### Delete an alert by a given alert ID + /// + /// DELETE /alerts/{alert_id} -> void + Future> delete_alert( + + /// @param {int} alert_id ID of an alert + int alert_id) async { + var path_alert_id = encodeParam(alert_id); + + void responseHandler(dynamic json, String contentType) {} + return delete(responseHandler, '/alerts/$path_alert_id'); + } + + /// ### Create a new alert and return details of the newly created object + /// + /// Required fields: `field`, `destinations`, `comparison_type`, `threshold`, `cron` + /// + /// Example Request: + /// Run alert on dashboard element '103' at 5am every day. Send an email to 'test@test.com' if inventory for Los Angeles (using dashboard filter `Warehouse Name`) is lower than 1,000 + /// ``` + /// { + /// "cron": "0 5 * * *", + /// "custom_title": "Alert when LA inventory is low", + /// "dashboard_element_id": 103, + /// "applied_dashboard_filters": [ + /// { + /// "filter_title": "Warehouse Name", + /// "field_name": "distribution_centers.name", + /// "filter_value": "Los Angeles CA", + /// "filter_description": "is Los Angeles CA" + /// } + /// ], + /// "comparison_type": "LESS_THAN", + /// "destinations": [ + /// { + /// "destination_type": "EMAIL", + /// "email_address": "test@test.com" + /// } + /// ], + /// "field": { + /// "title": "Number on Hand", + /// "name": "inventory_items.number_on_hand" + /// }, + /// "is_disabled": false, + /// "is_public": true, + /// "threshold": 1000 + /// } + /// ``` + /// + /// POST /alerts -> Alert + Future> create_alert( + + /// @param {WriteAlert} body + WriteAlert body) async { + Alert responseHandler(dynamic json, String contentType) { + return Alert.fromResponse(json, contentType); + } + + return post( + responseHandler, '/alerts', null, body == null ? null : body.toJson()); + } + + /// ### Enqueue an Alert by ID + /// + /// POST /alerts/{alert_id}/enqueue -> void + Future> enqueue_alert( + + /// @param {int} alert_id ID of an alert + int alert_id, + { + + /// @param {bool} force Whether to enqueue an alert again if its already running. + bool force}) async { + var path_alert_id = encodeParam(alert_id); + + void responseHandler(dynamic json, String contentType) {} + return post( + responseHandler, '/alerts/$path_alert_id/enqueue', {'force': force}); + } + + // #endregion Alert: Alert + + // #region ApiAuth: API Authentication + + /// ### Present client credentials to obtain an authorization token + /// + /// Looker API implements the OAuth2 [Resource Owner Password Credentials Grant](https://looker.com/docs/r/api/outh2_resource_owner_pc) pattern. + /// The client credentials required for this login must be obtained by creating an API3 key on a user account + /// in the Looker Admin console. The API3 key consists of a public `client_id` and a private `client_secret`. + /// + /// The access token returned by `login` must be used in the HTTP Authorization header of subsequent + /// API requests, like this: + /// ``` + /// Authorization: token 4QDkCyCtZzYgj4C2p2cj3csJH7zqS5RzKs2kTnG4 + /// ``` + /// Replace "4QDkCy..." with the `access_token` value returned by `login`. + /// The word `token` is a string literal and must be included exactly as shown. + /// + /// This function can accept `client_id` and `client_secret` parameters as URL query params or as www-form-urlencoded params in the body of the HTTP request. Since there is a small risk that URL parameters may be visible to intermediate nodes on the network route (proxies, routers, etc), passing credentials in the body of the request is considered more secure than URL params. + /// + /// Example of passing credentials in the HTTP request body: + /// ```` + /// POST HTTP /login + /// Content-Type: application/x-www-form-urlencoded + /// + /// client_id=CGc9B7v7J48dQSJvxxx&client_secret=nNVS9cSS3xNpSC9JdsBvvvvv + /// ```` + /// + /// ### Best Practice: + /// Always pass credentials in body params. Pass credentials in URL query params **only** when you cannot pass body params due to application, tool, or other limitations. + /// + /// For more information and detailed examples of Looker API authorization, see [How to Authenticate to Looker API3](https://github.com/looker/looker-sdk-ruby/blob/master/authentication.md). + /// + /// POST /login -> AccessToken + Future> login( + { + + /// @param {String} client_id client_id part of API3 Key. + String client_id, + + /// @param {String} client_secret client_secret part of API3 Key. + String client_secret}) async { + AccessToken responseHandler(dynamic json, String contentType) { + return AccessToken.fromResponse(json, contentType); + } + + return post(responseHandler, '/login', + {'client_id': client_id, 'client_secret': client_secret}); + } + + /// ### Create an access token that runs as a given user. + /// + /// This can only be called by an authenticated admin user. It allows that admin to generate a new + /// authentication token for the user with the given user id. That token can then be used for subsequent + /// API calls - which are then performed *as* that target user. + /// + /// The target user does *not* need to have a pre-existing API client_id/client_secret pair. And, no such + /// credentials are created by this call. + /// + /// This allows for building systems where api user authentication for an arbitrary number of users is done + /// outside of Looker and funneled through a single 'service account' with admin permissions. Note that a + /// new access token is generated on each call. If target users are going to be making numerous API + /// calls in a short period then it is wise to cache this authentication token rather than call this before + /// each of those API calls. + /// + /// See 'login' for more detail on the access token and how to use it. + /// + /// POST /login/{user_id} -> AccessToken + Future> login_user( + + /// @param {int} user_id Id of user. + int user_id, + { + + /// @param {bool} associative When true (default), API calls using the returned access_token are attributed to the admin user who created the access_token. When false, API activity is attributed to the user the access_token runs as. False requires a looker license. + bool associative}) async { + var path_user_id = encodeParam(user_id); + + AccessToken responseHandler(dynamic json, String contentType) { + return AccessToken.fromResponse(json, contentType); + } + + return post( + responseHandler, '/login/$path_user_id', {'associative': associative}); + } + + /// ### Logout of the API and invalidate the current access token. + /// + /// DELETE /logout -> String + Future> logout() async { + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/logout'); + } + + // #endregion ApiAuth: API Authentication + + // #region Auth: Manage User Authentication Configuration + + /// ### Create an embed secret using the specified information. + /// + /// The value of the `secret` field will be set by Looker and returned. + /// + /// POST /embed_config/secrets -> EmbedSecret + Future> create_embed_secret( + { + + /// @param {WriteEmbedSecret} body + WriteEmbedSecret body}) async { + EmbedSecret responseHandler(dynamic json, String contentType) { + return EmbedSecret.fromResponse(json, contentType); + } + + return post(responseHandler, '/embed_config/secrets', null, + body == null ? null : body.toJson()); + } + + /// ### Delete an embed secret. + /// + /// DELETE /embed_config/secrets/{embed_secret_id} -> String + Future> delete_embed_secret( + + /// @param {int} embed_secret_id Id of Embed Secret + int embed_secret_id) async { + var path_embed_secret_id = encodeParam(embed_secret_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete( + responseHandler, '/embed_config/secrets/$path_embed_secret_id'); + } + + /// ### Create SSO Embed URL + /// + /// Creates an SSO embed URL and cryptographically signs it with an embed secret. + /// This signed URL can then be used to instantiate a Looker embed session in a PBL web application. + /// Do not make any modifications to this URL - any change may invalidate the signature and + /// cause the URL to fail to load a Looker embed session. + /// + /// A signed SSO embed URL can only be used once. After it has been used to request a page from the + /// Looker server, the URL is invalid. Future requests using the same URL will fail. This is to prevent + /// 'replay attacks'. + /// + /// The `target_url` property must be a complete URL of a Looker UI page - scheme, hostname, path and query params. + /// To load a dashboard with id 56 and with a filter of `Date=1 years`, the looker URL would look like `https:/myname.looker.com/dashboards/56?Date=1%20years`. + /// The best way to obtain this target_url is to navigate to the desired Looker page in your web browser, + /// copy the URL shown in the browser address bar and paste it into the `target_url` property as a quoted string value in this API request. + /// + /// Permissions for the embed user are defined by the groups in which the embed user is a member (group_ids property) + /// and the lists of models and permissions assigned to the embed user. + /// At a minimum, you must provide values for either the group_ids property, or both the models and permissions properties. + /// These properties are additive; an embed user can be a member of certain groups AND be granted access to models and permissions. + /// + /// The embed user's access is the union of permissions granted by the group_ids, models, and permissions properties. + /// + /// This function does not strictly require all group_ids, user attribute names, or model names to exist at the moment the + /// SSO embed url is created. Unknown group_id, user attribute names or model names will be passed through to the output URL. + /// To diagnose potential problems with an SSO embed URL, you can copy the signed URL into the Embed URI Validator text box in `/admin/embed`. + /// + /// The `secret_id` parameter is optional. If specified, its value must be the id of an active secret defined in the Looker instance. + /// if not specified, the URL will be signed using the newest active secret defined in the Looker instance. + /// + /// #### Security Note + /// Protect this signed URL as you would an access token or password credentials - do not write + /// it to disk, do not pass it to a third party, and only pass it through a secure HTTPS + /// encrypted transport. + /// + /// POST /embed/sso_url -> EmbedUrlResponse + Future> create_sso_embed_url( + + /// @param {EmbedSsoParams} body + EmbedSsoParams body) async { + EmbedUrlResponse responseHandler(dynamic json, String contentType) { + return EmbedUrlResponse.fromResponse(json, contentType); + } + + return post(responseHandler, '/embed/sso_url', null, + body == null ? null : body.toJson()); + } + + /// ### Create an Embed URL + /// + /// Creates an embed URL that runs as the Looker user making this API call. ("Embed as me") + /// This embed URL can then be used to instantiate a Looker embed session in a + /// "Powered by Looker" (PBL) web application. + /// + /// This is similar to Private Embedding (https://docs.looker.com/r/admin/embed/private-embed). Instead of + /// of logging into the Web UI to authenticate, the user has already authenticated against the API to be able to + /// make this call. However, unlike Private Embed where the user has access to any other part of the Looker UI, + /// the embed web session created by requesting the EmbedUrlResponse.url in a browser only has access to + /// content visible under the `/embed` context. + /// + /// An embed URL can only be used once, and must be used within 5 minutes of being created. After it + /// has been used to request a page from the Looker server, the URL is invalid. Future requests using + /// the same URL will fail. This is to prevent 'replay attacks'. + /// + /// The `target_url` property must be a complete URL of a Looker Embedded UI page - scheme, hostname, path starting with "/embed" and query params. + /// To load a dashboard with id 56 and with a filter of `Date=1 years`, the looker Embed URL would look like `https://myname.looker.com/embed/dashboards/56?Date=1%20years`. + /// The best way to obtain this target_url is to navigate to the desired Looker page in your web browser, + /// copy the URL shown in the browser address bar, insert "/embed" after the host/port, and paste it into the `target_url` property as a quoted string value in this API request. + /// + /// #### Security Note + /// Protect this embed URL as you would an access token or password credentials - do not write + /// it to disk, do not pass it to a third party, and only pass it through a secure HTTPS + /// encrypted transport. + /// + /// POST /embed/token_url/me -> EmbedUrlResponse + Future> create_embed_url_as_me( + + /// @param {EmbedParams} body + EmbedParams body) async { + EmbedUrlResponse responseHandler(dynamic json, String contentType) { + return EmbedUrlResponse.fromResponse(json, contentType); + } + + return post(responseHandler, '/embed/token_url/me', null, + body == null ? null : body.toJson()); + } + + /// ### Get the LDAP configuration. + /// + /// Looker can be optionally configured to authenticate users against an Active Directory or other LDAP directory server. + /// LDAP setup requires coordination with an administrator of that directory server. + /// + /// Only Looker administrators can read and update the LDAP configuration. + /// + /// Configuring LDAP impacts authentication for all users. This configuration should be done carefully. + /// + /// Looker maintains a single LDAP configuration. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct). + /// + /// LDAP is enabled or disabled for Looker using the **enabled** field. + /// + /// Looker will never return an **auth_password** field. That value can be set, but never retrieved. + /// + /// See the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information. + /// + /// GET /ldap_config -> LDAPConfig + Future> ldap_config() async { + LDAPConfig responseHandler(dynamic json, String contentType) { + return LDAPConfig.fromResponse(json, contentType); + } + + return get(responseHandler, '/ldap_config'); + } + + /// ### Update the LDAP configuration. + /// + /// Configuring LDAP impacts authentication for all users. This configuration should be done carefully. + /// + /// Only Looker administrators can read and update the LDAP configuration. + /// + /// LDAP is enabled or disabled for Looker using the **enabled** field. + /// + /// It is **highly** recommended that any LDAP setting changes be tested using the APIs below before being set globally. + /// + /// See the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information. + /// + /// PATCH /ldap_config -> LDAPConfig + Future> update_ldap_config( + + /// @param {WriteLDAPConfig} body + WriteLDAPConfig body) async { + LDAPConfig responseHandler(dynamic json, String contentType) { + return LDAPConfig.fromResponse(json, contentType); + } + + return patch(responseHandler, '/ldap_config', null, + body == null ? null : body.toJson()); + } + + /// ### Test the connection settings for an LDAP configuration. + /// + /// This tests that the connection is possible given a connection_host and connection_port. + /// + /// **connection_host** and **connection_port** are required. **connection_tls** is optional. + /// + /// Example: + /// ```json + /// { + /// "connection_host": "ldap.example.com", + /// "connection_port": "636", + /// "connection_tls": true + /// } + /// ``` + /// + /// No authentication to the LDAP server is attempted. + /// + /// The active LDAP settings are not modified. + /// + /// PUT /ldap_config/test_connection -> LDAPConfigTestResult + Future> test_ldap_config_connection( + + /// @param {WriteLDAPConfig} body + WriteLDAPConfig body) async { + LDAPConfigTestResult responseHandler(dynamic json, String contentType) { + return LDAPConfigTestResult.fromResponse(json, contentType); + } + + return put(responseHandler, '/ldap_config/test_connection', null, + body == null ? null : body.toJson()); + } + + /// ### Test the connection authentication settings for an LDAP configuration. + /// + /// This tests that the connection is possible and that a 'server' account to be used by Looker can authenticate to the LDAP server given connection and authentication information. + /// + /// **connection_host**, **connection_port**, and **auth_username**, are required. **connection_tls** and **auth_password** are optional. + /// + /// Example: + /// ```json + /// { + /// "connection_host": "ldap.example.com", + /// "connection_port": "636", + /// "connection_tls": true, + /// "auth_username": "cn=looker,dc=example,dc=com", + /// "auth_password": "secret" + /// } + /// ``` + /// + /// Looker will never return an **auth_password**. If this request omits the **auth_password** field, then the **auth_password** value from the active config (if present) will be used for the test. + /// + /// The active LDAP settings are not modified. + /// + /// PUT /ldap_config/test_auth -> LDAPConfigTestResult + Future> test_ldap_config_auth( + + /// @param {WriteLDAPConfig} body + WriteLDAPConfig body) async { + LDAPConfigTestResult responseHandler(dynamic json, String contentType) { + return LDAPConfigTestResult.fromResponse(json, contentType); + } + + return put(responseHandler, '/ldap_config/test_auth', null, + body == null ? null : body.toJson()); + } + + /// ### Test the user authentication settings for an LDAP configuration without authenticating the user. + /// + /// This test will let you easily test the mapping for user properties and roles for any user without needing to authenticate as that user. + /// + /// This test accepts a full LDAP configuration along with a username and attempts to find the full info for the user from the LDAP server without actually authenticating the user. So, user password is not required.The configuration is validated before attempting to contact the server. + /// + /// **test_ldap_user** is required. + /// + /// The active LDAP settings are not modified. + /// + /// PUT /ldap_config/test_user_info -> LDAPConfigTestResult + Future> test_ldap_config_user_info( + + /// @param {WriteLDAPConfig} body + WriteLDAPConfig body) async { + LDAPConfigTestResult responseHandler(dynamic json, String contentType) { + return LDAPConfigTestResult.fromResponse(json, contentType); + } + + return put(responseHandler, '/ldap_config/test_user_info', null, + body == null ? null : body.toJson()); + } + + /// ### Test the user authentication settings for an LDAP configuration. + /// + /// This test accepts a full LDAP configuration along with a username/password pair and attempts to authenticate the user with the LDAP server. The configuration is validated before attempting the authentication. + /// + /// Looker will never return an **auth_password**. If this request omits the **auth_password** field, then the **auth_password** value from the active config (if present) will be used for the test. + /// + /// **test_ldap_user** and **test_ldap_password** are required. + /// + /// The active LDAP settings are not modified. + /// + /// PUT /ldap_config/test_user_auth -> LDAPConfigTestResult + Future> test_ldap_config_user_auth( + + /// @param {WriteLDAPConfig} body + WriteLDAPConfig body) async { + LDAPConfigTestResult responseHandler(dynamic json, String contentType) { + return LDAPConfigTestResult.fromResponse(json, contentType); + } + + return put(responseHandler, '/ldap_config/test_user_auth', null, + body == null ? null : body.toJson()); + } + + /// ### List All OAuth Client Apps + /// + /// Lists all applications registered to use OAuth2 login with this Looker instance, including + /// enabled and disabled apps. + /// + /// Results are filtered to include only the apps that the caller (current user) + /// has permission to see. + /// + /// GET /oauth_client_apps -> List + Future>> all_oauth_client_apps( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => OauthClientApp.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/oauth_client_apps', {'fields': fields}); + } + + /// ### Get Oauth Client App + /// + /// Returns the registered app client with matching client_guid. + /// + /// GET /oauth_client_apps/{client_guid} -> OauthClientApp + Future> oauth_client_app( + + /// @param {String} client_guid The unique id of this application + String client_guid, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_client_guid = encodeParam(client_guid); + + OauthClientApp responseHandler(dynamic json, String contentType) { + return OauthClientApp.fromResponse(json, contentType); + } + + return get(responseHandler, '/oauth_client_apps/$path_client_guid', + {'fields': fields}); + } + + /// ### Register an OAuth2 Client App + /// + /// Registers details identifying an external web app or native app as an OAuth2 login client of the Looker instance. + /// The app registration must provide a unique client_guid and redirect_uri that the app will present + /// in OAuth login requests. If the client_guid and redirect_uri parameters in the login request do not match + /// the app details registered with the Looker instance, the request is assumed to be a forgery and is rejected. + /// + /// POST /oauth_client_apps/{client_guid} -> OauthClientApp + Future> register_oauth_client_app( + + /// @param {String} client_guid The unique id of this application + String client_guid, + + /// @param {WriteOauthClientApp} body + WriteOauthClientApp body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_client_guid = encodeParam(client_guid); + + OauthClientApp responseHandler(dynamic json, String contentType) { + return OauthClientApp.fromResponse(json, contentType); + } + + return post(responseHandler, '/oauth_client_apps/$path_client_guid', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// ### Update OAuth2 Client App Details + /// + /// Modifies the details a previously registered OAuth2 login client app. + /// + /// PATCH /oauth_client_apps/{client_guid} -> OauthClientApp + Future> update_oauth_client_app( + + /// @param {String} client_guid The unique id of this application + String client_guid, + + /// @param {WriteOauthClientApp} body + WriteOauthClientApp body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_client_guid = encodeParam(client_guid); + + OauthClientApp responseHandler(dynamic json, String contentType) { + return OauthClientApp.fromResponse(json, contentType); + } + + return patch(responseHandler, '/oauth_client_apps/$path_client_guid', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// ### Delete OAuth Client App + /// + /// Deletes the registration info of the app with the matching client_guid. + /// All active sessions and tokens issued for this app will immediately become invalid. + /// + /// ### Note: this deletion cannot be undone. + /// + /// DELETE /oauth_client_apps/{client_guid} -> String + Future> delete_oauth_client_app( + + /// @param {String} client_guid The unique id of this application + String client_guid) async { + var path_client_guid = encodeParam(client_guid); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/oauth_client_apps/$path_client_guid'); + } + + /// ### Invalidate All Issued Tokens + /// + /// Immediately invalidates all auth codes, sessions, access tokens and refresh tokens issued for + /// this app for ALL USERS of this app. + /// + /// DELETE /oauth_client_apps/{client_guid}/tokens -> String + Future> invalidate_tokens( + + /// @param {String} client_guid The unique id of the application + String client_guid) async { + var path_client_guid = encodeParam(client_guid); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete( + responseHandler, '/oauth_client_apps/$path_client_guid/tokens'); + } + + /// ### Activate an app for a user + /// + /// Activates a user for a given oauth client app. This indicates the user has been informed that + /// the app will have access to the user's looker data, and that the user has accepted and allowed + /// the app to use their Looker account. + /// + /// Activating a user for an app that the user is already activated with returns a success response. + /// + /// POST /oauth_client_apps/{client_guid}/users/{user_id} -> String + Future> activate_app_user( + + /// @param {String} client_guid The unique id of this application + String client_guid, + + /// @param {int} user_id The id of the user to enable use of this app + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_client_guid = encodeParam(client_guid); + var path_user_id = encodeParam(user_id); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return post( + responseHandler, + '/oauth_client_apps/$path_client_guid/users/$path_user_id', + {'fields': fields}); + } + + /// ### Deactivate an app for a user + /// + /// Deactivate a user for a given oauth client app. All tokens issued to the app for + /// this user will be invalid immediately. Before the user can use the app with their + /// Looker account, the user will have to read and accept an account use disclosure statement for the app. + /// + /// Admin users can deactivate other users, but non-admin users can only deactivate themselves. + /// + /// As with most REST DELETE operations, this endpoint does not return an error if the indicated + /// resource (app or user) does not exist or has already been deactivated. + /// + /// DELETE /oauth_client_apps/{client_guid}/users/{user_id} -> String + Future> deactivate_app_user( + + /// @param {String} client_guid The unique id of this application + String client_guid, + + /// @param {int} user_id The id of the user to enable use of this app + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_client_guid = encodeParam(client_guid); + var path_user_id = encodeParam(user_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete( + responseHandler, + '/oauth_client_apps/$path_client_guid/users/$path_user_id', + {'fields': fields}); + } + + /// ### Get the OIDC configuration. + /// + /// Looker can be optionally configured to authenticate users against an OpenID Connect (OIDC) + /// authentication server. OIDC setup requires coordination with an administrator of that server. + /// + /// Only Looker administrators can read and update the OIDC configuration. + /// + /// Configuring OIDC impacts authentication for all users. This configuration should be done carefully. + /// + /// Looker maintains a single OIDC configuation. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct). + /// + /// OIDC is enabled or disabled for Looker using the **enabled** field. + /// + /// GET /oidc_config -> OIDCConfig + Future> oidc_config() async { + OIDCConfig responseHandler(dynamic json, String contentType) { + return OIDCConfig.fromResponse(json, contentType); + } + + return get(responseHandler, '/oidc_config'); + } + + /// ### Update the OIDC configuration. + /// + /// Configuring OIDC impacts authentication for all users. This configuration should be done carefully. + /// + /// Only Looker administrators can read and update the OIDC configuration. + /// + /// OIDC is enabled or disabled for Looker using the **enabled** field. + /// + /// It is **highly** recommended that any OIDC setting changes be tested using the APIs below before being set globally. + /// + /// PATCH /oidc_config -> OIDCConfig + Future> update_oidc_config( + + /// @param {WriteOIDCConfig} body + WriteOIDCConfig body) async { + OIDCConfig responseHandler(dynamic json, String contentType) { + return OIDCConfig.fromResponse(json, contentType); + } + + return patch(responseHandler, '/oidc_config', null, + body == null ? null : body.toJson()); + } + + /// ### Get a OIDC test configuration by test_slug. + /// + /// GET /oidc_test_configs/{test_slug} -> OIDCConfig + Future> oidc_test_config( + + /// @param {String} test_slug Slug of test config + String test_slug) async { + var path_test_slug = encodeParam(test_slug); + + OIDCConfig responseHandler(dynamic json, String contentType) { + return OIDCConfig.fromResponse(json, contentType); + } + + return get(responseHandler, '/oidc_test_configs/$path_test_slug'); + } + + /// ### Delete a OIDC test configuration. + /// + /// DELETE /oidc_test_configs/{test_slug} -> String + Future> delete_oidc_test_config( + + /// @param {String} test_slug Slug of test config + String test_slug) async { + var path_test_slug = encodeParam(test_slug); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/oidc_test_configs/$path_test_slug'); + } + + /// ### Create a OIDC test configuration. + /// + /// POST /oidc_test_configs -> OIDCConfig + Future> create_oidc_test_config( + + /// @param {WriteOIDCConfig} body + WriteOIDCConfig body) async { + OIDCConfig responseHandler(dynamic json, String contentType) { + return OIDCConfig.fromResponse(json, contentType); + } + + return post(responseHandler, '/oidc_test_configs', null, + body == null ? null : body.toJson()); + } + + /// ### Get password config. + /// + /// GET /password_config -> PasswordConfig + Future> password_config() async { + PasswordConfig responseHandler(dynamic json, String contentType) { + return PasswordConfig.fromResponse(json, contentType); + } + + return get(responseHandler, '/password_config'); + } + + /// ### Update password config. + /// + /// PATCH /password_config -> PasswordConfig + Future> update_password_config( + + /// @param {WritePasswordConfig} body + WritePasswordConfig body) async { + PasswordConfig responseHandler(dynamic json, String contentType) { + return PasswordConfig.fromResponse(json, contentType); + } + + return patch(responseHandler, '/password_config', null, + body == null ? null : body.toJson()); + } + + /// ### Force all credentials_email users to reset their login passwords upon their next login. + /// + /// PUT /password_config/force_password_reset_at_next_login_for_all_users -> String + Future> + force_password_reset_at_next_login_for_all_users() async { + String responseHandler(dynamic json, String contentType) { + return json; + } + + return put(responseHandler, + '/password_config/force_password_reset_at_next_login_for_all_users'); + } + + /// ### Get the SAML configuration. + /// + /// Looker can be optionally configured to authenticate users against a SAML authentication server. + /// SAML setup requires coordination with an administrator of that server. + /// + /// Only Looker administrators can read and update the SAML configuration. + /// + /// Configuring SAML impacts authentication for all users. This configuration should be done carefully. + /// + /// Looker maintains a single SAML configuation. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct). + /// + /// SAML is enabled or disabled for Looker using the **enabled** field. + /// + /// GET /saml_config -> SamlConfig + Future> saml_config() async { + SamlConfig responseHandler(dynamic json, String contentType) { + return SamlConfig.fromResponse(json, contentType); + } + + return get(responseHandler, '/saml_config'); + } + + /// ### Update the SAML configuration. + /// + /// Configuring SAML impacts authentication for all users. This configuration should be done carefully. + /// + /// Only Looker administrators can read and update the SAML configuration. + /// + /// SAML is enabled or disabled for Looker using the **enabled** field. + /// + /// It is **highly** recommended that any SAML setting changes be tested using the APIs below before being set globally. + /// + /// PATCH /saml_config -> SamlConfig + Future> update_saml_config( + + /// @param {WriteSamlConfig} body + WriteSamlConfig body) async { + SamlConfig responseHandler(dynamic json, String contentType) { + return SamlConfig.fromResponse(json, contentType); + } + + return patch(responseHandler, '/saml_config', null, + body == null ? null : body.toJson()); + } + + /// ### Get a SAML test configuration by test_slug. + /// + /// GET /saml_test_configs/{test_slug} -> SamlConfig + Future> saml_test_config( + + /// @param {String} test_slug Slug of test config + String test_slug) async { + var path_test_slug = encodeParam(test_slug); + + SamlConfig responseHandler(dynamic json, String contentType) { + return SamlConfig.fromResponse(json, contentType); + } + + return get(responseHandler, '/saml_test_configs/$path_test_slug'); + } + + /// ### Delete a SAML test configuration. + /// + /// DELETE /saml_test_configs/{test_slug} -> String + Future> delete_saml_test_config( + + /// @param {String} test_slug Slug of test config + String test_slug) async { + var path_test_slug = encodeParam(test_slug); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/saml_test_configs/$path_test_slug'); + } + + /// ### Create a SAML test configuration. + /// + /// POST /saml_test_configs -> SamlConfig + Future> create_saml_test_config( + + /// @param {WriteSamlConfig} body + WriteSamlConfig body) async { + SamlConfig responseHandler(dynamic json, String contentType) { + return SamlConfig.fromResponse(json, contentType); + } + + return post(responseHandler, '/saml_test_configs', null, + body == null ? null : body.toJson()); + } + + /// ### Parse the given xml as a SAML IdP metadata document and return the result. + /// + /// POST /parse_saml_idp_metadata -> SamlMetadataParseResult + Future> parse_saml_idp_metadata( + + /// @param {String} body + String body) async { + SamlMetadataParseResult responseHandler(dynamic json, String contentType) { + return SamlMetadataParseResult.fromResponse(json, contentType); + } + + return post(responseHandler, '/parse_saml_idp_metadata', null, body); + } + + /// ### Fetch the given url and parse it as a SAML IdP metadata document and return the result. + /// Note that this requires that the url be public or at least at a location where the Looker instance + /// can fetch it without requiring any special authentication. + /// + /// POST /fetch_and_parse_saml_idp_metadata -> SamlMetadataParseResult + Future> + fetch_and_parse_saml_idp_metadata( + + /// @param {String} body + String body) async { + SamlMetadataParseResult responseHandler(dynamic json, String contentType) { + return SamlMetadataParseResult.fromResponse(json, contentType); + } + + return post( + responseHandler, '/fetch_and_parse_saml_idp_metadata', null, body); + } + + /// ### Get session config. + /// + /// GET /session_config -> SessionConfig + Future> session_config() async { + SessionConfig responseHandler(dynamic json, String contentType) { + return SessionConfig.fromResponse(json, contentType); + } + + return get(responseHandler, '/session_config'); + } + + /// ### Update session config. + /// + /// PATCH /session_config -> SessionConfig + Future> update_session_config( + + /// @param {WriteSessionConfig} body + WriteSessionConfig body) async { + SessionConfig responseHandler(dynamic json, String contentType) { + return SessionConfig.fromResponse(json, contentType); + } + + return patch(responseHandler, '/session_config', null, + body == null ? null : body.toJson()); + } + + /// ### Get Support Access Allowlist Users + /// + /// Returns the users that have been added to the Support Access Allowlist + /// + /// GET /support_access/allowlist -> List + Future>> + get_support_access_allowlist_entries( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => SupportAccessAllowlistEntry.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, '/support_access/allowlist', {'fields': fields}); + } + + /// ### Add Support Access Allowlist Users + /// + /// Adds a list of emails to the Allowlist, using the provided reason + /// + /// POST /support_access/allowlist -> List + Future>> + add_support_access_allowlist_entries( + + /// @param {SupportAccessAddEntries} body + SupportAccessAddEntries body) async { + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => SupportAccessAllowlistEntry.fromResponse(i, contentType)) + .toList(); + } + + return post(responseHandler, '/support_access/allowlist', null, + body == null ? null : body.toJson()); + } + + /// ### Delete Support Access Allowlist User + /// + /// Deletes the specified Allowlist Entry Id + /// + /// DELETE /support_access/allowlist/{entry_id} -> String + Future> delete_support_access_allowlist_entry( + + /// @param {String} entry_id Id of Allowlist Entry + String entry_id) async { + var path_entry_id = encodeParam(entry_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/support_access/allowlist/$path_entry_id'); + } + + /// ### Enable Support Access + /// + /// Enables Support Access for the provided duration + /// + /// PUT /support_access/enable -> SupportAccessStatus + Future> enable_support_access( + + /// @param {SupportAccessEnable} body + SupportAccessEnable body) async { + SupportAccessStatus responseHandler(dynamic json, String contentType) { + return SupportAccessStatus.fromResponse(json, contentType); + } + + return put(responseHandler, '/support_access/enable', null, + body == null ? null : body.toJson()); + } + + /// ### Disable Support Access + /// + /// Disables Support Access immediately + /// + /// PUT /support_access/disable -> SupportAccessStatus + Future> disable_support_access() async { + SupportAccessStatus responseHandler(dynamic json, String contentType) { + return SupportAccessStatus.fromResponse(json, contentType); + } + + return put(responseHandler, '/support_access/disable'); + } + + /// ### Support Access Status + /// + /// Returns the current Support Access Status + /// + /// GET /support_access/status -> SupportAccessStatus + Future> support_access_status() async { + SupportAccessStatus responseHandler(dynamic json, String contentType) { + return SupportAccessStatus.fromResponse(json, contentType); + } + + return get(responseHandler, '/support_access/status'); + } + + /// ### Get currently locked-out users. + /// + /// GET /user_login_lockouts -> List + Future>> all_user_login_lockouts( + { + + /// @param {String} fields Include only these fields in the response + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => UserLoginLockout.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/user_login_lockouts', {'fields': fields}); + } + + /// ### Search currently locked-out users. + /// + /// GET /user_login_lockouts/search -> List + Future>> search_user_login_lockouts( + { + + /// @param {String} fields Include only these fields in the response + String fields, + + /// @param {int} page Return only page N of paginated results + int page, + + /// @param {int} per_page Return N rows of data per page + int per_page, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {String} auth_type Auth type user is locked out for (email, ldap, totp, api) + String auth_type, + + /// @param {String} full_name Match name + String full_name, + + /// @param {String} email Match email + String email, + + /// @param {String} remote_id Match remote LDAP ID + String remote_id, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => UserLoginLockout.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/user_login_lockouts/search', { + 'fields': fields, + 'page': page, + 'per_page': per_page, + 'sorts': sorts, + 'auth_type': auth_type, + 'full_name': full_name, + 'email': email, + 'remote_id': remote_id, + 'filter_or': filter_or + }); + } + + /// ### Removes login lockout for the associated user. + /// + /// DELETE /user_login_lockout/{key} -> String + Future> delete_user_login_lockout( + + /// @param {String} key The key associated with the locked user + String key) async { + var path_key = encodeParam(key); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/user_login_lockout/$path_key'); + } + + // #endregion Auth: Manage User Authentication Configuration + + // #region Board: Manage Boards + + /// ### Get information about all boards. + /// + /// GET /boards -> List + Future>> all_boards( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Board.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/boards', {'fields': fields}); + } + + /// ### Create a new board. + /// + /// POST /boards -> Board + Future> create_board( + + /// @param {WriteBoard} body + WriteBoard body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + Board responseHandler(dynamic json, String contentType) { + return Board.fromResponse(json, contentType); + } + + return post(responseHandler, '/boards', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Search Boards + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /boards/search -> List + Future>> search_boards( + { + + /// @param {String} title Matches board title. + String title, + + /// @param {String} created_at Matches the timestamp for when the board was created. + String created_at, + + /// @param {String} first_name The first name of the user who created this board. + String first_name, + + /// @param {String} last_name The last name of the user who created this board. + String last_name, + + /// @param {String} fields Requested fields. + String fields, + + /// @param {bool} favorited Return favorited boards when true. + bool favorited, + + /// @param {String} creator_id Filter on boards created by a particular user. + String creator_id, + + /// @param {String} sorts The fields to sort the results by + String sorts, + + /// @param {int} page The page to return. + int page, + + /// @param {int} per_page The number of items in the returned page. + int per_page, + + /// @param {int} offset The number of items to skip before returning any. (used with limit and takes priority over page and per_page) + int offset, + + /// @param {int} limit The maximum number of items to return. (used with offset and takes priority over page and per_page) + int limit, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Board.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/boards/search', { + 'title': title, + 'created_at': created_at, + 'first_name': first_name, + 'last_name': last_name, + 'fields': fields, + 'favorited': favorited, + 'creator_id': creator_id, + 'sorts': sorts, + 'page': page, + 'per_page': per_page, + 'offset': offset, + 'limit': limit, + 'filter_or': filter_or + }); + } + + /// ### Get information about a board. + /// + /// GET /boards/{board_id} -> Board + Future> board( + + /// @param {int} board_id Id of board + int board_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_board_id = encodeParam(board_id); + + Board responseHandler(dynamic json, String contentType) { + return Board.fromResponse(json, contentType); + } + + return get(responseHandler, '/boards/$path_board_id', {'fields': fields}); + } + + /// ### Update a board definition. + /// + /// PATCH /boards/{board_id} -> Board + Future> update_board( + + /// @param {int} board_id Id of board + int board_id, + + /// @param {WriteBoard} body + WriteBoard body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_board_id = encodeParam(board_id); + + Board responseHandler(dynamic json, String contentType) { + return Board.fromResponse(json, contentType); + } + + return patch(responseHandler, '/boards/$path_board_id', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Delete a board. + /// + /// DELETE /boards/{board_id} -> String + Future> delete_board( + + /// @param {int} board_id Id of board + int board_id) async { + var path_board_id = encodeParam(board_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/boards/$path_board_id'); + } + + /// ### Get information about all board items. + /// + /// GET /board_items -> List + Future>> all_board_items( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {String} board_section_id Filter to a specific board section + String board_section_id}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => BoardItem.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/board_items', { + 'fields': fields, + 'sorts': sorts, + 'board_section_id': board_section_id + }); + } + + /// ### Create a new board item. + /// + /// POST /board_items -> BoardItem + Future> create_board_item( + + /// @param {WriteBoardItem} body + WriteBoardItem body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + BoardItem responseHandler(dynamic json, String contentType) { + return BoardItem.fromResponse(json, contentType); + } + + return post(responseHandler, '/board_items', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Get information about a board item. + /// + /// GET /board_items/{board_item_id} -> BoardItem + Future> board_item( + + /// @param {int} board_item_id Id of board item + int board_item_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_board_item_id = encodeParam(board_item_id); + + BoardItem responseHandler(dynamic json, String contentType) { + return BoardItem.fromResponse(json, contentType); + } + + return get(responseHandler, '/board_items/$path_board_item_id', + {'fields': fields}); + } + + /// ### Update a board item definition. + /// + /// PATCH /board_items/{board_item_id} -> BoardItem + Future> update_board_item( + + /// @param {int} board_item_id Id of board item + int board_item_id, + + /// @param {WriteBoardItem} body + WriteBoardItem body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_board_item_id = encodeParam(board_item_id); + + BoardItem responseHandler(dynamic json, String contentType) { + return BoardItem.fromResponse(json, contentType); + } + + return patch(responseHandler, '/board_items/$path_board_item_id', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// ### Delete a board item. + /// + /// DELETE /board_items/{board_item_id} -> String + Future> delete_board_item( + + /// @param {int} board_item_id Id of board_item + int board_item_id) async { + var path_board_item_id = encodeParam(board_item_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/board_items/$path_board_item_id'); + } + + /// ### Get information about all board sections. + /// + /// GET /board_sections -> List + Future>> all_board_sections( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {String} sorts Fields to sort by. + String sorts}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => BoardSection.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, '/board_sections', {'fields': fields, 'sorts': sorts}); + } + + /// ### Create a new board section. + /// + /// POST /board_sections -> BoardSection + Future> create_board_section( + + /// @param {WriteBoardSection} body + WriteBoardSection body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + BoardSection responseHandler(dynamic json, String contentType) { + return BoardSection.fromResponse(json, contentType); + } + + return post(responseHandler, '/board_sections', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Get information about a board section. + /// + /// GET /board_sections/{board_section_id} -> BoardSection + Future> board_section( + + /// @param {int} board_section_id Id of board section + int board_section_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_board_section_id = encodeParam(board_section_id); + + BoardSection responseHandler(dynamic json, String contentType) { + return BoardSection.fromResponse(json, contentType); + } + + return get(responseHandler, '/board_sections/$path_board_section_id', + {'fields': fields}); + } + + /// ### Update a board section definition. + /// + /// PATCH /board_sections/{board_section_id} -> BoardSection + Future> update_board_section( + + /// @param {int} board_section_id Id of board section + int board_section_id, + + /// @param {WriteBoardSection} body + WriteBoardSection body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_board_section_id = encodeParam(board_section_id); + + BoardSection responseHandler(dynamic json, String contentType) { + return BoardSection.fromResponse(json, contentType); + } + + return patch(responseHandler, '/board_sections/$path_board_section_id', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// ### Delete a board section. + /// + /// DELETE /board_sections/{board_section_id} -> String + Future> delete_board_section( + + /// @param {int} board_section_id Id of board section + int board_section_id) async { + var path_board_section_id = encodeParam(board_section_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/board_sections/$path_board_section_id'); + } + + // #endregion Board: Manage Boards + + // #region ColorCollection: Manage Color Collections + + /// ### Get an array of all existing Color Collections + /// Get a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection) + /// + /// Get all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard) + /// + /// Get all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom) + /// + /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. + /// + /// GET /color_collections -> List + Future>> all_color_collections( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => ColorCollection.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/color_collections', {'fields': fields}); + } + + /// ### Create a custom color collection with the specified information + /// + /// Creates a new custom color collection object, returning the details, including the created id. + /// + /// **Update** an existing color collection with [Update Color Collection](#!/ColorCollection/update_color_collection) + /// + /// **Permanently delete** an existing custom color collection with [Delete Color Collection](#!/ColorCollection/delete_color_collection) + /// + /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. + /// + /// POST /color_collections -> ColorCollection + Future> create_color_collection( + + /// @param {WriteColorCollection} body + WriteColorCollection body) async { + ColorCollection responseHandler(dynamic json, String contentType) { + return ColorCollection.fromResponse(json, contentType); + } + + return post(responseHandler, '/color_collections', null, + body == null ? null : body.toJson()); + } + + /// ### Get an array of all existing **Custom** Color Collections + /// Get a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection) + /// + /// Get all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard) + /// + /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. + /// + /// GET /color_collections/custom -> List + Future>> color_collections_custom( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => ColorCollection.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, '/color_collections/custom', {'fields': fields}); + } + + /// ### Get an array of all existing **Standard** Color Collections + /// Get a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection) + /// + /// Get all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom) + /// + /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. + /// + /// GET /color_collections/standard -> List + Future>> color_collections_standard( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => ColorCollection.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, '/color_collections/standard', {'fields': fields}); + } + + /// ### Get the default color collection + /// + /// Use this to retrieve the default Color Collection. + /// + /// Set the default color collection with [ColorCollection](#!/ColorCollection/set_default_color_collection) + /// + /// GET /color_collections/default -> ColorCollection + Future> default_color_collection() async { + ColorCollection responseHandler(dynamic json, String contentType) { + return ColorCollection.fromResponse(json, contentType); + } + + return get(responseHandler, '/color_collections/default'); + } + + /// ### Set the global default Color Collection by ID + /// + /// Returns the new specified default Color Collection object. + /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. + /// + /// PUT /color_collections/default -> ColorCollection + Future> set_default_color_collection( + + /// @param {String} collection_id ID of color collection to set as default + String collection_id) async { + ColorCollection responseHandler(dynamic json, String contentType) { + return ColorCollection.fromResponse(json, contentType); + } + + return put(responseHandler, '/color_collections/default', + {'collection_id': collection_id}); + } + + /// ### Get a Color Collection by ID + /// + /// Use this to retrieve a specific Color Collection. + /// Get a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection) + /// + /// Get all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard) + /// + /// Get all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom) + /// + /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. + /// + /// GET /color_collections/{collection_id} -> ColorCollection + Future> color_collection( + + /// @param {String} collection_id Id of Color Collection + String collection_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_collection_id = encodeParam(collection_id); + + ColorCollection responseHandler(dynamic json, String contentType) { + return ColorCollection.fromResponse(json, contentType); + } + + return get(responseHandler, '/color_collections/$path_collection_id', + {'fields': fields}); + } + + /// ### Update a custom color collection by id. + /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. + /// + /// PATCH /color_collections/{collection_id} -> ColorCollection + Future> update_color_collection( + + /// @param {String} collection_id Id of Custom Color Collection + String collection_id, + + /// @param {WriteColorCollection} body + WriteColorCollection body) async { + var path_collection_id = encodeParam(collection_id); + + ColorCollection responseHandler(dynamic json, String contentType) { + return ColorCollection.fromResponse(json, contentType); + } + + return patch(responseHandler, '/color_collections/$path_collection_id', + null, body == null ? null : body.toJson()); + } + + /// ### Delete a custom color collection by id + /// + /// This operation permanently deletes the identified **Custom** color collection. + /// + /// **Standard** color collections cannot be deleted + /// + /// Because multiple color collections can have the same label, they must be deleted by ID, not name. + /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. + /// + /// DELETE /color_collections/{collection_id} -> String + Future> delete_color_collection( + + /// @param {String} collection_id Id of Color Collection + String collection_id) async { + var path_collection_id = encodeParam(collection_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/color_collections/$path_collection_id'); + } + + // #endregion ColorCollection: Manage Color Collections + + // #region Command: Manage Commands + + /// ### Get All Commands. + /// + /// GET /commands -> List + Future>> get_all_commands( + { + + /// @param {String} content_id Id of the associated content. This must be accompanied with content_type. + String content_id, + + /// @param {String} content_type Type of the associated content. This must be accompanied with content_id. + String content_type, + + /// @param {int} limit Number of results to return. + int limit}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Command.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/commands', { + 'content_id': content_id, + 'content_type': content_type, + 'limit': limit + }); + } + + /// ### Create a new command. + /// # Required fields: [:name, :linked_content_id, :linked_content_type] + /// # `linked_content_type` must be one of ["dashboard", "lookml_dashboard"] + /// # + /// + /// POST /commands -> Command + Future> create_command( + + /// @param {WriteCommand} body + WriteCommand body) async { + Command responseHandler(dynamic json, String contentType) { + return Command.fromResponse(json, contentType); + } + + return post(responseHandler, '/commands', null, + body == null ? null : body.toJson()); + } + + /// ### Update an existing custom command. + /// # Optional fields: ['name', 'description'] + /// # + /// + /// PATCH /commands/{command_id} -> Command + Future> update_command( + + /// @param {int} command_id ID of a command + int command_id, + + /// @param {UpdateCommand} body + UpdateCommand body) async { + var path_command_id = encodeParam(command_id); + + Command responseHandler(dynamic json, String contentType) { + return Command.fromResponse(json, contentType); + } + + return patch(responseHandler, '/commands/$path_command_id', null, + body == null ? null : body.toJson()); + } + + /// ### Delete an existing custom command. + /// + /// DELETE /commands/{command_id} -> void + Future> delete_command( + + /// @param {int} command_id ID of a command + int command_id) async { + var path_command_id = encodeParam(command_id); + + void responseHandler(dynamic json, String contentType) {} + return delete(responseHandler, '/commands/$path_command_id'); + } + + // #endregion Command: Manage Commands + + // #region Config: Manage General Configuration + + /// Get the current Cloud Storage Configuration. + /// + /// GET /cloud_storage -> BackupConfiguration + Future> cloud_storage_configuration() async { + BackupConfiguration responseHandler(dynamic json, String contentType) { + return BackupConfiguration.fromResponse(json, contentType); + } + + return get(responseHandler, '/cloud_storage'); + } + + /// Update the current Cloud Storage Configuration. + /// + /// PATCH /cloud_storage -> BackupConfiguration + Future> update_cloud_storage_configuration( + + /// @param {WriteBackupConfiguration} body + WriteBackupConfiguration body) async { + BackupConfiguration responseHandler(dynamic json, String contentType) { + return BackupConfiguration.fromResponse(json, contentType); + } + + return patch(responseHandler, '/cloud_storage', null, + body == null ? null : body.toJson()); + } + + /// ### Get the current status and content of custom welcome emails + /// + /// GET /custom_welcome_email -> CustomWelcomeEmail + Future> custom_welcome_email() async { + CustomWelcomeEmail responseHandler(dynamic json, String contentType) { + return CustomWelcomeEmail.fromResponse(json, contentType); + } + + return get(responseHandler, '/custom_welcome_email'); + } + + /// Update custom welcome email setting and values. Optionally send a test email with the new content to the currently logged in user. + /// + /// PATCH /custom_welcome_email -> CustomWelcomeEmail + Future> update_custom_welcome_email( + + /// @param {CustomWelcomeEmail} body + CustomWelcomeEmail body, + { + + /// @param {bool} send_test_welcome_email If true a test email with the content from the request will be sent to the current user after saving + bool send_test_welcome_email}) async { + CustomWelcomeEmail responseHandler(dynamic json, String contentType) { + return CustomWelcomeEmail.fromResponse(json, contentType); + } + + return patch( + responseHandler, + '/custom_welcome_email', + {'send_test_welcome_email': send_test_welcome_email}, + body == null ? null : body.toJson()); + } + + /// Requests to this endpoint will send a welcome email with the custom content provided in the body to the currently logged in user. + /// + /// PUT /custom_welcome_email_test -> WelcomeEmailTest + Future> update_custom_welcome_email_test( + + /// @param {WelcomeEmailTest} body + WelcomeEmailTest body) async { + WelcomeEmailTest responseHandler(dynamic json, String contentType) { + return WelcomeEmailTest.fromResponse(json, contentType); + } + + return put(responseHandler, '/custom_welcome_email_test', null, + body == null ? null : body.toJson()); + } + + /// ### Retrieve the value for whether or not digest emails is enabled + /// + /// GET /digest_emails_enabled -> DigestEmails + Future> digest_emails_enabled() async { + DigestEmails responseHandler(dynamic json, String contentType) { + return DigestEmails.fromResponse(json, contentType); + } + + return get(responseHandler, '/digest_emails_enabled'); + } + + /// ### Update the setting for enabling/disabling digest emails + /// + /// PATCH /digest_emails_enabled -> DigestEmails + Future> update_digest_emails_enabled( + + /// @param {DigestEmails} body + DigestEmails body) async { + DigestEmails responseHandler(dynamic json, String contentType) { + return DigestEmails.fromResponse(json, contentType); + } + + return patch(responseHandler, '/digest_emails_enabled', null, + body == null ? null : body.toJson()); + } + + /// ### Trigger the generation of digest email records and send them to Looker's internal system. This does not send + /// any actual emails, it generates records containing content which may be of interest for users who have become inactive. + /// Emails will be sent at a later time from Looker's internal system if the Digest Emails feature is enabled in settings. + /// + /// POST /digest_email_send -> DigestEmailSend + Future> create_digest_email_send() async { + DigestEmailSend responseHandler(dynamic json, String contentType) { + return DigestEmailSend.fromResponse(json, contentType); + } + + return post(responseHandler, '/digest_email_send'); + } + + /// ### Set the menu item name and content for internal help resources + /// + /// GET /internal_help_resources_content -> InternalHelpResourcesContent + Future> + internal_help_resources_content() async { + InternalHelpResourcesContent responseHandler( + dynamic json, String contentType) { + return InternalHelpResourcesContent.fromResponse(json, contentType); + } + + return get(responseHandler, '/internal_help_resources_content'); + } + + /// Update internal help resources content + /// + /// PATCH /internal_help_resources_content -> InternalHelpResourcesContent + Future> + update_internal_help_resources_content( + + /// @param {WriteInternalHelpResourcesContent} body + WriteInternalHelpResourcesContent body) async { + InternalHelpResourcesContent responseHandler( + dynamic json, String contentType) { + return InternalHelpResourcesContent.fromResponse(json, contentType); + } + + return patch(responseHandler, '/internal_help_resources_content', null, + body == null ? null : body.toJson()); + } + + /// ### Get and set the options for internal help resources + /// + /// GET /internal_help_resources_enabled -> InternalHelpResources + Future> internal_help_resources() async { + InternalHelpResources responseHandler(dynamic json, String contentType) { + return InternalHelpResources.fromResponse(json, contentType); + } + + return get(responseHandler, '/internal_help_resources_enabled'); + } + + /// Update internal help resources settings + /// + /// PATCH /internal_help_resources -> InternalHelpResources + Future> update_internal_help_resources( + + /// @param {WriteInternalHelpResources} body + WriteInternalHelpResources body) async { + InternalHelpResources responseHandler(dynamic json, String contentType) { + return InternalHelpResources.fromResponse(json, contentType); + } + + return patch(responseHandler, '/internal_help_resources', null, + body == null ? null : body.toJson()); + } + + /// ### Get all legacy features. + /// + /// GET /legacy_features -> List + Future>> all_legacy_features() async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => LegacyFeature.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/legacy_features'); + } + + /// ### Get information about the legacy feature with a specific id. + /// + /// GET /legacy_features/{legacy_feature_id} -> LegacyFeature + Future> legacy_feature( + + /// @param {String} legacy_feature_id id of legacy feature + String legacy_feature_id) async { + var path_legacy_feature_id = encodeParam(legacy_feature_id); + + LegacyFeature responseHandler(dynamic json, String contentType) { + return LegacyFeature.fromResponse(json, contentType); + } + + return get(responseHandler, '/legacy_features/$path_legacy_feature_id'); + } + + /// ### Update information about the legacy feature with a specific id. + /// + /// PATCH /legacy_features/{legacy_feature_id} -> LegacyFeature + Future> update_legacy_feature( + + /// @param {String} legacy_feature_id id of legacy feature + String legacy_feature_id, + + /// @param {WriteLegacyFeature} body + WriteLegacyFeature body) async { + var path_legacy_feature_id = encodeParam(legacy_feature_id); + + LegacyFeature responseHandler(dynamic json, String contentType) { + return LegacyFeature.fromResponse(json, contentType); + } + + return patch(responseHandler, '/legacy_features/$path_legacy_feature_id', + null, body == null ? null : body.toJson()); + } + + /// ### Get a list of locales that Looker supports. + /// + /// GET /locales -> List + Future>> all_locales() async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Locale.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/locales'); + } + + /// ### Get all mobile settings. + /// + /// GET /mobile/settings -> MobileSettings + Future> mobile_settings() async { + MobileSettings responseHandler(dynamic json, String contentType) { + return MobileSettings.fromResponse(json, contentType); + } + + return get(responseHandler, '/mobile/settings'); + } + + /// ### Get Looker Settings + /// + /// Available settings are: + /// - extension_framework_enabled + /// - marketplace_auto_install_enabled + /// - marketplace_enabled + /// - whitelabel_configuration + /// - custom_welcome_email + /// + /// GET /setting -> Setting + Future> get_setting( + { + + /// @param {String} fields Requested fields + String fields}) async { + Setting responseHandler(dynamic json, String contentType) { + return Setting.fromResponse(json, contentType); + } + + return get(responseHandler, '/setting', {'fields': fields}); + } + + /// ### Configure Looker Settings + /// + /// Available settings are: + /// - extension_framework_enabled + /// - marketplace_auto_install_enabled + /// - marketplace_enabled + /// - whitelabel_configuration + /// - custom_welcome_email + /// + /// See the `Setting` type for more information on the specific values that can be configured. + /// + /// PATCH /setting -> Setting + Future> set_setting( + + /// @param {WriteSetting} body + WriteSetting body, + { + + /// @param {String} fields Requested fields + String fields}) async { + Setting responseHandler(dynamic json, String contentType) { + return Setting.fromResponse(json, contentType); + } + + return patch(responseHandler, '/setting', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Get current SMTP status. + /// + /// GET /smtp_status -> SmtpStatus + Future> smtp_status( + { + + /// @param {String} fields Include only these fields in the response + String fields}) async { + SmtpStatus responseHandler(dynamic json, String contentType) { + return SmtpStatus.fromResponse(json, contentType); + } + + return get(responseHandler, '/smtp_status', {'fields': fields}); + } + + /// ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). + /// + /// GET /timezones -> List + Future>> all_timezones() async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Timezone.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/timezones'); + } + + /// ### Get information about all API versions supported by this Looker instance. + /// + /// GET /versions -> ApiVersion + Future> versions( + { + + /// @param {String} fields Requested fields. + String fields}) async { + ApiVersion responseHandler(dynamic json, String contentType) { + return ApiVersion.fromResponse(json, contentType); + } + + return get(responseHandler, '/versions', {'fields': fields}); + } + + /// ### Get an API specification for this Looker instance. + /// + /// The specification is returned as a JSON document in Swagger 2.x format + /// + /// GET /api_spec/{api_version}/{specification} -> dynamic + Future> api_spec( + + /// @param {String} api_version API version + String api_version, + + /// @param {String} specification Specification name. Typically, this is "swagger.json" + String specification) async { + var path_api_version = encodeParam(api_version); + var path_specification = encodeParam(specification); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return get( + responseHandler, '/api_spec/$path_api_version/$path_specification'); + } + + /// ### This feature is enabled only by special license. + /// ### Gets the whitelabel configuration, which includes hiding documentation links, custom favicon uploading, etc. + /// + /// GET /whitelabel_configuration -> WhitelabelConfiguration + Future> whitelabel_configuration( + { + + /// @param {String} fields Requested fields. + String fields}) async { + WhitelabelConfiguration responseHandler(dynamic json, String contentType) { + return WhitelabelConfiguration.fromResponse(json, contentType); + } + + return get( + responseHandler, '/whitelabel_configuration', {'fields': fields}); + } + + /// ### Update the whitelabel configuration + /// + /// PUT /whitelabel_configuration -> WhitelabelConfiguration + Future> update_whitelabel_configuration( + + /// @param {WriteWhitelabelConfiguration} body + WriteWhitelabelConfiguration body) async { + WhitelabelConfiguration responseHandler(dynamic json, String contentType) { + return WhitelabelConfiguration.fromResponse(json, contentType); + } + + return put(responseHandler, '/whitelabel_configuration', null, + body == null ? null : body.toJson()); + } + + // #endregion Config: Manage General Configuration + + // #region Connection: Manage Database Connections + + /// ### Get information about all connections. + /// + /// GET /connections -> List + Future>> all_connections( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => DBConnection.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/connections', {'fields': fields}); + } + + /// ### Create a connection using the specified configuration. + /// + /// POST /connections -> DBConnection + Future> create_connection( + + /// @param {WriteDBConnection} body + WriteDBConnection body) async { + DBConnection responseHandler(dynamic json, String contentType) { + return DBConnection.fromResponse(json, contentType); + } + + return post(responseHandler, '/connections', null, + body == null ? null : body.toJson()); + } + + /// ### Get information about a connection. + /// + /// GET /connections/{connection_name} -> DBConnection + Future> connection( + + /// @param {String} connection_name Name of connection + String connection_name, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_connection_name = encodeParam(connection_name); + + DBConnection responseHandler(dynamic json, String contentType) { + return DBConnection.fromResponse(json, contentType); + } + + return get(responseHandler, '/connections/$path_connection_name', + {'fields': fields}); + } + + /// ### Update a connection using the specified configuration. + /// + /// PATCH /connections/{connection_name} -> DBConnection + Future> update_connection( + + /// @param {String} connection_name Name of connection + String connection_name, + + /// @param {WriteDBConnection} body + WriteDBConnection body) async { + var path_connection_name = encodeParam(connection_name); + + DBConnection responseHandler(dynamic json, String contentType) { + return DBConnection.fromResponse(json, contentType); + } + + return patch(responseHandler, '/connections/$path_connection_name', null, + body == null ? null : body.toJson()); + } + + /// ### Delete a connection. + /// + /// DELETE /connections/{connection_name} -> String + Future> delete_connection( + + /// @param {String} connection_name Name of connection + String connection_name) async { + var path_connection_name = encodeParam(connection_name); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/connections/$path_connection_name'); + } + + /// ### Delete a connection override. + /// + /// DELETE /connections/{connection_name}/connection_override/{override_context} -> String + Future> delete_connection_override( + + /// @param {String} connection_name Name of connection + String connection_name, + + /// @param {String} override_context Context of connection override + String override_context) async { + var path_connection_name = encodeParam(connection_name); + var path_override_context = encodeParam(override_context); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, + '/connections/$path_connection_name/connection_override/$path_override_context'); + } + + /// ### Test an existing connection. + /// + /// Note that a connection's 'dialect' property has a 'connection_tests' property that lists the + /// specific types of tests that the connection supports. + /// + /// This API is rate limited. + /// + /// Unsupported tests in the request will be ignored. + /// + /// PUT /connections/{connection_name}/test -> List + Future>> test_connection( + + /// @param {String} connection_name Name of connection + String connection_name, + { + + /// @param {DelimList} tests Array of names of tests to run + DelimList tests}) async { + var path_connection_name = encodeParam(connection_name); + + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => DBConnectionTestResult.fromResponse(i, contentType)) + .toList(); + } + + return put(responseHandler, '/connections/$path_connection_name/test', + {'tests': tests}); + } + + /// ### Test a connection configuration. + /// + /// Note that a connection's 'dialect' property has a 'connection_tests' property that lists the + /// specific types of tests that the connection supports. + /// + /// This API is rate limited. + /// + /// Unsupported tests in the request will be ignored. + /// + /// PUT /connections/test -> List + Future>> test_connection_config( + + /// @param {WriteDBConnection} body + WriteDBConnection body, + { + + /// @param {DelimList} tests Array of names of tests to run + DelimList tests}) async { + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => DBConnectionTestResult.fromResponse(i, contentType)) + .toList(); + } + + return put(responseHandler, '/connections/test', {'tests': tests}, + body == null ? null : body.toJson()); + } + + /// ### Get information about all dialects. + /// + /// GET /dialect_info -> List + Future>> all_dialect_infos( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => DialectInfo.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/dialect_info', {'fields': fields}); + } + + /// ### Get all External OAuth Applications. + /// + /// This is an OAuth Application which Looker uses to access external systems. + /// + /// GET /external_oauth_applications -> List + Future>> + all_external_oauth_applications( + { + + /// @param {String} name Application name + String name, + + /// @param {String} client_id Application Client ID + String client_id}) async { + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => ExternalOauthApplication.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/external_oauth_applications', + {'name': name, 'client_id': client_id}); + } + + /// ### Create an OAuth Application using the specified configuration. + /// + /// This is an OAuth Application which Looker uses to access external systems. + /// + /// POST /external_oauth_applications -> ExternalOauthApplication + Future> + create_external_oauth_application( + + /// @param {WriteExternalOauthApplication} body + WriteExternalOauthApplication body) async { + ExternalOauthApplication responseHandler(dynamic json, String contentType) { + return ExternalOauthApplication.fromResponse(json, contentType); + } + + return post(responseHandler, '/external_oauth_applications', null, + body == null ? null : body.toJson()); + } + + /// ### Create OAuth User state. + /// + /// POST /external_oauth_applications/user_state -> CreateOAuthApplicationUserStateResponse + Future> + create_oauth_application_user_state( + + /// @param {CreateOAuthApplicationUserStateRequest} body + CreateOAuthApplicationUserStateRequest body) async { + CreateOAuthApplicationUserStateResponse responseHandler( + dynamic json, String contentType) { + return CreateOAuthApplicationUserStateResponse.fromResponse( + json, contentType); + } + + return post(responseHandler, '/external_oauth_applications/user_state', + null, body == null ? null : body.toJson()); + } + + /// ### Get information about all SSH Servers. + /// + /// GET /ssh_servers -> List + Future>> all_ssh_servers( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => SshServer.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/ssh_servers', {'fields': fields}); + } + + /// ### Create an SSH Server. + /// + /// POST /ssh_servers -> SshServer + Future> create_ssh_server( + + /// @param {WriteSshServer} body + WriteSshServer body) async { + SshServer responseHandler(dynamic json, String contentType) { + return SshServer.fromResponse(json, contentType); + } + + return post(responseHandler, '/ssh_servers', null, + body == null ? null : body.toJson()); + } + + /// ### Get information about an SSH Server. + /// + /// GET /ssh_server/{ssh_server_id} -> SshServer + Future> ssh_server( + + /// @param {String} ssh_server_id Id of SSH Server + String ssh_server_id) async { + var path_ssh_server_id = encodeParam(ssh_server_id); + + SshServer responseHandler(dynamic json, String contentType) { + return SshServer.fromResponse(json, contentType); + } + + return get(responseHandler, '/ssh_server/$path_ssh_server_id'); + } + + /// ### Update an SSH Server. + /// + /// PATCH /ssh_server/{ssh_server_id} -> SshServer + Future> update_ssh_server( + + /// @param {String} ssh_server_id Id of SSH Server + String ssh_server_id, + + /// @param {WriteSshServer} body + WriteSshServer body) async { + var path_ssh_server_id = encodeParam(ssh_server_id); + + SshServer responseHandler(dynamic json, String contentType) { + return SshServer.fromResponse(json, contentType); + } + + return patch(responseHandler, '/ssh_server/$path_ssh_server_id', null, + body == null ? null : body.toJson()); + } + + /// ### Delete an SSH Server. + /// + /// DELETE /ssh_server/{ssh_server_id} -> String + Future> delete_ssh_server( + + /// @param {String} ssh_server_id Id of SSH Server + String ssh_server_id) async { + var path_ssh_server_id = encodeParam(ssh_server_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/ssh_server/$path_ssh_server_id'); + } + + /// ### Test the SSH Server + /// + /// GET /ssh_server/{ssh_server_id}/test -> SshServer + Future> test_ssh_server( + + /// @param {String} ssh_server_id Id of SSH Server + String ssh_server_id) async { + var path_ssh_server_id = encodeParam(ssh_server_id); + + SshServer responseHandler(dynamic json, String contentType) { + return SshServer.fromResponse(json, contentType); + } + + return get(responseHandler, '/ssh_server/$path_ssh_server_id/test'); + } + + /// ### Get information about all SSH Tunnels. + /// + /// GET /ssh_tunnels -> List + Future>> all_ssh_tunnels( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => SshTunnel.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/ssh_tunnels', {'fields': fields}); + } + + /// ### Create an SSH Tunnel + /// + /// POST /ssh_tunnels -> SshTunnel + Future> create_ssh_tunnel( + + /// @param {WriteSshTunnel} body + WriteSshTunnel body) async { + SshTunnel responseHandler(dynamic json, String contentType) { + return SshTunnel.fromResponse(json, contentType); + } + + return post(responseHandler, '/ssh_tunnels', null, + body == null ? null : body.toJson()); + } + + /// ### Get information about an SSH Tunnel. + /// + /// GET /ssh_tunnel/{ssh_tunnel_id} -> SshTunnel + Future> ssh_tunnel( + + /// @param {String} ssh_tunnel_id Id of SSH Tunnel + String ssh_tunnel_id) async { + var path_ssh_tunnel_id = encodeParam(ssh_tunnel_id); + + SshTunnel responseHandler(dynamic json, String contentType) { + return SshTunnel.fromResponse(json, contentType); + } + + return get(responseHandler, '/ssh_tunnel/$path_ssh_tunnel_id'); + } + + /// ### Update an SSH Tunnel + /// + /// PATCH /ssh_tunnel/{ssh_tunnel_id} -> SshTunnel + Future> update_ssh_tunnel( + + /// @param {String} ssh_tunnel_id Id of SSH Tunnel + String ssh_tunnel_id, + + /// @param {WriteSshTunnel} body + WriteSshTunnel body) async { + var path_ssh_tunnel_id = encodeParam(ssh_tunnel_id); + + SshTunnel responseHandler(dynamic json, String contentType) { + return SshTunnel.fromResponse(json, contentType); + } + + return patch(responseHandler, '/ssh_tunnel/$path_ssh_tunnel_id', null, + body == null ? null : body.toJson()); + } + + /// ### Delete an SSH Tunnel + /// + /// DELETE /ssh_tunnel/{ssh_tunnel_id} -> String + Future> delete_ssh_tunnel( + + /// @param {String} ssh_tunnel_id Id of SSH Tunnel + String ssh_tunnel_id) async { + var path_ssh_tunnel_id = encodeParam(ssh_tunnel_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/ssh_tunnel/$path_ssh_tunnel_id'); + } + + /// ### Test the SSH Tunnel + /// + /// GET /ssh_tunnel/{ssh_tunnel_id}/test -> SshTunnel + Future> test_ssh_tunnel( + + /// @param {String} ssh_tunnel_id Id of SSH Tunnel + String ssh_tunnel_id) async { + var path_ssh_tunnel_id = encodeParam(ssh_tunnel_id); + + SshTunnel responseHandler(dynamic json, String contentType) { + return SshTunnel.fromResponse(json, contentType); + } + + return get(responseHandler, '/ssh_tunnel/$path_ssh_tunnel_id/test'); + } + + /// ### Get the SSH public key + /// + /// Get the public key created for this instance to identify itself to a remote SSH server. + /// + /// GET /ssh_public_key -> SshPublicKey + Future> ssh_public_key() async { + SshPublicKey responseHandler(dynamic json, String contentType) { + return SshPublicKey.fromResponse(json, contentType); + } + + return get(responseHandler, '/ssh_public_key'); + } + + // #endregion Connection: Manage Database Connections + + // #region Content: Manage Content + + /// ### Search Favorite Content + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /content_favorite/search -> List + Future>> search_content_favorites( + { + + /// @param {int} id Match content favorite id(s) + int id, + + /// @param {String} user_id Match user id(s).To create a list of multiple ids, use commas as separators + String user_id, + + /// @param {String} content_metadata_id Match content metadata id(s).To create a list of multiple ids, use commas as separators + String content_metadata_id, + + /// @param {String} dashboard_id Match dashboard id(s).To create a list of multiple ids, use commas as separators + String dashboard_id, + + /// @param {String} look_id Match look id(s).To create a list of multiple ids, use commas as separators + String look_id, + + /// @param {String} board_id Match board id(s).To create a list of multiple ids, use commas as separators + String board_id, + + /// @param {int} limit Number of results to return. (used with offset) + int limit, + + /// @param {int} offset Number of results to skip before returning any. (used with limit) + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {String} fields Requested fields. + String fields, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => ContentFavorite.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/content_favorite/search', { + 'id': id, + 'user_id': user_id, + 'content_metadata_id': content_metadata_id, + 'dashboard_id': dashboard_id, + 'look_id': look_id, + 'board_id': board_id, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'fields': fields, + 'filter_or': filter_or + }); + } + + /// ### Get favorite content by its id + /// + /// GET /content_favorite/{content_favorite_id} -> ContentFavorite + Future> content_favorite( + + /// @param {int} content_favorite_id Id of favorite content + int content_favorite_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_content_favorite_id = encodeParam(content_favorite_id); + + ContentFavorite responseHandler(dynamic json, String contentType) { + return ContentFavorite.fromResponse(json, contentType); + } + + return get(responseHandler, '/content_favorite/$path_content_favorite_id', + {'fields': fields}); + } + + /// ### Delete favorite content + /// + /// DELETE /content_favorite/{content_favorite_id} -> String + Future> delete_content_favorite( + + /// @param {int} content_favorite_id Id of favorite content + int content_favorite_id) async { + var path_content_favorite_id = encodeParam(content_favorite_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete( + responseHandler, '/content_favorite/$path_content_favorite_id'); + } + + /// ### Create favorite content + /// + /// POST /content_favorite -> ContentFavorite + Future> create_content_favorite( + + /// @param {WriteContentFavorite} body + WriteContentFavorite body) async { + ContentFavorite responseHandler(dynamic json, String contentType) { + return ContentFavorite.fromResponse(json, contentType); + } + + return post(responseHandler, '/content_favorite', null, + body == null ? null : body.toJson()); + } + + /// ### Get information about all content metadata in a space. + /// + /// GET /content_metadata -> List + Future>> all_content_metadatas( + + /// @param {int} parent_id Parent space of content. + int parent_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ContentMeta.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/content_metadata', + {'parent_id': parent_id, 'fields': fields}); + } + + /// ### Get information about an individual content metadata record. + /// + /// GET /content_metadata/{content_metadata_id} -> ContentMeta + Future> content_metadata( + + /// @param {int} content_metadata_id Id of content metadata + int content_metadata_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_content_metadata_id = encodeParam(content_metadata_id); + + ContentMeta responseHandler(dynamic json, String contentType) { + return ContentMeta.fromResponse(json, contentType); + } + + return get(responseHandler, '/content_metadata/$path_content_metadata_id', + {'fields': fields}); + } + + /// ### Move a piece of content. + /// + /// PATCH /content_metadata/{content_metadata_id} -> ContentMeta + Future> update_content_metadata( + + /// @param {int} content_metadata_id Id of content metadata + int content_metadata_id, + + /// @param {WriteContentMeta} body + WriteContentMeta body) async { + var path_content_metadata_id = encodeParam(content_metadata_id); + + ContentMeta responseHandler(dynamic json, String contentType) { + return ContentMeta.fromResponse(json, contentType); + } + + return patch(responseHandler, '/content_metadata/$path_content_metadata_id', + null, body == null ? null : body.toJson()); + } + + /// ### All content metadata access records for a content metadata item. + /// + /// GET /content_metadata_access -> List + Future>> all_content_metadata_accesses( + + /// @param {int} content_metadata_id Id of content metadata + int content_metadata_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => ContentMetaGroupUser.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/content_metadata_access', + {'content_metadata_id': content_metadata_id, 'fields': fields}); + } + + /// ### Create content metadata access. + /// + /// POST /content_metadata_access -> ContentMetaGroupUser + Future> create_content_metadata_access( + + /// @param {ContentMetaGroupUser} body + ContentMetaGroupUser body, + { + + /// @param {bool} send_boards_notification_email Optionally sends notification email when granting access to a board. + bool send_boards_notification_email}) async { + ContentMetaGroupUser responseHandler(dynamic json, String contentType) { + return ContentMetaGroupUser.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/content_metadata_access', + {'send_boards_notification_email': send_boards_notification_email}, + body == null ? null : body.toJson()); + } + + /// ### Update type of access for content metadata. + /// + /// PUT /content_metadata_access/{content_metadata_access_id} -> ContentMetaGroupUser + Future> update_content_metadata_access( + + /// @param {String} content_metadata_access_id Id of content metadata access + String content_metadata_access_id, + + /// @param {ContentMetaGroupUser} body + ContentMetaGroupUser body) async { + var path_content_metadata_access_id = + encodeParam(content_metadata_access_id); + + ContentMetaGroupUser responseHandler(dynamic json, String contentType) { + return ContentMetaGroupUser.fromResponse(json, contentType); + } + + return put( + responseHandler, + '/content_metadata_access/$path_content_metadata_access_id', + null, + body == null ? null : body.toJson()); + } + + /// ### Remove content metadata access. + /// + /// DELETE /content_metadata_access/{content_metadata_access_id} -> String + Future> delete_content_metadata_access( + + /// @param {int} content_metadata_access_id Id of content metadata access + int content_metadata_access_id) async { + var path_content_metadata_access_id = + encodeParam(content_metadata_access_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, + '/content_metadata_access/$path_content_metadata_access_id'); + } + + /// ### Get an image representing the contents of a dashboard or look. + /// + /// The returned thumbnail is an abstract representation of the contents of a dashbord or look and does not + /// reflect the actual data displayed in the respective visualizations. + /// + /// GET /content_thumbnail/{type}/{resource_id} -> String + /// + /// **Note**: Binary content may be returned by this method. + Future> content_thumbnail( + + /// @param {String} type Either dashboard or look + String type, + + /// @param {String} resource_id ID of the dashboard or look to render + String resource_id, + { + + /// @param {String} reload Whether or not to refresh the rendered image with the latest content + String reload, + + /// @param {String} format A value of png produces a thumbnail in PNG format instead of SVG (default) + String format, + + /// @param {int} width The width of the image if format is supplied + int width, + + /// @param {int} height The height of the image if format is supplied + int height}) async { + var path_type = encodeParam(type); + var path_resource_id = encodeParam(resource_id); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return get( + responseHandler, + '/content_thumbnail/$path_type/$path_resource_id', + {'reload': reload, 'format': format, 'width': width, 'height': height}); + } + + /// ### Validate All Content + /// + /// Performs validation of all looks and dashboards + /// Returns a list of errors found as well as metadata about the content validation run. + /// + /// GET /content_validation -> ContentValidation + Future> content_validation( + { + + /// @param {String} fields Requested fields. + String fields}) async { + ContentValidation responseHandler(dynamic json, String contentType) { + return ContentValidation.fromResponse(json, contentType); + } + + return get(responseHandler, '/content_validation', {'fields': fields}); + } + + /// ### Search Content Views + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /content_view/search -> List + Future>> search_content_views( + { + + /// @param {String} view_count Match view count + String view_count, + + /// @param {String} group_id Match Group Id + String group_id, + + /// @param {String} look_id Match look_id + String look_id, + + /// @param {String} dashboard_id Match dashboard_id + String dashboard_id, + + /// @param {String} content_metadata_id Match content metadata id + String content_metadata_id, + + /// @param {String} start_of_week_date Match start of week date (format is "YYYY-MM-DD") + String start_of_week_date, + + /// @param {bool} all_time True if only all time view records should be returned + bool all_time, + + /// @param {String} user_id Match user id + String user_id, + + /// @param {String} fields Requested fields + String fields, + + /// @param {int} limit Number of results to return. Use with `offset` to manage pagination of results + int limit, + + /// @param {int} offset Number of results to skip before returning data + int offset, + + /// @param {String} sorts Fields to sort by + String sorts, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ContentView.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/content_view/search', { + 'view_count': view_count, + 'group_id': group_id, + 'look_id': look_id, + 'dashboard_id': dashboard_id, + 'content_metadata_id': content_metadata_id, + 'start_of_week_date': start_of_week_date, + 'all_time': all_time, + 'user_id': user_id, + 'fields': fields, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'filter_or': filter_or + }); + } + + /// ### Get a vector image representing the contents of a dashboard or look. + /// + /// # DEPRECATED: Use [content_thumbnail()](#!/Content/content_thumbnail) + /// + /// The returned thumbnail is an abstract representation of the contents of a dashbord or look and does not + /// reflect the actual data displayed in the respective visualizations. + /// + /// GET /vector_thumbnail/{type}/{resource_id} -> String + Future> vector_thumbnail( + + /// @param {String} type Either dashboard or look + String type, + + /// @param {String} resource_id ID of the dashboard or look to render + String resource_id, + { + + /// @param {String} reload Whether or not to refresh the rendered image with the latest content + String reload}) async { + var path_type = encodeParam(type); + var path_resource_id = encodeParam(resource_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return get(responseHandler, + '/vector_thumbnail/$path_type/$path_resource_id', {'reload': reload}); + } + + // #endregion Content: Manage Content + + // #region Dashboard: Manage Dashboards + + /// ### Get information about all active dashboards. + /// + /// Returns an array of **abbreviated dashboard objects**. Dashboards marked as deleted are excluded from this list. + /// + /// Get the **full details** of a specific dashboard by id with [dashboard()](#!/Dashboard/dashboard) + /// + /// Find **deleted dashboards** with [search_dashboards()](#!/Dashboard/search_dashboards) + /// + /// GET /dashboards -> List + Future>> all_dashboards( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => DashboardBase.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/dashboards', {'fields': fields}); + } + + /// ### Create a new dashboard + /// + /// Creates a new dashboard object and returns the details of the newly created dashboard. + /// + /// `Title`, `user_id`, and `space_id` are all required fields. + /// `Space_id` and `user_id` must contain the id of an existing space or user, respectively. + /// A dashboard's `title` must be unique within the space in which it resides. + /// + /// If you receive a 422 error response when creating a dashboard, be sure to look at the + /// response body for information about exactly which fields are missing or contain invalid data. + /// + /// You can **update** an existing dashboard with [update_dashboard()](#!/Dashboard/update_dashboard) + /// + /// You can **permanently delete** an existing dashboard with [delete_dashboard()](#!/Dashboard/delete_dashboard) + /// + /// POST /dashboards -> Dashboard + Future> create_dashboard( + + /// @param {WriteDashboard} body + WriteDashboard body) async { + Dashboard responseHandler(dynamic json, String contentType) { + return Dashboard.fromResponse(json, contentType); + } + + return post(responseHandler, '/dashboards', null, + body == null ? null : body.toJson()); + } + + /// ### Search Dashboards + /// + /// Returns an **array of dashboard objects** that match the specified search criteria. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// + /// The parameters `limit`, and `offset` are recommended for fetching results in page-size chunks. + /// + /// Get a **single dashboard** by id with [dashboard()](#!/Dashboard/dashboard) + /// + /// GET /dashboards/search -> List + Future>> search_dashboards( + { + + /// @param {String} id Match dashboard id. + String id, + + /// @param {String} slug Match dashboard slug. + String slug, + + /// @param {String} title Match Dashboard title. + String title, + + /// @param {String} description Match Dashboard description. + String description, + + /// @param {String} content_favorite_id Filter on a content favorite id. + String content_favorite_id, + + /// @param {String} folder_id Filter on a particular space. + String folder_id, + + /// @param {String} deleted Filter on dashboards deleted status. + String deleted, + + /// @param {String} user_id Filter on dashboards created by a particular user. + String user_id, + + /// @param {String} view_count Filter on a particular value of view_count + String view_count, + + /// @param {String} content_metadata_id Filter on a content favorite id. + String content_metadata_id, + + /// @param {bool} curate Exclude items that exist only in personal spaces other than the users + bool curate, + + /// @param {String} last_viewed_at Select dashboards based on when they were last viewed + String last_viewed_at, + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} page Requested page. + int page, + + /// @param {int} per_page Results per page. + int per_page, + + /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) + int limit, + + /// @param {int} offset Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + int offset, + + /// @param {String} sorts One or more fields to sort by. Sortable fields: [:title, :user_id, :id, :created_at, :space_id, :folder_id, :description, :view_count, :favorite_count, :slug, :content_favorite_id, :content_metadata_id, :deleted, :deleted_at, :last_viewed_at, :last_accessed_at] + String sorts, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Dashboard.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/dashboards/search', { + 'id': id, + 'slug': slug, + 'title': title, + 'description': description, + 'content_favorite_id': content_favorite_id, + 'folder_id': folder_id, + 'deleted': deleted, + 'user_id': user_id, + 'view_count': view_count, + 'content_metadata_id': content_metadata_id, + 'curate': curate, + 'last_viewed_at': last_viewed_at, + 'fields': fields, + 'page': page, + 'per_page': per_page, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'filter_or': filter_or + }); + } + + /// ### Import a LookML dashboard to a space as a UDD + /// Creates a UDD (a dashboard which exists in the Looker database rather than as a LookML file) from the LookML dashboard + /// and places it in the space specified. The created UDD will have a lookml_link_id which links to the original LookML dashboard. + /// + /// To give the imported dashboard specify a (e.g. title: "my title") in the body of your request, otherwise the imported + /// dashboard will have the same title as the original LookML dashboard. + /// + /// For this operation to succeed the user must have permission to see the LookML dashboard in question, and have permission to + /// create content in the space the dashboard is being imported to. + /// + /// **Sync** a linked UDD with [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) + /// **Unlink** a linked UDD by setting lookml_link_id to null with [update_dashboard()](#!/Dashboard/update_dashboard) + /// + /// POST /dashboards/{lookml_dashboard_id}/import/{space_id} -> Dashboard + Future> import_lookml_dashboard( + + /// @param {String} lookml_dashboard_id Id of LookML dashboard + String lookml_dashboard_id, + + /// @param {String} space_id Id of space to import the dashboard to + String space_id, + { + + /// @param {WriteDashboard} body + WriteDashboard body, + + /// @param {bool} raw_locale If true, and this dashboard is localized, export it with the raw keys, not localized. + bool raw_locale}) async { + var path_lookml_dashboard_id = encodeParam(lookml_dashboard_id); + var path_space_id = encodeParam(space_id); + + Dashboard responseHandler(dynamic json, String contentType) { + return Dashboard.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/dashboards/$path_lookml_dashboard_id/import/$path_space_id', + {'raw_locale': raw_locale}, + body == null ? null : body.toJson()); + } + + /// ### Update all linked dashboards to match the specified LookML dashboard. + /// + /// Any UDD (a dashboard which exists in the Looker database rather than as a LookML file) which has a `lookml_link_id` + /// property value referring to a LookML dashboard's id (model::dashboardname) will be updated so that it matches the current state of the LookML dashboard. + /// + /// For this operation to succeed the user must have permission to view the LookML dashboard, and only linked dashboards + /// that the user has permission to update will be synced. + /// + /// To **link** or **unlink** a UDD set the `lookml_link_id` property with [update_dashboard()](#!/Dashboard/update_dashboard) + /// + /// PATCH /dashboards/{lookml_dashboard_id}/sync -> List + Future>> sync_lookml_dashboard( + + /// @param {String} lookml_dashboard_id Id of LookML dashboard, in the form 'model::dashboardname' + String lookml_dashboard_id, + + /// @param {WriteDashboard} body + WriteDashboard body, + { + + /// @param {bool} raw_locale If true, and this dashboard is localized, export it with the raw keys, not localized. + bool raw_locale}) async { + var path_lookml_dashboard_id = encodeParam(lookml_dashboard_id); + + List responseHandler(dynamic json, String contentType) { + return json; + } + + return patch(responseHandler, '/dashboards/$path_lookml_dashboard_id/sync', + {'raw_locale': raw_locale}, body == null ? null : body.toJson()); + } + + /// ### Get information about a dashboard + /// + /// Returns the full details of the identified dashboard object + /// + /// Get a **summary list** of all active dashboards with [all_dashboards()](#!/Dashboard/all_dashboards) + /// + /// You can **Search** for dashboards with [search_dashboards()](#!/Dashboard/search_dashboards) + /// + /// GET /dashboards/{dashboard_id} -> Dashboard + Future> dashboard( + + /// @param {String} dashboard_id Id of dashboard + String dashboard_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_id = encodeParam(dashboard_id); + + Dashboard responseHandler(dynamic json, String contentType) { + return Dashboard.fromResponse(json, contentType); + } + + return get( + responseHandler, '/dashboards/$path_dashboard_id', {'fields': fields}); + } + + /// ### Update a dashboard + /// + /// You can use this function to change the string and integer properties of + /// a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components + /// cannot be modified by this function - use the update functions for the respective + /// nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + /// to modify nested objects referenced by a dashboard. + /// + /// If you receive a 422 error response when updating a dashboard, be sure to look at the + /// response body for information about exactly which fields are missing or contain invalid data. + /// + /// PATCH /dashboards/{dashboard_id} -> Dashboard + Future> update_dashboard( + + /// @param {String} dashboard_id Id of dashboard + String dashboard_id, + + /// @param {WriteDashboard} body + WriteDashboard body) async { + var path_dashboard_id = encodeParam(dashboard_id); + + Dashboard responseHandler(dynamic json, String contentType) { + return Dashboard.fromResponse(json, contentType); + } + + return patch(responseHandler, '/dashboards/$path_dashboard_id', null, + body == null ? null : body.toJson()); + } + + /// ### Delete the dashboard with the specified id + /// + /// Permanently **deletes** a dashboard. (The dashboard cannot be recovered after this operation.) + /// + /// "Soft" delete or hide a dashboard by setting its `deleted` status to `True` with [update_dashboard()](#!/Dashboard/update_dashboard). + /// + /// Note: When a dashboard is deleted in the UI, it is soft deleted. Use this API call to permanently remove it, if desired. + /// + /// DELETE /dashboards/{dashboard_id} -> String + Future> delete_dashboard( + + /// @param {String} dashboard_id Id of dashboard + String dashboard_id) async { + var path_dashboard_id = encodeParam(dashboard_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/dashboards/$path_dashboard_id'); + } + + /// ### Get Aggregate Table LookML for Each Query on a Dahboard + /// + /// Returns a JSON object that contains the dashboard id and Aggregate Table lookml + /// + /// GET /dashboards/aggregate_table_lookml/{dashboard_id} -> DashboardAggregateTableLookml + Future> + dashboard_aggregate_table_lookml( + + /// @param {String} dashboard_id Id of dashboard + String dashboard_id) async { + var path_dashboard_id = encodeParam(dashboard_id); + + DashboardAggregateTableLookml responseHandler( + dynamic json, String contentType) { + return DashboardAggregateTableLookml.fromResponse(json, contentType); + } + + return get(responseHandler, + '/dashboards/aggregate_table_lookml/$path_dashboard_id'); + } + + /// ### Get lookml of a UDD + /// + /// Returns a JSON object that contains the dashboard id and the full lookml + /// + /// GET /dashboards/lookml/{dashboard_id} -> DashboardLookml + Future> dashboard_lookml( + + /// @param {String} dashboard_id Id of dashboard + String dashboard_id) async { + var path_dashboard_id = encodeParam(dashboard_id); + + DashboardLookml responseHandler(dynamic json, String contentType) { + return DashboardLookml.fromResponse(json, contentType); + } + + return get(responseHandler, '/dashboards/lookml/$path_dashboard_id'); + } + + /// ### Move an existing dashboard + /// + /// Moves a dashboard to a specified folder, and returns the moved dashboard. + /// + /// `dashboard_id` and `folder_id` are required. + /// `dashboard_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. + /// + /// PATCH /dashboards/{dashboard_id}/move -> Dashboard + Future> move_dashboard( + + /// @param {String} dashboard_id Dashboard id to move. + String dashboard_id, + + /// @param {String} folder_id Folder id to move to. + String folder_id) async { + var path_dashboard_id = encodeParam(dashboard_id); + + Dashboard responseHandler(dynamic json, String contentType) { + return Dashboard.fromResponse(json, contentType); + } + + return patch(responseHandler, '/dashboards/$path_dashboard_id/move', + {'folder_id': folder_id}); + } + + /// ### Copy an existing dashboard + /// + /// Creates a copy of an existing dashboard, in a specified folder, and returns the copied dashboard. + /// + /// `dashboard_id` is required, `dashboard_id` and `folder_id` must already exist if specified. + /// `folder_id` will default to the existing folder. + /// + /// If a dashboard with the same title already exists in the target folder, the copy will have '(copy)' + /// or '(copy <# of copies>)' appended. + /// + /// POST /dashboards/{dashboard_id}/copy -> Dashboard + Future> copy_dashboard( + + /// @param {String} dashboard_id Dashboard id to copy. + String dashboard_id, + { + + /// @param {String} folder_id Folder id to copy to. + String folder_id}) async { + var path_dashboard_id = encodeParam(dashboard_id); + + Dashboard responseHandler(dynamic json, String contentType) { + return Dashboard.fromResponse(json, contentType); + } + + return post(responseHandler, '/dashboards/$path_dashboard_id/copy', + {'folder_id': folder_id}); + } + + /// ### Search Dashboard Elements + /// + /// Returns an **array of DashboardElement objects** that match the specified search criteria. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /dashboard_elements/search -> List + Future>> search_dashboard_elements( + { + + /// @param {int} dashboard_id Select elements that refer to a given dashboard id + int dashboard_id, + + /// @param {int} look_id Select elements that refer to a given look id + int look_id, + + /// @param {String} title Match the title of element + String title, + + /// @param {bool} deleted Select soft-deleted dashboard elements + bool deleted, + + /// @param {String} fields Requested fields. + String fields, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or, + + /// @param {String} sorts Fields to sort by. Sortable fields: [:look_id, :dashboard_id, :deleted, :title] + String sorts}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => DashboardElement.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/dashboard_elements/search', { + 'dashboard_id': dashboard_id, + 'look_id': look_id, + 'title': title, + 'deleted': deleted, + 'fields': fields, + 'filter_or': filter_or, + 'sorts': sorts + }); + } + + /// ### Get information about the dashboard element with a specific id. + /// + /// GET /dashboard_elements/{dashboard_element_id} -> DashboardElement + Future> dashboard_element( + + /// @param {String} dashboard_element_id Id of dashboard element + String dashboard_element_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_element_id = encodeParam(dashboard_element_id); + + DashboardElement responseHandler(dynamic json, String contentType) { + return DashboardElement.fromResponse(json, contentType); + } + + return get(responseHandler, + '/dashboard_elements/$path_dashboard_element_id', {'fields': fields}); + } + + /// ### Update the dashboard element with a specific id. + /// + /// PATCH /dashboard_elements/{dashboard_element_id} -> DashboardElement + Future> update_dashboard_element( + + /// @param {String} dashboard_element_id Id of dashboard element + String dashboard_element_id, + + /// @param {WriteDashboardElement} body + WriteDashboardElement body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_element_id = encodeParam(dashboard_element_id); + + DashboardElement responseHandler(dynamic json, String contentType) { + return DashboardElement.fromResponse(json, contentType); + } + + return patch( + responseHandler, + '/dashboard_elements/$path_dashboard_element_id', + {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Delete a dashboard element with a specific id. + /// + /// DELETE /dashboard_elements/{dashboard_element_id} -> String + Future> delete_dashboard_element( + + /// @param {String} dashboard_element_id Id of dashboard element + String dashboard_element_id) async { + var path_dashboard_element_id = encodeParam(dashboard_element_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete( + responseHandler, '/dashboard_elements/$path_dashboard_element_id'); + } + + /// ### Get information about all the dashboard elements on a dashboard with a specific id. + /// + /// GET /dashboards/{dashboard_id}/dashboard_elements -> List + Future>> dashboard_dashboard_elements( + + /// @param {String} dashboard_id Id of dashboard + String dashboard_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_id = encodeParam(dashboard_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => DashboardElement.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, + '/dashboards/$path_dashboard_id/dashboard_elements', + {'fields': fields}); + } + + /// ### Create a dashboard element on the dashboard with a specific id. + /// + /// POST /dashboard_elements -> DashboardElement + Future> create_dashboard_element( + + /// @param {WriteDashboardElement} body + WriteDashboardElement body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + DashboardElement responseHandler(dynamic json, String contentType) { + return DashboardElement.fromResponse(json, contentType); + } + + return post(responseHandler, '/dashboard_elements', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Get information about the dashboard filters with a specific id. + /// + /// GET /dashboard_filters/{dashboard_filter_id} -> DashboardFilter + Future> dashboard_filter( + + /// @param {String} dashboard_filter_id Id of dashboard filters + String dashboard_filter_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_filter_id = encodeParam(dashboard_filter_id); + + DashboardFilter responseHandler(dynamic json, String contentType) { + return DashboardFilter.fromResponse(json, contentType); + } + + return get(responseHandler, '/dashboard_filters/$path_dashboard_filter_id', + {'fields': fields}); + } + + /// ### Update the dashboard filter with a specific id. + /// + /// PATCH /dashboard_filters/{dashboard_filter_id} -> DashboardFilter + Future> update_dashboard_filter( + + /// @param {String} dashboard_filter_id Id of dashboard filter + String dashboard_filter_id, + + /// @param {WriteDashboardFilter} body + WriteDashboardFilter body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_filter_id = encodeParam(dashboard_filter_id); + + DashboardFilter responseHandler(dynamic json, String contentType) { + return DashboardFilter.fromResponse(json, contentType); + } + + return patch( + responseHandler, + '/dashboard_filters/$path_dashboard_filter_id', + {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Delete a dashboard filter with a specific id. + /// + /// DELETE /dashboard_filters/{dashboard_filter_id} -> String + Future> delete_dashboard_filter( + + /// @param {String} dashboard_filter_id Id of dashboard filter + String dashboard_filter_id) async { + var path_dashboard_filter_id = encodeParam(dashboard_filter_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete( + responseHandler, '/dashboard_filters/$path_dashboard_filter_id'); + } + + /// ### Get information about all the dashboard filters on a dashboard with a specific id. + /// + /// GET /dashboards/{dashboard_id}/dashboard_filters -> List + Future>> dashboard_dashboard_filters( + + /// @param {String} dashboard_id Id of dashboard + String dashboard_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_id = encodeParam(dashboard_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => DashboardFilter.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, + '/dashboards/$path_dashboard_id/dashboard_filters', {'fields': fields}); + } + + /// ### Create a dashboard filter on the dashboard with a specific id. + /// + /// POST /dashboard_filters -> DashboardFilter + Future> create_dashboard_filter( + + /// @param {WriteCreateDashboardFilter} body + WriteCreateDashboardFilter body, + { + + /// @param {String} fields Requested fields + String fields}) async { + DashboardFilter responseHandler(dynamic json, String contentType) { + return DashboardFilter.fromResponse(json, contentType); + } + + return post(responseHandler, '/dashboard_filters', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Get information about the dashboard elements with a specific id. + /// + /// GET /dashboard_layout_components/{dashboard_layout_component_id} -> DashboardLayoutComponent + Future> dashboard_layout_component( + + /// @param {String} dashboard_layout_component_id Id of dashboard layout component + String dashboard_layout_component_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_layout_component_id = + encodeParam(dashboard_layout_component_id); + + DashboardLayoutComponent responseHandler(dynamic json, String contentType) { + return DashboardLayoutComponent.fromResponse(json, contentType); + } + + return get( + responseHandler, + '/dashboard_layout_components/$path_dashboard_layout_component_id', + {'fields': fields}); + } + + /// ### Update the dashboard element with a specific id. + /// + /// PATCH /dashboard_layout_components/{dashboard_layout_component_id} -> DashboardLayoutComponent + Future> update_dashboard_layout_component( + + /// @param {String} dashboard_layout_component_id Id of dashboard layout component + String dashboard_layout_component_id, + + /// @param {WriteDashboardLayoutComponent} body + WriteDashboardLayoutComponent body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_layout_component_id = + encodeParam(dashboard_layout_component_id); + + DashboardLayoutComponent responseHandler(dynamic json, String contentType) { + return DashboardLayoutComponent.fromResponse(json, contentType); + } + + return patch( + responseHandler, + '/dashboard_layout_components/$path_dashboard_layout_component_id', + {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Get information about all the dashboard layout components for a dashboard layout with a specific id. + /// + /// GET /dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components -> List + Future>> + dashboard_layout_dashboard_layout_components( + + /// @param {String} dashboard_layout_id Id of dashboard layout component + String dashboard_layout_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_layout_id = encodeParam(dashboard_layout_id); + + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => DashboardLayoutComponent.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, + '/dashboard_layouts/$path_dashboard_layout_id/dashboard_layout_components', + {'fields': fields}); + } + + /// ### Get information about the dashboard layouts with a specific id. + /// + /// GET /dashboard_layouts/{dashboard_layout_id} -> DashboardLayout + Future> dashboard_layout( + + /// @param {String} dashboard_layout_id Id of dashboard layouts + String dashboard_layout_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_layout_id = encodeParam(dashboard_layout_id); + + DashboardLayout responseHandler(dynamic json, String contentType) { + return DashboardLayout.fromResponse(json, contentType); + } + + return get(responseHandler, '/dashboard_layouts/$path_dashboard_layout_id', + {'fields': fields}); + } + + /// ### Update the dashboard layout with a specific id. + /// + /// PATCH /dashboard_layouts/{dashboard_layout_id} -> DashboardLayout + Future> update_dashboard_layout( + + /// @param {String} dashboard_layout_id Id of dashboard layout + String dashboard_layout_id, + + /// @param {WriteDashboardLayout} body + WriteDashboardLayout body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_layout_id = encodeParam(dashboard_layout_id); + + DashboardLayout responseHandler(dynamic json, String contentType) { + return DashboardLayout.fromResponse(json, contentType); + } + + return patch( + responseHandler, + '/dashboard_layouts/$path_dashboard_layout_id', + {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Delete a dashboard layout with a specific id. + /// + /// DELETE /dashboard_layouts/{dashboard_layout_id} -> String + Future> delete_dashboard_layout( + + /// @param {String} dashboard_layout_id Id of dashboard layout + String dashboard_layout_id) async { + var path_dashboard_layout_id = encodeParam(dashboard_layout_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete( + responseHandler, '/dashboard_layouts/$path_dashboard_layout_id'); + } + + /// ### Get information about all the dashboard elements on a dashboard with a specific id. + /// + /// GET /dashboards/{dashboard_id}/dashboard_layouts -> List + Future>> dashboard_dashboard_layouts( + + /// @param {String} dashboard_id Id of dashboard + String dashboard_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_id = encodeParam(dashboard_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => DashboardLayout.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, + '/dashboards/$path_dashboard_id/dashboard_layouts', {'fields': fields}); + } + + /// ### Create a dashboard layout on the dashboard with a specific id. + /// + /// POST /dashboard_layouts -> DashboardLayout + Future> create_dashboard_layout( + + /// @param {WriteDashboardLayout} body + WriteDashboardLayout body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + DashboardLayout responseHandler(dynamic json, String contentType) { + return DashboardLayout.fromResponse(json, contentType); + } + + return post(responseHandler, '/dashboard_layouts', {'fields': fields}, + body == null ? null : body.toJson()); + } + + // #endregion Dashboard: Manage Dashboards + + // #region DataAction: Run Data Actions + + /// Perform a data action. The data action object can be obtained from query results, and used to perform an arbitrary action. + /// + /// POST /data_actions -> DataActionResponse + Future> perform_data_action( + + /// @param {DataActionRequest} body + DataActionRequest body) async { + DataActionResponse responseHandler(dynamic json, String contentType) { + return DataActionResponse.fromResponse(json, contentType); + } + + return post(responseHandler, '/data_actions', null, + body == null ? null : body.toJson()); + } + + /// For some data actions, the remote server may supply a form requesting further user input. This endpoint takes a data action, asks the remote server to generate a form for it, and returns that form to you for presentation to the user. + /// + /// POST /data_actions/form -> DataActionForm + Future> fetch_remote_data_action_form( + + /// @param {Map} body + Map body) async { + DataActionForm responseHandler(dynamic json, String contentType) { + return DataActionForm.fromResponse(json, contentType); + } + + return post(responseHandler, '/data_actions/form', null, body); + } + + // #endregion DataAction: Run Data Actions + + // #region Datagroup: Manage Datagroups + + /// ### Get information about all datagroups. + /// + /// GET /datagroups -> List + Future>> all_datagroups() async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Datagroup.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/datagroups'); + } + + /// ### Get information about a datagroup. + /// + /// GET /datagroups/{datagroup_id} -> Datagroup + Future> datagroup( + + /// @param {int} datagroup_id ID of datagroup. + int datagroup_id) async { + var path_datagroup_id = encodeParam(datagroup_id); + + Datagroup responseHandler(dynamic json, String contentType) { + return Datagroup.fromResponse(json, contentType); + } + + return get(responseHandler, '/datagroups/$path_datagroup_id'); + } + + /// ### Update a datagroup using the specified params. + /// + /// PATCH /datagroups/{datagroup_id} -> Datagroup + Future> update_datagroup( + + /// @param {int} datagroup_id ID of datagroup. + int datagroup_id, + + /// @param {WriteDatagroup} body + WriteDatagroup body) async { + var path_datagroup_id = encodeParam(datagroup_id); + + Datagroup responseHandler(dynamic json, String contentType) { + return Datagroup.fromResponse(json, contentType); + } + + return patch(responseHandler, '/datagroups/$path_datagroup_id', null, + body == null ? null : body.toJson()); + } + + // #endregion Datagroup: Manage Datagroups + + // #region DerivedTable: View Derived Table graphs + + /// ### Discover information about derived tables + /// + /// GET /derived_table/graph/model/{model} -> DependencyGraph + Future> graph_derived_tables_for_model( + + /// @param {String} model The name of the Lookml model. + String model, + { + + /// @param {String} format The format of the graph. Valid values are [dot]. Default is `dot` + String format, + + /// @param {String} color Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. + String color}) async { + var path_model = encodeParam(model); + + DependencyGraph responseHandler(dynamic json, String contentType) { + return DependencyGraph.fromResponse(json, contentType); + } + + return get(responseHandler, '/derived_table/graph/model/$path_model', + {'format': format, 'color': color}); + } + + /// ### Get the subgraph representing this derived table and its dependencies. + /// + /// GET /derived_table/graph/view/{view} -> DependencyGraph + Future> graph_derived_tables_for_view( + + /// @param {String} view The derived table's view name. + String view, + { + + /// @param {String} models The models where this derived table is defined. + String models, + + /// @param {String} workspace The model directory to look in, either `dev` or `production`. + String workspace}) async { + var path_view = encodeParam(view); + + DependencyGraph responseHandler(dynamic json, String contentType) { + return DependencyGraph.fromResponse(json, contentType); + } + + return get(responseHandler, '/derived_table/graph/view/$path_view', + {'models': models, 'workspace': workspace}); + } + + // #endregion DerivedTable: View Derived Table graphs + + // #region Folder: Manage Folders + + /// Search for folders by creator id, parent id, name, etc + /// + /// GET /folders/search -> List + Future>> search_folders( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} page Requested page. + int page, + + /// @param {int} per_page Results per page. + int per_page, + + /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) + int limit, + + /// @param {int} offset Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {String} name Match Space title. + String name, + + /// @param {int} id Match Space id + int id, + + /// @param {String} parent_id Filter on a children of a particular folder. + String parent_id, + + /// @param {String} creator_id Filter on folder created by a particular user. + String creator_id, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or, + + /// @param {bool} is_shared_root Match is shared root + bool is_shared_root}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Folder.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/folders/search', { + 'fields': fields, + 'page': page, + 'per_page': per_page, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'name': name, + 'id': id, + 'parent_id': parent_id, + 'creator_id': creator_id, + 'filter_or': filter_or, + 'is_shared_root': is_shared_root + }); + } + + /// ### Get information about the folder with a specific id. + /// + /// GET /folders/{folder_id} -> Folder + Future> folder( + + /// @param {String} folder_id Id of folder + String folder_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_folder_id = encodeParam(folder_id); + + Folder responseHandler(dynamic json, String contentType) { + return Folder.fromResponse(json, contentType); + } + + return get(responseHandler, '/folders/$path_folder_id', {'fields': fields}); + } + + /// ### Update the folder with a specific id. + /// + /// PATCH /folders/{folder_id} -> Folder + Future> update_folder( + + /// @param {String} folder_id Id of folder + String folder_id, + + /// @param {UpdateFolder} body + UpdateFolder body) async { + var path_folder_id = encodeParam(folder_id); + + Folder responseHandler(dynamic json, String contentType) { + return Folder.fromResponse(json, contentType); + } + + return patch(responseHandler, '/folders/$path_folder_id', null, + body == null ? null : body.toJson()); + } + + /// ### Delete the folder with a specific id including any children folders. + /// **DANGER** this will delete all looks and dashboards in the folder. + /// + /// DELETE /folders/{folder_id} -> String + Future> delete_folder( + + /// @param {String} folder_id Id of folder + String folder_id) async { + var path_folder_id = encodeParam(folder_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/folders/$path_folder_id'); + } + + /// ### Get information about all folders. + /// + /// In API 3.x, this will not return empty personal folders, unless they belong to the calling user, + /// or if they contain soft-deleted content. + /// + /// In API 4.0+, all personal folders will be returned. + /// + /// GET /folders -> List + Future>> all_folders( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Folder.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/folders', {'fields': fields}); + } + + /// ### Create a folder with specified information. + /// + /// Caller must have permission to edit the parent folder and to create folders, otherwise the request + /// returns 404 Not Found. + /// + /// POST /folders -> Folder + Future> create_folder( + + /// @param {CreateFolder} body + CreateFolder body) async { + Folder responseHandler(dynamic json, String contentType) { + return Folder.fromResponse(json, contentType); + } + + return post( + responseHandler, '/folders', null, body == null ? null : body.toJson()); + } + + /// ### Get the children of a folder. + /// + /// GET /folders/{folder_id}/children -> List + Future>> folder_children( + + /// @param {String} folder_id Id of folder + String folder_id, + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} page Requested page. + int page, + + /// @param {int} per_page Results per page. + int per_page, + + /// @param {String} sorts Fields to sort by. + String sorts}) async { + var path_folder_id = encodeParam(folder_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Folder.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/folders/$path_folder_id/children', + {'fields': fields, 'page': page, 'per_page': per_page, 'sorts': sorts}); + } + + /// ### Search the children of a folder + /// + /// GET /folders/{folder_id}/children/search -> List + Future>> folder_children_search( + + /// @param {String} folder_id Id of folder + String folder_id, + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {String} name Match folder name. + String name}) async { + var path_folder_id = encodeParam(folder_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Folder.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/folders/$path_folder_id/children/search', + {'fields': fields, 'sorts': sorts, 'name': name}); + } + + /// ### Get the parent of a folder + /// + /// GET /folders/{folder_id}/parent -> Folder + Future> folder_parent( + + /// @param {String} folder_id Id of folder + String folder_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_folder_id = encodeParam(folder_id); + + Folder responseHandler(dynamic json, String contentType) { + return Folder.fromResponse(json, contentType); + } + + return get( + responseHandler, '/folders/$path_folder_id/parent', {'fields': fields}); + } + + /// ### Get the ancestors of a folder + /// + /// GET /folders/{folder_id}/ancestors -> List + Future>> folder_ancestors( + + /// @param {String} folder_id Id of folder + String folder_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_folder_id = encodeParam(folder_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Folder.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/folders/$path_folder_id/ancestors', + {'fields': fields}); + } + + /// ### Get all looks in a folder. + /// In API 3.x, this will return all looks in a folder, including looks in the trash. + /// In API 4.0+, all looks in a folder will be returned, excluding looks in the trash. + /// + /// GET /folders/{folder_id}/looks -> List + Future>> folder_looks( + + /// @param {String} folder_id Id of folder + String folder_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_folder_id = encodeParam(folder_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => LookWithQuery.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, '/folders/$path_folder_id/looks', {'fields': fields}); + } + + /// ### Get the dashboards in a folder + /// + /// GET /folders/{folder_id}/dashboards -> List + Future>> folder_dashboards( + + /// @param {String} folder_id Id of folder + String folder_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_folder_id = encodeParam(folder_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Dashboard.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/folders/$path_folder_id/dashboards', + {'fields': fields}); + } + + // #endregion Folder: Manage Folders + + // #region Group: Manage Groups + + /// ### Get information about all groups. + /// + /// GET /groups -> List + Future>> all_groups( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} page Requested page. + int page, + + /// @param {int} per_page Results per page. + int per_page, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {DelimList} ids Optional of ids to get specific groups. + DelimList ids, + + /// @param {int} content_metadata_id Id of content metadata to which groups must have access. + int content_metadata_id, + + /// @param {bool} can_add_to_content_metadata Select only groups that either can/cannot be given access to content. + bool can_add_to_content_metadata}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Group.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/groups', { + 'fields': fields, + 'page': page, + 'per_page': per_page, + 'sorts': sorts, + 'ids': ids, + 'content_metadata_id': content_metadata_id, + 'can_add_to_content_metadata': can_add_to_content_metadata + }); + } + + /// ### Creates a new group (admin only). + /// + /// POST /groups -> Group + Future> create_group( + + /// @param {WriteGroup} body + WriteGroup body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + Group responseHandler(dynamic json, String contentType) { + return Group.fromResponse(json, contentType); + } + + return post(responseHandler, '/groups', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Search groups + /// + /// Returns all group records that match the given search criteria. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /groups/search -> List + Future>> search_groups( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} limit Number of results to return (used with `offset`). + int limit, + + /// @param {int} offset Number of results to skip before returning any (used with `limit`). + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or, + + /// @param {int} id Match group id. + int id, + + /// @param {String} name Match group name. + String name, + + /// @param {String} external_group_id Match group external_group_id. + String external_group_id, + + /// @param {bool} externally_managed Match group externally_managed. + bool externally_managed, + + /// @param {bool} externally_orphaned Match group externally_orphaned. + bool externally_orphaned}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Group.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/groups/search', { + 'fields': fields, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'filter_or': filter_or, + 'id': id, + 'name': name, + 'external_group_id': external_group_id, + 'externally_managed': externally_managed, + 'externally_orphaned': externally_orphaned + }); + } + + /// ### Search groups include roles + /// + /// Returns all group records that match the given search criteria, and attaches any associated roles. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /groups/search/with_roles -> List + Future>> search_groups_with_roles( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} limit Number of results to return (used with `offset`). + int limit, + + /// @param {int} offset Number of results to skip before returning any (used with `limit`). + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or, + + /// @param {int} id Match group id. + int id, + + /// @param {String} name Match group name. + String name, + + /// @param {String} external_group_id Match group external_group_id. + String external_group_id, + + /// @param {bool} externally_managed Match group externally_managed. + bool externally_managed, + + /// @param {bool} externally_orphaned Match group externally_orphaned. + bool externally_orphaned}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => GroupSearch.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/groups/search/with_roles', { + 'fields': fields, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'filter_or': filter_or, + 'id': id, + 'name': name, + 'external_group_id': external_group_id, + 'externally_managed': externally_managed, + 'externally_orphaned': externally_orphaned + }); + } + + /// ### Search groups include hierarchy + /// + /// Returns all group records that match the given search criteria, and attaches + /// associated role_ids and parent group_ids. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /groups/search/with_hierarchy -> List + Future>> search_groups_with_hierarchy( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} limit Number of results to return (used with `offset`). + int limit, + + /// @param {int} offset Number of results to skip before returning any (used with `limit`). + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or, + + /// @param {int} id Match group id. + int id, + + /// @param {String} name Match group name. + String name, + + /// @param {String} external_group_id Match group external_group_id. + String external_group_id, + + /// @param {bool} externally_managed Match group externally_managed. + bool externally_managed, + + /// @param {bool} externally_orphaned Match group externally_orphaned. + bool externally_orphaned}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => GroupHierarchy.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/groups/search/with_hierarchy', { + 'fields': fields, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'filter_or': filter_or, + 'id': id, + 'name': name, + 'external_group_id': external_group_id, + 'externally_managed': externally_managed, + 'externally_orphaned': externally_orphaned + }); + } + + /// ### Get information about a group. + /// + /// GET /groups/{group_id} -> Group + Future> group( + + /// @param {int} group_id Id of group + int group_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_group_id = encodeParam(group_id); + + Group responseHandler(dynamic json, String contentType) { + return Group.fromResponse(json, contentType); + } + + return get(responseHandler, '/groups/$path_group_id', {'fields': fields}); + } + + /// ### Updates the a group (admin only). + /// + /// PATCH /groups/{group_id} -> Group + Future> update_group( + + /// @param {int} group_id Id of group + int group_id, + + /// @param {WriteGroup} body + WriteGroup body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_group_id = encodeParam(group_id); + + Group responseHandler(dynamic json, String contentType) { + return Group.fromResponse(json, contentType); + } + + return patch(responseHandler, '/groups/$path_group_id', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Deletes a group (admin only). + /// + /// DELETE /groups/{group_id} -> String + Future> delete_group( + + /// @param {int} group_id Id of group + int group_id) async { + var path_group_id = encodeParam(group_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/groups/$path_group_id'); + } + + /// ### Get information about all the groups in a group + /// + /// GET /groups/{group_id}/groups -> List + Future>> all_group_groups( + + /// @param {int} group_id Id of group + int group_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_group_id = encodeParam(group_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Group.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, '/groups/$path_group_id/groups', {'fields': fields}); + } + + /// ### Adds a new group to a group. + /// + /// POST /groups/{group_id}/groups -> Group + Future> add_group_group( + + /// @param {int} group_id Id of group + int group_id, + + /// @param {GroupIdForGroupInclusion} body + GroupIdForGroupInclusion body) async { + var path_group_id = encodeParam(group_id); + + Group responseHandler(dynamic json, String contentType) { + return Group.fromResponse(json, contentType); + } + + return post(responseHandler, '/groups/$path_group_id/groups', null, + body == null ? null : body.toJson()); + } + + /// ### Get information about all the users directly included in a group. + /// + /// GET /groups/{group_id}/users -> List + Future>> all_group_users( + + /// @param {int} group_id Id of group + int group_id, + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} page Requested page. + int page, + + /// @param {int} per_page Results per page. + int per_page, + + /// @param {String} sorts Fields to sort by. + String sorts}) async { + var path_group_id = encodeParam(group_id); + + List responseHandler(dynamic json, String contentType) { + return json.map((i) => User.fromResponse(i, contentType)).toList(); + } + + return get(responseHandler, '/groups/$path_group_id/users', + {'fields': fields, 'page': page, 'per_page': per_page, 'sorts': sorts}); + } + + /// ### Adds a new user to a group. + /// + /// POST /groups/{group_id}/users -> User + Future> add_group_user( + + /// @param {int} group_id Id of group + int group_id, + + /// @param {GroupIdForGroupUserInclusion} body + GroupIdForGroupUserInclusion body) async { + var path_group_id = encodeParam(group_id); + + User responseHandler(dynamic json, String contentType) { + return User.fromResponse(json, contentType); + } + + return post(responseHandler, '/groups/$path_group_id/users', null, + body == null ? null : body.toJson()); + } + + /// ### Removes a user from a group. + /// + /// DELETE /groups/{group_id}/users/{user_id} -> void + Future> delete_group_user( + + /// @param {int} group_id Id of group + int group_id, + + /// @param {int} user_id Id of user to remove from group + int user_id) async { + var path_group_id = encodeParam(group_id); + var path_user_id = encodeParam(user_id); + + void responseHandler(dynamic json, String contentType) {} + return delete( + responseHandler, '/groups/$path_group_id/users/$path_user_id'); + } + + /// ### Removes a group from a group. + /// + /// DELETE /groups/{group_id}/groups/{deleting_group_id} -> void + Future> delete_group_from_group( + + /// @param {int} group_id Id of group + int group_id, + + /// @param {int} deleting_group_id Id of group to delete + int deleting_group_id) async { + var path_group_id = encodeParam(group_id); + var path_deleting_group_id = encodeParam(deleting_group_id); + + void responseHandler(dynamic json, String contentType) {} + return delete(responseHandler, + '/groups/$path_group_id/groups/$path_deleting_group_id'); + } + + /// ### Set the value of a user attribute for a group. + /// + /// For information about how user attribute values are calculated, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values). + /// + /// PATCH /groups/{group_id}/attribute_values/{user_attribute_id} -> UserAttributeGroupValue + Future> + update_user_attribute_group_value( + + /// @param {int} group_id Id of group + int group_id, + + /// @param {int} user_attribute_id Id of user attribute + int user_attribute_id, + + /// @param {UserAttributeGroupValue} body + UserAttributeGroupValue body) async { + var path_group_id = encodeParam(group_id); + var path_user_attribute_id = encodeParam(user_attribute_id); + + UserAttributeGroupValue responseHandler(dynamic json, String contentType) { + return UserAttributeGroupValue.fromResponse(json, contentType); + } + + return patch( + responseHandler, + '/groups/$path_group_id/attribute_values/$path_user_attribute_id', + null, + body == null ? null : body.toJson()); + } + + /// ### Remove a user attribute value from a group. + /// + /// DELETE /groups/{group_id}/attribute_values/{user_attribute_id} -> void + Future> delete_user_attribute_group_value( + + /// @param {int} group_id Id of group + int group_id, + + /// @param {int} user_attribute_id Id of user attribute + int user_attribute_id) async { + var path_group_id = encodeParam(group_id); + var path_user_attribute_id = encodeParam(user_attribute_id); + + void responseHandler(dynamic json, String contentType) {} + return delete(responseHandler, + '/groups/$path_group_id/attribute_values/$path_user_attribute_id'); + } + + // #endregion Group: Manage Groups + + // #region Homepage: Manage Homepage + + /// ### Get information about the primary homepage's sections. + /// + /// GET /primary_homepage_sections -> List + Future>> all_primary_homepage_sections( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => HomepageSection.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, '/primary_homepage_sections', {'fields': fields}); + } + + // #endregion Homepage: Manage Homepage + + // #region Integration: Manage Integrations + + /// ### Get information about all Integration Hubs. + /// + /// GET /integration_hubs -> List + Future>> all_integration_hubs( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => IntegrationHub.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/integration_hubs', {'fields': fields}); + } + + /// ### Create a new Integration Hub. + /// + /// This API is rate limited to prevent it from being used for SSRF attacks + /// + /// POST /integration_hubs -> IntegrationHub + Future> create_integration_hub( + + /// @param {WriteIntegrationHub} body + WriteIntegrationHub body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + IntegrationHub responseHandler(dynamic json, String contentType) { + return IntegrationHub.fromResponse(json, contentType); + } + + return post(responseHandler, '/integration_hubs', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Get information about a Integration Hub. + /// + /// GET /integration_hubs/{integration_hub_id} -> IntegrationHub + Future> integration_hub( + + /// @param {int} integration_hub_id Id of Integration Hub + int integration_hub_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_integration_hub_id = encodeParam(integration_hub_id); + + IntegrationHub responseHandler(dynamic json, String contentType) { + return IntegrationHub.fromResponse(json, contentType); + } + + return get(responseHandler, '/integration_hubs/$path_integration_hub_id', + {'fields': fields}); + } + + /// ### Update a Integration Hub definition. + /// + /// This API is rate limited to prevent it from being used for SSRF attacks + /// + /// PATCH /integration_hubs/{integration_hub_id} -> IntegrationHub + Future> update_integration_hub( + + /// @param {int} integration_hub_id Id of Integration Hub + int integration_hub_id, + + /// @param {WriteIntegrationHub} body + WriteIntegrationHub body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_integration_hub_id = encodeParam(integration_hub_id); + + IntegrationHub responseHandler(dynamic json, String contentType) { + return IntegrationHub.fromResponse(json, contentType); + } + + return patch(responseHandler, '/integration_hubs/$path_integration_hub_id', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// ### Delete a Integration Hub. + /// + /// DELETE /integration_hubs/{integration_hub_id} -> String + Future> delete_integration_hub( + + /// @param {int} integration_hub_id Id of integration_hub + int integration_hub_id) async { + var path_integration_hub_id = encodeParam(integration_hub_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete( + responseHandler, '/integration_hubs/$path_integration_hub_id'); + } + + /// Accepts the legal agreement for a given integration hub. This only works for integration hubs that have legal_agreement_required set to true and legal_agreement_signed set to false. + /// + /// POST /integration_hubs/{integration_hub_id}/accept_legal_agreement -> IntegrationHub + Future> accept_integration_hub_legal_agreement( + + /// @param {int} integration_hub_id Id of integration_hub + int integration_hub_id) async { + var path_integration_hub_id = encodeParam(integration_hub_id); + + IntegrationHub responseHandler(dynamic json, String contentType) { + return IntegrationHub.fromResponse(json, contentType); + } + + return post(responseHandler, + '/integration_hubs/$path_integration_hub_id/accept_legal_agreement'); + } + + /// ### Get information about all Integrations. + /// + /// GET /integrations -> List + Future>> all_integrations( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {String} integration_hub_id Filter to a specific provider + String integration_hub_id}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Integration.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/integrations', + {'fields': fields, 'integration_hub_id': integration_hub_id}); + } + + /// ### Get information about a Integration. + /// + /// GET /integrations/{integration_id} -> Integration + Future> integration( + + /// @param {String} integration_id Id of integration + String integration_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_integration_id = encodeParam(integration_id); + + Integration responseHandler(dynamic json, String contentType) { + return Integration.fromResponse(json, contentType); + } + + return get(responseHandler, '/integrations/$path_integration_id', + {'fields': fields}); + } + + /// ### Update parameters on a Integration. + /// + /// PATCH /integrations/{integration_id} -> Integration + Future> update_integration( + + /// @param {String} integration_id Id of integration + String integration_id, + + /// @param {WriteIntegration} body + WriteIntegration body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_integration_id = encodeParam(integration_id); + + Integration responseHandler(dynamic json, String contentType) { + return Integration.fromResponse(json, contentType); + } + + return patch(responseHandler, '/integrations/$path_integration_id', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// Returns the Integration form for presentation to the user. + /// + /// POST /integrations/{integration_id}/form -> DataActionForm + Future> fetch_integration_form( + + /// @param {String} integration_id Id of integration + String integration_id, + { + + /// @param {Map} body + Map body}) async { + var path_integration_id = encodeParam(integration_id); + + DataActionForm responseHandler(dynamic json, String contentType) { + return DataActionForm.fromResponse(json, contentType); + } + + return post( + responseHandler, '/integrations/$path_integration_id/form', null, body); + } + + /// Tests the integration to make sure all the settings are working. + /// + /// POST /integrations/{integration_id}/test -> IntegrationTestResult + Future> test_integration( + + /// @param {String} integration_id Id of integration + String integration_id) async { + var path_integration_id = encodeParam(integration_id); + + IntegrationTestResult responseHandler(dynamic json, String contentType) { + return IntegrationTestResult.fromResponse(json, contentType); + } + + return post(responseHandler, '/integrations/$path_integration_id/test'); + } + + // #endregion Integration: Manage Integrations + + // #region Look: Run and Manage Looks + + /// ### Get information about all active Looks + /// + /// Returns an array of **abbreviated Look objects** describing all the looks that the caller has access to. Soft-deleted Looks are **not** included. + /// + /// Get the **full details** of a specific look by id with [look(id)](#!/Look/look) + /// + /// Find **soft-deleted looks** with [search_looks()](#!/Look/search_looks) + /// + /// GET /looks -> List + Future>> all_looks( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json.map((i) => Look.fromResponse(i, contentType)).toList(); + } + + return get(responseHandler, '/looks', {'fields': fields}); + } + + /// ### Create a Look + /// + /// To create a look to display query data, first create the query with [create_query()](#!/Query/create_query) + /// then assign the query's id to the `query_id` property in the call to `create_look()`. + /// + /// To place the look into a particular space, assign the space's id to the `space_id` property + /// in the call to `create_look()`. + /// + /// POST /looks -> LookWithQuery + Future> create_look( + + /// @param {WriteLookWithQuery} body + WriteLookWithQuery body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + LookWithQuery responseHandler(dynamic json, String contentType) { + return LookWithQuery.fromResponse(json, contentType); + } + + return post(responseHandler, '/looks', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Search Looks + /// + /// Returns an **array of Look objects** that match the specified search criteria. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// + /// Get a **single look** by id with [look(id)](#!/Look/look) + /// + /// GET /looks/search -> List + Future>> search_looks( + { + + /// @param {String} id Match look id. + String id, + + /// @param {String} title Match Look title. + String title, + + /// @param {String} description Match Look description. + String description, + + /// @param {String} content_favorite_id Select looks with a particular content favorite id + String content_favorite_id, + + /// @param {String} folder_id Select looks in a particular folder. + String folder_id, + + /// @param {String} user_id Select looks created by a particular user. + String user_id, + + /// @param {String} view_count Select looks with particular view_count value + String view_count, + + /// @param {bool} deleted Select soft-deleted looks + bool deleted, + + /// @param {int} query_id Select looks that reference a particular query by query_id + int query_id, + + /// @param {bool} curate Exclude items that exist only in personal spaces other than the users + bool curate, + + /// @param {String} last_viewed_at Select looks based on when they were last viewed + String last_viewed_at, + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} page Requested page. + int page, + + /// @param {int} per_page Results per page. + int per_page, + + /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) + int limit, + + /// @param {int} offset Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + int offset, + + /// @param {String} sorts One or more fields to sort results by. Sortable fields: [:title, :user_id, :id, :created_at, :space_id, :folder_id, :description, :updated_at, :last_updater_id, :view_count, :favorite_count, :content_favorite_id, :deleted, :deleted_at, :last_viewed_at, :last_accessed_at, :query_id] + String sorts, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json.map((i) => Look.fromResponse(i, contentType)).toList(); + } + + return get(responseHandler, '/looks/search', { + 'id': id, + 'title': title, + 'description': description, + 'content_favorite_id': content_favorite_id, + 'folder_id': folder_id, + 'user_id': user_id, + 'view_count': view_count, + 'deleted': deleted, + 'query_id': query_id, + 'curate': curate, + 'last_viewed_at': last_viewed_at, + 'fields': fields, + 'page': page, + 'per_page': per_page, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'filter_or': filter_or + }); + } + + /// ### Get a Look. + /// + /// Returns detailed information about a Look and its associated Query. + /// + /// GET /looks/{look_id} -> LookWithQuery + Future> look( + + /// @param {String} look_id Id of look + String look_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_look_id = encodeParam(look_id); + + LookWithQuery responseHandler(dynamic json, String contentType) { + return LookWithQuery.fromResponse(json, contentType); + } + + return get(responseHandler, '/looks/$path_look_id', {'fields': fields}); + } + + /// ### Modify a Look + /// + /// Use this function to modify parts of a look. Property values given in a call to `update_look` are + /// applied to the existing look, so there's no need to include properties whose values are not changing. + /// It's best to specify only the properties you want to change and leave everything else out + /// of your `update_look` call. **Look properties marked 'read-only' will be ignored.** + /// + /// When a user deletes a look in the Looker UI, the look data remains in the database but is + /// marked with a deleted flag ("soft-deleted"). Soft-deleted looks can be undeleted (by an admin) + /// if the delete was in error. + /// + /// To soft-delete a look via the API, use [update_look()](#!/Look/update_look) to change the look's `deleted` property to `true`. + /// You can undelete a look by calling `update_look` to change the look's `deleted` property to `false`. + /// + /// Soft-deleted looks are excluded from the results of [all_looks()](#!/Look/all_looks) and [search_looks()](#!/Look/search_looks), so they + /// essentially disappear from view even though they still reside in the db. + /// In API 3.1 and later, you can pass `deleted: true` as a parameter to [search_looks()](#!/3.1/Look/search_looks) to list soft-deleted looks. + /// + /// NOTE: [delete_look()](#!/Look/delete_look) performs a "hard delete" - the look data is removed from the Looker + /// database and destroyed. There is no "undo" for `delete_look()`. + /// + /// PATCH /looks/{look_id} -> LookWithQuery + Future> update_look( + + /// @param {String} look_id Id of look + String look_id, + + /// @param {WriteLookWithQuery} body + WriteLookWithQuery body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_look_id = encodeParam(look_id); + + LookWithQuery responseHandler(dynamic json, String contentType) { + return LookWithQuery.fromResponse(json, contentType); + } + + return patch(responseHandler, '/looks/$path_look_id', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Permanently Delete a Look + /// + /// This operation **permanently** removes a look from the Looker database. + /// + /// NOTE: There is no "undo" for this kind of delete. + /// + /// For information about soft-delete (which can be undone) see [update_look()](#!/Look/update_look). + /// + /// DELETE /looks/{look_id} -> String + Future> delete_look( + + /// @param {String} look_id Id of look + String look_id) async { + var path_look_id = encodeParam(look_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/looks/$path_look_id'); + } + + /// ### Run a Look + /// + /// Runs a given look's query and returns the results in the requested format. + /// + /// Supported formats: + /// + /// | result_format | Description + /// | :-----------: | :--- | + /// | json | Plain json + /// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query + /// | csv | Comma separated values with a header + /// | txt | Tab separated values with a header + /// | html | Simple html + /// | md | Simple markdown + /// | xlsx | MS Excel spreadsheet + /// | sql | Returns the generated SQL rather than running the query + /// | png | A PNG image of the visualization of the query + /// | jpg | A JPG image of the visualization of the query + /// + /// GET /looks/{look_id}/run/{result_format} -> String + /// + /// **Note**: Binary content may be returned by this method. + Future> run_look( + + /// @param {String} look_id Id of look + String look_id, + + /// @param {String} result_format Format of result + String result_format, + { + + /// @param {int} limit Row limit (may override the limit in the saved query). + int limit, + + /// @param {bool} apply_formatting Apply model-specified formatting to each result. + bool apply_formatting, + + /// @param {bool} apply_vis Apply visualization options to results. + bool apply_vis, + + /// @param {bool} cache Get results from cache if available. + bool cache, + + /// @param {int} image_width Render width for image formats. + int image_width, + + /// @param {int} image_height Render height for image formats. + int image_height, + + /// @param {bool} generate_drill_links Generate drill links (only applicable to 'json_detail' format. + bool generate_drill_links, + + /// @param {bool} force_production Force use of production models even if the user is in development mode. + bool force_production, + + /// @param {bool} cache_only Retrieve any results from cache even if the results have expired. + bool cache_only, + + /// @param {String} path_prefix Prefix to use for drill links (url encoded). + String path_prefix, + + /// @param {bool} rebuild_pdts Rebuild PDTS used in query. + bool rebuild_pdts, + + /// @param {bool} server_table_calcs Perform table calculations on query results + bool server_table_calcs}) async { + var path_look_id = encodeParam(look_id); + var path_result_format = encodeParam(result_format); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return get( + responseHandler, '/looks/$path_look_id/run/$path_result_format', { + 'limit': limit, + 'apply_formatting': apply_formatting, + 'apply_vis': apply_vis, + 'cache': cache, + 'image_width': image_width, + 'image_height': image_height, + 'generate_drill_links': generate_drill_links, + 'force_production': force_production, + 'cache_only': cache_only, + 'path_prefix': path_prefix, + 'rebuild_pdts': rebuild_pdts, + 'server_table_calcs': server_table_calcs + }); + } + + /// ### Copy an existing look + /// + /// Creates a copy of an existing look, in a specified folder, and returns the copied look. + /// + /// `look_id` and `folder_id` are required. + /// + /// `look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. + /// + /// POST /looks/{look_id}/copy -> LookWithQuery + Future> copy_look( + + /// @param {String} look_id Look id to copy. + String look_id, + { + + /// @param {String} folder_id Folder id to copy to. + String folder_id}) async { + var path_look_id = encodeParam(look_id); + + LookWithQuery responseHandler(dynamic json, String contentType) { + return LookWithQuery.fromResponse(json, contentType); + } + + return post( + responseHandler, '/looks/$path_look_id/copy', {'folder_id': folder_id}); + } + + /// ### Move an existing look + /// + /// Moves a look to a specified folder, and returns the moved look. + /// + /// `look_id` and `folder_id` are required. + /// `look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. + /// + /// PATCH /looks/{look_id}/move -> LookWithQuery + Future> move_look( + + /// @param {String} look_id Look id to move. + String look_id, + + /// @param {String} folder_id Folder id to move to. + String folder_id) async { + var path_look_id = encodeParam(look_id); + + LookWithQuery responseHandler(dynamic json, String contentType) { + return LookWithQuery.fromResponse(json, contentType); + } + + return patch( + responseHandler, '/looks/$path_look_id/move', {'folder_id': folder_id}); + } + + // #endregion Look: Run and Manage Looks + + // #region LookmlModel: Manage LookML Models + + /// ### Get information about all lookml models. + /// + /// GET /lookml_models -> List + Future>> all_lookml_models( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} limit Number of results to return. (can be used with offset) + int limit, + + /// @param {int} offset Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) + int offset}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => LookmlModel.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/lookml_models', + {'fields': fields, 'limit': limit, 'offset': offset}); + } + + /// ### Create a lookml model using the specified configuration. + /// + /// POST /lookml_models -> LookmlModel + Future> create_lookml_model( + + /// @param {WriteLookmlModel} body + WriteLookmlModel body) async { + LookmlModel responseHandler(dynamic json, String contentType) { + return LookmlModel.fromResponse(json, contentType); + } + + return post(responseHandler, '/lookml_models', null, + body == null ? null : body.toJson()); + } + + /// ### Get information about a lookml model. + /// + /// GET /lookml_models/{lookml_model_name} -> LookmlModel + Future> lookml_model( + + /// @param {String} lookml_model_name Name of lookml model. + String lookml_model_name, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_lookml_model_name = encodeParam(lookml_model_name); + + LookmlModel responseHandler(dynamic json, String contentType) { + return LookmlModel.fromResponse(json, contentType); + } + + return get(responseHandler, '/lookml_models/$path_lookml_model_name', + {'fields': fields}); + } + + /// ### Update a lookml model using the specified configuration. + /// + /// PATCH /lookml_models/{lookml_model_name} -> LookmlModel + Future> update_lookml_model( + + /// @param {String} lookml_model_name Name of lookml model. + String lookml_model_name, + + /// @param {WriteLookmlModel} body + WriteLookmlModel body) async { + var path_lookml_model_name = encodeParam(lookml_model_name); + + LookmlModel responseHandler(dynamic json, String contentType) { + return LookmlModel.fromResponse(json, contentType); + } + + return patch(responseHandler, '/lookml_models/$path_lookml_model_name', + null, body == null ? null : body.toJson()); + } + + /// ### Delete a lookml model. + /// + /// DELETE /lookml_models/{lookml_model_name} -> String + Future> delete_lookml_model( + + /// @param {String} lookml_model_name Name of lookml model. + String lookml_model_name) async { + var path_lookml_model_name = encodeParam(lookml_model_name); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/lookml_models/$path_lookml_model_name'); + } + + /// ### Get information about a lookml model explore. + /// + /// GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> LookmlModelExplore + Future> lookml_model_explore( + + /// @param {String} lookml_model_name Name of lookml model. + String lookml_model_name, + + /// @param {String} explore_name Name of explore. + String explore_name, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_lookml_model_name = encodeParam(lookml_model_name); + var path_explore_name = encodeParam(explore_name); + + LookmlModelExplore responseHandler(dynamic json, String contentType) { + return LookmlModelExplore.fromResponse(json, contentType); + } + + return get( + responseHandler, + '/lookml_models/$path_lookml_model_name/explores/$path_explore_name', + {'fields': fields}); + } + + // #endregion LookmlModel: Manage LookML Models + + // #region Metadata: Connection Metadata Features + + /// ### Field name suggestions for a model and view + /// + /// `filters` is a string hash of values, with the key as the field name and the string value as the filter expression: + /// + /// ```ruby + /// {'users.age': '>=60'} + /// ``` + /// + /// or + /// + /// ```ruby + /// {'users.age': '<30'} + /// ``` + /// + /// or + /// + /// ```ruby + /// {'users.age': '=50'} + /// ``` + /// + /// GET /models/{model_name}/views/{view_name}/fields/{field_name}/suggestions -> ModelFieldSuggestions + Future> model_fieldname_suggestions( + + /// @param {String} model_name Name of model + String model_name, + + /// @param {String} view_name Name of view + String view_name, + + /// @param {String} field_name Name of field to use for suggestions + String field_name, + { + + /// @param {String} term Search term pattern (evaluated as as `%term%`) + String term, + + /// @param {Map} filters Suggestion filters with field name keys and comparison expressions + Map filters}) async { + var path_model_name = encodeParam(model_name); + var path_view_name = encodeParam(view_name); + var path_field_name = encodeParam(field_name); + + ModelFieldSuggestions responseHandler(dynamic json, String contentType) { + return ModelFieldSuggestions.fromResponse(json, contentType); + } + + return get( + responseHandler, + '/models/$path_model_name/views/$path_view_name/fields/$path_field_name/suggestions', + {'term': term, 'filters': filters}); + } + + /// ### Get a single model + /// + /// GET /models/{model_name} -> Model + Future> get_model( + + /// @param {String} model_name Name of model + String model_name) async { + var path_model_name = encodeParam(model_name); + + Model responseHandler(dynamic json, String contentType) { + return Model.fromResponse(json, contentType); + } + + return get(responseHandler, '/models/$path_model_name'); + } + + /// ### List databases available to this connection + /// + /// Certain dialects can support multiple databases per single connection. + /// If this connection supports multiple databases, the database names will be returned in an array. + /// + /// Connections using dialects that do not support multiple databases will return an empty array. + /// + /// **Note**: [Connection Features](#!/Metadata/connection_features) can be used to determine if a connection supports + /// multiple databases. + /// + /// GET /connections/{connection_name}/databases -> List + Future>> connection_databases( + + /// @param {String} connection_name Name of connection + String connection_name) async { + var path_connection_name = encodeParam(connection_name); + + List responseHandler(dynamic json, String contentType) { + return json; + } + + return get(responseHandler, '/connections/$path_connection_name/databases'); + } + + /// ### Retrieve metadata features for this connection + /// + /// Returns a list of feature names with `true` (available) or `false` (not available) + /// + /// GET /connections/{connection_name}/features -> ConnectionFeatures + Future> connection_features( + + /// @param {String} connection_name Name of connection + String connection_name, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_connection_name = encodeParam(connection_name); + + ConnectionFeatures responseHandler(dynamic json, String contentType) { + return ConnectionFeatures.fromResponse(json, contentType); + } + + return get(responseHandler, '/connections/$path_connection_name/features', + {'fields': fields}); + } + + /// ### Get the list of schemas and tables for a connection + /// + /// GET /connections/{connection_name}/schemas -> List + Future>> connection_schemas( + + /// @param {String} connection_name Name of connection + String connection_name, + { + + /// @param {String} database For dialects that support multiple databases, optionally identify which to use + String database, + + /// @param {bool} cache True to use fetch from cache, false to load fresh + bool cache, + + /// @param {String} fields Requested fields. + String fields}) async { + var path_connection_name = encodeParam(connection_name); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Schema.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/connections/$path_connection_name/schemas', + {'database': database, 'cache': cache, 'fields': fields}); + } + + /// ### Get the list of tables for a schema + /// + /// For dialects that support multiple databases, optionally identify which to use. If not provided, the default + /// database for the connection will be used. + /// + /// For dialects that do **not** support multiple databases, **do not use** the database parameter + /// + /// GET /connections/{connection_name}/tables -> List + Future>> connection_tables( + + /// @param {String} connection_name Name of connection + String connection_name, + { + + /// @param {String} database Optional. Name of database to use for the query, only if applicable + String database, + + /// @param {String} schema_name Optional. Return only tables for this schema + String schema_name, + + /// @param {bool} cache True to fetch from cache, false to load fresh + bool cache, + + /// @param {String} fields Requested fields. + String fields, + + /// @param {String} table_filter Optional. Return tables with names that contain this value + String table_filter, + + /// @param {int} table_limit Optional. Return tables up to the table_limit + int table_limit}) async { + var path_connection_name = encodeParam(connection_name); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => SchemaTables.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/connections/$path_connection_name/tables', { + 'database': database, + 'schema_name': schema_name, + 'cache': cache, + 'fields': fields, + 'table_filter': table_filter, + 'table_limit': table_limit + }); + } + + /// ### Get the columns (and therefore also the tables) in a specific schema + /// + /// GET /connections/{connection_name}/columns -> List + Future>> connection_columns( + + /// @param {String} connection_name Name of connection + String connection_name, + { + + /// @param {String} database For dialects that support multiple databases, optionally identify which to use + String database, + + /// @param {String} schema_name Name of schema to use. + String schema_name, + + /// @param {bool} cache True to fetch from cache, false to load fresh + bool cache, + + /// @param {int} table_limit limits the tables per schema returned + int table_limit, + + /// @param {String} table_names only fetch columns for a given (comma-separated) list of tables + String table_names, + + /// @param {String} fields Requested fields. + String fields}) async { + var path_connection_name = encodeParam(connection_name); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => SchemaColumns.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/connections/$path_connection_name/columns', { + 'database': database, + 'schema_name': schema_name, + 'cache': cache, + 'table_limit': table_limit, + 'table_names': table_names, + 'fields': fields + }); + } + + /// ### Search a connection for columns matching the specified name + /// + /// **Note**: `column_name` must be a valid column name. It is not a search pattern. + /// + /// GET /connections/{connection_name}/search_columns -> List + Future>> connection_search_columns( + + /// @param {String} connection_name Name of connection + String connection_name, + { + + /// @param {String} column_name Column name to find + String column_name, + + /// @param {String} fields Requested fields. + String fields}) async { + var path_connection_name = encodeParam(connection_name); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ColumnSearch.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, + '/connections/$path_connection_name/search_columns', + {'column_name': column_name, 'fields': fields}); + } + + /// ### Connection cost estimating + /// + /// Assign a `sql` statement to the body of the request. e.g., for Ruby, `{sql: 'select * from users'}` + /// + /// **Note**: If the connection's dialect has no support for cost estimates, an error will be returned + /// + /// POST /connections/{connection_name}/cost_estimate -> CostEstimate + Future> connection_cost_estimate( + + /// @param {String} connection_name Name of connection + String connection_name, + + /// @param {CreateCostEstimate} body + CreateCostEstimate body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_connection_name = encodeParam(connection_name); + + CostEstimate responseHandler(dynamic json, String contentType) { + return CostEstimate.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/connections/$path_connection_name/cost_estimate', + {'fields': fields}, + body == null ? null : body.toJson()); + } + + // #endregion Metadata: Connection Metadata Features + + // #region Project: Manage Projects + + /// ### Generate Lockfile for All LookML Dependencies + /// + /// Git must have been configured, must be in dev mode and deploy permission required + /// + /// Install_all is a two step process + /// 1. For each remote_dependency in a project the dependency manager will resolve any ambiguous ref. + /// 2. The project will then write out a lockfile including each remote_dependency with its resolved ref. + /// + /// POST /projects/{project_id}/manifest/lock_all -> String + Future> lock_all( + + /// @param {String} project_id Id of project + String project_id, + { + + /// @param {String} fields Requested fields + String fields}) async { + var path_project_id = encodeParam(project_id); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return post(responseHandler, '/projects/$path_project_id/manifest/lock_all', + {'fields': fields}); + } + + /// ### Get All Git Branches + /// + /// Returns a list of git branches in the project repository + /// + /// GET /projects/{project_id}/git_branches -> List + Future>> all_git_branches( + + /// @param {String} project_id Project Id + String project_id) async { + var path_project_id = encodeParam(project_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => GitBranch.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/projects/$path_project_id/git_branches'); + } + + /// ### Get the Current Git Branch + /// + /// Returns the git branch currently checked out in the given project repository + /// + /// GET /projects/{project_id}/git_branch -> GitBranch + Future> git_branch( + + /// @param {String} project_id Project Id + String project_id) async { + var path_project_id = encodeParam(project_id); + + GitBranch responseHandler(dynamic json, String contentType) { + return GitBranch.fromResponse(json, contentType); + } + + return get(responseHandler, '/projects/$path_project_id/git_branch'); + } + + /// ### Checkout and/or reset --hard an existing Git Branch + /// + /// Only allowed in development mode + /// - Call `update_session` to select the 'dev' workspace. + /// + /// Checkout an existing branch if name field is different from the name of the currently checked out branch. + /// + /// Optionally specify a branch name, tag name or commit SHA to which the branch should be reset. + /// **DANGER** hard reset will be force pushed to the remote. Unsaved changes and commits may be permanently lost. + /// + /// PUT /projects/{project_id}/git_branch -> GitBranch + Future> update_git_branch( + + /// @param {String} project_id Project Id + String project_id, + + /// @param {WriteGitBranch} body + WriteGitBranch body) async { + var path_project_id = encodeParam(project_id); + + GitBranch responseHandler(dynamic json, String contentType) { + return GitBranch.fromResponse(json, contentType); + } + + return put(responseHandler, '/projects/$path_project_id/git_branch', null, + body == null ? null : body.toJson()); + } + + /// ### Create and Checkout a Git Branch + /// + /// Creates and checks out a new branch in the given project repository + /// Only allowed in development mode + /// - Call `update_session` to select the 'dev' workspace. + /// + /// Optionally specify a branch name, tag name or commit SHA as the start point in the ref field. + /// If no ref is specified, HEAD of the current branch will be used as the start point for the new branch. + /// + /// POST /projects/{project_id}/git_branch -> GitBranch + Future> create_git_branch( + + /// @param {String} project_id Project Id + String project_id, + + /// @param {WriteGitBranch} body + WriteGitBranch body) async { + var path_project_id = encodeParam(project_id); + + GitBranch responseHandler(dynamic json, String contentType) { + return GitBranch.fromResponse(json, contentType); + } + + return post(responseHandler, '/projects/$path_project_id/git_branch', null, + body == null ? null : body.toJson()); + } + + /// ### Get the specified Git Branch + /// + /// Returns the git branch specified in branch_name path param if it exists in the given project repository + /// + /// GET /projects/{project_id}/git_branch/{branch_name} -> GitBranch + Future> find_git_branch( + + /// @param {String} project_id Project Id + String project_id, + + /// @param {String} branch_name Branch Name + String branch_name) async { + var path_project_id = encodeParam(project_id); + var path_branch_name = encodeParam(branch_name); + + GitBranch responseHandler(dynamic json, String contentType) { + return GitBranch.fromResponse(json, contentType); + } + + return get(responseHandler, + '/projects/$path_project_id/git_branch/$path_branch_name'); + } + + /// ### Delete the specified Git Branch + /// + /// Delete git branch specified in branch_name path param from local and remote of specified project repository + /// + /// DELETE /projects/{project_id}/git_branch/{branch_name} -> String + Future> delete_git_branch( + + /// @param {String} project_id Project Id + String project_id, + + /// @param {String} branch_name Branch Name + String branch_name) async { + var path_project_id = encodeParam(project_id); + var path_branch_name = encodeParam(branch_name); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, + '/projects/$path_project_id/git_branch/$path_branch_name'); + } + + /// ### Deploy a Remote Branch or Ref to Production + /// + /// Git must have been configured and deploy permission required. + /// + /// Deploy is a one/two step process + /// 1. If this is the first deploy of this project, create the production project with git repository. + /// 2. Pull the branch or ref into the production project. + /// + /// Can only specify either a branch or a ref. + /// + /// POST /projects/{project_id}/deploy_ref_to_production -> String + Future> deploy_ref_to_production( + + /// @param {String} project_id Id of project + String project_id, + { + + /// @param {String} branch Branch to deploy to production + String branch, + + /// @param {String} ref Ref to deploy to production + String ref}) async { + var path_project_id = encodeParam(project_id); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return post( + responseHandler, + '/projects/$path_project_id/deploy_ref_to_production', + {'branch': branch, 'ref': ref}); + } + + /// ### Deploy LookML from this Development Mode Project to Production + /// + /// Git must have been configured, must be in dev mode and deploy permission required + /// + /// Deploy is a two / three step process: + /// + /// 1. Push commits in current branch of dev mode project to the production branch (origin/master). + /// Note a. This step is skipped in read-only projects. + /// Note b. If this step is unsuccessful for any reason (e.g. rejected non-fastforward because production branch has + /// commits not in current branch), subsequent steps will be skipped. + /// 2. If this is the first deploy of this project, create the production project with git repository. + /// 3. Pull the production branch into the production project. + /// + /// POST /projects/{project_id}/deploy_to_production -> String + Future> deploy_to_production( + + /// @param {String} project_id Id of project + String project_id) async { + var path_project_id = encodeParam(project_id); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return post( + responseHandler, '/projects/$path_project_id/deploy_to_production'); + } + + /// ### Reset a project to the revision of the project that is in production. + /// + /// **DANGER** this will delete any changes that have not been pushed to a remote repository. + /// + /// POST /projects/{project_id}/reset_to_production -> String + Future> reset_project_to_production( + + /// @param {String} project_id Id of project + String project_id) async { + var path_project_id = encodeParam(project_id); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return post( + responseHandler, '/projects/$path_project_id/reset_to_production'); + } + + /// ### Reset a project development branch to the revision of the project that is on the remote. + /// + /// **DANGER** this will delete any changes that have not been pushed to a remote repository. + /// + /// POST /projects/{project_id}/reset_to_remote -> String + Future> reset_project_to_remote( + + /// @param {String} project_id Id of project + String project_id) async { + var path_project_id = encodeParam(project_id); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return post(responseHandler, '/projects/$path_project_id/reset_to_remote'); + } + + /// ### Get All Projects + /// + /// Returns all projects visible to the current user + /// + /// GET /projects -> List + Future>> all_projects( + { + + /// @param {String} fields Requested fields + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Project.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/projects', {'fields': fields}); + } + + /// ### Create A Project + /// + /// dev mode required. + /// - Call `update_session` to select the 'dev' workspace. + /// + /// `name` is required. + /// `git_remote_url` is not allowed. To configure Git for the newly created project, follow the instructions in `update_project`. + /// + /// POST /projects -> Project + Future> create_project( + + /// @param {WriteProject} body + WriteProject body) async { + Project responseHandler(dynamic json, String contentType) { + return Project.fromResponse(json, contentType); + } + + return post(responseHandler, '/projects', null, + body == null ? null : body.toJson()); + } + + /// ### Get A Project + /// + /// Returns the project with the given project id + /// + /// GET /projects/{project_id} -> Project + Future> project( + + /// @param {String} project_id Project Id + String project_id, + { + + /// @param {String} fields Requested fields + String fields}) async { + var path_project_id = encodeParam(project_id); + + Project responseHandler(dynamic json, String contentType) { + return Project.fromResponse(json, contentType); + } + + return get( + responseHandler, '/projects/$path_project_id', {'fields': fields}); + } + + /// ### Update Project Configuration + /// + /// Apply changes to a project's configuration. + /// + /// + /// #### Configuring Git for a Project + /// + /// To set up a Looker project with a remote git repository, follow these steps: + /// + /// 1. Call `update_session` to select the 'dev' workspace. + /// 1. Call `create_git_deploy_key` to create a new deploy key for the project + /// 1. Copy the deploy key text into the remote git repository's ssh key configuration + /// 1. Call `update_project` to set project's `git_remote_url` ()and `git_service_name`, if necessary). + /// + /// When you modify a project's `git_remote_url`, Looker connects to the remote repository to fetch + /// metadata. The remote git repository MUST be configured with the Looker-generated deploy + /// key for this project prior to setting the project's `git_remote_url`. + /// + /// To set up a Looker project with a git repository residing on the Looker server (a 'bare' git repo): + /// + /// 1. Call `update_session` to select the 'dev' workspace. + /// 1. Call `update_project` setting `git_remote_url` to null and `git_service_name` to "bare". + /// + /// PATCH /projects/{project_id} -> Project + Future> update_project( + + /// @param {String} project_id Project Id + String project_id, + + /// @param {WriteProject} body + WriteProject body, + { + + /// @param {String} fields Requested fields + String fields}) async { + var path_project_id = encodeParam(project_id); + + Project responseHandler(dynamic json, String contentType) { + return Project.fromResponse(json, contentType); + } + + return patch(responseHandler, '/projects/$path_project_id', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// ### Get A Projects Manifest object + /// + /// Returns the project with the given project id + /// + /// GET /projects/{project_id}/manifest -> Manifest + Future> manifest( + + /// @param {String} project_id Project Id + String project_id) async { + var path_project_id = encodeParam(project_id); + + Manifest responseHandler(dynamic json, String contentType) { + return Manifest.fromResponse(json, contentType); + } + + return get(responseHandler, '/projects/$path_project_id/manifest'); + } + + /// ### Git Deploy Key + /// + /// Returns the ssh public key previously created for a project's git repository. + /// + /// GET /projects/{project_id}/git/deploy_key -> String + Future> git_deploy_key( + + /// @param {String} project_id Project Id + String project_id) async { + var path_project_id = encodeParam(project_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return get(responseHandler, '/projects/$path_project_id/git/deploy_key'); + } + + /// ### Create Git Deploy Key + /// + /// Create a public/private key pair for authenticating ssh git requests from Looker to a remote git repository + /// for a particular Looker project. + /// + /// Returns the public key of the generated ssh key pair. + /// + /// Copy this public key to your remote git repository's ssh keys configuration so that the remote git service can + /// validate and accept git requests from the Looker server. + /// + /// POST /projects/{project_id}/git/deploy_key -> String + Future> create_git_deploy_key( + + /// @param {String} project_id Project Id + String project_id) async { + var path_project_id = encodeParam(project_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return post(responseHandler, '/projects/$path_project_id/git/deploy_key'); + } + + /// ### Get Cached Project Validation Results + /// + /// Returns the cached results of a previous project validation calculation, if any. + /// Returns http status 204 No Content if no validation results exist. + /// + /// Validating the content of all the files in a project can be computationally intensive + /// for large projects. Use this API to simply fetch the results of the most recent + /// project validation rather than revalidating the entire project from scratch. + /// + /// A value of `"stale": true` in the response indicates that the project has changed since + /// the cached validation results were computed. The cached validation results may no longer + /// reflect the current state of the project. + /// + /// GET /projects/{project_id}/validate -> ProjectValidationCache + Future> project_validation_results( + + /// @param {String} project_id Project Id + String project_id, + { + + /// @param {String} fields Requested fields + String fields}) async { + var path_project_id = encodeParam(project_id); + + ProjectValidationCache responseHandler(dynamic json, String contentType) { + return ProjectValidationCache.fromResponse(json, contentType); + } + + return get(responseHandler, '/projects/$path_project_id/validate', + {'fields': fields}); + } + + /// ### Validate Project + /// + /// Performs lint validation of all lookml files in the project. + /// Returns a list of errors found, if any. + /// + /// Validating the content of all the files in a project can be computationally intensive + /// for large projects. For best performance, call `validate_project(project_id)` only + /// when you really want to recompute project validation. To quickly display the results of + /// the most recent project validation (without recomputing), use `project_validation_results(project_id)` + /// + /// POST /projects/{project_id}/validate -> ProjectValidation + Future> validate_project( + + /// @param {String} project_id Project Id + String project_id, + { + + /// @param {String} fields Requested fields + String fields}) async { + var path_project_id = encodeParam(project_id); + + ProjectValidation responseHandler(dynamic json, String contentType) { + return ProjectValidation.fromResponse(json, contentType); + } + + return post(responseHandler, '/projects/$path_project_id/validate', + {'fields': fields}); + } + + /// ### Get Project Workspace + /// + /// Returns information about the state of the project files in the currently selected workspace + /// + /// GET /projects/{project_id}/current_workspace -> ProjectWorkspace + Future> project_workspace( + + /// @param {String} project_id Project Id + String project_id, + { + + /// @param {String} fields Requested fields + String fields}) async { + var path_project_id = encodeParam(project_id); + + ProjectWorkspace responseHandler(dynamic json, String contentType) { + return ProjectWorkspace.fromResponse(json, contentType); + } + + return get(responseHandler, '/projects/$path_project_id/current_workspace', + {'fields': fields}); + } + + /// ### Get All Project Files + /// + /// Returns a list of the files in the project + /// + /// GET /projects/{project_id}/files -> List + Future>> all_project_files( + + /// @param {String} project_id Project Id + String project_id, + { + + /// @param {String} fields Requested fields + String fields}) async { + var path_project_id = encodeParam(project_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ProjectFile.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/projects/$path_project_id/files', + {'fields': fields}); + } + + /// ### Get Project File Info + /// + /// Returns information about a file in the project + /// + /// GET /projects/{project_id}/files/file -> ProjectFile + Future> project_file( + + /// @param {String} project_id Project Id + String project_id, + + /// @param {String} file_id File Id + String file_id, + { + + /// @param {String} fields Requested fields + String fields}) async { + var path_project_id = encodeParam(project_id); + + ProjectFile responseHandler(dynamic json, String contentType) { + return ProjectFile.fromResponse(json, contentType); + } + + return get(responseHandler, '/projects/$path_project_id/files/file', + {'file_id': file_id, 'fields': fields}); + } + + /// ### Get All Git Connection Tests + /// + /// dev mode required. + /// - Call `update_session` to select the 'dev' workspace. + /// + /// Returns a list of tests which can be run against a project's (or the dependency project for the provided remote_url) git connection. Call [Run Git Connection Test](#!/Project/run_git_connection_test) to execute each test in sequence. + /// + /// Tests are ordered by increasing specificity. Tests should be run in the order returned because later tests require functionality tested by tests earlier in the test list. + /// + /// For example, a late-stage test for write access is meaningless if connecting to the git server (an early test) is failing. + /// + /// GET /projects/{project_id}/git_connection_tests -> List + Future>> all_git_connection_tests( + + /// @param {String} project_id Project Id + String project_id, + { + + /// @param {String} remote_url (Optional: leave blank for root project) The remote url for remote dependency to test. + String remote_url}) async { + var path_project_id = encodeParam(project_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => GitConnectionTest.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, + '/projects/$path_project_id/git_connection_tests', + {'remote_url': remote_url}); + } + + /// ### Run a git connection test + /// + /// Run the named test on the git service used by this project (or the dependency project for the provided remote_url) and return the result. This + /// is intended to help debug git connections when things do not work properly, to give + /// more helpful information about why a git url is not working with Looker. + /// + /// Tests should be run in the order they are returned by [Get All Git Connection Tests](#!/Project/all_git_connection_tests). + /// + /// GET /projects/{project_id}/git_connection_tests/{test_id} -> GitConnectionTestResult + Future> run_git_connection_test( + + /// @param {String} project_id Project Id + String project_id, + + /// @param {String} test_id Test Id + String test_id, + { + + /// @param {String} remote_url (Optional: leave blank for root project) The remote url for remote dependency to test. + String remote_url, + + /// @param {String} use_production (Optional: leave blank for dev credentials) Whether to use git production credentials. + String use_production}) async { + var path_project_id = encodeParam(project_id); + var path_test_id = encodeParam(test_id); + + GitConnectionTestResult responseHandler(dynamic json, String contentType) { + return GitConnectionTestResult.fromResponse(json, contentType); + } + + return get( + responseHandler, + '/projects/$path_project_id/git_connection_tests/$path_test_id', + {'remote_url': remote_url, 'use_production': use_production}); + } + + /// ### Get All LookML Tests + /// + /// Returns a list of tests which can be run to validate a project's LookML code and/or the underlying data, + /// optionally filtered by the file id. + /// Call [Run LookML Test](#!/Project/run_lookml_test) to execute tests. + /// + /// GET /projects/{project_id}/lookml_tests -> List + Future>> all_lookml_tests( + + /// @param {String} project_id Project Id + String project_id, + { + + /// @param {String} file_id File Id + String file_id}) async { + var path_project_id = encodeParam(project_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => LookmlTest.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/projects/$path_project_id/lookml_tests', + {'file_id': file_id}); + } + + /// ### Run LookML Tests + /// + /// Runs all tests in the project, optionally filtered by file, test, and/or model. + /// + /// GET /projects/{project_id}/lookml_tests/run -> List + Future>> run_lookml_test( + + /// @param {String} project_id Project Id + String project_id, + { + + /// @param {String} file_id File Name + String file_id, + + /// @param {String} test Test Name + String test, + + /// @param {String} model Model Name + String model}) async { + var path_project_id = encodeParam(project_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => LookmlTestResult.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/projects/$path_project_id/lookml_tests/run', + {'file_id': file_id, 'test': test, 'model': model}); + } + + /// ### Creates a tag for the most recent commit, or a specific ref is a SHA is provided + /// + /// This is an internal-only, undocumented route. + /// + /// POST /projects/{project_id}/tag -> Project + Future> tag_ref( + + /// @param {String} project_id Project Id + String project_id, + + /// @param {WriteProject} body + WriteProject body, + { + + /// @param {String} commit_sha (Optional): Commit Sha to Tag + String commit_sha, + + /// @param {String} tag_name Tag Name + String tag_name, + + /// @param {String} tag_message (Optional): Tag Message + String tag_message}) async { + var path_project_id = encodeParam(project_id); + + Project responseHandler(dynamic json, String contentType) { + return Project.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/projects/$path_project_id/tag', + { + 'commit_sha': commit_sha, + 'tag_name': tag_name, + 'tag_message': tag_message + }, + body == null ? null : body.toJson()); + } + + /// ### Configure Repository Credential for a remote dependency + /// + /// Admin required. + /// + /// `root_project_id` is required. + /// `credential_id` is required. + /// + /// PUT /projects/{root_project_id}/credential/{credential_id} -> RepositoryCredential + Future> update_repository_credential( + + /// @param {String} root_project_id Root Project Id + String root_project_id, + + /// @param {String} credential_id Credential Id + String credential_id, + + /// @param {WriteRepositoryCredential} body + WriteRepositoryCredential body) async { + var path_root_project_id = encodeParam(root_project_id); + var path_credential_id = encodeParam(credential_id); + + RepositoryCredential responseHandler(dynamic json, String contentType) { + return RepositoryCredential.fromResponse(json, contentType); + } + + return put( + responseHandler, + '/projects/$path_root_project_id/credential/$path_credential_id', + null, + body == null ? null : body.toJson()); + } + + /// ### Repository Credential for a remote dependency + /// + /// Admin required. + /// + /// `root_project_id` is required. + /// `credential_id` is required. + /// + /// DELETE /projects/{root_project_id}/credential/{credential_id} -> String + Future> delete_repository_credential( + + /// @param {String} root_project_id Root Project Id + String root_project_id, + + /// @param {String} credential_id Credential Id + String credential_id) async { + var path_root_project_id = encodeParam(root_project_id); + var path_credential_id = encodeParam(credential_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, + '/projects/$path_root_project_id/credential/$path_credential_id'); + } + + /// ### Get all Repository Credentials for a project + /// + /// `root_project_id` is required. + /// + /// GET /projects/{root_project_id}/credentials -> List + Future>> + get_all_repository_credentials( + + /// @param {String} root_project_id Root Project Id + String root_project_id) async { + var path_root_project_id = encodeParam(root_project_id); + + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => RepositoryCredential.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/projects/$path_root_project_id/credentials'); + } + + // #endregion Project: Manage Projects + + // #region Query: Run and Manage Queries + + /// ### Create an async query task + /// + /// Creates a query task (job) to run a previously created query asynchronously. Returns a Query Task ID. + /// + /// Use [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task. + /// After the query task status reaches "Complete", use [query_task_results(query_task_id)](#!/Query/query_task_results) to fetch the results of the query. + /// + /// POST /query_tasks -> QueryTask + Future> create_query_task( + + /// @param {WriteCreateQueryTask} body + WriteCreateQueryTask body, + { + + /// @param {int} limit Row limit (may override the limit in the saved query). + int limit, + + /// @param {bool} apply_formatting Apply model-specified formatting to each result. + bool apply_formatting, + + /// @param {bool} apply_vis Apply visualization options to results. + bool apply_vis, + + /// @param {bool} cache Get results from cache if available. + bool cache, + + /// @param {int} image_width Render width for image formats. + int image_width, + + /// @param {int} image_height Render height for image formats. + int image_height, + + /// @param {bool} generate_drill_links Generate drill links (only applicable to 'json_detail' format. + bool generate_drill_links, + + /// @param {bool} force_production Force use of production models even if the user is in development mode. + bool force_production, + + /// @param {bool} cache_only Retrieve any results from cache even if the results have expired. + bool cache_only, + + /// @param {String} path_prefix Prefix to use for drill links (url encoded). + String path_prefix, + + /// @param {bool} rebuild_pdts Rebuild PDTS used in query. + bool rebuild_pdts, + + /// @param {bool} server_table_calcs Perform table calculations on query results + bool server_table_calcs, + + /// @param {String} fields Requested fields + String fields}) async { + QueryTask responseHandler(dynamic json, String contentType) { + return QueryTask.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/query_tasks', + { + 'limit': limit, + 'apply_formatting': apply_formatting, + 'apply_vis': apply_vis, + 'cache': cache, + 'image_width': image_width, + 'image_height': image_height, + 'generate_drill_links': generate_drill_links, + 'force_production': force_production, + 'cache_only': cache_only, + 'path_prefix': path_prefix, + 'rebuild_pdts': rebuild_pdts, + 'server_table_calcs': server_table_calcs, + 'fields': fields + }, + body == null ? null : body.toJson()); + } + + /// ### Fetch results of multiple async queries + /// + /// Returns the results of multiple async queries in one request. + /// + /// For Query Tasks that are not completed, the response will include the execution status of the Query Task but will not include query results. + /// Query Tasks whose results have expired will have a status of 'expired'. + /// If the user making the API request does not have sufficient privileges to view a Query Task result, the result will have a status of 'missing' + /// + /// GET /query_tasks/multi_results -> Map + Future>> query_task_multi_results( + + /// @param {DelimList} query_task_ids List of Query Task IDs + DelimList query_task_ids) async { + Map responseHandler(dynamic json, String contentType) { + return json; + } + + return get(responseHandler, '/query_tasks/multi_results', + {'query_task_ids': query_task_ids}); + } + + /// ### Get Query Task details + /// + /// Use this function to check the status of an async query task. After the status + /// reaches "Complete", you can call [query_task_results(query_task_id)](#!/Query/query_task_results) to + /// retrieve the results of the query. + /// + /// Use [create_query_task()](#!/Query/create_query_task) to create an async query task. + /// + /// GET /query_tasks/{query_task_id} -> QueryTask + Future> query_task( + + /// @param {String} query_task_id ID of the Query Task + String query_task_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_query_task_id = encodeParam(query_task_id); + + QueryTask responseHandler(dynamic json, String contentType) { + return QueryTask.fromResponse(json, contentType); + } + + return get(responseHandler, '/query_tasks/$path_query_task_id', + {'fields': fields}); + } + + /// ### Get Async Query Results + /// + /// Returns the results of an async query task if the query has completed. + /// + /// If the query task is still running or waiting to run, this function returns 204 No Content. + /// + /// If the query task ID is invalid or the cached results of the query task have expired, this function returns 404 Not Found. + /// + /// Use [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task + /// Call query_task_results only after the query task status reaches "Complete". + /// + /// You can also use [query_task_multi_results()](#!/Query/query_task_multi_results) retrieve the + /// results of multiple async query tasks at the same time. + /// + /// #### SQL Error Handling: + /// If the query fails due to a SQL db error, how this is communicated depends on the result_format you requested in `create_query_task()`. + /// + /// For `json_detail` result_format: `query_task_results()` will respond with HTTP status '200 OK' and db SQL error info + /// will be in the `errors` property of the response object. The 'data' property will be empty. + /// + /// For all other result formats: `query_task_results()` will respond with HTTP status `400 Bad Request` and some db SQL error info + /// will be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`. + /// These data formats can only carry row data, and error info is not row data. + /// + /// GET /query_tasks/{query_task_id}/results -> String + Future> query_task_results( + + /// @param {String} query_task_id ID of the Query Task + String query_task_id) async { + var path_query_task_id = encodeParam(query_task_id); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return get(responseHandler, '/query_tasks/$path_query_task_id/results'); + } + + /// ### Get a previously created query by id. + /// + /// A Looker query object includes the various parameters that define a database query that has been run or + /// could be run in the future. These parameters include: model, view, fields, filters, pivots, etc. + /// Query *results* are not part of the query object. + /// + /// Query objects are unique and immutable. Query objects are created automatically in Looker as users explore data. + /// Looker does not delete them; they become part of the query history. When asked to create a query for + /// any given set of parameters, Looker will first try to find an existing query object with matching + /// parameters and will only create a new object when an appropriate object can not be found. + /// + /// This 'get' method is used to get the details about a query for a given id. See the other methods here + /// to 'create' and 'run' queries. + /// + /// Note that some fields like 'filter_config' and 'vis_config' etc are specific to how the Looker UI + /// builds queries and visualizations and are not generally useful for API use. They are not required when + /// creating new queries and can usually just be ignored. + /// + /// GET /queries/{query_id} -> Query + Future> query( + + /// @param {int} query_id Id of query + int query_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_query_id = encodeParam(query_id); + + Query responseHandler(dynamic json, String contentType) { + return Query.fromResponse(json, contentType); + } + + return get(responseHandler, '/queries/$path_query_id', {'fields': fields}); + } + + /// ### Get the query for a given query slug. + /// + /// This returns the query for the 'slug' in a query share URL. + /// + /// The 'slug' is a randomly chosen short string that is used as an alternative to the query's id value + /// for use in URLs etc. This method exists as a convenience to help you use the API to 'find' queries that + /// have been created using the Looker UI. + /// + /// You can use the Looker explore page to build a query and then choose the 'Share' option to + /// show the share url for the query. Share urls generally look something like 'https://looker.yourcompany/x/vwGSbfc'. + /// The trailing 'vwGSbfc' is the share slug. You can pass that string to this api method to get details about the query. + /// Those details include the 'id' that you can use to run the query. Or, you can copy the query body + /// (perhaps with your own modification) and use that as the basis to make/run new queries. + /// + /// This will also work with slugs from Looker explore urls like + /// 'https://looker.yourcompany/explore/ecommerce/orders?qid=aogBgL6o3cKK1jN3RoZl5s'. In this case + /// 'aogBgL6o3cKK1jN3RoZl5s' is the slug. + /// + /// GET /queries/slug/{slug} -> Query + Future> query_for_slug( + + /// @param {String} slug Slug of query + String slug, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_slug = encodeParam(slug); + + Query responseHandler(dynamic json, String contentType) { + return Query.fromResponse(json, contentType); + } + + return get(responseHandler, '/queries/slug/$path_slug', {'fields': fields}); + } + + /// ### Create a query. + /// + /// This allows you to create a new query that you can later run. Looker queries are immutable once created + /// and are not deleted. If you create a query that is exactly like an existing query then the existing query + /// will be returned and no new query will be created. Whether a new query is created or not, you can use + /// the 'id' in the returned query with the 'run' method. + /// + /// The query parameters are passed as json in the body of the request. + /// + /// POST /queries -> Query + Future> create_query( + + /// @param {WriteQuery} body + WriteQuery body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + Query responseHandler(dynamic json, String contentType) { + return Query.fromResponse(json, contentType); + } + + return post(responseHandler, '/queries', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Run a saved query. + /// + /// This runs a previously saved query. You can use this on a query that was generated in the Looker UI + /// or one that you have explicitly created using the API. You can also use a query 'id' from a saved 'Look'. + /// + /// The 'result_format' parameter specifies the desired structure and format of the response. + /// + /// Supported formats: + /// + /// | result_format | Description + /// | :-----------: | :--- | + /// | json | Plain json + /// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query + /// | csv | Comma separated values with a header + /// | txt | Tab separated values with a header + /// | html | Simple html + /// | md | Simple markdown + /// | xlsx | MS Excel spreadsheet + /// | sql | Returns the generated SQL rather than running the query + /// | png | A PNG image of the visualization of the query + /// | jpg | A JPG image of the visualization of the query + /// + /// GET /queries/{query_id}/run/{result_format} -> String + /// + /// **Note**: Binary content may be returned by this method. + Future> run_query( + + /// @param {int} query_id Id of query + int query_id, + + /// @param {String} result_format Format of result + String result_format, + { + + /// @param {int} limit Row limit (may override the limit in the saved query). + int limit, + + /// @param {bool} apply_formatting Apply model-specified formatting to each result. + bool apply_formatting, + + /// @param {bool} apply_vis Apply visualization options to results. + bool apply_vis, + + /// @param {bool} cache Get results from cache if available. + bool cache, + + /// @param {int} image_width Render width for image formats. + int image_width, + + /// @param {int} image_height Render height for image formats. + int image_height, + + /// @param {bool} generate_drill_links Generate drill links (only applicable to 'json_detail' format. + bool generate_drill_links, + + /// @param {bool} force_production Force use of production models even if the user is in development mode. + bool force_production, + + /// @param {bool} cache_only Retrieve any results from cache even if the results have expired. + bool cache_only, + + /// @param {String} path_prefix Prefix to use for drill links (url encoded). + String path_prefix, + + /// @param {bool} rebuild_pdts Rebuild PDTS used in query. + bool rebuild_pdts, + + /// @param {bool} server_table_calcs Perform table calculations on query results + bool server_table_calcs, + + /// @param {String} source Specifies the source of this call. + String source}) async { + var path_query_id = encodeParam(query_id); + var path_result_format = encodeParam(result_format); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return get( + responseHandler, '/queries/$path_query_id/run/$path_result_format', { + 'limit': limit, + 'apply_formatting': apply_formatting, + 'apply_vis': apply_vis, + 'cache': cache, + 'image_width': image_width, + 'image_height': image_height, + 'generate_drill_links': generate_drill_links, + 'force_production': force_production, + 'cache_only': cache_only, + 'path_prefix': path_prefix, + 'rebuild_pdts': rebuild_pdts, + 'server_table_calcs': server_table_calcs, + 'source': source + }); + } + + /// ### Run the query that is specified inline in the posted body. + /// + /// This allows running a query as defined in json in the posted body. This combines + /// the two actions of posting & running a query into one step. + /// + /// Here is an example body in json: + /// ``` + /// { + /// "model":"thelook", + /// "view":"inventory_items", + /// "fields":["category.name","inventory_items.days_in_inventory_tier","products.count"], + /// "filters":{"category.name":"socks"}, + /// "sorts":["products.count desc 0"], + /// "limit":"500", + /// "query_timezone":"America/Los_Angeles" + /// } + /// ``` + /// + /// When using the Ruby SDK this would be passed as a Ruby hash like: + /// ``` + /// { + /// :model=>"thelook", + /// :view=>"inventory_items", + /// :fields=> + /// ["category.name", + /// "inventory_items.days_in_inventory_tier", + /// "products.count"], + /// :filters=>{:"category.name"=>"socks"}, + /// :sorts=>["products.count desc 0"], + /// :limit=>"500", + /// :query_timezone=>"America/Los_Angeles", + /// } + /// ``` + /// + /// This will return the result of running the query in the format specified by the 'result_format' parameter. + /// + /// Supported formats: + /// + /// | result_format | Description + /// | :-----------: | :--- | + /// | json | Plain json + /// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query + /// | csv | Comma separated values with a header + /// | txt | Tab separated values with a header + /// | html | Simple html + /// | md | Simple markdown + /// | xlsx | MS Excel spreadsheet + /// | sql | Returns the generated SQL rather than running the query + /// | png | A PNG image of the visualization of the query + /// | jpg | A JPG image of the visualization of the query + /// + /// POST /queries/run/{result_format} -> String + /// + /// **Note**: Binary content may be returned by this method. + Future> run_inline_query( + + /// @param {String} result_format Format of result + String result_format, + + /// @param {WriteQuery} body + WriteQuery body, + { + + /// @param {int} limit Row limit (may override the limit in the saved query). + int limit, + + /// @param {bool} apply_formatting Apply model-specified formatting to each result. + bool apply_formatting, + + /// @param {bool} apply_vis Apply visualization options to results. + bool apply_vis, + + /// @param {bool} cache Get results from cache if available. + bool cache, + + /// @param {int} image_width Render width for image formats. + int image_width, + + /// @param {int} image_height Render height for image formats. + int image_height, + + /// @param {bool} generate_drill_links Generate drill links (only applicable to 'json_detail' format. + bool generate_drill_links, + + /// @param {bool} force_production Force use of production models even if the user is in development mode. + bool force_production, + + /// @param {bool} cache_only Retrieve any results from cache even if the results have expired. + bool cache_only, + + /// @param {String} path_prefix Prefix to use for drill links (url encoded). + String path_prefix, + + /// @param {bool} rebuild_pdts Rebuild PDTS used in query. + bool rebuild_pdts, + + /// @param {bool} server_table_calcs Perform table calculations on query results + bool server_table_calcs}) async { + var path_result_format = encodeParam(result_format); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return post( + responseHandler, + '/queries/run/$path_result_format', + { + 'limit': limit, + 'apply_formatting': apply_formatting, + 'apply_vis': apply_vis, + 'cache': cache, + 'image_width': image_width, + 'image_height': image_height, + 'generate_drill_links': generate_drill_links, + 'force_production': force_production, + 'cache_only': cache_only, + 'path_prefix': path_prefix, + 'rebuild_pdts': rebuild_pdts, + 'server_table_calcs': server_table_calcs + }, + body == null ? null : body.toJson()); + } + + /// ### Run an URL encoded query. + /// + /// This requires the caller to encode the specifiers for the query into the URL query part using + /// Looker-specific syntax as explained below. + /// + /// Generally, you would want to use one of the methods that takes the parameters as json in the POST body + /// for creating and/or running queries. This method exists for cases where one really needs to encode the + /// parameters into the URL of a single 'GET' request. This matches the way that the Looker UI formats + /// 'explore' URLs etc. + /// + /// The parameters here are very similar to the json body formatting except that the filter syntax is + /// tricky. Unfortunately, this format makes this method not currently callable via the 'Try it out!' button + /// in this documentation page. But, this is callable when creating URLs manually or when using the Looker SDK. + /// + /// Here is an example inline query URL: + /// + /// ``` + /// https://looker.mycompany.com:19999/api/3.0/queries/models/thelook/views/inventory_items/run/json?fields=category.name,inventory_items.days_in_inventory_tier,products.count&f[category.name]=socks&sorts=products.count+desc+0&limit=500&query_timezone=America/Los_Angeles + /// ``` + /// + /// When invoking this endpoint with the Ruby SDK, pass the query parameter parts as a hash. The hash to match the above would look like: + /// + /// ```ruby + /// query_params = + /// { + /// :fields => "category.name,inventory_items.days_in_inventory_tier,products.count", + /// :"f[category.name]" => "socks", + /// :sorts => "products.count desc 0", + /// :limit => "500", + /// :query_timezone => "America/Los_Angeles" + /// } + /// response = ruby_sdk.run_url_encoded_query('thelook','inventory_items','json', query_params) + /// + /// ``` + /// + /// Again, it is generally easier to use the variant of this method that passes the full query in the POST body. + /// This method is available for cases where other alternatives won't fit the need. + /// + /// Supported formats: + /// + /// | result_format | Description + /// | :-----------: | :--- | + /// | json | Plain json + /// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query + /// | csv | Comma separated values with a header + /// | txt | Tab separated values with a header + /// | html | Simple html + /// | md | Simple markdown + /// | xlsx | MS Excel spreadsheet + /// | sql | Returns the generated SQL rather than running the query + /// | png | A PNG image of the visualization of the query + /// | jpg | A JPG image of the visualization of the query + /// + /// GET /queries/models/{model_name}/views/{view_name}/run/{result_format} -> String + /// + /// **Note**: Binary content may be returned by this method. + Future> run_url_encoded_query( + + /// @param {String} model_name Model name + String model_name, + + /// @param {String} view_name View name + String view_name, + + /// @param {String} result_format Format of result + String result_format) async { + var path_model_name = encodeParam(model_name); + var path_view_name = encodeParam(view_name); + var path_result_format = encodeParam(result_format); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return get(responseHandler, + '/queries/models/$path_model_name/views/$path_view_name/run/$path_result_format'); + } + + /// ### Get Merge Query + /// + /// Returns a merge query object given its id. + /// + /// GET /merge_queries/{merge_query_id} -> MergeQuery + Future> merge_query( + + /// @param {String} merge_query_id Merge Query Id + String merge_query_id, + { + + /// @param {String} fields Requested fields + String fields}) async { + var path_merge_query_id = encodeParam(merge_query_id); + + MergeQuery responseHandler(dynamic json, String contentType) { + return MergeQuery.fromResponse(json, contentType); + } + + return get(responseHandler, '/merge_queries/$path_merge_query_id', + {'fields': fields}); + } + + /// ### Create Merge Query + /// + /// Creates a new merge query object. + /// + /// A merge query takes the results of one or more queries and combines (merges) the results + /// according to field mapping definitions. The result is similar to a SQL left outer join. + /// + /// A merge query can merge results of queries from different SQL databases. + /// + /// The order that queries are defined in the source_queries array property is significant. The + /// first query in the array defines the primary key into which the results of subsequent + /// queries will be merged. + /// + /// Like model/view query objects, merge queries are immutable and have structural identity - if + /// you make a request to create a new merge query that is identical to an existing merge query, + /// the existing merge query will be returned instead of creating a duplicate. Conversely, any + /// change to the contents of a merge query will produce a new object with a new id. + /// + /// POST /merge_queries -> MergeQuery + Future> create_merge_query( + { + + /// @param {WriteMergeQuery} body + WriteMergeQuery body, + + /// @param {String} fields Requested fields + String fields}) async { + MergeQuery responseHandler(dynamic json, String contentType) { + return MergeQuery.fromResponse(json, contentType); + } + + return post(responseHandler, '/merge_queries', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// Get information about all running queries. + /// + /// GET /running_queries -> List + Future>> all_running_queries() async { + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => RunningQueries.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/running_queries'); + } + + /// Kill a query with a specific query_task_id. + /// + /// DELETE /running_queries/{query_task_id} -> String + Future> kill_query( + + /// @param {String} query_task_id Query task id. + String query_task_id) async { + var path_query_task_id = encodeParam(query_task_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/running_queries/$path_query_task_id'); + } + + /// Get a SQL Runner query. + /// + /// GET /sql_queries/{slug} -> SqlQuery + Future> sql_query( + + /// @param {String} slug slug of query + String slug) async { + var path_slug = encodeParam(slug); + + SqlQuery responseHandler(dynamic json, String contentType) { + return SqlQuery.fromResponse(json, contentType); + } + + return get(responseHandler, '/sql_queries/$path_slug'); + } + + /// ### Create a SQL Runner Query + /// + /// Either the `connection_name` or `model_name` parameter MUST be provided. + /// + /// POST /sql_queries -> SqlQuery + Future> create_sql_query( + + /// @param {SqlQueryCreate} body + SqlQueryCreate body) async { + SqlQuery responseHandler(dynamic json, String contentType) { + return SqlQuery.fromResponse(json, contentType); + } + + return post(responseHandler, '/sql_queries', null, + body == null ? null : body.toJson()); + } + + /// Execute a SQL Runner query in a given result_format. + /// + /// POST /sql_queries/{slug}/run/{result_format} -> String + /// + /// **Note**: Binary content may be returned by this method. + Future> run_sql_query( + + /// @param {String} slug slug of query + String slug, + + /// @param {String} result_format Format of result, options are: ["inline_json", "json", "json_detail", "json_fe", "csv", "html", "md", "txt", "xlsx", "gsxml", "json_label"] + String result_format, + { + + /// @param {String} download Defaults to false. If set to true, the HTTP response will have content-disposition and other headers set to make the HTTP response behave as a downloadable attachment instead of as inline content. + String download}) async { + var path_slug = encodeParam(slug); + var path_result_format = encodeParam(result_format); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return post( + responseHandler, + '/sql_queries/$path_slug/run/$path_result_format', + {'download': download}); + } + + // #endregion Query: Run and Manage Queries + + // #region RenderTask: Manage Render Tasks + + /// ### Create a new task to render a look to an image. + /// + /// Returns a render task object. + /// To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). + /// Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). + /// + /// POST /render_tasks/looks/{look_id}/{result_format} -> RenderTask + Future> create_look_render_task( + + /// @param {int} look_id Id of look to render + int look_id, + + /// @param {String} result_format Output type: png, or jpg + String result_format, + + /// @param {int} width Output width in pixels + int width, + + /// @param {int} height Output height in pixels + int height, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_look_id = encodeParam(look_id); + var path_result_format = encodeParam(result_format); + + RenderTask responseHandler(dynamic json, String contentType) { + return RenderTask.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/render_tasks/looks/$path_look_id/$path_result_format', + {'width': width, 'height': height, 'fields': fields}); + } + + /// ### Create a new task to render an existing query to an image. + /// + /// Returns a render task object. + /// To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). + /// Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). + /// + /// POST /render_tasks/queries/{query_id}/{result_format} -> RenderTask + Future> create_query_render_task( + + /// @param {int} query_id Id of the query to render + int query_id, + + /// @param {String} result_format Output type: png or jpg + String result_format, + + /// @param {int} width Output width in pixels + int width, + + /// @param {int} height Output height in pixels + int height, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_query_id = encodeParam(query_id); + var path_result_format = encodeParam(result_format); + + RenderTask responseHandler(dynamic json, String contentType) { + return RenderTask.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/render_tasks/queries/$path_query_id/$path_result_format', + {'width': width, 'height': height, 'fields': fields}); + } + + /// ### Create a new task to render a dashboard to a document or image. + /// + /// Returns a render task object. + /// To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). + /// Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). + /// + /// POST /render_tasks/dashboards/{dashboard_id}/{result_format} -> RenderTask + Future> create_dashboard_render_task( + + /// @param {String} dashboard_id Id of dashboard to render. The ID can be a LookML dashboard also. + String dashboard_id, + + /// @param {String} result_format Output type: pdf, png, or jpg + String result_format, + + /// @param {CreateDashboardRenderTask} body + CreateDashboardRenderTask body, + + /// @param {int} width Output width in pixels + int width, + + /// @param {int} height Output height in pixels + int height, + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {String} pdf_paper_size Paper size for pdf. Value can be one of: ["letter","legal","tabloid","a0","a1","a2","a3","a4","a5"] + String pdf_paper_size, + + /// @param {bool} pdf_landscape Whether to render pdf in landscape paper orientation + bool pdf_landscape, + + /// @param {bool} long_tables Whether or not to expand table vis to full length + bool long_tables}) async { + var path_dashboard_id = encodeParam(dashboard_id); + var path_result_format = encodeParam(result_format); + + RenderTask responseHandler(dynamic json, String contentType) { + return RenderTask.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/render_tasks/dashboards/$path_dashboard_id/$path_result_format', + { + 'width': width, + 'height': height, + 'fields': fields, + 'pdf_paper_size': pdf_paper_size, + 'pdf_landscape': pdf_landscape, + 'long_tables': long_tables + }, + body == null ? null : body.toJson()); + } + + /// ### Get information about a render task. + /// + /// Returns a render task object. + /// To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). + /// Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). + /// + /// GET /render_tasks/{render_task_id} -> RenderTask + Future> render_task( + + /// @param {String} render_task_id Id of render task + String render_task_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_render_task_id = encodeParam(render_task_id); + + RenderTask responseHandler(dynamic json, String contentType) { + return RenderTask.fromResponse(json, contentType); + } + + return get(responseHandler, '/render_tasks/$path_render_task_id', + {'fields': fields}); + } + + /// ### Get the document or image produced by a completed render task. + /// + /// Note that the PDF or image result will be a binary blob in the HTTP response, as indicated by the + /// Content-Type in the response headers. This may require specialized (or at least different) handling than text + /// responses such as JSON. You may need to tell your HTTP client that the response is binary so that it does not + /// attempt to parse the binary data as text. + /// + /// If the render task exists but has not finished rendering the results, the response HTTP status will be + /// **202 Accepted**, the response body will be empty, and the response will have a Retry-After header indicating + /// that the caller should repeat the request at a later time. + /// + /// Returns 404 if the render task cannot be found, if the cached result has expired, or if the caller + /// does not have permission to view the results. + /// + /// For detailed information about the status of the render task, use [Render Task](#!/RenderTask/render_task). + /// Polling loops waiting for completion of a render task would be better served by polling **render_task(id)** until + /// the task status reaches completion (or error) instead of polling **render_task_results(id)** alone. + /// + /// GET /render_tasks/{render_task_id}/results -> String + /// + /// **Note**: Binary content is returned by this method. + /// + Future> render_task_results( + + /// @param {String} render_task_id Id of render task + String render_task_id) async { + var path_render_task_id = encodeParam(render_task_id); + + dynamic responseHandler(dynamic json, String contentType) { + return json; + } + + return get(responseHandler, '/render_tasks/$path_render_task_id/results'); + } + + /// ### Create a new task to render a dashboard element to an image. + /// + /// Returns a render task object. + /// To check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task). + /// Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). + /// + /// POST /render_tasks/dashboard_elements/{dashboard_element_id}/{result_format} -> RenderTask + Future> create_dashboard_element_render_task( + + /// @param {String} dashboard_element_id Id of dashboard element to render: UDD dashboard element would be numeric and LookML dashboard element would be model_name::dashboard_title::lookml_link_id + String dashboard_element_id, + + /// @param {String} result_format Output type: png or jpg + String result_format, + + /// @param {int} width Output width in pixels + int width, + + /// @param {int} height Output height in pixels + int height, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_element_id = encodeParam(dashboard_element_id); + var path_result_format = encodeParam(result_format); + + RenderTask responseHandler(dynamic json, String contentType) { + return RenderTask.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/render_tasks/dashboard_elements/$path_dashboard_element_id/$path_result_format', + {'width': width, 'height': height, 'fields': fields}); + } + + // #endregion RenderTask: Manage Render Tasks + + // #region Role: Manage Roles + + /// ### Search model sets + /// Returns all model set records that match the given search criteria. + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /model_sets/search -> List + Future>> search_model_sets( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} limit Number of results to return (used with `offset`). + int limit, + + /// @param {int} offset Number of results to skip before returning any (used with `limit`). + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {int} id Match model set id. + int id, + + /// @param {String} name Match model set name. + String name, + + /// @param {bool} all_access Match model sets by all_access status. + bool all_access, + + /// @param {bool} built_in Match model sets by built_in status. + bool built_in, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression. + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ModelSet.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/model_sets/search', { + 'fields': fields, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'id': id, + 'name': name, + 'all_access': all_access, + 'built_in': built_in, + 'filter_or': filter_or + }); + } + + /// ### Get information about the model set with a specific id. + /// + /// GET /model_sets/{model_set_id} -> ModelSet + Future> model_set( + + /// @param {int} model_set_id Id of model set + int model_set_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_model_set_id = encodeParam(model_set_id); + + ModelSet responseHandler(dynamic json, String contentType) { + return ModelSet.fromResponse(json, contentType); + } + + return get( + responseHandler, '/model_sets/$path_model_set_id', {'fields': fields}); + } + + /// ### Update information about the model set with a specific id. + /// + /// PATCH /model_sets/{model_set_id} -> ModelSet + Future> update_model_set( + + /// @param {int} model_set_id id of model set + int model_set_id, + + /// @param {WriteModelSet} body + WriteModelSet body) async { + var path_model_set_id = encodeParam(model_set_id); + + ModelSet responseHandler(dynamic json, String contentType) { + return ModelSet.fromResponse(json, contentType); + } + + return patch(responseHandler, '/model_sets/$path_model_set_id', null, + body == null ? null : body.toJson()); + } + + /// ### Delete the model set with a specific id. + /// + /// DELETE /model_sets/{model_set_id} -> String + Future> delete_model_set( + + /// @param {int} model_set_id id of model set + int model_set_id) async { + var path_model_set_id = encodeParam(model_set_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/model_sets/$path_model_set_id'); + } + + /// ### Get information about all model sets. + /// + /// GET /model_sets -> List + Future>> all_model_sets( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ModelSet.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/model_sets', {'fields': fields}); + } + + /// ### Create a model set with the specified information. Model sets are used by Roles. + /// + /// POST /model_sets -> ModelSet + Future> create_model_set( + + /// @param {WriteModelSet} body + WriteModelSet body) async { + ModelSet responseHandler(dynamic json, String contentType) { + return ModelSet.fromResponse(json, contentType); + } + + return post(responseHandler, '/model_sets', null, + body == null ? null : body.toJson()); + } + + /// ### Get all supported permissions. + /// + /// GET /permissions -> List + Future>> all_permissions() async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Permission.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/permissions'); + } + + /// ### Search permission sets + /// Returns all permission set records that match the given search criteria. + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /permission_sets/search -> List + Future>> search_permission_sets( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} limit Number of results to return (used with `offset`). + int limit, + + /// @param {int} offset Number of results to skip before returning any (used with `limit`). + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {int} id Match permission set id. + int id, + + /// @param {String} name Match permission set name. + String name, + + /// @param {bool} all_access Match permission sets by all_access status. + bool all_access, + + /// @param {bool} built_in Match permission sets by built_in status. + bool built_in, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression. + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => PermissionSet.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/permission_sets/search', { + 'fields': fields, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'id': id, + 'name': name, + 'all_access': all_access, + 'built_in': built_in, + 'filter_or': filter_or + }); + } + + /// ### Get information about the permission set with a specific id. + /// + /// GET /permission_sets/{permission_set_id} -> PermissionSet + Future> permission_set( + + /// @param {int} permission_set_id Id of permission set + int permission_set_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_permission_set_id = encodeParam(permission_set_id); + + PermissionSet responseHandler(dynamic json, String contentType) { + return PermissionSet.fromResponse(json, contentType); + } + + return get(responseHandler, '/permission_sets/$path_permission_set_id', + {'fields': fields}); + } + + /// ### Update information about the permission set with a specific id. + /// + /// PATCH /permission_sets/{permission_set_id} -> PermissionSet + Future> update_permission_set( + + /// @param {int} permission_set_id id of permission set + int permission_set_id, + + /// @param {WritePermissionSet} body + WritePermissionSet body) async { + var path_permission_set_id = encodeParam(permission_set_id); + + PermissionSet responseHandler(dynamic json, String contentType) { + return PermissionSet.fromResponse(json, contentType); + } + + return patch(responseHandler, '/permission_sets/$path_permission_set_id', + null, body == null ? null : body.toJson()); + } + + /// ### Delete the permission set with a specific id. + /// + /// DELETE /permission_sets/{permission_set_id} -> String + Future> delete_permission_set( + + /// @param {int} permission_set_id Id of permission set + int permission_set_id) async { + var path_permission_set_id = encodeParam(permission_set_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/permission_sets/$path_permission_set_id'); + } + + /// ### Get information about all permission sets. + /// + /// GET /permission_sets -> List + Future>> all_permission_sets( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => PermissionSet.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/permission_sets', {'fields': fields}); + } + + /// ### Create a permission set with the specified information. Permission sets are used by Roles. + /// + /// POST /permission_sets -> PermissionSet + Future> create_permission_set( + + /// @param {WritePermissionSet} body + WritePermissionSet body) async { + PermissionSet responseHandler(dynamic json, String contentType) { + return PermissionSet.fromResponse(json, contentType); + } + + return post(responseHandler, '/permission_sets', null, + body == null ? null : body.toJson()); + } + + /// ### Get information about all roles. + /// + /// GET /roles -> List + Future>> all_roles( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {DelimList} ids Optional list of ids to get specific roles. + DelimList ids}) async { + List responseHandler(dynamic json, String contentType) { + return json.map((i) => Role.fromResponse(i, contentType)).toList(); + } + + return get(responseHandler, '/roles', {'fields': fields, 'ids': ids}); + } + + /// ### Create a role with the specified information. + /// + /// POST /roles -> Role + Future> create_role( + + /// @param {WriteRole} body + WriteRole body) async { + Role responseHandler(dynamic json, String contentType) { + return Role.fromResponse(json, contentType); + } + + return post( + responseHandler, '/roles', null, body == null ? null : body.toJson()); + } + + /// ### Search roles + /// + /// Returns all role records that match the given search criteria. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /roles/search -> List + Future>> search_roles( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} limit Number of results to return (used with `offset`). + int limit, + + /// @param {int} offset Number of results to skip before returning any (used with `limit`). + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {int} id Match role id. + int id, + + /// @param {String} name Match role name. + String name, + + /// @param {bool} built_in Match roles by built_in status. + bool built_in, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression. + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json.map((i) => Role.fromResponse(i, contentType)).toList(); + } + + return get(responseHandler, '/roles/search', { + 'fields': fields, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'id': id, + 'name': name, + 'built_in': built_in, + 'filter_or': filter_or + }); + } + + /// ### Search roles include user count + /// + /// Returns all role records that match the given search criteria, and attaches + /// associated user counts. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /roles/search/with_user_count -> List + Future>> search_roles_with_user_count( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} limit Number of results to return (used with `offset`). + int limit, + + /// @param {int} offset Number of results to skip before returning any (used with `limit`). + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {int} id Match role id. + int id, + + /// @param {String} name Match role name. + String name, + + /// @param {bool} built_in Match roles by built_in status. + bool built_in, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression. + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => RoleSearch.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/roles/search/with_user_count', { + 'fields': fields, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'id': id, + 'name': name, + 'built_in': built_in, + 'filter_or': filter_or + }); + } + + /// ### Get information about the role with a specific id. + /// + /// GET /roles/{role_id} -> Role + Future> role( + + /// @param {int} role_id id of role + int role_id) async { + var path_role_id = encodeParam(role_id); + + Role responseHandler(dynamic json, String contentType) { + return Role.fromResponse(json, contentType); + } + + return get(responseHandler, '/roles/$path_role_id'); + } + + /// ### Update information about the role with a specific id. + /// + /// PATCH /roles/{role_id} -> Role + Future> update_role( + + /// @param {int} role_id id of role + int role_id, + + /// @param {WriteRole} body + WriteRole body) async { + var path_role_id = encodeParam(role_id); + + Role responseHandler(dynamic json, String contentType) { + return Role.fromResponse(json, contentType); + } + + return patch(responseHandler, '/roles/$path_role_id', null, + body == null ? null : body.toJson()); + } + + /// ### Delete the role with a specific id. + /// + /// DELETE /roles/{role_id} -> String + Future> delete_role( + + /// @param {int} role_id id of role + int role_id) async { + var path_role_id = encodeParam(role_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/roles/$path_role_id'); + } + + /// ### Get information about all the groups with the role that has a specific id. + /// + /// GET /roles/{role_id}/groups -> List + Future>> role_groups( + + /// @param {int} role_id id of role + int role_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_role_id = encodeParam(role_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Group.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, '/roles/$path_role_id/groups', {'fields': fields}); + } + + /// ### Set all groups for a role, removing all existing group associations from that role. + /// + /// PUT /roles/{role_id}/groups -> List + Future>> set_role_groups( + + /// @param {int} role_id Id of Role + int role_id, + + /// @param {List} body + List body) async { + var path_role_id = encodeParam(role_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Group.fromResponse(i, contentType)) + .toList(); + } + + return put(responseHandler, '/roles/$path_role_id/groups', null, body); + } + + /// ### Get information about all the users with the role that has a specific id. + /// + /// GET /roles/{role_id}/users -> List + Future>> role_users( + + /// @param {int} role_id id of user + int role_id, + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {bool} direct_association_only Get only users associated directly with the role: exclude those only associated through groups. + bool direct_association_only}) async { + var path_role_id = encodeParam(role_id); + + List responseHandler(dynamic json, String contentType) { + return json.map((i) => User.fromResponse(i, contentType)).toList(); + } + + return get(responseHandler, '/roles/$path_role_id/users', + {'fields': fields, 'direct_association_only': direct_association_only}); + } + + /// ### Set all the users of the role with a specific id. + /// + /// PUT /roles/{role_id}/users -> List + Future>> set_role_users( + + /// @param {int} role_id id of role + int role_id, + + /// @param {List} body + List body) async { + var path_role_id = encodeParam(role_id); + + List responseHandler(dynamic json, String contentType) { + return json.map((i) => User.fromResponse(i, contentType)).toList(); + } + + return put(responseHandler, '/roles/$path_role_id/users', null, body); + } + + // #endregion Role: Manage Roles + + // #region ScheduledPlan: Manage Scheduled Plans + + /// ### Get Scheduled Plans for a Space + /// + /// Returns scheduled plans owned by the caller for a given space id. + /// + /// GET /scheduled_plans/space/{space_id} -> List + Future>> scheduled_plans_for_space( + + /// @param {int} space_id Space Id + int space_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_space_id = encodeParam(space_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ScheduledPlan.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/scheduled_plans/space/$path_space_id', + {'fields': fields}); + } + + /// ### Get Information About a Scheduled Plan + /// + /// Admins can fetch information about other users' Scheduled Plans. + /// + /// GET /scheduled_plans/{scheduled_plan_id} -> ScheduledPlan + Future> scheduled_plan( + + /// @param {int} scheduled_plan_id Scheduled Plan Id + int scheduled_plan_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_scheduled_plan_id = encodeParam(scheduled_plan_id); + + ScheduledPlan responseHandler(dynamic json, String contentType) { + return ScheduledPlan.fromResponse(json, contentType); + } + + return get(responseHandler, '/scheduled_plans/$path_scheduled_plan_id', + {'fields': fields}); + } + + /// ### Update a Scheduled Plan + /// + /// Admins can update other users' Scheduled Plans. + /// + /// Note: Any scheduled plan destinations specified in an update will **replace** all scheduled plan destinations + /// currently defined for the scheduled plan. + /// + /// For Example: If a scheduled plan has destinations A, B, and C, and you call update on this scheduled plan + /// specifying only B in the destinations, then destinations A and C will be deleted by the update. + /// + /// Updating a scheduled plan to assign null or an empty array to the scheduled_plan_destinations property is an error, as a scheduled plan must always have at least one destination. + /// + /// If you omit the scheduled_plan_destinations property from the object passed to update, then the destinations + /// defined on the original scheduled plan will remain unchanged. + /// + /// #### Email Permissions: + /// + /// For details about permissions required to schedule delivery to email and the safeguards + /// Looker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions). + /// + /// + /// #### Scheduled Plan Destination Formats + /// + /// Scheduled plan destinations must specify the data format to produce and send to the destination. + /// + /// Formats: + /// + /// | format | Description + /// | :-----------: | :--- | + /// | json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata. + /// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query + /// | inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination. + /// | csv | Comma separated values with a header + /// | txt | Tab separated values with a header + /// | html | Simple html + /// | xlsx | MS Excel spreadsheet + /// | wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document + /// | assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document + /// | wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image + /// || + /// + /// Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. + /// + /// PATCH /scheduled_plans/{scheduled_plan_id} -> ScheduledPlan + Future> update_scheduled_plan( + + /// @param {int} scheduled_plan_id Scheduled Plan Id + int scheduled_plan_id, + + /// @param {WriteScheduledPlan} body + WriteScheduledPlan body) async { + var path_scheduled_plan_id = encodeParam(scheduled_plan_id); + + ScheduledPlan responseHandler(dynamic json, String contentType) { + return ScheduledPlan.fromResponse(json, contentType); + } + + return patch(responseHandler, '/scheduled_plans/$path_scheduled_plan_id', + null, body == null ? null : body.toJson()); + } + + /// ### Delete a Scheduled Plan + /// + /// Normal users can only delete their own scheduled plans. + /// Admins can delete other users' scheduled plans. + /// This delete cannot be undone. + /// + /// DELETE /scheduled_plans/{scheduled_plan_id} -> String + Future> delete_scheduled_plan( + + /// @param {int} scheduled_plan_id Scheduled Plan Id + int scheduled_plan_id) async { + var path_scheduled_plan_id = encodeParam(scheduled_plan_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/scheduled_plans/$path_scheduled_plan_id'); + } + + /// ### List All Scheduled Plans + /// + /// Returns all scheduled plans which belong to the caller or given user. + /// + /// If no user_id is provided, this function returns the scheduled plans owned by the caller. + /// + /// + /// To list all schedules for all users, pass `all_users=true`. + /// + /// + /// The caller must have `see_schedules` permission to see other users' scheduled plans. + /// + /// GET /scheduled_plans -> List + Future>> all_scheduled_plans( + { + + /// @param {int} user_id Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. + int user_id, + + /// @param {String} fields Comma delimited list of field names. If provided, only the fields specified will be included in the response + String fields, + + /// @param {bool} all_users Return scheduled plans belonging to all users (caller needs see_schedules permission) + bool all_users}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ScheduledPlan.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/scheduled_plans', + {'user_id': user_id, 'fields': fields, 'all_users': all_users}); + } + + /// ### Create a Scheduled Plan + /// + /// Create a scheduled plan to render a Look or Dashboard on a recurring schedule. + /// + /// To create a scheduled plan, you MUST provide values for the following fields: + /// `name` + /// and + /// `look_id`, `dashboard_id`, `lookml_dashboard_id`, or `query_id` + /// and + /// `cron_tab` or `datagroup` + /// and + /// at least one scheduled_plan_destination + /// + /// A scheduled plan MUST have at least one scheduled_plan_destination defined. + /// + /// When `look_id` is set, `require_no_results`, `require_results`, and `require_change` are all required. + /// + /// If `create_scheduled_plan` fails with a 422 error, be sure to look at the error messages in the response which will explain exactly what fields are missing or values that are incompatible. + /// + /// The queries that provide the data for the look or dashboard are run in the context of user account that owns the scheduled plan. + /// + /// When `run_as_recipient` is `false` or not specified, the queries that provide the data for the + /// look or dashboard are run in the context of user account that owns the scheduled plan. + /// + /// When `run_as_recipient` is `true` and all the email recipients are Looker user accounts, the + /// queries are run in the context of each recipient, so different recipients may see different + /// data from the same scheduled render of a look or dashboard. For more details, see [Run As Recipient](https://looker.com/docs/r/admin/run-as-recipient). + /// + /// Admins can create and modify scheduled plans on behalf of other users by specifying a user id. + /// Non-admin users may not create or modify scheduled plans by or for other users. + /// + /// #### Email Permissions: + /// + /// For details about permissions required to schedule delivery to email and the safeguards + /// Looker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions). + /// + /// + /// #### Scheduled Plan Destination Formats + /// + /// Scheduled plan destinations must specify the data format to produce and send to the destination. + /// + /// Formats: + /// + /// | format | Description + /// | :-----------: | :--- | + /// | json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata. + /// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query + /// | inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination. + /// | csv | Comma separated values with a header + /// | txt | Tab separated values with a header + /// | html | Simple html + /// | xlsx | MS Excel spreadsheet + /// | wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document + /// | assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document + /// | wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image + /// || + /// + /// Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. + /// + /// POST /scheduled_plans -> ScheduledPlan + Future> create_scheduled_plan( + + /// @param {WriteScheduledPlan} body + WriteScheduledPlan body) async { + ScheduledPlan responseHandler(dynamic json, String contentType) { + return ScheduledPlan.fromResponse(json, contentType); + } + + return post(responseHandler, '/scheduled_plans', null, + body == null ? null : body.toJson()); + } + + /// ### Run a Scheduled Plan Immediately + /// + /// Create a scheduled plan that runs only once, and immediately. + /// + /// This can be useful for testing a Scheduled Plan before committing to a production schedule. + /// + /// Admins can create scheduled plans on behalf of other users by specifying a user id. + /// + /// This API is rate limited to prevent it from being used for relay spam or DoS attacks + /// + /// #### Email Permissions: + /// + /// For details about permissions required to schedule delivery to email and the safeguards + /// Looker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions). + /// + /// + /// #### Scheduled Plan Destination Formats + /// + /// Scheduled plan destinations must specify the data format to produce and send to the destination. + /// + /// Formats: + /// + /// | format | Description + /// | :-----------: | :--- | + /// | json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata. + /// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query + /// | inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination. + /// | csv | Comma separated values with a header + /// | txt | Tab separated values with a header + /// | html | Simple html + /// | xlsx | MS Excel spreadsheet + /// | wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document + /// | assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document + /// | wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image + /// || + /// + /// Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. + /// + /// POST /scheduled_plans/run_once -> ScheduledPlan + Future> scheduled_plan_run_once( + + /// @param {WriteScheduledPlan} body + WriteScheduledPlan body) async { + ScheduledPlan responseHandler(dynamic json, String contentType) { + return ScheduledPlan.fromResponse(json, contentType); + } + + return post(responseHandler, '/scheduled_plans/run_once', null, + body == null ? null : body.toJson()); + } + + /// ### Get Scheduled Plans for a Look + /// + /// Returns all scheduled plans for a look which belong to the caller or given user. + /// + /// If no user_id is provided, this function returns the scheduled plans owned by the caller. + /// + /// + /// To list all schedules for all users, pass `all_users=true`. + /// + /// + /// The caller must have `see_schedules` permission to see other users' scheduled plans. + /// + /// GET /scheduled_plans/look/{look_id} -> List + Future>> scheduled_plans_for_look( + + /// @param {int} look_id Look Id + int look_id, + { + + /// @param {int} user_id User Id (default is requesting user if not specified) + int user_id, + + /// @param {String} fields Requested fields. + String fields, + + /// @param {bool} all_users Return scheduled plans belonging to all users for the look + bool all_users}) async { + var path_look_id = encodeParam(look_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ScheduledPlan.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/scheduled_plans/look/$path_look_id', + {'user_id': user_id, 'fields': fields, 'all_users': all_users}); + } + + /// ### Get Scheduled Plans for a Dashboard + /// + /// Returns all scheduled plans for a dashboard which belong to the caller or given user. + /// + /// If no user_id is provided, this function returns the scheduled plans owned by the caller. + /// + /// + /// To list all schedules for all users, pass `all_users=true`. + /// + /// + /// The caller must have `see_schedules` permission to see other users' scheduled plans. + /// + /// GET /scheduled_plans/dashboard/{dashboard_id} -> List + Future>> scheduled_plans_for_dashboard( + + /// @param {int} dashboard_id Dashboard Id + int dashboard_id, + { + + /// @param {int} user_id User Id (default is requesting user if not specified) + int user_id, + + /// @param {bool} all_users Return scheduled plans belonging to all users for the dashboard + bool all_users, + + /// @param {String} fields Requested fields. + String fields}) async { + var path_dashboard_id = encodeParam(dashboard_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ScheduledPlan.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/scheduled_plans/dashboard/$path_dashboard_id', + {'user_id': user_id, 'all_users': all_users, 'fields': fields}); + } + + /// ### Get Scheduled Plans for a LookML Dashboard + /// + /// Returns all scheduled plans for a LookML Dashboard which belong to the caller or given user. + /// + /// If no user_id is provided, this function returns the scheduled plans owned by the caller. + /// + /// + /// To list all schedules for all users, pass `all_users=true`. + /// + /// + /// The caller must have `see_schedules` permission to see other users' scheduled plans. + /// + /// GET /scheduled_plans/lookml_dashboard/{lookml_dashboard_id} -> List + Future>> scheduled_plans_for_lookml_dashboard( + + /// @param {String} lookml_dashboard_id LookML Dashboard Id + String lookml_dashboard_id, + { + + /// @param {int} user_id User Id (default is requesting user if not specified) + int user_id, + + /// @param {String} fields Requested fields. + String fields, + + /// @param {bool} all_users Return scheduled plans belonging to all users for the dashboard + bool all_users}) async { + var path_lookml_dashboard_id = encodeParam(lookml_dashboard_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => ScheduledPlan.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, + '/scheduled_plans/lookml_dashboard/$path_lookml_dashboard_id', + {'user_id': user_id, 'fields': fields, 'all_users': all_users}); + } + + /// ### Run a Scheduled Plan By Id Immediately + /// This function creates a run-once schedule plan based on an existing scheduled plan, + /// applies modifications (if any) to the new scheduled plan, and runs the new schedule plan immediately. + /// This can be useful for testing modifications to an existing scheduled plan before committing to a production schedule. + /// + /// This function internally performs the following operations: + /// + /// 1. Copies the properties of the existing scheduled plan into a new scheduled plan + /// 2. Copies any properties passed in the JSON body of this request into the new scheduled plan (replacing the original values) + /// 3. Creates the new scheduled plan + /// 4. Runs the new scheduled plan + /// + /// The original scheduled plan is not modified by this operation. + /// Admins can create, modify, and run scheduled plans on behalf of other users by specifying a user id. + /// Non-admins can only create, modify, and run their own scheduled plans. + /// + /// #### Email Permissions: + /// + /// For details about permissions required to schedule delivery to email and the safeguards + /// Looker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions). + /// + /// + /// #### Scheduled Plan Destination Formats + /// + /// Scheduled plan destinations must specify the data format to produce and send to the destination. + /// + /// Formats: + /// + /// | format | Description + /// | :-----------: | :--- | + /// | json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata. + /// | json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query + /// | inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination. + /// | csv | Comma separated values with a header + /// | txt | Tab separated values with a header + /// | html | Simple html + /// | xlsx | MS Excel spreadsheet + /// | wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document + /// | assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document + /// | wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image + /// || + /// + /// Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. + /// + /// + /// + /// This API is rate limited to prevent it from being used for relay spam or DoS attacks + /// + /// POST /scheduled_plans/{scheduled_plan_id}/run_once -> ScheduledPlan + Future> scheduled_plan_run_once_by_id( + + /// @param {int} scheduled_plan_id Id of schedule plan to copy and run + int scheduled_plan_id, + { + + /// @param {WriteScheduledPlan} body + WriteScheduledPlan body}) async { + var path_scheduled_plan_id = encodeParam(scheduled_plan_id); + + ScheduledPlan responseHandler(dynamic json, String contentType) { + return ScheduledPlan.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/scheduled_plans/$path_scheduled_plan_id/run_once', + null, + body == null ? null : body.toJson()); + } + + // #endregion ScheduledPlan: Manage Scheduled Plans + + // #region Session: Session Information + + /// ### Get API Session + /// + /// Returns information about the current API session, such as which workspace is selected for the session. + /// + /// GET /session -> ApiSession + Future> session() async { + ApiSession responseHandler(dynamic json, String contentType) { + return ApiSession.fromResponse(json, contentType); + } + + return get(responseHandler, '/session'); + } + + /// ### Update API Session + /// + /// #### API Session Workspace + /// + /// You can use this endpoint to change the active workspace for the current API session. + /// + /// Only one workspace can be active in a session. The active workspace can be changed + /// any number of times in a session. + /// + /// The default workspace for API sessions is the "production" workspace. + /// + /// All Looker APIs that use projects or lookml models (such as running queries) will + /// use the version of project and model files defined by this workspace for the lifetime of the + /// current API session or until the session workspace is changed again. + /// + /// An API session has the same lifetime as the access_token used to authenticate API requests. Each successful + /// API login generates a new access_token and a new API session. + /// + /// If your Looker API client application needs to work in a dev workspace across multiple + /// API sessions, be sure to select the dev workspace after each login. + /// + /// PATCH /session -> ApiSession + Future> update_session( + + /// @param {WriteApiSession} body + WriteApiSession body) async { + ApiSession responseHandler(dynamic json, String contentType) { + return ApiSession.fromResponse(json, contentType); + } + + return patch( + responseHandler, '/session', null, body == null ? null : body.toJson()); + } + + // #endregion Session: Session Information + + // #region Theme: Manage Themes + + /// ### Get an array of all existing themes + /// + /// Get a **single theme** by id with [Theme](#!/Theme/theme) + /// + /// This method returns an array of all existing themes. The active time for the theme is not considered. + /// + /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. + /// + /// GET /themes -> List + Future>> all_themes( + { + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Theme.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/themes', {'fields': fields}); + } + + /// ### Create a theme + /// + /// Creates a new theme object, returning the theme details, including the created id. + /// + /// If `settings` are not specified, the default theme settings will be copied into the new theme. + /// + /// The theme `name` can only contain alphanumeric characters or underscores. Theme names should not contain any confidential information, such as customer names. + /// + /// **Update** an existing theme with [Update Theme](#!/Theme/update_theme) + /// + /// **Permanently delete** an existing theme with [Delete Theme](#!/Theme/delete_theme) + /// + /// For more information, see [Creating and Applying Themes](https://looker.com/docs/r/admin/themes). + /// + /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. + /// + /// POST /themes -> Theme + Future> create_theme( + + /// @param {WriteTheme} body + WriteTheme body) async { + Theme responseHandler(dynamic json, String contentType) { + return Theme.fromResponse(json, contentType); + } + + return post( + responseHandler, '/themes', null, body == null ? null : body.toJson()); + } + + /// ### Search all themes for matching criteria. + /// + /// Returns an **array of theme objects** that match the specified search criteria. + /// + /// | Search Parameters | Description + /// | :-------------------: | :------ | + /// | `begin_at` only | Find themes active at or after `begin_at` + /// | `end_at` only | Find themes active at or before `end_at` + /// | both set | Find themes with an active inclusive period between `begin_at` and `end_at` + /// + /// Note: Range matching requires boolean AND logic. + /// When using `begin_at` and `end_at` together, do not use `filter_or`=TRUE + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// + /// Get a **single theme** by id with [Theme](#!/Theme/theme) + /// + /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. + /// + /// GET /themes/search -> List + Future>> search_themes( + { + + /// @param {int} id Match theme id. + int id, + + /// @param {String} name Match theme name. + String name, + + /// @param {DateTime} begin_at Timestamp for activation. + DateTime begin_at, + + /// @param {DateTime} end_at Timestamp for expiration. + DateTime end_at, + + /// @param {int} limit Number of results to return (used with `offset`). + int limit, + + /// @param {int} offset Number of results to skip before returning any (used with `limit`). + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {String} fields Requested fields. + String fields, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Theme.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/themes/search', { + 'id': id, + 'name': name, + 'begin_at': begin_at, + 'end_at': end_at, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'fields': fields, + 'filter_or': filter_or + }); + } + + /// ### Get the default theme + /// + /// Returns the active theme object set as the default. + /// + /// The **default** theme name can be set in the UI on the Admin|Theme UI page + /// + /// The optional `ts` parameter can specify a different timestamp than "now." If specified, it returns the default theme at the time indicated. + /// + /// GET /themes/default -> Theme + Future> default_theme( + { + + /// @param {DateTime} ts Timestamp representing the target datetime for the active period. Defaults to 'now' + DateTime ts}) async { + Theme responseHandler(dynamic json, String contentType) { + return Theme.fromResponse(json, contentType); + } + + return get(responseHandler, '/themes/default', {'ts': ts}); + } + + /// ### Set the global default theme by theme name + /// + /// Only Admin users can call this function. + /// + /// Only an active theme with no expiration (`end_at` not set) can be assigned as the default theme. As long as a theme has an active record with no expiration, it can be set as the default. + /// + /// [Create Theme](#!/Theme/create) has detailed information on rules for default and active themes + /// + /// Returns the new specified default theme object. + /// + /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. + /// + /// PUT /themes/default -> Theme + Future> set_default_theme( + + /// @param {String} name Name of theme to set as default + String name) async { + Theme responseHandler(dynamic json, String contentType) { + return Theme.fromResponse(json, contentType); + } + + return put(responseHandler, '/themes/default', {'name': name}); + } + + /// ### Get active themes + /// + /// Returns an array of active themes. + /// + /// If the `name` parameter is specified, it will return an array with one theme if it's active and found. + /// + /// The optional `ts` parameter can specify a different timestamp than "now." + /// + /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. + /// + /// GET /themes/active -> List + Future>> active_themes( + { + + /// @param {String} name Name of theme + String name, + + /// @param {DateTime} ts Timestamp representing the target datetime for the active period. Defaults to 'now' + DateTime ts, + + /// @param {String} fields Requested fields. + String fields}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Theme.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/themes/active', + {'name': name, 'ts': ts, 'fields': fields}); + } + + /// ### Get the named theme if it's active. Otherwise, return the default theme + /// + /// The optional `ts` parameter can specify a different timestamp than "now." + /// Note: API users with `show` ability can call this function + /// + /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. + /// + /// GET /themes/theme_or_default -> Theme + Future> theme_or_default( + + /// @param {String} name Name of theme + String name, + { + + /// @param {DateTime} ts Timestamp representing the target datetime for the active period. Defaults to 'now' + DateTime ts}) async { + Theme responseHandler(dynamic json, String contentType) { + return Theme.fromResponse(json, contentType); + } + + return get( + responseHandler, '/themes/theme_or_default', {'name': name, 'ts': ts}); + } + + /// ### Validate a theme with the specified information + /// + /// Validates all values set for the theme, returning any errors encountered, or 200 OK if valid + /// + /// See [Create Theme](#!/Theme/create_theme) for constraints + /// + /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. + /// + /// POST /themes/validate -> ValidationError + Future> validate_theme( + + /// @param {WriteTheme} body + WriteTheme body) async { + ValidationError responseHandler(dynamic json, String contentType) { + return ValidationError.fromResponse(json, contentType); + } + + return post(responseHandler, '/themes/validate', null, + body == null ? null : body.toJson()); + } + + /// ### Get a theme by ID + /// + /// Use this to retrieve a specific theme, whether or not it's currently active. + /// + /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. + /// + /// GET /themes/{theme_id} -> Theme + Future> theme( + + /// @param {int} theme_id Id of theme + int theme_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_theme_id = encodeParam(theme_id); + + Theme responseHandler(dynamic json, String contentType) { + return Theme.fromResponse(json, contentType); + } + + return get(responseHandler, '/themes/$path_theme_id', {'fields': fields}); + } + + /// ### Update the theme by id. + /// + /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. + /// + /// PATCH /themes/{theme_id} -> Theme + Future> update_theme( + + /// @param {int} theme_id Id of theme + int theme_id, + + /// @param {WriteTheme} body + WriteTheme body) async { + var path_theme_id = encodeParam(theme_id); + + Theme responseHandler(dynamic json, String contentType) { + return Theme.fromResponse(json, contentType); + } + + return patch(responseHandler, '/themes/$path_theme_id', null, + body == null ? null : body.toJson()); + } + + /// ### Delete a specific theme by id + /// + /// This operation permanently deletes the identified theme from the database. + /// + /// Because multiple themes can have the same name (with different activation time spans) themes can only be deleted by ID. + /// + /// All IDs associated with a theme name can be retrieved by searching for the theme name with [Theme Search](#!/Theme/search). + /// + /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. + /// + /// DELETE /themes/{theme_id} -> String + Future> delete_theme( + + /// @param {String} theme_id Id of theme + String theme_id) async { + var path_theme_id = encodeParam(theme_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/themes/$path_theme_id'); + } + + // #endregion Theme: Manage Themes + + // #region User: Manage Users + + /// ### Search email credentials + /// + /// Returns all credentials_email records that match the given search criteria. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /credentials_email/search -> List + Future>> search_credentials_email( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} limit Number of results to return (used with `offset`). + int limit, + + /// @param {int} offset Number of results to skip before returning any (used with `limit`). + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {int} id Match credentials_email id. + int id, + + /// @param {String} email Match credentials_email email. + String email, + + /// @param {String} emails Find credentials_email that match given emails. + String emails, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression. + bool filter_or}) async { + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => CredentialsEmailSearch.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/credentials_email/search', { + 'fields': fields, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'id': id, + 'email': email, + 'emails': emails, + 'filter_or': filter_or + }); + } + + /// ### Get information about the current user; i.e. the user account currently calling the API. + /// + /// GET /user -> User + Future> me( + { + + /// @param {String} fields Requested fields. + String fields}) async { + User responseHandler(dynamic json, String contentType) { + return User.fromResponse(json, contentType); + } + + return get(responseHandler, '/user', {'fields': fields}); + } + + /// ### Get information about all users. + /// + /// GET /users -> List + Future>> all_users( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {int} page DEPRECATED. Use limit and offset instead. Return only page N of paginated results + int page, + + /// @param {int} per_page DEPRECATED. Use limit and offset instead. Return N rows of data per page + int per_page, + + /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) + int limit, + + /// @param {int} offset Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {DelimList} ids Optional list of ids to get specific users. + DelimList ids}) async { + List responseHandler(dynamic json, String contentType) { + return json.map((i) => User.fromResponse(i, contentType)).toList(); + } + + return get(responseHandler, '/users', { + 'fields': fields, + 'page': page, + 'per_page': per_page, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'ids': ids + }); + } + + /// ### Create a user with the specified information. + /// + /// POST /users -> User + Future> create_user( + { + + /// @param {WriteUser} body + WriteUser body, + + /// @param {String} fields Requested fields. + String fields}) async { + User responseHandler(dynamic json, String contentType) { + return User.fromResponse(json, contentType); + } + + return post(responseHandler, '/users', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Search users + /// + /// Returns all* user records that match the given search criteria. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// + /// (*) Results are always filtered to the level of information the caller is permitted to view. + /// Looker admins can see all user details; normal users in an open system can see + /// names of other users but no details; normal users in a closed system can only see + /// names of other users who are members of the same group as the user. + /// + /// GET /users/search -> List + Future>> search_users( + { + + /// @param {String} fields Include only these fields in the response + String fields, + + /// @param {int} page DEPRECATED. Use limit and offset instead. Return only page N of paginated results + int page, + + /// @param {int} per_page DEPRECATED. Use limit and offset instead. Return N rows of data per page + int per_page, + + /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) + int limit, + + /// @param {int} offset Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + int offset, + + /// @param {String} sorts Fields to sort by. + String sorts, + + /// @param {String} id Match User Id. + String id, + + /// @param {String} first_name Match First name. + String first_name, + + /// @param {String} last_name Match Last name. + String last_name, + + /// @param {bool} verified_looker_employee Search for user accounts associated with Looker employees + bool verified_looker_employee, + + /// @param {bool} embed_user Search for only embed users + bool embed_user, + + /// @param {String} email Search for the user with this email address + String email, + + /// @param {bool} is_disabled Search for disabled user accounts + bool is_disabled, + + /// @param {bool} filter_or Combine given search criteria in a boolean OR expression + bool filter_or, + + /// @param {String} content_metadata_id Search for users who have access to this content_metadata item + String content_metadata_id, + + /// @param {String} group_id Search for users who are direct members of this group + String group_id}) async { + List responseHandler(dynamic json, String contentType) { + return json.map((i) => User.fromResponse(i, contentType)).toList(); + } + + return get(responseHandler, '/users/search', { + 'fields': fields, + 'page': page, + 'per_page': per_page, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'id': id, + 'first_name': first_name, + 'last_name': last_name, + 'verified_looker_employee': verified_looker_employee, + 'embed_user': embed_user, + 'email': email, + 'is_disabled': is_disabled, + 'filter_or': filter_or, + 'content_metadata_id': content_metadata_id, + 'group_id': group_id + }); + } + + /// ### Search for user accounts by name + /// + /// Returns all user accounts where `first_name` OR `last_name` OR `email` field values match a pattern. + /// The pattern can contain `%` and `_` wildcards as in SQL LIKE expressions. + /// + /// Any additional search params will be combined into a logical AND expression. + /// + /// GET /users/search/names/{pattern} -> List + Future>> search_users_names( + + /// @param {String} pattern Pattern to match + String pattern, + { + + /// @param {String} fields Include only these fields in the response + String fields, + + /// @param {int} page DEPRECATED. Use limit and offset instead. Return only page N of paginated results + int page, + + /// @param {int} per_page DEPRECATED. Use limit and offset instead. Return N rows of data per page + int per_page, + + /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) + int limit, + + /// @param {int} offset Number of results to skip before returning any. (used with limit and takes priority over page and per_page) + int offset, + + /// @param {String} sorts Fields to sort by + String sorts, + + /// @param {int} id Match User Id + int id, + + /// @param {String} first_name Match First name + String first_name, + + /// @param {String} last_name Match Last name + String last_name, + + /// @param {bool} verified_looker_employee Match Verified Looker employee + bool verified_looker_employee, + + /// @param {String} email Match Email Address + String email, + + /// @param {bool} is_disabled Include or exclude disabled accounts in the results + bool is_disabled}) async { + var path_pattern = encodeParam(pattern); + + List responseHandler(dynamic json, String contentType) { + return json.map((i) => User.fromResponse(i, contentType)).toList(); + } + + return get(responseHandler, '/users/search/names/$path_pattern', { + 'fields': fields, + 'page': page, + 'per_page': per_page, + 'limit': limit, + 'offset': offset, + 'sorts': sorts, + 'id': id, + 'first_name': first_name, + 'last_name': last_name, + 'verified_looker_employee': verified_looker_employee, + 'email': email, + 'is_disabled': is_disabled + }); + } + + /// ### Get information about the user with a specific id. + /// + /// If the caller is an admin or the caller is the user being specified, then full user information will + /// be returned. Otherwise, a minimal 'public' variant of the user information will be returned. This contains + /// The user name and avatar url, but no sensitive information. + /// + /// GET /users/{user_id} -> User + Future> user( + + /// @param {int} user_id Id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + User responseHandler(dynamic json, String contentType) { + return User.fromResponse(json, contentType); + } + + return get(responseHandler, '/users/$path_user_id', {'fields': fields}); + } + + /// ### Update information about the user with a specific id. + /// + /// PATCH /users/{user_id} -> User + Future> update_user( + + /// @param {int} user_id Id of user + int user_id, + + /// @param {WriteUser} body + WriteUser body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + User responseHandler(dynamic json, String contentType) { + return User.fromResponse(json, contentType); + } + + return patch(responseHandler, '/users/$path_user_id', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Delete the user with a specific id. + /// + /// **DANGER** this will delete the user and all looks and other information owned by the user. + /// + /// DELETE /users/{user_id} -> String + Future> delete_user( + + /// @param {int} user_id Id of user + int user_id) async { + var path_user_id = encodeParam(user_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/users/$path_user_id'); + } + + /// ### Get information about the user with a credential of given type with specific id. + /// + /// This is used to do things like find users by their embed external_user_id. Or, find the user with + /// a given api3 client_id, etc. The 'credential_type' matches the 'type' name of the various credential + /// types. It must be one of the values listed in the table below. The 'credential_id' is your unique Id + /// for the user and is specific to each type of credential. + /// + /// An example using the Ruby sdk might look like: + /// + /// `sdk.user_for_credential('embed', 'customer-4959425')` + /// + /// This table shows the supported 'Credential Type' strings. The right column is for reference; it shows + /// which field in the given credential type is actually searched when finding a user with the supplied + /// 'credential_id'. + /// + /// | Credential Types | Id Field Matched | + /// | ---------------- | ---------------- | + /// | email | email | + /// | google | google_user_id | + /// | saml | saml_user_id | + /// | oidc | oidc_user_id | + /// | ldap | ldap_id | + /// | api | token | + /// | api3 | client_id | + /// | embed | external_user_id | + /// | looker_openid | email | + /// + /// **NOTE**: The 'api' credential type was only used with the legacy Looker query API and is no longer supported. The credential type for API you are currently looking at is 'api3'. + /// + /// GET /users/credential/{credential_type}/{credential_id} -> User + Future> user_for_credential( + + /// @param {String} credential_type Type name of credential + String credential_type, + + /// @param {String} credential_id Id of credential + String credential_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_credential_type = encodeParam(credential_type); + var path_credential_id = encodeParam(credential_id); + + User responseHandler(dynamic json, String contentType) { + return User.fromResponse(json, contentType); + } + + return get( + responseHandler, + '/users/credential/$path_credential_type/$path_credential_id', + {'fields': fields}); + } + + /// ### Email/password login information for the specified user. + /// + /// GET /users/{user_id}/credentials_email -> CredentialsEmail + Future> user_credentials_email( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsEmail responseHandler(dynamic json, String contentType) { + return CredentialsEmail.fromResponse(json, contentType); + } + + return get(responseHandler, '/users/$path_user_id/credentials_email', + {'fields': fields}); + } + + /// ### Email/password login information for the specified user. + /// + /// POST /users/{user_id}/credentials_email -> CredentialsEmail + Future> create_user_credentials_email( + + /// @param {int} user_id id of user + int user_id, + + /// @param {WriteCredentialsEmail} body + WriteCredentialsEmail body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsEmail responseHandler(dynamic json, String contentType) { + return CredentialsEmail.fromResponse(json, contentType); + } + + return post(responseHandler, '/users/$path_user_id/credentials_email', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// ### Email/password login information for the specified user. + /// + /// PATCH /users/{user_id}/credentials_email -> CredentialsEmail + Future> update_user_credentials_email( + + /// @param {int} user_id id of user + int user_id, + + /// @param {WriteCredentialsEmail} body + WriteCredentialsEmail body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsEmail responseHandler(dynamic json, String contentType) { + return CredentialsEmail.fromResponse(json, contentType); + } + + return patch(responseHandler, '/users/$path_user_id/credentials_email', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// ### Email/password login information for the specified user. + /// + /// DELETE /users/{user_id}/credentials_email -> String + Future> delete_user_credentials_email( + + /// @param {int} user_id id of user + int user_id) async { + var path_user_id = encodeParam(user_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/users/$path_user_id/credentials_email'); + } + + /// ### Two-factor login information for the specified user. + /// + /// GET /users/{user_id}/credentials_totp -> CredentialsTotp + Future> user_credentials_totp( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsTotp responseHandler(dynamic json, String contentType) { + return CredentialsTotp.fromResponse(json, contentType); + } + + return get(responseHandler, '/users/$path_user_id/credentials_totp', + {'fields': fields}); + } + + /// ### Two-factor login information for the specified user. + /// + /// POST /users/{user_id}/credentials_totp -> CredentialsTotp + Future> create_user_credentials_totp( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {CredentialsTotp} body + CredentialsTotp body, + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsTotp responseHandler(dynamic json, String contentType) { + return CredentialsTotp.fromResponse(json, contentType); + } + + return post(responseHandler, '/users/$path_user_id/credentials_totp', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// ### Two-factor login information for the specified user. + /// + /// DELETE /users/{user_id}/credentials_totp -> String + Future> delete_user_credentials_totp( + + /// @param {int} user_id id of user + int user_id) async { + var path_user_id = encodeParam(user_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/users/$path_user_id/credentials_totp'); + } + + /// ### LDAP login information for the specified user. + /// + /// GET /users/{user_id}/credentials_ldap -> CredentialsLDAP + Future> user_credentials_ldap( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsLDAP responseHandler(dynamic json, String contentType) { + return CredentialsLDAP.fromResponse(json, contentType); + } + + return get(responseHandler, '/users/$path_user_id/credentials_ldap', + {'fields': fields}); + } + + /// ### LDAP login information for the specified user. + /// + /// DELETE /users/{user_id}/credentials_ldap -> String + Future> delete_user_credentials_ldap( + + /// @param {int} user_id id of user + int user_id) async { + var path_user_id = encodeParam(user_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/users/$path_user_id/credentials_ldap'); + } + + /// ### Google authentication login information for the specified user. + /// + /// GET /users/{user_id}/credentials_google -> CredentialsGoogle + Future> user_credentials_google( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsGoogle responseHandler(dynamic json, String contentType) { + return CredentialsGoogle.fromResponse(json, contentType); + } + + return get(responseHandler, '/users/$path_user_id/credentials_google', + {'fields': fields}); + } + + /// ### Google authentication login information for the specified user. + /// + /// DELETE /users/{user_id}/credentials_google -> String + Future> delete_user_credentials_google( + + /// @param {int} user_id id of user + int user_id) async { + var path_user_id = encodeParam(user_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/users/$path_user_id/credentials_google'); + } + + /// ### Saml authentication login information for the specified user. + /// + /// GET /users/{user_id}/credentials_saml -> CredentialsSaml + Future> user_credentials_saml( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsSaml responseHandler(dynamic json, String contentType) { + return CredentialsSaml.fromResponse(json, contentType); + } + + return get(responseHandler, '/users/$path_user_id/credentials_saml', + {'fields': fields}); + } + + /// ### Saml authentication login information for the specified user. + /// + /// DELETE /users/{user_id}/credentials_saml -> String + Future> delete_user_credentials_saml( + + /// @param {int} user_id id of user + int user_id) async { + var path_user_id = encodeParam(user_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/users/$path_user_id/credentials_saml'); + } + + /// ### OpenID Connect (OIDC) authentication login information for the specified user. + /// + /// GET /users/{user_id}/credentials_oidc -> CredentialsOIDC + Future> user_credentials_oidc( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsOIDC responseHandler(dynamic json, String contentType) { + return CredentialsOIDC.fromResponse(json, contentType); + } + + return get(responseHandler, '/users/$path_user_id/credentials_oidc', + {'fields': fields}); + } + + /// ### OpenID Connect (OIDC) authentication login information for the specified user. + /// + /// DELETE /users/{user_id}/credentials_oidc -> String + Future> delete_user_credentials_oidc( + + /// @param {int} user_id id of user + int user_id) async { + var path_user_id = encodeParam(user_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/users/$path_user_id/credentials_oidc'); + } + + /// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. + /// + /// GET /users/{user_id}/credentials_api3/{credentials_api3_id} -> CredentialsApi3 + Future> user_credentials_api3( + + /// @param {int} user_id Id of user + int user_id, + + /// @param {int} credentials_api3_id Id of API 3 Credential + int credentials_api3_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + var path_credentials_api3_id = encodeParam(credentials_api3_id); + + CredentialsApi3 responseHandler(dynamic json, String contentType) { + return CredentialsApi3.fromResponse(json, contentType); + } + + return get( + responseHandler, + '/users/$path_user_id/credentials_api3/$path_credentials_api3_id', + {'fields': fields}); + } + + /// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. + /// + /// DELETE /users/{user_id}/credentials_api3/{credentials_api3_id} -> String + Future> delete_user_credentials_api3( + + /// @param {int} user_id id of user + int user_id, + + /// @param {int} credentials_api3_id id of API 3 Credential + int credentials_api3_id) async { + var path_user_id = encodeParam(user_id); + var path_credentials_api3_id = encodeParam(credentials_api3_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, + '/users/$path_user_id/credentials_api3/$path_credentials_api3_id'); + } + + /// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. + /// + /// GET /users/{user_id}/credentials_api3 -> List + Future>> all_user_credentials_api3s( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => CredentialsApi3.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/users/$path_user_id/credentials_api3', + {'fields': fields}); + } + + /// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. + /// + /// POST /users/{user_id}/credentials_api3 -> CreateCredentialsApi3 + Future> create_user_credentials_api3( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CreateCredentialsApi3 responseHandler(dynamic json, String contentType) { + return CreateCredentialsApi3.fromResponse(json, contentType); + } + + return post(responseHandler, '/users/$path_user_id/credentials_api3', + {'fields': fields}); + } + + /// ### Embed login information for the specified user. + /// + /// GET /users/{user_id}/credentials_embed/{credentials_embed_id} -> CredentialsEmbed + Future> user_credentials_embed( + + /// @param {int} user_id Id of user + int user_id, + + /// @param {int} credentials_embed_id Id of Embedding Credential + int credentials_embed_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + var path_credentials_embed_id = encodeParam(credentials_embed_id); + + CredentialsEmbed responseHandler(dynamic json, String contentType) { + return CredentialsEmbed.fromResponse(json, contentType); + } + + return get( + responseHandler, + '/users/$path_user_id/credentials_embed/$path_credentials_embed_id', + {'fields': fields}); + } + + /// ### Embed login information for the specified user. + /// + /// DELETE /users/{user_id}/credentials_embed/{credentials_embed_id} -> String + Future> delete_user_credentials_embed( + + /// @param {int} user_id id of user + int user_id, + + /// @param {int} credentials_embed_id id of Embedding Credential + int credentials_embed_id) async { + var path_user_id = encodeParam(user_id); + var path_credentials_embed_id = encodeParam(credentials_embed_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, + '/users/$path_user_id/credentials_embed/$path_credentials_embed_id'); + } + + /// ### Embed login information for the specified user. + /// + /// GET /users/{user_id}/credentials_embed -> List + Future>> all_user_credentials_embeds( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map( + (i) => CredentialsEmbed.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/users/$path_user_id/credentials_embed', + {'fields': fields}); + } + + /// ### Looker Openid login information for the specified user. Used by Looker Analysts. + /// + /// GET /users/{user_id}/credentials_looker_openid -> CredentialsLookerOpenid + Future> user_credentials_looker_openid( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsLookerOpenid responseHandler(dynamic json, String contentType) { + return CredentialsLookerOpenid.fromResponse(json, contentType); + } + + return get(responseHandler, + '/users/$path_user_id/credentials_looker_openid', {'fields': fields}); + } + + /// ### Looker Openid login information for the specified user. Used by Looker Analysts. + /// + /// DELETE /users/{user_id}/credentials_looker_openid -> String + Future> delete_user_credentials_looker_openid( + + /// @param {int} user_id id of user + int user_id) async { + var path_user_id = encodeParam(user_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete( + responseHandler, '/users/$path_user_id/credentials_looker_openid'); + } + + /// ### Web login session for the specified user. + /// + /// GET /users/{user_id}/sessions/{session_id} -> Session + Future> user_session( + + /// @param {int} user_id Id of user + int user_id, + + /// @param {int} session_id Id of Web Login Session + int session_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + var path_session_id = encodeParam(session_id); + + Session responseHandler(dynamic json, String contentType) { + return Session.fromResponse(json, contentType); + } + + return get(responseHandler, + '/users/$path_user_id/sessions/$path_session_id', {'fields': fields}); + } + + /// ### Web login session for the specified user. + /// + /// DELETE /users/{user_id}/sessions/{session_id} -> String + Future> delete_user_session( + + /// @param {int} user_id id of user + int user_id, + + /// @param {int} session_id id of Web Login Session + int session_id) async { + var path_user_id = encodeParam(user_id); + var path_session_id = encodeParam(session_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete( + responseHandler, '/users/$path_user_id/sessions/$path_session_id'); + } + + /// ### Web login session for the specified user. + /// + /// GET /users/{user_id}/sessions -> List + Future>> all_user_sessions( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Session.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, '/users/$path_user_id/sessions', {'fields': fields}); + } + + /// ### Create a password reset token. + /// This will create a cryptographically secure random password reset token for the user. + /// If the user already has a password reset token then this invalidates the old token and creates a new one. + /// The token is expressed as the 'password_reset_url' of the user's email/password credential object. + /// This takes an optional 'expires' param to indicate if the new token should be an expiring token. + /// Tokens that expire are typically used for self-service password resets for existing users. + /// Invitation emails for new users typically are not set to expire. + /// The expire period is always 60 minutes when expires is enabled. + /// This method can be called with an empty body. + /// + /// POST /users/{user_id}/credentials_email/password_reset -> CredentialsEmail + Future> + create_user_credentials_email_password_reset( + + /// @param {int} user_id Id of user + int user_id, + { + + /// @param {bool} expires Expiring token. + bool expires, + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsEmail responseHandler(dynamic json, String contentType) { + return CredentialsEmail.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/users/$path_user_id/credentials_email/password_reset', + {'expires': expires, 'fields': fields}); + } + + /// ### Get information about roles of a given user + /// + /// GET /users/{user_id}/roles -> List + Future>> user_roles( + + /// @param {int} user_id id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {bool} direct_association_only Get only roles associated directly with the user: exclude those only associated through groups. + bool direct_association_only}) async { + var path_user_id = encodeParam(user_id); + + List responseHandler(dynamic json, String contentType) { + return json.map((i) => Role.fromResponse(i, contentType)).toList(); + } + + return get(responseHandler, '/users/$path_user_id/roles', + {'fields': fields, 'direct_association_only': direct_association_only}); + } + + /// ### Set roles of the user with a specific id. + /// + /// PUT /users/{user_id}/roles -> List + Future>> set_user_roles( + + /// @param {int} user_id id of user + int user_id, + + /// @param {List} body + List body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + List responseHandler(dynamic json, String contentType) { + return json.map((i) => Role.fromResponse(i, contentType)).toList(); + } + + return put(responseHandler, '/users/$path_user_id/roles', + {'fields': fields}, body); + } + + /// ### Get user attribute values for a given user. + /// + /// Returns the values of specified user attributes (or all user attributes) for a certain user. + /// + /// A value for each user attribute is searched for in the following locations, in this order: + /// + /// 1. in the user's account information + /// 1. in groups that the user is a member of + /// 1. the default value of the user attribute + /// + /// If more than one group has a value defined for a user attribute, the group with the lowest rank wins. + /// + /// The response will only include user attributes for which values were found. Use `include_unset=true` to include + /// empty records for user attributes with no value. + /// + /// The value of all hidden user attributes will be blank. + /// + /// GET /users/{user_id}/attribute_values -> List + Future>> user_attribute_user_values( + + /// @param {int} user_id Id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {DelimList} user_attribute_ids Specific user attributes to request. Omit or leave blank to request all user attributes. + DelimList user_attribute_ids, + + /// @param {bool} all_values If true, returns all values in the search path instead of just the first value found. Useful for debugging group precedence. + bool all_values, + + /// @param {bool} include_unset If true, returns an empty record for each requested attribute that has no user, group, or default value. + bool include_unset}) async { + var path_user_id = encodeParam(user_id); + + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => UserAttributeWithValue.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/users/$path_user_id/attribute_values', { + 'fields': fields, + 'user_attribute_ids': user_attribute_ids, + 'all_values': all_values, + 'include_unset': include_unset + }); + } + + /// ### Store a custom value for a user attribute in a user's account settings. + /// + /// Per-user user attribute values take precedence over group or default values. + /// + /// PATCH /users/{user_id}/attribute_values/{user_attribute_id} -> UserAttributeWithValue + Future> set_user_attribute_user_value( + + /// @param {int} user_id Id of user + int user_id, + + /// @param {int} user_attribute_id Id of user attribute + int user_attribute_id, + + /// @param {WriteUserAttributeWithValue} body + WriteUserAttributeWithValue body) async { + var path_user_id = encodeParam(user_id); + var path_user_attribute_id = encodeParam(user_attribute_id); + + UserAttributeWithValue responseHandler(dynamic json, String contentType) { + return UserAttributeWithValue.fromResponse(json, contentType); + } + + return patch( + responseHandler, + '/users/$path_user_id/attribute_values/$path_user_attribute_id', + null, + body == null ? null : body.toJson()); + } + + /// ### Delete a user attribute value from a user's account settings. + /// + /// After the user attribute value is deleted from the user's account settings, subsequent requests + /// for the user attribute value for this user will draw from the user's groups or the default + /// value of the user attribute. See [Get User Attribute Values](#!/User/user_attribute_user_values) for more + /// information about how user attribute values are resolved. + /// + /// DELETE /users/{user_id}/attribute_values/{user_attribute_id} -> void + Future> delete_user_attribute_user_value( + + /// @param {int} user_id Id of user + int user_id, + + /// @param {int} user_attribute_id Id of user attribute + int user_attribute_id) async { + var path_user_id = encodeParam(user_id); + var path_user_attribute_id = encodeParam(user_attribute_id); + + void responseHandler(dynamic json, String contentType) {} + return delete(responseHandler, + '/users/$path_user_id/attribute_values/$path_user_attribute_id'); + } + + /// ### Send a password reset token. + /// This will send a password reset email to the user. If a password reset token does not already exist + /// for this user, it will create one and then send it. + /// If the user has not yet set up their account, it will send a setup email to the user. + /// The URL sent in the email is expressed as the 'password_reset_url' of the user's email/password credential object. + /// Password reset URLs will expire in 60 minutes. + /// This method can be called with an empty body. + /// + /// POST /users/{user_id}/credentials_email/send_password_reset -> CredentialsEmail + Future> + send_user_credentials_email_password_reset( + + /// @param {int} user_id Id of user + int user_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + CredentialsEmail responseHandler(dynamic json, String contentType) { + return CredentialsEmail.fromResponse(json, contentType); + } + + return post( + responseHandler, + '/users/$path_user_id/credentials_email/send_password_reset', + {'fields': fields}); + } + + /// ### Change a disabled user's email addresses + /// + /// Allows the admin to change the email addresses for all the user's + /// associated credentials. Will overwrite all associated email addresses with + /// the value supplied in the 'email' body param. + /// The user's 'is_disabled' status must be true. + /// + /// POST /users/{user_id}/update_emails -> User + Future> wipeout_user_emails( + + /// @param {int} user_id Id of user + int user_id, + + /// @param {UserEmailOnly} body + UserEmailOnly body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_id = encodeParam(user_id); + + User responseHandler(dynamic json, String contentType) { + return User.fromResponse(json, contentType); + } + + return post(responseHandler, '/users/$path_user_id/update_emails', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// Create an embed user from an external user ID + /// + /// POST /users/embed_user -> UserPublic + Future> create_embed_user( + + /// @param {CreateEmbedUserRequest} body + CreateEmbedUserRequest body) async { + UserPublic responseHandler(dynamic json, String contentType) { + return UserPublic.fromResponse(json, contentType); + } + + return post(responseHandler, '/users/embed_user', null, + body == null ? null : body.toJson()); + } + + // #endregion User: Manage Users + + // #region UserAttribute: Manage User Attributes + + /// ### Get information about all user attributes. + /// + /// GET /user_attributes -> List + Future>> all_user_attributes( + { + + /// @param {String} fields Requested fields. + String fields, + + /// @param {String} sorts Fields to order the results by. Sortable fields include: name, label + String sorts}) async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => UserAttribute.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/user_attributes', + {'fields': fields, 'sorts': sorts}); + } + + /// ### Create a new user attribute + /// + /// Permission information for a user attribute is conveyed through the `can` and `user_can_edit` fields. + /// The `user_can_edit` field indicates whether an attribute is user-editable _anywhere_ in the application. + /// The `can` field gives more granular access information, with the `set_value` child field indicating whether + /// an attribute's value can be set by [Setting the User Attribute User Value](#!/User/set_user_attribute_user_value). + /// + /// Note: `name` and `label` fields must be unique across all user attributes in the Looker instance. + /// Attempting to create a new user attribute with a name or label that duplicates an existing + /// user attribute will fail with a 422 error. + /// + /// POST /user_attributes -> UserAttribute + Future> create_user_attribute( + + /// @param {WriteUserAttribute} body + WriteUserAttribute body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + UserAttribute responseHandler(dynamic json, String contentType) { + return UserAttribute.fromResponse(json, contentType); + } + + return post(responseHandler, '/user_attributes', {'fields': fields}, + body == null ? null : body.toJson()); + } + + /// ### Get information about a user attribute. + /// + /// GET /user_attributes/{user_attribute_id} -> UserAttribute + Future> user_attribute( + + /// @param {int} user_attribute_id Id of user attribute + int user_attribute_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_attribute_id = encodeParam(user_attribute_id); + + UserAttribute responseHandler(dynamic json, String contentType) { + return UserAttribute.fromResponse(json, contentType); + } + + return get(responseHandler, '/user_attributes/$path_user_attribute_id', + {'fields': fields}); + } + + /// ### Update a user attribute definition. + /// + /// PATCH /user_attributes/{user_attribute_id} -> UserAttribute + Future> update_user_attribute( + + /// @param {int} user_attribute_id Id of user attribute + int user_attribute_id, + + /// @param {WriteUserAttribute} body + WriteUserAttribute body, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_attribute_id = encodeParam(user_attribute_id); + + UserAttribute responseHandler(dynamic json, String contentType) { + return UserAttribute.fromResponse(json, contentType); + } + + return patch(responseHandler, '/user_attributes/$path_user_attribute_id', + {'fields': fields}, body == null ? null : body.toJson()); + } + + /// ### Delete a user attribute (admin only). + /// + /// DELETE /user_attributes/{user_attribute_id} -> String + Future> delete_user_attribute( + + /// @param {int} user_attribute_id Id of user_attribute + int user_attribute_id) async { + var path_user_attribute_id = encodeParam(user_attribute_id); + + String responseHandler(dynamic json, String contentType) { + return json; + } + + return delete(responseHandler, '/user_attributes/$path_user_attribute_id'); + } + + /// ### Returns all values of a user attribute defined by user groups, in precedence order. + /// + /// A user may be a member of multiple groups which define different values for a given user attribute. + /// The order of group-values in the response determines precedence for selecting which group-value applies + /// to a given user. For more information, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values). + /// + /// Results will only include groups that the caller's user account has permission to see. + /// + /// GET /user_attributes/{user_attribute_id}/group_values -> List + Future>> + all_user_attribute_group_values( + + /// @param {int} user_attribute_id Id of user attribute + int user_attribute_id, + { + + /// @param {String} fields Requested fields. + String fields}) async { + var path_user_attribute_id = encodeParam(user_attribute_id); + + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => UserAttributeGroupValue.fromResponse(i, contentType)) + .toList(); + } + + return get( + responseHandler, + '/user_attributes/$path_user_attribute_id/group_values', + {'fields': fields}); + } + + /// ### Define values for a user attribute across a set of groups, in priority order. + /// + /// This function defines all values for a user attribute defined by user groups. This is a global setting, potentially affecting + /// all users in the system. This function replaces any existing group value definitions for the indicated user attribute. + /// + /// The value of a user attribute for a given user is determined by searching the following locations, in this order: + /// + /// 1. the user's account settings + /// 2. the groups that the user is a member of + /// 3. the default value of the user attribute, if any + /// + /// The user may be a member of multiple groups which define different values for that user attribute. The order of items in the group_values parameter + /// determines which group takes priority for that user. Lowest array index wins. + /// + /// An alternate method to indicate the selection precedence of group-values is to assign numbers to the 'rank' property of each + /// group-value object in the array. Lowest 'rank' value wins. If you use this technique, you must assign a + /// rank value to every group-value object in the array. + /// + /// To set a user attribute value for a single user, see [Set User Attribute User Value](#!/User/set_user_attribute_user_value). + /// To set a user attribute value for all members of a group, see [Set User Attribute Group Value](#!/Group/update_user_attribute_group_value). + /// + /// POST /user_attributes/{user_attribute_id}/group_values -> List + Future>> + set_user_attribute_group_values( + + /// @param {int} user_attribute_id Id of user attribute + int user_attribute_id, + + /// @param {List} body + List body) async { + var path_user_attribute_id = encodeParam(user_attribute_id); + + List responseHandler( + dynamic json, String contentType) { + return json + .map( + (i) => UserAttributeGroupValue.fromResponse(i, contentType)) + .toList(); + } + + return post(responseHandler, + '/user_attributes/$path_user_attribute_id/group_values', null, body); + } + + // #endregion UserAttribute: Manage User Attributes + + // #region Workspace: Manage Workspaces + + /// ### Get All Workspaces + /// + /// Returns all workspaces available to the calling user. + /// + /// GET /workspaces -> List + Future>> all_workspaces() async { + List responseHandler(dynamic json, String contentType) { + return json + .map((i) => Workspace.fromResponse(i, contentType)) + .toList(); + } + + return get(responseHandler, '/workspaces'); + } + + /// ### Get A Workspace + /// + /// Returns information about a workspace such as the git status and selected branches + /// of all projects available to the caller's user account. + /// + /// A workspace defines which versions of project files will be used to evaluate expressions + /// and operations that use model definitions - operations such as running queries or rendering dashboards. + /// Each project has its own git repository, and each project in a workspace may be configured to reference + /// particular branch or revision within their respective repositories. + /// + /// There are two predefined workspaces available: "production" and "dev". + /// + /// The production workspace is shared across all Looker users. Models in the production workspace are read-only. + /// Changing files in production is accomplished by modifying files in a git branch and using Pull Requests + /// to merge the changes from the dev branch into the production branch, and then telling + /// Looker to sync with production. + /// + /// The dev workspace is local to each Looker user. Changes made to project/model files in the dev workspace only affect + /// that user, and only when the dev workspace is selected as the active workspace for the API session. + /// (See set_session_workspace()). + /// + /// The dev workspace is NOT unique to an API session. Two applications accessing the Looker API using + /// the same user account will see the same files in the dev workspace. To avoid collisions between + /// API clients it's best to have each client login with API3 credentials for a different user account. + /// + /// Changes made to files in a dev workspace are persistent across API sessions. It's a good + /// idea to commit any changes you've made to the git repository, but not strictly required. Your modified files + /// reside in a special user-specific directory on the Looker server and will still be there when you login in again + /// later and use update_session(workspace_id: "dev") to select the dev workspace for the new API session. + /// + /// GET /workspaces/{workspace_id} -> Workspace + Future> workspace( + + /// @param {String} workspace_id Id of the workspace + String workspace_id) async { + var path_workspace_id = encodeParam(workspace_id); + + Workspace responseHandler(dynamic json, String contentType) { + return Workspace.fromResponse(json, contentType); + } + + return get(responseHandler, '/workspaces/$path_workspace_id'); + } + + // #endregion Workspace: Manage Workspaces +} diff --git a/dart/looker_sdk/lib/src/sdk/models.dart b/dart/looker_sdk/lib/src/sdk/models.dart new file mode 100644 index 000000000..646e3e091 --- /dev/null +++ b/dart/looker_sdk/lib/src/sdk/models.dart @@ -0,0 +1,66228 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + */ + +/// 307 API models: 229 Spec, 0 Request, 58 Write, 20 Enum + +// NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 + +class AccessToken { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _accessToken; + bool _accessTokenSet = false; + + String _tokenType; + bool _tokenTypeSet = false; + + int _expiresIn; + bool _expiresInSet = false; + + String _refreshToken; + bool _refreshTokenSet = false; + + /// Access Token used for API calls (read-only) + + String get accessToken { + if (!_accessTokenSet && _apiMapResponse.containsKey('access_token')) { + _accessToken = _apiMapResponse['access_token'] == null + ? null + : _apiMapResponse['access_token'].toString(); + _accessTokenSet = true; + } + return _accessToken; + } + + set accessToken(String v) { + _accessToken = v; + _accessTokenSet = true; + } + + /// Type of Token (read-only) + + String get tokenType { + if (!_tokenTypeSet && _apiMapResponse.containsKey('token_type')) { + _tokenType = _apiMapResponse['token_type'] == null + ? null + : _apiMapResponse['token_type'].toString(); + _tokenTypeSet = true; + } + return _tokenType; + } + + set tokenType(String v) { + _tokenType = v; + _tokenTypeSet = true; + } + + /// Number of seconds before the token expires (read-only) + + int get expiresIn { + if (!_expiresInSet && _apiMapResponse.containsKey('expires_in')) { + _expiresIn = _apiMapResponse['expires_in']; + _expiresInSet = true; + } + return _expiresIn; + } + + set expiresIn(int v) { + _expiresIn = v; + _expiresInSet = true; + } + + /// Refresh token which can be used to obtain a new access token (read-only) + + String get refreshToken { + if (!_refreshTokenSet && _apiMapResponse.containsKey('refresh_token')) { + _refreshToken = _apiMapResponse['refresh_token'] == null + ? null + : _apiMapResponse['refresh_token'].toString(); + _refreshTokenSet = true; + } + return _refreshToken; + } + + set refreshToken(String v) { + _refreshToken = v; + _refreshTokenSet = true; + } + + AccessToken() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + AccessToken.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_accessTokenSet || _apiMapResponse.containsKey('access_token')) { + json['access_token'] = accessToken; + } + if (_tokenTypeSet || _apiMapResponse.containsKey('token_type')) { + json['token_type'] = tokenType; + } + if (_expiresInSet || _apiMapResponse.containsKey('expires_in')) { + json['expires_in'] = expiresIn; + } + if (_refreshTokenSet || _apiMapResponse.containsKey('refresh_token')) { + json['refresh_token'] = refreshToken; + } + return json; + } +} + +class Alert { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _appliedDashboardFilters; + bool _appliedDashboardFiltersSet = false; + + ComparisonType _comparisonType; + bool _comparisonTypeSet = false; + + String _cron; + bool _cronSet = false; + + String _customTitle; + bool _customTitleSet = false; + + int _dashboardElementId; + bool _dashboardElementIdSet = false; + + String _description; + bool _descriptionSet = false; + + List _destinations; + bool _destinationsSet = false; + + AlertField _field; + bool _fieldSet = false; + + bool _followed; + bool _followedSet = false; + + bool _followable; + bool _followableSet = false; + + int _id; + bool _idSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _disabledReason; + bool _disabledReasonSet = false; + + bool _isPublic; + bool _isPublicSet = false; + + InvestigativeContentType _investigativeContentType; + bool _investigativeContentTypeSet = false; + + String _investigativeContentId; + bool _investigativeContentIdSet = false; + + String _investigativeContentTitle; + bool _investigativeContentTitleSet = false; + + String _lookmlDashboardId; + bool _lookmlDashboardIdSet = false; + + String _lookmlLinkId; + bool _lookmlLinkIdSet = false; + + int _ownerId; + bool _ownerIdSet = false; + + String _ownerDisplayName; + bool _ownerDisplayNameSet = false; + + double _threshold; + bool _thresholdSet = false; + + AlertConditionState _timeSeriesConditionState; + bool _timeSeriesConditionStateSet = false; + + /// Filters coming from the dashboard that are applied. Example `[{ "filter_title": "Name", "field_name": "distribution_centers.name", "filter_value": "Los Angeles CA" }]` + + List get appliedDashboardFilters { + if (!_appliedDashboardFiltersSet && + _apiMapResponse.containsKey('applied_dashboard_filters')) { + _appliedDashboardFilters = + _apiMapResponse['applied_dashboard_filters'] == null + ? null + : (_apiMapResponse['applied_dashboard_filters'] as List) + .map((i) => AlertAppliedDashboardFilter.fromResponse( + i, apiResponseContentType)) + .toList(); + _appliedDashboardFiltersSet = true; + } + return _appliedDashboardFilters; + } + + set appliedDashboardFilters(List v) { + _appliedDashboardFilters = v; + _appliedDashboardFiltersSet = true; + } + + /// This property informs the check what kind of comparison we are performing. Only certain condition types are valid for time series alerts. For details, refer to [Setting Alert Conditions](https://docs.looker.com/sharing-and-publishing/creating-alerts#setting_alert_conditions) Valid values are: "EQUAL_TO", "GREATER_THAN", "GREATER_THAN_OR_EQUAL_TO", "LESS_THAN", "LESS_THAN_OR_EQUAL_TO", "INCREASES_BY", "DECREASES_BY", "CHANGES_BY". + + ComparisonType get comparisonType { + if (!_comparisonTypeSet && _apiMapResponse.containsKey('comparison_type')) { + _comparisonType = ComparisonTypeMapper.fromStringValue( + _apiMapResponse['comparison_type']); + _comparisonTypeSet = true; + } + return _comparisonType; + } + + set comparisonType(ComparisonType v) { + _comparisonType = v; + _comparisonTypeSet = true; + } + + /// Vixie-Style crontab specification when to run. At minumum, it has to be longer than 15 minute intervals + + String get cron { + if (!_cronSet && _apiMapResponse.containsKey('cron')) { + _cron = _apiMapResponse['cron'] == null + ? null + : _apiMapResponse['cron'].toString(); + _cronSet = true; + } + return _cron; + } + + set cron(String v) { + _cron = v; + _cronSet = true; + } + + /// An optional, user-defined title for the alert + + String get customTitle { + if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { + _customTitle = _apiMapResponse['custom_title'] == null + ? null + : _apiMapResponse['custom_title'].toString(); + _customTitleSet = true; + } + return _customTitle; + } + + set customTitle(String v) { + _customTitle = v; + _customTitleSet = true; + } + + /// ID of the dashboard element associated with the alert. Refer to [dashboard_element()](#!/Dashboard/DashboardElement) + + int get dashboardElementId { + if (!_dashboardElementIdSet && + _apiMapResponse.containsKey('dashboard_element_id')) { + _dashboardElementId = _apiMapResponse['dashboard_element_id']; + _dashboardElementIdSet = true; + } + return _dashboardElementId; + } + + set dashboardElementId(int v) { + _dashboardElementId = v; + _dashboardElementIdSet = true; + } + + /// An optional description for the alert. This supplements the title + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Array of destinations to send alerts to. Must be the same type of destination. Example `[{ "destination_type": "EMAIL", "email_address": "test@test.com" }]` + + List get destinations { + if (!_destinationsSet && _apiMapResponse.containsKey('destinations')) { + _destinations = _apiMapResponse['destinations'] == null + ? null + : (_apiMapResponse['destinations'] as List) + .map((i) => + AlertDestination.fromResponse(i, apiResponseContentType)) + .toList(); + _destinationsSet = true; + } + return _destinations; + } + + set destinations(List v) { + _destinations = v; + _destinationsSet = true; + } + + AlertField get field { + if (!_fieldSet && _apiMapResponse.containsKey('field')) { + _field = _apiMapResponse['field'] == null + ? null + : AlertField.fromResponse( + _apiMapResponse['field'], apiResponseContentType); + _fieldSet = true; + } + return _field; + } + + set field(AlertField v) { + _field = v; + _fieldSet = true; + } + + /// Whether or not the user follows this alert. (read-only) + + bool get followed { + if (!_followedSet && _apiMapResponse.containsKey('followed')) { + _followed = _apiMapResponse['followed']; + _followedSet = true; + } + return _followed; + } + + set followed(bool v) { + _followed = v; + _followedSet = true; + } + + /// Whether or not the alert is followable (read-only) + + bool get followable { + if (!_followableSet && _apiMapResponse.containsKey('followable')) { + _followable = _apiMapResponse['followable']; + _followableSet = true; + } + return _followable; + } + + set followable(bool v) { + _followable = v; + _followableSet = true; + } + + /// ID of the alert (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Whether or not the alert is disabled + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Reason for disabling alert + + String get disabledReason { + if (!_disabledReasonSet && _apiMapResponse.containsKey('disabled_reason')) { + _disabledReason = _apiMapResponse['disabled_reason'] == null + ? null + : _apiMapResponse['disabled_reason'].toString(); + _disabledReasonSet = true; + } + return _disabledReason; + } + + set disabledReason(String v) { + _disabledReason = v; + _disabledReasonSet = true; + } + + /// Whether or not the alert is public + + bool get isPublic { + if (!_isPublicSet && _apiMapResponse.containsKey('is_public')) { + _isPublic = _apiMapResponse['is_public']; + _isPublicSet = true; + } + return _isPublic; + } + + set isPublic(bool v) { + _isPublic = v; + _isPublicSet = true; + } + + /// The type of the investigative content Valid values are: "dashboard". + + InvestigativeContentType get investigativeContentType { + if (!_investigativeContentTypeSet && + _apiMapResponse.containsKey('investigative_content_type')) { + _investigativeContentType = + InvestigativeContentTypeMapper.fromStringValue( + _apiMapResponse['investigative_content_type']); + _investigativeContentTypeSet = true; + } + return _investigativeContentType; + } + + set investigativeContentType(InvestigativeContentType v) { + _investigativeContentType = v; + _investigativeContentTypeSet = true; + } + + /// The ID of the investigative content. For dashboards, this will be the dashboard ID + + String get investigativeContentId { + if (!_investigativeContentIdSet && + _apiMapResponse.containsKey('investigative_content_id')) { + _investigativeContentId = + _apiMapResponse['investigative_content_id'] == null + ? null + : _apiMapResponse['investigative_content_id'].toString(); + _investigativeContentIdSet = true; + } + return _investigativeContentId; + } + + set investigativeContentId(String v) { + _investigativeContentId = v; + _investigativeContentIdSet = true; + } + + /// The title of the investigative content. (read-only) + + String get investigativeContentTitle { + if (!_investigativeContentTitleSet && + _apiMapResponse.containsKey('investigative_content_title')) { + _investigativeContentTitle = + _apiMapResponse['investigative_content_title'] == null + ? null + : _apiMapResponse['investigative_content_title'].toString(); + _investigativeContentTitleSet = true; + } + return _investigativeContentTitle; + } + + set investigativeContentTitle(String v) { + _investigativeContentTitle = v; + _investigativeContentTitleSet = true; + } + + /// ID of the LookML dashboard associated with the alert + + String get lookmlDashboardId { + if (!_lookmlDashboardIdSet && + _apiMapResponse.containsKey('lookml_dashboard_id')) { + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null + ? null + : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardIdSet = true; + } + return _lookmlDashboardId; + } + + set lookmlDashboardId(String v) { + _lookmlDashboardId = v; + _lookmlDashboardIdSet = true; + } + + /// ID of the LookML dashboard element associated with the alert + + String get lookmlLinkId { + if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { + _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null + ? null + : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkIdSet = true; + } + return _lookmlLinkId; + } + + set lookmlLinkId(String v) { + _lookmlLinkId = v; + _lookmlLinkIdSet = true; + } + + /// User id of alert owner + + int get ownerId { + if (!_ownerIdSet && _apiMapResponse.containsKey('owner_id')) { + _ownerId = _apiMapResponse['owner_id']; + _ownerIdSet = true; + } + return _ownerId; + } + + set ownerId(int v) { + _ownerId = v; + _ownerIdSet = true; + } + + /// Alert owner's display name (read-only) + + String get ownerDisplayName { + if (!_ownerDisplayNameSet && + _apiMapResponse.containsKey('owner_display_name')) { + _ownerDisplayName = _apiMapResponse['owner_display_name'] == null + ? null + : _apiMapResponse['owner_display_name'].toString(); + _ownerDisplayNameSet = true; + } + return _ownerDisplayName; + } + + set ownerDisplayName(String v) { + _ownerDisplayName = v; + _ownerDisplayNameSet = true; + } + + /// Value of the alert threshold + + double get threshold { + if (!_thresholdSet && _apiMapResponse.containsKey('threshold')) { + _threshold = _apiMapResponse['threshold']; + _thresholdSet = true; + } + return _threshold; + } + + set threshold(double v) { + _threshold = v; + _thresholdSet = true; + } + + AlertConditionState get timeSeriesConditionState { + if (!_timeSeriesConditionStateSet && + _apiMapResponse.containsKey('time_series_condition_state')) { + _timeSeriesConditionState = + _apiMapResponse['time_series_condition_state'] == null + ? null + : AlertConditionState.fromResponse( + _apiMapResponse['time_series_condition_state'], + apiResponseContentType); + _timeSeriesConditionStateSet = true; + } + return _timeSeriesConditionState; + } + + set timeSeriesConditionState(AlertConditionState v) { + _timeSeriesConditionState = v; + _timeSeriesConditionStateSet = true; + } + + Alert() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Alert.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_appliedDashboardFiltersSet || + _apiMapResponse.containsKey('applied_dashboard_filters')) { + json['applied_dashboard_filters'] = appliedDashboardFilters == null + ? null + : appliedDashboardFilters.map((i) => i.toJson()).toList(); + } + if (_comparisonTypeSet || _apiMapResponse.containsKey('comparison_type')) { + json['comparison_type'] = + ComparisonTypeMapper.toStringValue(comparisonType); + } + if (_cronSet || _apiMapResponse.containsKey('cron')) { + json['cron'] = cron; + } + if (_customTitleSet || _apiMapResponse.containsKey('custom_title')) { + json['custom_title'] = customTitle; + } + if (_dashboardElementIdSet || + _apiMapResponse.containsKey('dashboard_element_id')) { + json['dashboard_element_id'] = dashboardElementId; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_destinationsSet || _apiMapResponse.containsKey('destinations')) { + json['destinations'] = destinations == null + ? null + : destinations.map((i) => i.toJson()).toList(); + } + if (_fieldSet || _apiMapResponse.containsKey('field')) { + json['field'] = field == null ? null : field.toJson(); + } + if (_followedSet || _apiMapResponse.containsKey('followed')) { + json['followed'] = followed; + } + if (_followableSet || _apiMapResponse.containsKey('followable')) { + json['followable'] = followable; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_disabledReasonSet || _apiMapResponse.containsKey('disabled_reason')) { + json['disabled_reason'] = disabledReason; + } + if (_isPublicSet || _apiMapResponse.containsKey('is_public')) { + json['is_public'] = isPublic; + } + if (_investigativeContentTypeSet || + _apiMapResponse.containsKey('investigative_content_type')) { + json['investigative_content_type'] = + InvestigativeContentTypeMapper.toStringValue( + investigativeContentType); + } + if (_investigativeContentIdSet || + _apiMapResponse.containsKey('investigative_content_id')) { + json['investigative_content_id'] = investigativeContentId; + } + if (_investigativeContentTitleSet || + _apiMapResponse.containsKey('investigative_content_title')) { + json['investigative_content_title'] = investigativeContentTitle; + } + if (_lookmlDashboardIdSet || + _apiMapResponse.containsKey('lookml_dashboard_id')) { + json['lookml_dashboard_id'] = lookmlDashboardId; + } + if (_lookmlLinkIdSet || _apiMapResponse.containsKey('lookml_link_id')) { + json['lookml_link_id'] = lookmlLinkId; + } + if (_ownerIdSet || _apiMapResponse.containsKey('owner_id')) { + json['owner_id'] = ownerId; + } + if (_ownerDisplayNameSet || + _apiMapResponse.containsKey('owner_display_name')) { + json['owner_display_name'] = ownerDisplayName; + } + if (_thresholdSet || _apiMapResponse.containsKey('threshold')) { + json['threshold'] = threshold; + } + if (_timeSeriesConditionStateSet || + _apiMapResponse.containsKey('time_series_condition_state')) { + json['time_series_condition_state'] = timeSeriesConditionState == null + ? null + : timeSeriesConditionState.toJson(); + } + return json; + } +} + +class AlertAppliedDashboardFilter { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _filterTitle; + bool _filterTitleSet = false; + + String _fieldName; + bool _fieldNameSet = false; + + String _filterValue; + bool _filterValueSet = false; + + String _filterDescription; + bool _filterDescriptionSet = false; + + /// Field Title. Refer to `DashboardFilter.title` in [DashboardFilter](#!/types/DashboardFilter). Example `Name` + + String get filterTitle { + if (!_filterTitleSet && _apiMapResponse.containsKey('filter_title')) { + _filterTitle = _apiMapResponse['filter_title'] == null + ? null + : _apiMapResponse['filter_title'].toString(); + _filterTitleSet = true; + } + return _filterTitle; + } + + set filterTitle(String v) { + _filterTitle = v; + _filterTitleSet = true; + } + + /// Field Name. Refer to `DashboardFilter.dimension` in [DashboardFilter](#!/types/DashboardFilter). Example `distribution_centers.name` + + String get fieldName { + if (!_fieldNameSet && _apiMapResponse.containsKey('field_name')) { + _fieldName = _apiMapResponse['field_name'] == null + ? null + : _apiMapResponse['field_name'].toString(); + _fieldNameSet = true; + } + return _fieldName; + } + + set fieldName(String v) { + _fieldName = v; + _fieldNameSet = true; + } + + /// Field Value. [Filter Expressions](https://docs.looker.com/reference/filter-expressions). Example `Los Angeles CA` + + String get filterValue { + if (!_filterValueSet && _apiMapResponse.containsKey('filter_value')) { + _filterValue = _apiMapResponse['filter_value'] == null + ? null + : _apiMapResponse['filter_value'].toString(); + _filterValueSet = true; + } + return _filterValue; + } + + set filterValue(String v) { + _filterValue = v; + _filterValueSet = true; + } + + /// Human Readable Filter Description. This may be null or auto-generated. Example `is Los Angeles CA` (read-only) + + String get filterDescription { + if (!_filterDescriptionSet && + _apiMapResponse.containsKey('filter_description')) { + _filterDescription = _apiMapResponse['filter_description'] == null + ? null + : _apiMapResponse['filter_description'].toString(); + _filterDescriptionSet = true; + } + return _filterDescription; + } + + set filterDescription(String v) { + _filterDescription = v; + _filterDescriptionSet = true; + } + + AlertAppliedDashboardFilter() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + AlertAppliedDashboardFilter.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_filterTitleSet || _apiMapResponse.containsKey('filter_title')) { + json['filter_title'] = filterTitle; + } + if (_fieldNameSet || _apiMapResponse.containsKey('field_name')) { + json['field_name'] = fieldName; + } + if (_filterValueSet || _apiMapResponse.containsKey('filter_value')) { + json['filter_value'] = filterValue; + } + if (_filterDescriptionSet || + _apiMapResponse.containsKey('filter_description')) { + json['filter_description'] = filterDescription; + } + return json; + } +} + +class AlertConditionState { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _previousTimeSeriesId; + bool _previousTimeSeriesIdSet = false; + + String _latestTimeSeriesId; + bool _latestTimeSeriesIdSet = false; + + /// (Write-Only) The second latest time string the alert has seen. + + String get previousTimeSeriesId { + if (!_previousTimeSeriesIdSet && + _apiMapResponse.containsKey('previous_time_series_id')) { + _previousTimeSeriesId = _apiMapResponse['previous_time_series_id'] == null + ? null + : _apiMapResponse['previous_time_series_id'].toString(); + _previousTimeSeriesIdSet = true; + } + return _previousTimeSeriesId; + } + + set previousTimeSeriesId(String v) { + _previousTimeSeriesId = v; + _previousTimeSeriesIdSet = true; + } + + /// (Write-Only) Latest time string the alert has seen. + + String get latestTimeSeriesId { + if (!_latestTimeSeriesIdSet && + _apiMapResponse.containsKey('latest_time_series_id')) { + _latestTimeSeriesId = _apiMapResponse['latest_time_series_id'] == null + ? null + : _apiMapResponse['latest_time_series_id'].toString(); + _latestTimeSeriesIdSet = true; + } + return _latestTimeSeriesId; + } + + set latestTimeSeriesId(String v) { + _latestTimeSeriesId = v; + _latestTimeSeriesIdSet = true; + } + + AlertConditionState() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + AlertConditionState.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_previousTimeSeriesIdSet || + _apiMapResponse.containsKey('previous_time_series_id')) { + json['previous_time_series_id'] = previousTimeSeriesId; + } + if (_latestTimeSeriesIdSet || + _apiMapResponse.containsKey('latest_time_series_id')) { + json['latest_time_series_id'] = latestTimeSeriesId; + } + return json; + } +} + +class AlertDestination { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + DestinationType _destinationType; + bool _destinationTypeSet = false; + + String _emailAddress; + bool _emailAddressSet = false; + + String _actionHubIntegrationId; + bool _actionHubIntegrationIdSet = false; + + String _actionHubFormParamsJson; + bool _actionHubFormParamsJsonSet = false; + + /// Type of destination that the alert will be sent to Valid values are: "EMAIL", "ACTION_HUB". + + DestinationType get destinationType { + if (!_destinationTypeSet && + _apiMapResponse.containsKey('destination_type')) { + _destinationType = DestinationTypeMapper.fromStringValue( + _apiMapResponse['destination_type']); + _destinationTypeSet = true; + } + return _destinationType; + } + + set destinationType(DestinationType v) { + _destinationType = v; + _destinationTypeSet = true; + } + + /// Email address for the 'email' type + + String get emailAddress { + if (!_emailAddressSet && _apiMapResponse.containsKey('email_address')) { + _emailAddress = _apiMapResponse['email_address'] == null + ? null + : _apiMapResponse['email_address'].toString(); + _emailAddressSet = true; + } + return _emailAddress; + } + + set emailAddress(String v) { + _emailAddress = v; + _emailAddressSet = true; + } + + /// Action hub integration id for the 'action_hub' type. [Integration](#!/types/Integration) + + String get actionHubIntegrationId { + if (!_actionHubIntegrationIdSet && + _apiMapResponse.containsKey('action_hub_integration_id')) { + _actionHubIntegrationId = + _apiMapResponse['action_hub_integration_id'] == null + ? null + : _apiMapResponse['action_hub_integration_id'].toString(); + _actionHubIntegrationIdSet = true; + } + return _actionHubIntegrationId; + } + + set actionHubIntegrationId(String v) { + _actionHubIntegrationId = v; + _actionHubIntegrationIdSet = true; + } + + /// Action hub form params json for the 'action_hub' type [IntegrationParam](#!/types/IntegrationParam) + + String get actionHubFormParamsJson { + if (!_actionHubFormParamsJsonSet && + _apiMapResponse.containsKey('action_hub_form_params_json')) { + _actionHubFormParamsJson = + _apiMapResponse['action_hub_form_params_json'] == null + ? null + : _apiMapResponse['action_hub_form_params_json'].toString(); + _actionHubFormParamsJsonSet = true; + } + return _actionHubFormParamsJson; + } + + set actionHubFormParamsJson(String v) { + _actionHubFormParamsJson = v; + _actionHubFormParamsJsonSet = true; + } + + AlertDestination() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + AlertDestination.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_destinationTypeSet || + _apiMapResponse.containsKey('destination_type')) { + json['destination_type'] = + DestinationTypeMapper.toStringValue(destinationType); + } + if (_emailAddressSet || _apiMapResponse.containsKey('email_address')) { + json['email_address'] = emailAddress; + } + if (_actionHubIntegrationIdSet || + _apiMapResponse.containsKey('action_hub_integration_id')) { + json['action_hub_integration_id'] = actionHubIntegrationId; + } + if (_actionHubFormParamsJsonSet || + _apiMapResponse.containsKey('action_hub_form_params_json')) { + json['action_hub_form_params_json'] = actionHubFormParamsJson; + } + return json; + } +} + +class AlertField { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _title; + bool _titleSet = false; + + String _name; + bool _nameSet = false; + + List _filter; + bool _filterSet = false; + + /// Field's title. Usually auto-generated to reflect field name and its filters + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Field's name. Has the format `.` Refer to [docs](https://docs.looker.com/sharing-and-publishing/creating-alerts) for more details + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// (Optional / Advance Use) List of fields filter. This further restricts the alert to certain dashboard element's field values. This can be used on top of dashboard filters `applied_dashboard_filters`. To keep thing simple, it's suggested to just use dashboard filters. Example: `{ 'title': '12 Number on Hand', 'name': 'inventory_items.number_on_hand', 'filter': [{ 'field_name': 'inventory_items.id', 'field_value': 12, 'filter_value': null }] }` + + List get filter { + if (!_filterSet && _apiMapResponse.containsKey('filter')) { + _filter = _apiMapResponse['filter'] == null + ? null + : (_apiMapResponse['filter'] as List) + .map((i) => + AlertFieldFilter.fromResponse(i, apiResponseContentType)) + .toList(); + _filterSet = true; + } + return _filter; + } + + set filter(List v) { + _filter = v; + _filterSet = true; + } + + AlertField() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + AlertField.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_filterSet || _apiMapResponse.containsKey('filter')) { + json['filter'] = + filter == null ? null : filter.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class AlertFieldFilter { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _fieldName; + bool _fieldNameSet = false; + + dynamic _fieldValue; + bool _fieldValueSet = false; + + String _filterValue; + bool _filterValueSet = false; + + /// Field Name. Has format `.` + + String get fieldName { + if (!_fieldNameSet && _apiMapResponse.containsKey('field_name')) { + _fieldName = _apiMapResponse['field_name'] == null + ? null + : _apiMapResponse['field_name'].toString(); + _fieldNameSet = true; + } + return _fieldName; + } + + set fieldName(String v) { + _fieldName = v; + _fieldNameSet = true; + } + + /// Field Value. Depends on the type of field - numeric or string. For [location](https://docs.looker.com/reference/field-reference/dimension-type-reference#location) type, it's a list of floats. Example `[1.0, 56.0]` + + dynamic get fieldValue { + if (!_fieldValueSet && _apiMapResponse.containsKey('field_value')) { + _fieldValue = _apiMapResponse['field_value']; + _fieldValueSet = true; + } + return _fieldValue; + } + + set fieldValue(dynamic v) { + _fieldValue = v; + _fieldValueSet = true; + } + + /// Filter Value. Usually null except for [location](https://docs.looker.com/reference/field-reference/dimension-type-reference#location) type. It'll be a string of lat,long ie `'1.0,56.0'` + + String get filterValue { + if (!_filterValueSet && _apiMapResponse.containsKey('filter_value')) { + _filterValue = _apiMapResponse['filter_value'] == null + ? null + : _apiMapResponse['filter_value'].toString(); + _filterValueSet = true; + } + return _filterValue; + } + + set filterValue(String v) { + _filterValue = v; + _filterValueSet = true; + } + + AlertFieldFilter() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + AlertFieldFilter.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_fieldNameSet || _apiMapResponse.containsKey('field_name')) { + json['field_name'] = fieldName; + } + if (_fieldValueSet || _apiMapResponse.containsKey('field_value')) { + json['field_value'] = fieldValue; + } + if (_filterValueSet || _apiMapResponse.containsKey('filter_value')) { + json['filter_value'] = filterValue; + } + return json; + } +} + +class AlertPatch { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _ownerId; + bool _ownerIdSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _disabledReason; + bool _disabledReasonSet = false; + + bool _isPublic; + bool _isPublicSet = false; + + double _threshold; + bool _thresholdSet = false; + + /// New owner ID of the alert + + int get ownerId { + if (!_ownerIdSet && _apiMapResponse.containsKey('owner_id')) { + _ownerId = _apiMapResponse['owner_id']; + _ownerIdSet = true; + } + return _ownerId; + } + + set ownerId(int v) { + _ownerId = v; + _ownerIdSet = true; + } + + /// Set alert enabled or disabled + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// The reason this alert is disabled + + String get disabledReason { + if (!_disabledReasonSet && _apiMapResponse.containsKey('disabled_reason')) { + _disabledReason = _apiMapResponse['disabled_reason'] == null + ? null + : _apiMapResponse['disabled_reason'].toString(); + _disabledReasonSet = true; + } + return _disabledReason; + } + + set disabledReason(String v) { + _disabledReason = v; + _disabledReasonSet = true; + } + + /// Set alert public or private + + bool get isPublic { + if (!_isPublicSet && _apiMapResponse.containsKey('is_public')) { + _isPublic = _apiMapResponse['is_public']; + _isPublicSet = true; + } + return _isPublic; + } + + set isPublic(bool v) { + _isPublic = v; + _isPublicSet = true; + } + + /// New threshold value + + double get threshold { + if (!_thresholdSet && _apiMapResponse.containsKey('threshold')) { + _threshold = _apiMapResponse['threshold']; + _thresholdSet = true; + } + return _threshold; + } + + set threshold(double v) { + _threshold = v; + _thresholdSet = true; + } + + AlertPatch() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + AlertPatch.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_ownerIdSet || _apiMapResponse.containsKey('owner_id')) { + json['owner_id'] = ownerId; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_disabledReasonSet || _apiMapResponse.containsKey('disabled_reason')) { + json['disabled_reason'] = disabledReason; + } + if (_isPublicSet || _apiMapResponse.containsKey('is_public')) { + json['is_public'] = isPublic; + } + if (_thresholdSet || _apiMapResponse.containsKey('threshold')) { + json['threshold'] = threshold; + } + return json; + } +} + +/// The appropriate horizontal text alignment the values of this field should be displayed in. Valid values are: "left", "right". (Enum defined in LookmlModelExploreField) +enum Align { left, right } + +class AlignMapper { + static String toStringValue(Align e) { + switch (e) { + case Align.left: + return 'left'; + case Align.right: + return 'right'; + + default: + return null; + } + } + + static Align fromStringValue(String s) { + if (s == 'left') { + return Align.left; + } + if (s == 'right') { + return Align.right; + } + return null; + } +} + +class ApiSession { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _workspaceId; + bool _workspaceIdSet = false; + + int _sudoUserId; + bool _sudoUserIdSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// The id of active workspace for this session + + String get workspaceId { + if (!_workspaceIdSet && _apiMapResponse.containsKey('workspace_id')) { + _workspaceId = _apiMapResponse['workspace_id'] == null + ? null + : _apiMapResponse['workspace_id'].toString(); + _workspaceIdSet = true; + } + return _workspaceId; + } + + set workspaceId(String v) { + _workspaceId = v; + _workspaceIdSet = true; + } + + /// The id of the actual user in the case when this session represents one user sudo'ing as another (read-only) + + int get sudoUserId { + if (!_sudoUserIdSet && _apiMapResponse.containsKey('sudo_user_id')) { + _sudoUserId = _apiMapResponse['sudo_user_id']; + _sudoUserIdSet = true; + } + return _sudoUserId; + } + + set sudoUserId(int v) { + _sudoUserId = v; + _sudoUserIdSet = true; + } + + ApiSession() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ApiSession.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_workspaceIdSet || _apiMapResponse.containsKey('workspace_id')) { + json['workspace_id'] = workspaceId; + } + if (_sudoUserIdSet || _apiMapResponse.containsKey('sudo_user_id')) { + json['sudo_user_id'] = sudoUserId; + } + return json; + } +} + +class ApiVersion { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _lookerReleaseVersion; + bool _lookerReleaseVersionSet = false; + + ApiVersionElement _currentVersion; + bool _currentVersionSet = false; + + List _supportedVersions; + bool _supportedVersionsSet = false; + + String _apiServerUrl; + bool _apiServerUrlSet = false; + + String _webServerUrl; + bool _webServerUrlSet = false; + + /// Current Looker release version number (read-only) + + String get lookerReleaseVersion { + if (!_lookerReleaseVersionSet && + _apiMapResponse.containsKey('looker_release_version')) { + _lookerReleaseVersion = _apiMapResponse['looker_release_version'] == null + ? null + : _apiMapResponse['looker_release_version'].toString(); + _lookerReleaseVersionSet = true; + } + return _lookerReleaseVersion; + } + + set lookerReleaseVersion(String v) { + _lookerReleaseVersion = v; + _lookerReleaseVersionSet = true; + } + + ApiVersionElement get currentVersion { + if (!_currentVersionSet && _apiMapResponse.containsKey('current_version')) { + _currentVersion = _apiMapResponse['current_version'] == null + ? null + : ApiVersionElement.fromResponse( + _apiMapResponse['current_version'], apiResponseContentType); + _currentVersionSet = true; + } + return _currentVersion; + } + + set currentVersion(ApiVersionElement v) { + _currentVersion = v; + _currentVersionSet = true; + } + + /// Array of versions supported by this Looker instance (read-only) + + List get supportedVersions { + if (!_supportedVersionsSet && + _apiMapResponse.containsKey('supported_versions')) { + _supportedVersions = _apiMapResponse['supported_versions'] == null + ? null + : (_apiMapResponse['supported_versions'] as List) + .map((i) => + ApiVersionElement.fromResponse(i, apiResponseContentType)) + .toList(); + _supportedVersionsSet = true; + } + return _supportedVersions; + } + + set supportedVersions(List v) { + _supportedVersions = v; + _supportedVersionsSet = true; + } + + /// API server base url (read-only) + + String get apiServerUrl { + if (!_apiServerUrlSet && _apiMapResponse.containsKey('api_server_url')) { + _apiServerUrl = _apiMapResponse['api_server_url'] == null + ? null + : _apiMapResponse['api_server_url'].toString(); + _apiServerUrlSet = true; + } + return _apiServerUrl; + } + + set apiServerUrl(String v) { + _apiServerUrl = v; + _apiServerUrlSet = true; + } + + /// Web server base url (read-only) + + String get webServerUrl { + if (!_webServerUrlSet && _apiMapResponse.containsKey('web_server_url')) { + _webServerUrl = _apiMapResponse['web_server_url'] == null + ? null + : _apiMapResponse['web_server_url'].toString(); + _webServerUrlSet = true; + } + return _webServerUrl; + } + + set webServerUrl(String v) { + _webServerUrl = v; + _webServerUrlSet = true; + } + + ApiVersion() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ApiVersion.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_lookerReleaseVersionSet || + _apiMapResponse.containsKey('looker_release_version')) { + json['looker_release_version'] = lookerReleaseVersion; + } + if (_currentVersionSet || _apiMapResponse.containsKey('current_version')) { + json['current_version'] = + currentVersion == null ? null : currentVersion.toJson(); + } + if (_supportedVersionsSet || + _apiMapResponse.containsKey('supported_versions')) { + json['supported_versions'] = supportedVersions == null + ? null + : supportedVersions.map((i) => i.toJson()).toList(); + } + if (_apiServerUrlSet || _apiMapResponse.containsKey('api_server_url')) { + json['api_server_url'] = apiServerUrl; + } + if (_webServerUrlSet || _apiMapResponse.containsKey('web_server_url')) { + json['web_server_url'] = webServerUrl; + } + return json; + } +} + +class ApiVersionElement { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _version; + bool _versionSet = false; + + String _fullVersion; + bool _fullVersionSet = false; + + String _status; + bool _statusSet = false; + + String _swaggerUrl; + bool _swaggerUrlSet = false; + + /// Version number as it appears in '/api/xxx/' urls (read-only) + + String get version { + if (!_versionSet && _apiMapResponse.containsKey('version')) { + _version = _apiMapResponse['version'] == null + ? null + : _apiMapResponse['version'].toString(); + _versionSet = true; + } + return _version; + } + + set version(String v) { + _version = v; + _versionSet = true; + } + + /// Full version number including minor version (read-only) + + String get fullVersion { + if (!_fullVersionSet && _apiMapResponse.containsKey('full_version')) { + _fullVersion = _apiMapResponse['full_version'] == null + ? null + : _apiMapResponse['full_version'].toString(); + _fullVersionSet = true; + } + return _fullVersion; + } + + set fullVersion(String v) { + _fullVersion = v; + _fullVersionSet = true; + } + + /// Status of this version (read-only) + + String get status { + if (!_statusSet && _apiMapResponse.containsKey('status')) { + _status = _apiMapResponse['status'] == null + ? null + : _apiMapResponse['status'].toString(); + _statusSet = true; + } + return _status; + } + + set status(String v) { + _status = v; + _statusSet = true; + } + + /// Url for swagger.json for this version (read-only) + + String get swaggerUrl { + if (!_swaggerUrlSet && _apiMapResponse.containsKey('swagger_url')) { + _swaggerUrl = _apiMapResponse['swagger_url'] == null + ? null + : _apiMapResponse['swagger_url'].toString(); + _swaggerUrlSet = true; + } + return _swaggerUrl; + } + + set swaggerUrl(String v) { + _swaggerUrl = v; + _swaggerUrlSet = true; + } + + ApiVersionElement() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ApiVersionElement.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_versionSet || _apiMapResponse.containsKey('version')) { + json['version'] = version; + } + if (_fullVersionSet || _apiMapResponse.containsKey('full_version')) { + json['full_version'] = fullVersion; + } + if (_statusSet || _apiMapResponse.containsKey('status')) { + json['status'] = status; + } + if (_swaggerUrlSet || _apiMapResponse.containsKey('swagger_url')) { + json['swagger_url'] = swaggerUrl; + } + return json; + } +} + +class BackupConfiguration { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _type; + bool _typeSet = false; + + String _customS3Bucket; + bool _customS3BucketSet = false; + + String _customS3BucketRegion; + bool _customS3BucketRegionSet = false; + + String _customS3Key; + bool _customS3KeySet = false; + + String _customS3Secret; + bool _customS3SecretSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Type of backup: looker-s3 or custom-s3 + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Name of bucket for custom-s3 backups + + String get customS3Bucket { + if (!_customS3BucketSet && + _apiMapResponse.containsKey('custom_s3_bucket')) { + _customS3Bucket = _apiMapResponse['custom_s3_bucket'] == null + ? null + : _apiMapResponse['custom_s3_bucket'].toString(); + _customS3BucketSet = true; + } + return _customS3Bucket; + } + + set customS3Bucket(String v) { + _customS3Bucket = v; + _customS3BucketSet = true; + } + + /// Name of region where the bucket is located + + String get customS3BucketRegion { + if (!_customS3BucketRegionSet && + _apiMapResponse.containsKey('custom_s3_bucket_region')) { + _customS3BucketRegion = _apiMapResponse['custom_s3_bucket_region'] == null + ? null + : _apiMapResponse['custom_s3_bucket_region'].toString(); + _customS3BucketRegionSet = true; + } + return _customS3BucketRegion; + } + + set customS3BucketRegion(String v) { + _customS3BucketRegion = v; + _customS3BucketRegionSet = true; + } + + /// (Write-Only) AWS S3 key used for custom-s3 backups + + String get customS3Key { + if (!_customS3KeySet && _apiMapResponse.containsKey('custom_s3_key')) { + _customS3Key = _apiMapResponse['custom_s3_key'] == null + ? null + : _apiMapResponse['custom_s3_key'].toString(); + _customS3KeySet = true; + } + return _customS3Key; + } + + set customS3Key(String v) { + _customS3Key = v; + _customS3KeySet = true; + } + + /// (Write-Only) AWS S3 secret used for custom-s3 backups + + String get customS3Secret { + if (!_customS3SecretSet && + _apiMapResponse.containsKey('custom_s3_secret')) { + _customS3Secret = _apiMapResponse['custom_s3_secret'] == null + ? null + : _apiMapResponse['custom_s3_secret'].toString(); + _customS3SecretSet = true; + } + return _customS3Secret; + } + + set customS3Secret(String v) { + _customS3Secret = v; + _customS3SecretSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + BackupConfiguration() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + BackupConfiguration.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_customS3BucketSet || _apiMapResponse.containsKey('custom_s3_bucket')) { + json['custom_s3_bucket'] = customS3Bucket; + } + if (_customS3BucketRegionSet || + _apiMapResponse.containsKey('custom_s3_bucket_region')) { + json['custom_s3_bucket_region'] = customS3BucketRegion; + } + if (_customS3KeySet || _apiMapResponse.containsKey('custom_s3_key')) { + json['custom_s3_key'] = customS3Key; + } + if (_customS3SecretSet || _apiMapResponse.containsKey('custom_s3_secret')) { + json['custom_s3_secret'] = customS3Secret; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class Board { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + DateTime _deletedAt; + bool _deletedAtSet = false; + + String _description; + bool _descriptionSet = false; + + List _boardSections; + bool _boardSectionsSet = false; + + int _id; + bool _idSet = false; + + List _sectionOrder; + bool _sectionOrderSet = false; + + String _title; + bool _titleSet = false; + + DateTime _updatedAt; + bool _updatedAtSet = false; + + int _userId; + bool _userIdSet = false; + + bool _primaryHomepage; + bool _primaryHomepageSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Id of associated content_metadata record (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Date of board creation (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Date of board deletion + + DateTime get deletedAt { + if (!_deletedAtSet && _apiMapResponse.containsKey('deleted_at')) { + _deletedAt = _apiMapResponse['deleted_at'] == null + ? null + : DateTime.parse(_apiMapResponse['deleted_at']); + _deletedAtSet = true; + } + return _deletedAt; + } + + set deletedAt(DateTime v) { + _deletedAt = v; + _deletedAtSet = true; + } + + /// Description of the board + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Sections of the board (read-only) + + List get boardSections { + if (!_boardSectionsSet && _apiMapResponse.containsKey('board_sections')) { + _boardSections = _apiMapResponse['board_sections'] == null + ? null + : (_apiMapResponse['board_sections'] as List) + .map((i) => BoardSection.fromResponse(i, apiResponseContentType)) + .toList(); + _boardSectionsSet = true; + } + return _boardSections; + } + + set boardSections(List v) { + _boardSections = v; + _boardSectionsSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// ids of the board sections in the order they should be displayed + + List get sectionOrder { + if (!_sectionOrderSet && _apiMapResponse.containsKey('section_order')) { + _sectionOrder = _apiMapResponse['section_order'] == null + ? null + : _apiMapResponse['section_order'].map((i) => i as int).toList(); + _sectionOrderSet = true; + } + return _sectionOrder; + } + + set sectionOrder(List v) { + _sectionOrder = v; + _sectionOrderSet = true; + } + + /// Title of the board + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Date of last board update (read-only) + + DateTime get updatedAt { + if (!_updatedAtSet && _apiMapResponse.containsKey('updated_at')) { + _updatedAt = _apiMapResponse['updated_at'] == null + ? null + : DateTime.parse(_apiMapResponse['updated_at']); + _updatedAtSet = true; + } + return _updatedAt; + } + + set updatedAt(DateTime v) { + _updatedAt = v; + _updatedAtSet = true; + } + + /// User id of board creator (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Whether the board is the primary homepage or not (read-only) + + bool get primaryHomepage { + if (!_primaryHomepageSet && + _apiMapResponse.containsKey('primary_homepage')) { + _primaryHomepage = _apiMapResponse['primary_homepage']; + _primaryHomepageSet = true; + } + return _primaryHomepage; + } + + set primaryHomepage(bool v) { + _primaryHomepage = v; + _primaryHomepageSet = true; + } + + Board() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Board.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { + json['deleted_at'] = + deletedAt == null ? null : deletedAt.toIso8601String(); + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_boardSectionsSet || _apiMapResponse.containsKey('board_sections')) { + json['board_sections'] = boardSections == null + ? null + : boardSections.map((i) => i.toJson()).toList(); + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_sectionOrderSet || _apiMapResponse.containsKey('section_order')) { + json['section_order'] = sectionOrder; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { + json['updated_at'] = + updatedAt == null ? null : updatedAt.toIso8601String(); + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_primaryHomepageSet || + _apiMapResponse.containsKey('primary_homepage')) { + json['primary_homepage'] = primaryHomepage; + } + return json; + } +} + +class BoardItem { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _contentCreatedBy; + bool _contentCreatedBySet = false; + + int _contentFavoriteId; + bool _contentFavoriteIdSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + String _contentUpdatedAt; + bool _contentUpdatedAtSet = false; + + String _customDescription; + bool _customDescriptionSet = false; + + String _customTitle; + bool _customTitleSet = false; + + String _customUrl; + bool _customUrlSet = false; + + int _dashboardId; + bool _dashboardIdSet = false; + + String _description; + bool _descriptionSet = false; + + int _favoriteCount; + bool _favoriteCountSet = false; + + int _boardSectionId; + bool _boardSectionIdSet = false; + + int _id; + bool _idSet = false; + + String _imageUrl; + bool _imageUrlSet = false; + + String _location; + bool _locationSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _lookmlDashboardId; + bool _lookmlDashboardIdSet = false; + + int _order; + bool _orderSet = false; + + String _title; + bool _titleSet = false; + + String _url; + bool _urlSet = false; + + int _viewCount; + bool _viewCountSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Name of user who created the content this item is based on (read-only) + + String get contentCreatedBy { + if (!_contentCreatedBySet && + _apiMapResponse.containsKey('content_created_by')) { + _contentCreatedBy = _apiMapResponse['content_created_by'] == null + ? null + : _apiMapResponse['content_created_by'].toString(); + _contentCreatedBySet = true; + } + return _contentCreatedBy; + } + + set contentCreatedBy(String v) { + _contentCreatedBy = v; + _contentCreatedBySet = true; + } + + /// Content favorite id associated with the item this content is based on (read-only) + + int get contentFavoriteId { + if (!_contentFavoriteIdSet && + _apiMapResponse.containsKey('content_favorite_id')) { + _contentFavoriteId = _apiMapResponse['content_favorite_id']; + _contentFavoriteIdSet = true; + } + return _contentFavoriteId; + } + + set contentFavoriteId(int v) { + _contentFavoriteId = v; + _contentFavoriteIdSet = true; + } + + /// Content metadata id associated with the item this content is based on (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Last time the content that this item is based on was updated (read-only) + + String get contentUpdatedAt { + if (!_contentUpdatedAtSet && + _apiMapResponse.containsKey('content_updated_at')) { + _contentUpdatedAt = _apiMapResponse['content_updated_at'] == null + ? null + : _apiMapResponse['content_updated_at'].toString(); + _contentUpdatedAtSet = true; + } + return _contentUpdatedAt; + } + + set contentUpdatedAt(String v) { + _contentUpdatedAt = v; + _contentUpdatedAtSet = true; + } + + /// Custom description entered by the user, if present + + String get customDescription { + if (!_customDescriptionSet && + _apiMapResponse.containsKey('custom_description')) { + _customDescription = _apiMapResponse['custom_description'] == null + ? null + : _apiMapResponse['custom_description'].toString(); + _customDescriptionSet = true; + } + return _customDescription; + } + + set customDescription(String v) { + _customDescription = v; + _customDescriptionSet = true; + } + + /// Custom title entered by the user, if present + + String get customTitle { + if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { + _customTitle = _apiMapResponse['custom_title'] == null + ? null + : _apiMapResponse['custom_title'].toString(); + _customTitleSet = true; + } + return _customTitle; + } + + set customTitle(String v) { + _customTitle = v; + _customTitleSet = true; + } + + /// Custom url entered by the user, if present + + String get customUrl { + if (!_customUrlSet && _apiMapResponse.containsKey('custom_url')) { + _customUrl = _apiMapResponse['custom_url'] == null + ? null + : _apiMapResponse['custom_url'].toString(); + _customUrlSet = true; + } + return _customUrl; + } + + set customUrl(String v) { + _customUrl = v; + _customUrlSet = true; + } + + /// Dashboard to base this item on + + int get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id']; + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(int v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// The actual description for display (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Number of times content has been favorited, if present (read-only) + + int get favoriteCount { + if (!_favoriteCountSet && _apiMapResponse.containsKey('favorite_count')) { + _favoriteCount = _apiMapResponse['favorite_count']; + _favoriteCountSet = true; + } + return _favoriteCount; + } + + set favoriteCount(int v) { + _favoriteCount = v; + _favoriteCountSet = true; + } + + /// Associated Board Section + + int get boardSectionId { + if (!_boardSectionIdSet && + _apiMapResponse.containsKey('board_section_id')) { + _boardSectionId = _apiMapResponse['board_section_id']; + _boardSectionIdSet = true; + } + return _boardSectionId; + } + + set boardSectionId(int v) { + _boardSectionId = v; + _boardSectionIdSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// The actual image_url for display (read-only) + + String get imageUrl { + if (!_imageUrlSet && _apiMapResponse.containsKey('image_url')) { + _imageUrl = _apiMapResponse['image_url'] == null + ? null + : _apiMapResponse['image_url'].toString(); + _imageUrlSet = true; + } + return _imageUrl; + } + + set imageUrl(String v) { + _imageUrl = v; + _imageUrlSet = true; + } + + /// The container folder name of the content (read-only) + + String get location { + if (!_locationSet && _apiMapResponse.containsKey('location')) { + _location = _apiMapResponse['location'] == null + ? null + : _apiMapResponse['location'].toString(); + _locationSet = true; + } + return _location; + } + + set location(String v) { + _location = v; + _locationSet = true; + } + + /// Look to base this item on + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// LookML Dashboard to base this item on + + String get lookmlDashboardId { + if (!_lookmlDashboardIdSet && + _apiMapResponse.containsKey('lookml_dashboard_id')) { + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null + ? null + : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardIdSet = true; + } + return _lookmlDashboardId; + } + + set lookmlDashboardId(String v) { + _lookmlDashboardId = v; + _lookmlDashboardIdSet = true; + } + + /// An arbitrary integer representing the sort order within the section + + int get order { + if (!_orderSet && _apiMapResponse.containsKey('order')) { + _order = _apiMapResponse['order']; + _orderSet = true; + } + return _order; + } + + set order(int v) { + _order = v; + _orderSet = true; + } + + /// The actual title for display (read-only) + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Relative url for the associated content (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Number of times content has been viewed, if present (read-only) + + int get viewCount { + if (!_viewCountSet && _apiMapResponse.containsKey('view_count')) { + _viewCount = _apiMapResponse['view_count']; + _viewCountSet = true; + } + return _viewCount; + } + + set viewCount(int v) { + _viewCount = v; + _viewCountSet = true; + } + + BoardItem() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + BoardItem.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_contentCreatedBySet || + _apiMapResponse.containsKey('content_created_by')) { + json['content_created_by'] = contentCreatedBy; + } + if (_contentFavoriteIdSet || + _apiMapResponse.containsKey('content_favorite_id')) { + json['content_favorite_id'] = contentFavoriteId; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_contentUpdatedAtSet || + _apiMapResponse.containsKey('content_updated_at')) { + json['content_updated_at'] = contentUpdatedAt; + } + if (_customDescriptionSet || + _apiMapResponse.containsKey('custom_description')) { + json['custom_description'] = customDescription; + } + if (_customTitleSet || _apiMapResponse.containsKey('custom_title')) { + json['custom_title'] = customTitle; + } + if (_customUrlSet || _apiMapResponse.containsKey('custom_url')) { + json['custom_url'] = customUrl; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_favoriteCountSet || _apiMapResponse.containsKey('favorite_count')) { + json['favorite_count'] = favoriteCount; + } + if (_boardSectionIdSet || _apiMapResponse.containsKey('board_section_id')) { + json['board_section_id'] = boardSectionId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_imageUrlSet || _apiMapResponse.containsKey('image_url')) { + json['image_url'] = imageUrl; + } + if (_locationSet || _apiMapResponse.containsKey('location')) { + json['location'] = location; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_lookmlDashboardIdSet || + _apiMapResponse.containsKey('lookml_dashboard_id')) { + json['lookml_dashboard_id'] = lookmlDashboardId; + } + if (_orderSet || _apiMapResponse.containsKey('order')) { + json['order'] = order; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_viewCountSet || _apiMapResponse.containsKey('view_count')) { + json['view_count'] = viewCount; + } + return json; + } +} + +class BoardSection { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + DateTime _deletedAt; + bool _deletedAtSet = false; + + String _description; + bool _descriptionSet = false; + + int _boardId; + bool _boardIdSet = false; + + List _boardItems; + bool _boardItemsSet = false; + + int _id; + bool _idSet = false; + + List _itemOrder; + bool _itemOrderSet = false; + + List _visibleItemOrder; + bool _visibleItemOrderSet = false; + + String _title; + bool _titleSet = false; + + DateTime _updatedAt; + bool _updatedAtSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Time at which this section was created. (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Time at which this section was deleted. + + DateTime get deletedAt { + if (!_deletedAtSet && _apiMapResponse.containsKey('deleted_at')) { + _deletedAt = _apiMapResponse['deleted_at'] == null + ? null + : DateTime.parse(_apiMapResponse['deleted_at']); + _deletedAtSet = true; + } + return _deletedAt; + } + + set deletedAt(DateTime v) { + _deletedAt = v; + _deletedAtSet = true; + } + + /// Description of the content found in this section. + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Id reference to parent board + + int get boardId { + if (!_boardIdSet && _apiMapResponse.containsKey('board_id')) { + _boardId = _apiMapResponse['board_id']; + _boardIdSet = true; + } + return _boardId; + } + + set boardId(int v) { + _boardId = v; + _boardIdSet = true; + } + + /// Items in the board section (read-only) + + List get boardItems { + if (!_boardItemsSet && _apiMapResponse.containsKey('board_items')) { + _boardItems = _apiMapResponse['board_items'] == null + ? null + : (_apiMapResponse['board_items'] as List) + .map((i) => BoardItem.fromResponse(i, apiResponseContentType)) + .toList(); + _boardItemsSet = true; + } + return _boardItems; + } + + set boardItems(List v) { + _boardItems = v; + _boardItemsSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// ids of the board items in the order they should be displayed + + List get itemOrder { + if (!_itemOrderSet && _apiMapResponse.containsKey('item_order')) { + _itemOrder = _apiMapResponse['item_order'] == null + ? null + : _apiMapResponse['item_order'].map((i) => i as int).toList(); + _itemOrderSet = true; + } + return _itemOrder; + } + + set itemOrder(List v) { + _itemOrder = v; + _itemOrderSet = true; + } + + /// ids of the homepage items the user can see in the order they should be displayed (read-only) + + List get visibleItemOrder { + if (!_visibleItemOrderSet && + _apiMapResponse.containsKey('visible_item_order')) { + _visibleItemOrder = _apiMapResponse['visible_item_order'] == null + ? null + : _apiMapResponse['visible_item_order'] + .map((i) => i as int) + .toList(); + _visibleItemOrderSet = true; + } + return _visibleItemOrder; + } + + set visibleItemOrder(List v) { + _visibleItemOrder = v; + _visibleItemOrderSet = true; + } + + /// Name of row + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Time at which this section was last updated. (read-only) + + DateTime get updatedAt { + if (!_updatedAtSet && _apiMapResponse.containsKey('updated_at')) { + _updatedAt = _apiMapResponse['updated_at'] == null + ? null + : DateTime.parse(_apiMapResponse['updated_at']); + _updatedAtSet = true; + } + return _updatedAt; + } + + set updatedAt(DateTime v) { + _updatedAt = v; + _updatedAtSet = true; + } + + BoardSection() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + BoardSection.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { + json['deleted_at'] = + deletedAt == null ? null : deletedAt.toIso8601String(); + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_boardIdSet || _apiMapResponse.containsKey('board_id')) { + json['board_id'] = boardId; + } + if (_boardItemsSet || _apiMapResponse.containsKey('board_items')) { + json['board_items'] = boardItems == null + ? null + : boardItems.map((i) => i.toJson()).toList(); + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_itemOrderSet || _apiMapResponse.containsKey('item_order')) { + json['item_order'] = itemOrder; + } + if (_visibleItemOrderSet || + _apiMapResponse.containsKey('visible_item_order')) { + json['visible_item_order'] = visibleItemOrder; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { + json['updated_at'] = + updatedAt == null ? null : updatedAt.toIso8601String(); + } + return json; + } +} + +/// Field category Valid values are: "parameter", "filter", "measure", "dimension". (Enum defined in LookmlModelExploreField) +enum Category { parameter, filter, measure, dimension } + +class CategoryMapper { + static String toStringValue(Category e) { + switch (e) { + case Category.parameter: + return 'parameter'; + case Category.filter: + return 'filter'; + case Category.measure: + return 'measure'; + case Category.dimension: + return 'dimension'; + + default: + return null; + } + } + + static Category fromStringValue(String s) { + if (s == 'parameter') { + return Category.parameter; + } + if (s == 'filter') { + return Category.filter; + } + if (s == 'measure') { + return Category.measure; + } + if (s == 'dimension') { + return Category.dimension; + } + return null; + } +} + +class ColorCollection { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _id; + bool _idSet = false; + + String _label; + bool _labelSet = false; + + List _categoricalPalettes; + bool _categoricalPalettesSet = false; + + List _sequentialPalettes; + bool _sequentialPalettesSet = false; + + List _divergingPalettes; + bool _divergingPalettesSet = false; + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Label of color collection + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Array of categorical palette definitions + + List get categoricalPalettes { + if (!_categoricalPalettesSet && + _apiMapResponse.containsKey('categoricalPalettes')) { + _categoricalPalettes = _apiMapResponse['categoricalPalettes'] == null + ? null + : (_apiMapResponse['categoricalPalettes'] as List) + .map((i) => + DiscretePalette.fromResponse(i, apiResponseContentType)) + .toList(); + _categoricalPalettesSet = true; + } + return _categoricalPalettes; + } + + set categoricalPalettes(List v) { + _categoricalPalettes = v; + _categoricalPalettesSet = true; + } + + /// Array of discrete palette definitions + + List get sequentialPalettes { + if (!_sequentialPalettesSet && + _apiMapResponse.containsKey('sequentialPalettes')) { + _sequentialPalettes = _apiMapResponse['sequentialPalettes'] == null + ? null + : (_apiMapResponse['sequentialPalettes'] as List) + .map((i) => + ContinuousPalette.fromResponse(i, apiResponseContentType)) + .toList(); + _sequentialPalettesSet = true; + } + return _sequentialPalettes; + } + + set sequentialPalettes(List v) { + _sequentialPalettes = v; + _sequentialPalettesSet = true; + } + + /// Array of diverging palette definitions + + List get divergingPalettes { + if (!_divergingPalettesSet && + _apiMapResponse.containsKey('divergingPalettes')) { + _divergingPalettes = _apiMapResponse['divergingPalettes'] == null + ? null + : (_apiMapResponse['divergingPalettes'] as List) + .map((i) => + ContinuousPalette.fromResponse(i, apiResponseContentType)) + .toList(); + _divergingPalettesSet = true; + } + return _divergingPalettes; + } + + set divergingPalettes(List v) { + _divergingPalettes = v; + _divergingPalettesSet = true; + } + + ColorCollection() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ColorCollection.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_categoricalPalettesSet || + _apiMapResponse.containsKey('categoricalPalettes')) { + json['categoricalPalettes'] = categoricalPalettes == null + ? null + : categoricalPalettes.map((i) => i.toJson()).toList(); + } + if (_sequentialPalettesSet || + _apiMapResponse.containsKey('sequentialPalettes')) { + json['sequentialPalettes'] = sequentialPalettes == null + ? null + : sequentialPalettes.map((i) => i.toJson()).toList(); + } + if (_divergingPalettesSet || + _apiMapResponse.containsKey('divergingPalettes')) { + json['divergingPalettes'] = divergingPalettes == null + ? null + : divergingPalettes.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class ColorStop { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _color; + bool _colorSet = false; + + int _offset; + bool _offsetSet = false; + + /// CSS color string + + String get color { + if (!_colorSet && _apiMapResponse.containsKey('color')) { + _color = _apiMapResponse['color'] == null + ? null + : _apiMapResponse['color'].toString(); + _colorSet = true; + } + return _color; + } + + set color(String v) { + _color = v; + _colorSet = true; + } + + /// Offset in continuous palette (0 to 100) + + int get offset { + if (!_offsetSet && _apiMapResponse.containsKey('offset')) { + _offset = _apiMapResponse['offset']; + _offsetSet = true; + } + return _offset; + } + + set offset(int v) { + _offset = v; + _offsetSet = true; + } + + ColorStop() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ColorStop.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_colorSet || _apiMapResponse.containsKey('color')) { + json['color'] = color; + } + if (_offsetSet || _apiMapResponse.containsKey('offset')) { + json['offset'] = offset; + } + return json; + } +} + +class ColumnSearch { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _schemaName; + bool _schemaNameSet = false; + + String _tableName; + bool _tableNameSet = false; + + String _columnName; + bool _columnNameSet = false; + + String _dataType; + bool _dataTypeSet = false; + + /// Name of schema containing the table (read-only) + + String get schemaName { + if (!_schemaNameSet && _apiMapResponse.containsKey('schema_name')) { + _schemaName = _apiMapResponse['schema_name'] == null + ? null + : _apiMapResponse['schema_name'].toString(); + _schemaNameSet = true; + } + return _schemaName; + } + + set schemaName(String v) { + _schemaName = v; + _schemaNameSet = true; + } + + /// Name of table containing the column (read-only) + + String get tableName { + if (!_tableNameSet && _apiMapResponse.containsKey('table_name')) { + _tableName = _apiMapResponse['table_name'] == null + ? null + : _apiMapResponse['table_name'].toString(); + _tableNameSet = true; + } + return _tableName; + } + + set tableName(String v) { + _tableName = v; + _tableNameSet = true; + } + + /// Name of column (read-only) + + String get columnName { + if (!_columnNameSet && _apiMapResponse.containsKey('column_name')) { + _columnName = _apiMapResponse['column_name'] == null + ? null + : _apiMapResponse['column_name'].toString(); + _columnNameSet = true; + } + return _columnName; + } + + set columnName(String v) { + _columnName = v; + _columnNameSet = true; + } + + /// Column data type (read-only) + + String get dataType { + if (!_dataTypeSet && _apiMapResponse.containsKey('data_type')) { + _dataType = _apiMapResponse['data_type'] == null + ? null + : _apiMapResponse['data_type'].toString(); + _dataTypeSet = true; + } + return _dataType; + } + + set dataType(String v) { + _dataType = v; + _dataTypeSet = true; + } + + ColumnSearch() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ColumnSearch.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_schemaNameSet || _apiMapResponse.containsKey('schema_name')) { + json['schema_name'] = schemaName; + } + if (_tableNameSet || _apiMapResponse.containsKey('table_name')) { + json['table_name'] = tableName; + } + if (_columnNameSet || _apiMapResponse.containsKey('column_name')) { + json['column_name'] = columnName; + } + if (_dataTypeSet || _apiMapResponse.containsKey('data_type')) { + json['data_type'] = dataType; + } + return json; + } +} + +class Command { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + int _authorId; + bool _authorIdSet = false; + + String _name; + bool _nameSet = false; + + String _description; + bool _descriptionSet = false; + + String _linkedContentId; + bool _linkedContentIdSet = false; + + LinkedContentType _linkedContentType; + bool _linkedContentTypeSet = false; + + /// Id of the command record (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Id of the command author (read-only) + + int get authorId { + if (!_authorIdSet && _apiMapResponse.containsKey('author_id')) { + _authorId = _apiMapResponse['author_id']; + _authorIdSet = true; + } + return _authorId; + } + + set authorId(int v) { + _authorId = v; + _authorIdSet = true; + } + + /// Name of the command + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Description of the command + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Id of the content associated with the command + + String get linkedContentId { + if (!_linkedContentIdSet && + _apiMapResponse.containsKey('linked_content_id')) { + _linkedContentId = _apiMapResponse['linked_content_id'] == null + ? null + : _apiMapResponse['linked_content_id'].toString(); + _linkedContentIdSet = true; + } + return _linkedContentId; + } + + set linkedContentId(String v) { + _linkedContentId = v; + _linkedContentIdSet = true; + } + + /// Name of the command Valid values are: "dashboard", "lookml_dashboard". + + LinkedContentType get linkedContentType { + if (!_linkedContentTypeSet && + _apiMapResponse.containsKey('linked_content_type')) { + _linkedContentType = LinkedContentTypeMapper.fromStringValue( + _apiMapResponse['linked_content_type']); + _linkedContentTypeSet = true; + } + return _linkedContentType; + } + + set linkedContentType(LinkedContentType v) { + _linkedContentType = v; + _linkedContentTypeSet = true; + } + + Command() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Command.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_authorIdSet || _apiMapResponse.containsKey('author_id')) { + json['author_id'] = authorId; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_linkedContentIdSet || + _apiMapResponse.containsKey('linked_content_id')) { + json['linked_content_id'] = linkedContentId; + } + if (_linkedContentTypeSet || + _apiMapResponse.containsKey('linked_content_type')) { + json['linked_content_type'] = + LinkedContentTypeMapper.toStringValue(linkedContentType); + } + return json; + } +} + +/// This property informs the check what kind of comparison we are performing. Only certain condition types are valid for time series alerts. For details, refer to [Setting Alert Conditions](https://docs.looker.com/sharing-and-publishing/creating-alerts#setting_alert_conditions) Valid values are: "EQUAL_TO", "GREATER_THAN", "GREATER_THAN_OR_EQUAL_TO", "LESS_THAN", "LESS_THAN_OR_EQUAL_TO", "INCREASES_BY", "DECREASES_BY", "CHANGES_BY". (Enum defined in Alert) +enum ComparisonType { + EQUALTO, + GREATERTHAN, + GREATERTHANOREQUALTO, + LESSTHAN, + LESSTHANOREQUALTO, + INCREASESBY, + DECREASESBY, + CHANGESBY +} + +class ComparisonTypeMapper { + static String toStringValue(ComparisonType e) { + switch (e) { + case ComparisonType.EQUALTO: + return 'EQUAL_TO'; + case ComparisonType.GREATERTHAN: + return 'GREATER_THAN'; + case ComparisonType.GREATERTHANOREQUALTO: + return 'GREATER_THAN_OR_EQUAL_TO'; + case ComparisonType.LESSTHAN: + return 'LESS_THAN'; + case ComparisonType.LESSTHANOREQUALTO: + return 'LESS_THAN_OR_EQUAL_TO'; + case ComparisonType.INCREASESBY: + return 'INCREASES_BY'; + case ComparisonType.DECREASESBY: + return 'DECREASES_BY'; + case ComparisonType.CHANGESBY: + return 'CHANGES_BY'; + + default: + return null; + } + } + + static ComparisonType fromStringValue(String s) { + if (s == 'EQUAL_TO') { + return ComparisonType.EQUALTO; + } + if (s == 'GREATER_THAN') { + return ComparisonType.GREATERTHAN; + } + if (s == 'GREATER_THAN_OR_EQUAL_TO') { + return ComparisonType.GREATERTHANOREQUALTO; + } + if (s == 'LESS_THAN') { + return ComparisonType.LESSTHAN; + } + if (s == 'LESS_THAN_OR_EQUAL_TO') { + return ComparisonType.LESSTHANOREQUALTO; + } + if (s == 'INCREASES_BY') { + return ComparisonType.INCREASESBY; + } + if (s == 'DECREASES_BY') { + return ComparisonType.DECREASESBY; + } + if (s == 'CHANGES_BY') { + return ComparisonType.CHANGESBY; + } + return null; + } +} + +class ConnectionFeatures { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _dialectName; + bool _dialectNameSet = false; + + bool _costEstimate; + bool _costEstimateSet = false; + + bool _multipleDatabases; + bool _multipleDatabasesSet = false; + + bool _columnSearch; + bool _columnSearchSet = false; + + bool _persistentTableIndexes; + bool _persistentTableIndexesSet = false; + + bool _persistentDerivedTables; + bool _persistentDerivedTablesSet = false; + + bool _turtles; + bool _turtlesSet = false; + + bool _percentile; + bool _percentileSet = false; + + bool _distinctPercentile; + bool _distinctPercentileSet = false; + + bool _stableViews; + bool _stableViewsSet = false; + + bool _milliseconds; + bool _millisecondsSet = false; + + bool _microseconds; + bool _microsecondsSet = false; + + bool _subtotals; + bool _subtotalsSet = false; + + bool _location; + bool _locationSet = false; + + bool _timezone; + bool _timezoneSet = false; + + bool _connectionPooling; + bool _connectionPoolingSet = false; + + /// Name of the dialect for this connection (read-only) + + String get dialectName { + if (!_dialectNameSet && _apiMapResponse.containsKey('dialect_name')) { + _dialectName = _apiMapResponse['dialect_name'] == null + ? null + : _apiMapResponse['dialect_name'].toString(); + _dialectNameSet = true; + } + return _dialectName; + } + + set dialectName(String v) { + _dialectName = v; + _dialectNameSet = true; + } + + /// True for cost estimating support (read-only) + + bool get costEstimate { + if (!_costEstimateSet && _apiMapResponse.containsKey('cost_estimate')) { + _costEstimate = _apiMapResponse['cost_estimate']; + _costEstimateSet = true; + } + return _costEstimate; + } + + set costEstimate(bool v) { + _costEstimate = v; + _costEstimateSet = true; + } + + /// True for multiple database support (read-only) + + bool get multipleDatabases { + if (!_multipleDatabasesSet && + _apiMapResponse.containsKey('multiple_databases')) { + _multipleDatabases = _apiMapResponse['multiple_databases']; + _multipleDatabasesSet = true; + } + return _multipleDatabases; + } + + set multipleDatabases(bool v) { + _multipleDatabases = v; + _multipleDatabasesSet = true; + } + + /// True for cost estimating support (read-only) + + bool get columnSearch { + if (!_columnSearchSet && _apiMapResponse.containsKey('column_search')) { + _columnSearch = _apiMapResponse['column_search']; + _columnSearchSet = true; + } + return _columnSearch; + } + + set columnSearch(bool v) { + _columnSearch = v; + _columnSearchSet = true; + } + + /// True for secondary index support (read-only) + + bool get persistentTableIndexes { + if (!_persistentTableIndexesSet && + _apiMapResponse.containsKey('persistent_table_indexes')) { + _persistentTableIndexes = _apiMapResponse['persistent_table_indexes']; + _persistentTableIndexesSet = true; + } + return _persistentTableIndexes; + } + + set persistentTableIndexes(bool v) { + _persistentTableIndexes = v; + _persistentTableIndexesSet = true; + } + + /// True for persistent derived table support (read-only) + + bool get persistentDerivedTables { + if (!_persistentDerivedTablesSet && + _apiMapResponse.containsKey('persistent_derived_tables')) { + _persistentDerivedTables = _apiMapResponse['persistent_derived_tables']; + _persistentDerivedTablesSet = true; + } + return _persistentDerivedTables; + } + + set persistentDerivedTables(bool v) { + _persistentDerivedTables = v; + _persistentDerivedTablesSet = true; + } + + /// True for turtles support (read-only) + + bool get turtles { + if (!_turtlesSet && _apiMapResponse.containsKey('turtles')) { + _turtles = _apiMapResponse['turtles']; + _turtlesSet = true; + } + return _turtles; + } + + set turtles(bool v) { + _turtles = v; + _turtlesSet = true; + } + + /// True for percentile support (read-only) + + bool get percentile { + if (!_percentileSet && _apiMapResponse.containsKey('percentile')) { + _percentile = _apiMapResponse['percentile']; + _percentileSet = true; + } + return _percentile; + } + + set percentile(bool v) { + _percentile = v; + _percentileSet = true; + } + + /// True for distinct percentile support (read-only) + + bool get distinctPercentile { + if (!_distinctPercentileSet && + _apiMapResponse.containsKey('distinct_percentile')) { + _distinctPercentile = _apiMapResponse['distinct_percentile']; + _distinctPercentileSet = true; + } + return _distinctPercentile; + } + + set distinctPercentile(bool v) { + _distinctPercentile = v; + _distinctPercentileSet = true; + } + + /// True for stable views support (read-only) + + bool get stableViews { + if (!_stableViewsSet && _apiMapResponse.containsKey('stable_views')) { + _stableViews = _apiMapResponse['stable_views']; + _stableViewsSet = true; + } + return _stableViews; + } + + set stableViews(bool v) { + _stableViews = v; + _stableViewsSet = true; + } + + /// True for millisecond support (read-only) + + bool get milliseconds { + if (!_millisecondsSet && _apiMapResponse.containsKey('milliseconds')) { + _milliseconds = _apiMapResponse['milliseconds']; + _millisecondsSet = true; + } + return _milliseconds; + } + + set milliseconds(bool v) { + _milliseconds = v; + _millisecondsSet = true; + } + + /// True for microsecond support (read-only) + + bool get microseconds { + if (!_microsecondsSet && _apiMapResponse.containsKey('microseconds')) { + _microseconds = _apiMapResponse['microseconds']; + _microsecondsSet = true; + } + return _microseconds; + } + + set microseconds(bool v) { + _microseconds = v; + _microsecondsSet = true; + } + + /// True for subtotal support (read-only) + + bool get subtotals { + if (!_subtotalsSet && _apiMapResponse.containsKey('subtotals')) { + _subtotals = _apiMapResponse['subtotals']; + _subtotalsSet = true; + } + return _subtotals; + } + + set subtotals(bool v) { + _subtotals = v; + _subtotalsSet = true; + } + + /// True for geographic location support (read-only) + + bool get location { + if (!_locationSet && _apiMapResponse.containsKey('location')) { + _location = _apiMapResponse['location']; + _locationSet = true; + } + return _location; + } + + set location(bool v) { + _location = v; + _locationSet = true; + } + + /// True for timezone conversion in query support (read-only) + + bool get timezone { + if (!_timezoneSet && _apiMapResponse.containsKey('timezone')) { + _timezone = _apiMapResponse['timezone']; + _timezoneSet = true; + } + return _timezone; + } + + set timezone(bool v) { + _timezone = v; + _timezoneSet = true; + } + + /// True for connection pooling support (read-only) + + bool get connectionPooling { + if (!_connectionPoolingSet && + _apiMapResponse.containsKey('connection_pooling')) { + _connectionPooling = _apiMapResponse['connection_pooling']; + _connectionPoolingSet = true; + } + return _connectionPooling; + } + + set connectionPooling(bool v) { + _connectionPooling = v; + _connectionPoolingSet = true; + } + + ConnectionFeatures() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ConnectionFeatures.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dialectNameSet || _apiMapResponse.containsKey('dialect_name')) { + json['dialect_name'] = dialectName; + } + if (_costEstimateSet || _apiMapResponse.containsKey('cost_estimate')) { + json['cost_estimate'] = costEstimate; + } + if (_multipleDatabasesSet || + _apiMapResponse.containsKey('multiple_databases')) { + json['multiple_databases'] = multipleDatabases; + } + if (_columnSearchSet || _apiMapResponse.containsKey('column_search')) { + json['column_search'] = columnSearch; + } + if (_persistentTableIndexesSet || + _apiMapResponse.containsKey('persistent_table_indexes')) { + json['persistent_table_indexes'] = persistentTableIndexes; + } + if (_persistentDerivedTablesSet || + _apiMapResponse.containsKey('persistent_derived_tables')) { + json['persistent_derived_tables'] = persistentDerivedTables; + } + if (_turtlesSet || _apiMapResponse.containsKey('turtles')) { + json['turtles'] = turtles; + } + if (_percentileSet || _apiMapResponse.containsKey('percentile')) { + json['percentile'] = percentile; + } + if (_distinctPercentileSet || + _apiMapResponse.containsKey('distinct_percentile')) { + json['distinct_percentile'] = distinctPercentile; + } + if (_stableViewsSet || _apiMapResponse.containsKey('stable_views')) { + json['stable_views'] = stableViews; + } + if (_millisecondsSet || _apiMapResponse.containsKey('milliseconds')) { + json['milliseconds'] = milliseconds; + } + if (_microsecondsSet || _apiMapResponse.containsKey('microseconds')) { + json['microseconds'] = microseconds; + } + if (_subtotalsSet || _apiMapResponse.containsKey('subtotals')) { + json['subtotals'] = subtotals; + } + if (_locationSet || _apiMapResponse.containsKey('location')) { + json['location'] = location; + } + if (_timezoneSet || _apiMapResponse.containsKey('timezone')) { + json['timezone'] = timezone; + } + if (_connectionPoolingSet || + _apiMapResponse.containsKey('connection_pooling')) { + json['connection_pooling'] = connectionPooling; + } + return json; + } +} + +class ContentFavorite { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + int _userId; + bool _userIdSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + String _lookId; + bool _lookIdSet = false; + + int _dashboardId; + bool _dashboardIdSet = false; + + LookBasic _look; + bool _lookSet = false; + + DashboardBase _dashboard; + bool _dashboardSet = false; + + int _boardId; + bool _boardIdSet = false; + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// User Id which owns this ContentFavorite + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Content Metadata Id associated with this ContentFavorite + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Id of a look (read-only) + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Id of a dashboard (read-only) + + int get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id']; + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(int v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + LookBasic get look { + if (!_lookSet && _apiMapResponse.containsKey('look')) { + _look = _apiMapResponse['look'] == null + ? null + : LookBasic.fromResponse( + _apiMapResponse['look'], apiResponseContentType); + _lookSet = true; + } + return _look; + } + + set look(LookBasic v) { + _look = v; + _lookSet = true; + } + + DashboardBase get dashboard { + if (!_dashboardSet && _apiMapResponse.containsKey('dashboard')) { + _dashboard = _apiMapResponse['dashboard'] == null + ? null + : DashboardBase.fromResponse( + _apiMapResponse['dashboard'], apiResponseContentType); + _dashboardSet = true; + } + return _dashboard; + } + + set dashboard(DashboardBase v) { + _dashboard = v; + _dashboardSet = true; + } + + /// Id of a board (read-only) + + int get boardId { + if (!_boardIdSet && _apiMapResponse.containsKey('board_id')) { + _boardId = _apiMapResponse['board_id']; + _boardIdSet = true; + } + return _boardId; + } + + set boardId(int v) { + _boardId = v; + _boardIdSet = true; + } + + ContentFavorite() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentFavorite.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_lookSet || _apiMapResponse.containsKey('look')) { + json['look'] = look == null ? null : look.toJson(); + } + if (_dashboardSet || _apiMapResponse.containsKey('dashboard')) { + json['dashboard'] = dashboard == null ? null : dashboard.toJson(); + } + if (_boardIdSet || _apiMapResponse.containsKey('board_id')) { + json['board_id'] = boardId; + } + return json; + } +} + +class ContentMeta { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _name; + bool _nameSet = false; + + int _parentId; + bool _parentIdSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _folderId; + bool _folderIdSet = false; + + String _contentType; + bool _contentTypeSet = false; + + bool _inherits; + bool _inheritsSet = false; + + int _inheritingId; + bool _inheritingIdSet = false; + + String _slug; + bool _slugSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Name or title of underlying content (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Id of Parent Content (read-only) + + int get parentId { + if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { + _parentId = _apiMapResponse['parent_id']; + _parentIdSet = true; + } + return _parentId; + } + + set parentId(int v) { + _parentId = v; + _parentIdSet = true; + } + + /// Id of associated dashboard when content_type is "dashboard" (read-only) + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Id of associated look when content_type is "look" (read-only) + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Id of associated folder when content_type is "space" (read-only) + + String get folderId { + if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { + _folderId = _apiMapResponse['folder_id'] == null + ? null + : _apiMapResponse['folder_id'].toString(); + _folderIdSet = true; + } + return _folderId; + } + + set folderId(String v) { + _folderId = v; + _folderIdSet = true; + } + + /// Content Type ("dashboard", "look", or "folder") (read-only) + + String get contentType { + if (!_contentTypeSet && _apiMapResponse.containsKey('content_type')) { + _contentType = _apiMapResponse['content_type'] == null + ? null + : _apiMapResponse['content_type'].toString(); + _contentTypeSet = true; + } + return _contentType; + } + + set contentType(String v) { + _contentType = v; + _contentTypeSet = true; + } + + /// Whether content inherits its access levels from parent + + bool get inherits { + if (!_inheritsSet && _apiMapResponse.containsKey('inherits')) { + _inherits = _apiMapResponse['inherits']; + _inheritsSet = true; + } + return _inherits; + } + + set inherits(bool v) { + _inherits = v; + _inheritsSet = true; + } + + /// Id of Inherited Content (read-only) + + int get inheritingId { + if (!_inheritingIdSet && _apiMapResponse.containsKey('inheriting_id')) { + _inheritingId = _apiMapResponse['inheriting_id']; + _inheritingIdSet = true; + } + return _inheritingId; + } + + set inheritingId(int v) { + _inheritingId = v; + _inheritingIdSet = true; + } + + /// Content Slug (read-only) + + String get slug { + if (!_slugSet && _apiMapResponse.containsKey('slug')) { + _slug = _apiMapResponse['slug'] == null + ? null + : _apiMapResponse['slug'].toString(); + _slugSet = true; + } + return _slug; + } + + set slug(String v) { + _slug = v; + _slugSet = true; + } + + ContentMeta() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentMeta.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_parentIdSet || _apiMapResponse.containsKey('parent_id')) { + json['parent_id'] = parentId; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { + json['folder_id'] = folderId; + } + if (_contentTypeSet || _apiMapResponse.containsKey('content_type')) { + json['content_type'] = contentType; + } + if (_inheritsSet || _apiMapResponse.containsKey('inherits')) { + json['inherits'] = inherits; + } + if (_inheritingIdSet || _apiMapResponse.containsKey('inheriting_id')) { + json['inheriting_id'] = inheritingId; + } + if (_slugSet || _apiMapResponse.containsKey('slug')) { + json['slug'] = slug; + } + return json; + } +} + +/// WARNING: no writeable properties found for POST, PUT, or PATCH +class ContentMetaGroupUser { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + String _contentMetadataId; + bool _contentMetadataIdSet = false; + + PermissionType _permissionType; + bool _permissionTypeSet = false; + + int _groupId; + bool _groupIdSet = false; + + int _userId; + bool _userIdSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id of associated Content Metadata (read-only) + + String get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id'] == null + ? null + : _apiMapResponse['content_metadata_id'].toString(); + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(String v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Type of permission: "view" or "edit" Valid values are: "view", "edit". (read-only) + + PermissionType get permissionType { + if (!_permissionTypeSet && _apiMapResponse.containsKey('permission_type')) { + _permissionType = PermissionTypeMapper.fromStringValue( + _apiMapResponse['permission_type']); + _permissionTypeSet = true; + } + return _permissionType; + } + + set permissionType(PermissionType v) { + _permissionType = v; + _permissionTypeSet = true; + } + + /// ID of associated group (read-only) + + int get groupId { + if (!_groupIdSet && _apiMapResponse.containsKey('group_id')) { + _groupId = _apiMapResponse['group_id']; + _groupIdSet = true; + } + return _groupId; + } + + set groupId(int v) { + _groupId = v; + _groupIdSet = true; + } + + /// ID of associated user (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + ContentMetaGroupUser() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentMetaGroupUser.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_permissionTypeSet || _apiMapResponse.containsKey('permission_type')) { + json['permission_type'] = + PermissionTypeMapper.toStringValue(permissionType); + } + if (_groupIdSet || _apiMapResponse.containsKey('group_id')) { + json['group_id'] = groupId; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + return json; + } +} + +class ContentValidation { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _contentWithErrors; + bool _contentWithErrorsSet = false; + + double _computationTime; + bool _computationTimeSet = false; + + int _totalLooksValidated; + bool _totalLooksValidatedSet = false; + + int _totalDashboardElementsValidated; + bool _totalDashboardElementsValidatedSet = false; + + int _totalDashboardFiltersValidated; + bool _totalDashboardFiltersValidatedSet = false; + + int _totalScheduledPlansValidated; + bool _totalScheduledPlansValidatedSet = false; + + int _totalAlertsValidated; + bool _totalAlertsValidatedSet = false; + + int _totalExploresValidated; + bool _totalExploresValidatedSet = false; + + /// A list of content errors (read-only) + + List get contentWithErrors { + if (!_contentWithErrorsSet && + _apiMapResponse.containsKey('content_with_errors')) { + _contentWithErrors = _apiMapResponse['content_with_errors'] == null + ? null + : (_apiMapResponse['content_with_errors'] as List) + .map((i) => + ContentValidatorError.fromResponse(i, apiResponseContentType)) + .toList(); + _contentWithErrorsSet = true; + } + return _contentWithErrors; + } + + set contentWithErrors(List v) { + _contentWithErrors = v; + _contentWithErrorsSet = true; + } + + /// Duration of content validation in seconds (read-only) + + double get computationTime { + if (!_computationTimeSet && + _apiMapResponse.containsKey('computation_time')) { + _computationTime = _apiMapResponse['computation_time']; + _computationTimeSet = true; + } + return _computationTime; + } + + set computationTime(double v) { + _computationTime = v; + _computationTimeSet = true; + } + + /// The number of looks validated (read-only) + + int get totalLooksValidated { + if (!_totalLooksValidatedSet && + _apiMapResponse.containsKey('total_looks_validated')) { + _totalLooksValidated = _apiMapResponse['total_looks_validated']; + _totalLooksValidatedSet = true; + } + return _totalLooksValidated; + } + + set totalLooksValidated(int v) { + _totalLooksValidated = v; + _totalLooksValidatedSet = true; + } + + /// The number of dashboard elements validated (read-only) + + int get totalDashboardElementsValidated { + if (!_totalDashboardElementsValidatedSet && + _apiMapResponse.containsKey('total_dashboard_elements_validated')) { + _totalDashboardElementsValidated = + _apiMapResponse['total_dashboard_elements_validated']; + _totalDashboardElementsValidatedSet = true; + } + return _totalDashboardElementsValidated; + } + + set totalDashboardElementsValidated(int v) { + _totalDashboardElementsValidated = v; + _totalDashboardElementsValidatedSet = true; + } + + /// The number of dashboard filters validated (read-only) + + int get totalDashboardFiltersValidated { + if (!_totalDashboardFiltersValidatedSet && + _apiMapResponse.containsKey('total_dashboard_filters_validated')) { + _totalDashboardFiltersValidated = + _apiMapResponse['total_dashboard_filters_validated']; + _totalDashboardFiltersValidatedSet = true; + } + return _totalDashboardFiltersValidated; + } + + set totalDashboardFiltersValidated(int v) { + _totalDashboardFiltersValidated = v; + _totalDashboardFiltersValidatedSet = true; + } + + /// The number of scheduled plans validated (read-only) + + int get totalScheduledPlansValidated { + if (!_totalScheduledPlansValidatedSet && + _apiMapResponse.containsKey('total_scheduled_plans_validated')) { + _totalScheduledPlansValidated = + _apiMapResponse['total_scheduled_plans_validated']; + _totalScheduledPlansValidatedSet = true; + } + return _totalScheduledPlansValidated; + } + + set totalScheduledPlansValidated(int v) { + _totalScheduledPlansValidated = v; + _totalScheduledPlansValidatedSet = true; + } + + /// The number of alerts validated (read-only) + + int get totalAlertsValidated { + if (!_totalAlertsValidatedSet && + _apiMapResponse.containsKey('total_alerts_validated')) { + _totalAlertsValidated = _apiMapResponse['total_alerts_validated']; + _totalAlertsValidatedSet = true; + } + return _totalAlertsValidated; + } + + set totalAlertsValidated(int v) { + _totalAlertsValidated = v; + _totalAlertsValidatedSet = true; + } + + /// The number of explores used across all content validated (read-only) + + int get totalExploresValidated { + if (!_totalExploresValidatedSet && + _apiMapResponse.containsKey('total_explores_validated')) { + _totalExploresValidated = _apiMapResponse['total_explores_validated']; + _totalExploresValidatedSet = true; + } + return _totalExploresValidated; + } + + set totalExploresValidated(int v) { + _totalExploresValidated = v; + _totalExploresValidatedSet = true; + } + + ContentValidation() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidation.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_contentWithErrorsSet || + _apiMapResponse.containsKey('content_with_errors')) { + json['content_with_errors'] = contentWithErrors == null + ? null + : contentWithErrors.map((i) => i.toJson()).toList(); + } + if (_computationTimeSet || + _apiMapResponse.containsKey('computation_time')) { + json['computation_time'] = computationTime; + } + if (_totalLooksValidatedSet || + _apiMapResponse.containsKey('total_looks_validated')) { + json['total_looks_validated'] = totalLooksValidated; + } + if (_totalDashboardElementsValidatedSet || + _apiMapResponse.containsKey('total_dashboard_elements_validated')) { + json['total_dashboard_elements_validated'] = + totalDashboardElementsValidated; + } + if (_totalDashboardFiltersValidatedSet || + _apiMapResponse.containsKey('total_dashboard_filters_validated')) { + json['total_dashboard_filters_validated'] = + totalDashboardFiltersValidated; + } + if (_totalScheduledPlansValidatedSet || + _apiMapResponse.containsKey('total_scheduled_plans_validated')) { + json['total_scheduled_plans_validated'] = totalScheduledPlansValidated; + } + if (_totalAlertsValidatedSet || + _apiMapResponse.containsKey('total_alerts_validated')) { + json['total_alerts_validated'] = totalAlertsValidated; + } + if (_totalExploresValidatedSet || + _apiMapResponse.containsKey('total_explores_validated')) { + json['total_explores_validated'] = totalExploresValidated; + } + return json; + } +} + +class ContentValidationAlert { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + String _lookmlDashboardId; + bool _lookmlDashboardIdSet = false; + + String _lookmlLinkId; + bool _lookmlLinkIdSet = false; + + String _customTitle; + bool _customTitleSet = false; + + /// ID of the alert + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// ID of the LookML dashboard associated with the alert + + String get lookmlDashboardId { + if (!_lookmlDashboardIdSet && + _apiMapResponse.containsKey('lookml_dashboard_id')) { + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null + ? null + : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardIdSet = true; + } + return _lookmlDashboardId; + } + + set lookmlDashboardId(String v) { + _lookmlDashboardId = v; + _lookmlDashboardIdSet = true; + } + + /// ID of the LookML dashboard element associated with the alert + + String get lookmlLinkId { + if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { + _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null + ? null + : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkIdSet = true; + } + return _lookmlLinkId; + } + + set lookmlLinkId(String v) { + _lookmlLinkId = v; + _lookmlLinkIdSet = true; + } + + /// An optional, user-defined title for the alert + + String get customTitle { + if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { + _customTitle = _apiMapResponse['custom_title'] == null + ? null + : _apiMapResponse['custom_title'].toString(); + _customTitleSet = true; + } + return _customTitle; + } + + set customTitle(String v) { + _customTitle = v; + _customTitleSet = true; + } + + ContentValidationAlert() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidationAlert.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookmlDashboardIdSet || + _apiMapResponse.containsKey('lookml_dashboard_id')) { + json['lookml_dashboard_id'] = lookmlDashboardId; + } + if (_lookmlLinkIdSet || _apiMapResponse.containsKey('lookml_link_id')) { + json['lookml_link_id'] = lookmlLinkId; + } + if (_customTitleSet || _apiMapResponse.containsKey('custom_title')) { + json['custom_title'] = customTitle; + } + return json; + } +} + +class ContentValidationDashboard { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _description; + bool _descriptionSet = false; + + String _id; + bool _idSet = false; + + ContentValidationFolder _folder; + bool _folderSet = false; + + String _title; + bool _titleSet = false; + + String _url; + bool _urlSet = false; + + /// Description + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + ContentValidationFolder get folder { + if (!_folderSet && _apiMapResponse.containsKey('folder')) { + _folder = _apiMapResponse['folder'] == null + ? null + : ContentValidationFolder.fromResponse( + _apiMapResponse['folder'], apiResponseContentType); + _folderSet = true; + } + return _folder; + } + + set folder(ContentValidationFolder v) { + _folder = v; + _folderSet = true; + } + + /// Dashboard Title + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Relative URL of the dashboard (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + ContentValidationDashboard() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidationDashboard.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_folderSet || _apiMapResponse.containsKey('folder')) { + json['folder'] = folder == null ? null : folder.toJson(); + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class ContentValidationDashboardElement { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _bodyText; + bool _bodyTextSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _id; + bool _idSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _noteDisplay; + bool _noteDisplaySet = false; + + String _noteState; + bool _noteStateSet = false; + + String _noteText; + bool _noteTextSet = false; + + String _noteTextAsHtml; + bool _noteTextAsHtmlSet = false; + + int _queryId; + bool _queryIdSet = false; + + String _subtitleText; + bool _subtitleTextSet = false; + + String _title; + bool _titleSet = false; + + bool _titleHidden; + bool _titleHiddenSet = false; + + String _titleText; + bool _titleTextSet = false; + + String _type; + bool _typeSet = false; + + /// Text tile body text + + String get bodyText { + if (!_bodyTextSet && _apiMapResponse.containsKey('body_text')) { + _bodyText = _apiMapResponse['body_text'] == null + ? null + : _apiMapResponse['body_text'].toString(); + _bodyTextSet = true; + } + return _bodyText; + } + + set bodyText(String v) { + _bodyText = v; + _bodyTextSet = true; + } + + /// Id of Dashboard + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id Of Look + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Note Display + + String get noteDisplay { + if (!_noteDisplaySet && _apiMapResponse.containsKey('note_display')) { + _noteDisplay = _apiMapResponse['note_display'] == null + ? null + : _apiMapResponse['note_display'].toString(); + _noteDisplaySet = true; + } + return _noteDisplay; + } + + set noteDisplay(String v) { + _noteDisplay = v; + _noteDisplaySet = true; + } + + /// Note State + + String get noteState { + if (!_noteStateSet && _apiMapResponse.containsKey('note_state')) { + _noteState = _apiMapResponse['note_state'] == null + ? null + : _apiMapResponse['note_state'].toString(); + _noteStateSet = true; + } + return _noteState; + } + + set noteState(String v) { + _noteState = v; + _noteStateSet = true; + } + + /// Note Text + + String get noteText { + if (!_noteTextSet && _apiMapResponse.containsKey('note_text')) { + _noteText = _apiMapResponse['note_text'] == null + ? null + : _apiMapResponse['note_text'].toString(); + _noteTextSet = true; + } + return _noteText; + } + + set noteText(String v) { + _noteText = v; + _noteTextSet = true; + } + + /// Note Text as Html (read-only) + + String get noteTextAsHtml { + if (!_noteTextAsHtmlSet && + _apiMapResponse.containsKey('note_text_as_html')) { + _noteTextAsHtml = _apiMapResponse['note_text_as_html'] == null + ? null + : _apiMapResponse['note_text_as_html'].toString(); + _noteTextAsHtmlSet = true; + } + return _noteTextAsHtml; + } + + set noteTextAsHtml(String v) { + _noteTextAsHtml = v; + _noteTextAsHtmlSet = true; + } + + /// Id Of Query + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// Text tile subtitle text + + String get subtitleText { + if (!_subtitleTextSet && _apiMapResponse.containsKey('subtitle_text')) { + _subtitleText = _apiMapResponse['subtitle_text'] == null + ? null + : _apiMapResponse['subtitle_text'].toString(); + _subtitleTextSet = true; + } + return _subtitleText; + } + + set subtitleText(String v) { + _subtitleText = v; + _subtitleTextSet = true; + } + + /// Title of dashboard element + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Whether title is hidden + + bool get titleHidden { + if (!_titleHiddenSet && _apiMapResponse.containsKey('title_hidden')) { + _titleHidden = _apiMapResponse['title_hidden']; + _titleHiddenSet = true; + } + return _titleHidden; + } + + set titleHidden(bool v) { + _titleHidden = v; + _titleHiddenSet = true; + } + + /// Text tile title + + String get titleText { + if (!_titleTextSet && _apiMapResponse.containsKey('title_text')) { + _titleText = _apiMapResponse['title_text'] == null + ? null + : _apiMapResponse['title_text'].toString(); + _titleTextSet = true; + } + return _titleText; + } + + set titleText(String v) { + _titleText = v; + _titleTextSet = true; + } + + /// Type + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + ContentValidationDashboardElement() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidationDashboardElement.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_bodyTextSet || _apiMapResponse.containsKey('body_text')) { + json['body_text'] = bodyText; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_noteDisplaySet || _apiMapResponse.containsKey('note_display')) { + json['note_display'] = noteDisplay; + } + if (_noteStateSet || _apiMapResponse.containsKey('note_state')) { + json['note_state'] = noteState; + } + if (_noteTextSet || _apiMapResponse.containsKey('note_text')) { + json['note_text'] = noteText; + } + if (_noteTextAsHtmlSet || + _apiMapResponse.containsKey('note_text_as_html')) { + json['note_text_as_html'] = noteTextAsHtml; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_subtitleTextSet || _apiMapResponse.containsKey('subtitle_text')) { + json['subtitle_text'] = subtitleText; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_titleHiddenSet || _apiMapResponse.containsKey('title_hidden')) { + json['title_hidden'] = titleHidden; + } + if (_titleTextSet || _apiMapResponse.containsKey('title_text')) { + json['title_text'] = titleText; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + return json; + } +} + +class ContentValidationDashboardFilter { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _id; + bool _idSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _name; + bool _nameSet = false; + + String _title; + bool _titleSet = false; + + String _type; + bool _typeSet = false; + + String _defaultValue; + bool _defaultValueSet = false; + + String _model; + bool _modelSet = false; + + String _explore; + bool _exploreSet = false; + + String _dimension; + bool _dimensionSet = false; + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id of Dashboard (read-only) + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Name of filter + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Title of filter + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Type of filter: one of date, number, string, or field + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Default value of filter + + String get defaultValue { + if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { + _defaultValue = _apiMapResponse['default_value'] == null + ? null + : _apiMapResponse['default_value'].toString(); + _defaultValueSet = true; + } + return _defaultValue; + } + + set defaultValue(String v) { + _defaultValue = v; + _defaultValueSet = true; + } + + /// Model of filter (required if type = field) + + String get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : _apiMapResponse['model'].toString(); + _modelSet = true; + } + return _model; + } + + set model(String v) { + _model = v; + _modelSet = true; + } + + /// Explore of filter (required if type = field) + + String get explore { + if (!_exploreSet && _apiMapResponse.containsKey('explore')) { + _explore = _apiMapResponse['explore'] == null + ? null + : _apiMapResponse['explore'].toString(); + _exploreSet = true; + } + return _explore; + } + + set explore(String v) { + _explore = v; + _exploreSet = true; + } + + /// Dimension of filter (required if type = field) + + String get dimension { + if (!_dimensionSet && _apiMapResponse.containsKey('dimension')) { + _dimension = _apiMapResponse['dimension'] == null + ? null + : _apiMapResponse['dimension'].toString(); + _dimensionSet = true; + } + return _dimension; + } + + set dimension(String v) { + _dimension = v; + _dimensionSet = true; + } + + ContentValidationDashboardFilter() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidationDashboardFilter.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_defaultValueSet || _apiMapResponse.containsKey('default_value')) { + json['default_value'] = defaultValue; + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model; + } + if (_exploreSet || _apiMapResponse.containsKey('explore')) { + json['explore'] = explore; + } + if (_dimensionSet || _apiMapResponse.containsKey('dimension')) { + json['dimension'] = dimension; + } + return json; + } +} + +class ContentValidationError { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _message; + bool _messageSet = false; + + String _fieldName; + bool _fieldNameSet = false; + + String _modelName; + bool _modelNameSet = false; + + String _exploreName; + bool _exploreNameSet = false; + + bool _removable; + bool _removableSet = false; + + /// Error message (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Name of the field involved in the error (read-only) + + String get fieldName { + if (!_fieldNameSet && _apiMapResponse.containsKey('field_name')) { + _fieldName = _apiMapResponse['field_name'] == null + ? null + : _apiMapResponse['field_name'].toString(); + _fieldNameSet = true; + } + return _fieldName; + } + + set fieldName(String v) { + _fieldName = v; + _fieldNameSet = true; + } + + /// Name of the model involved in the error (read-only) + + String get modelName { + if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { + _modelName = _apiMapResponse['model_name'] == null + ? null + : _apiMapResponse['model_name'].toString(); + _modelNameSet = true; + } + return _modelName; + } + + set modelName(String v) { + _modelName = v; + _modelNameSet = true; + } + + /// Name of the explore involved in the error (read-only) + + String get exploreName { + if (!_exploreNameSet && _apiMapResponse.containsKey('explore_name')) { + _exploreName = _apiMapResponse['explore_name'] == null + ? null + : _apiMapResponse['explore_name'].toString(); + _exploreNameSet = true; + } + return _exploreName; + } + + set exploreName(String v) { + _exploreName = v; + _exploreNameSet = true; + } + + /// Whether this validation error is removable (read-only) + + bool get removable { + if (!_removableSet && _apiMapResponse.containsKey('removable')) { + _removable = _apiMapResponse['removable']; + _removableSet = true; + } + return _removable; + } + + set removable(bool v) { + _removable = v; + _removableSet = true; + } + + ContentValidationError() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidationError.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_fieldNameSet || _apiMapResponse.containsKey('field_name')) { + json['field_name'] = fieldName; + } + if (_modelNameSet || _apiMapResponse.containsKey('model_name')) { + json['model_name'] = modelName; + } + if (_exploreNameSet || _apiMapResponse.containsKey('explore_name')) { + json['explore_name'] = exploreName; + } + if (_removableSet || _apiMapResponse.containsKey('removable')) { + json['removable'] = removable; + } + return json; + } +} + +class ContentValidationFolder { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _id; + bool _idSet = false; + + /// Unique Name + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + ContentValidationFolder() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidationFolder.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + return json; + } +} + +class ContentValidationLook { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _id; + bool _idSet = false; + + String _title; + bool _titleSet = false; + + String _shortUrl; + bool _shortUrlSet = false; + + ContentValidationFolder _folder; + bool _folderSet = false; + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Look Title + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Short Url (read-only) + + String get shortUrl { + if (!_shortUrlSet && _apiMapResponse.containsKey('short_url')) { + _shortUrl = _apiMapResponse['short_url'] == null + ? null + : _apiMapResponse['short_url'].toString(); + _shortUrlSet = true; + } + return _shortUrl; + } + + set shortUrl(String v) { + _shortUrl = v; + _shortUrlSet = true; + } + + ContentValidationFolder get folder { + if (!_folderSet && _apiMapResponse.containsKey('folder')) { + _folder = _apiMapResponse['folder'] == null + ? null + : ContentValidationFolder.fromResponse( + _apiMapResponse['folder'], apiResponseContentType); + _folderSet = true; + } + return _folder; + } + + set folder(ContentValidationFolder v) { + _folder = v; + _folderSet = true; + } + + ContentValidationLook() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidationLook.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_shortUrlSet || _apiMapResponse.containsKey('short_url')) { + json['short_url'] = shortUrl; + } + if (_folderSet || _apiMapResponse.containsKey('folder')) { + json['folder'] = folder == null ? null : folder.toJson(); + } + return json; + } +} + +class ContentValidationLookMLDashboard { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _id; + bool _idSet = false; + + String _title; + bool _titleSet = false; + + String _spaceId; + bool _spaceIdSet = false; + + /// ID of the LookML Dashboard (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Title of the LookML Dashboard (read-only) + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// ID of Space (read-only) + + String get spaceId { + if (!_spaceIdSet && _apiMapResponse.containsKey('space_id')) { + _spaceId = _apiMapResponse['space_id'] == null + ? null + : _apiMapResponse['space_id'].toString(); + _spaceIdSet = true; + } + return _spaceId; + } + + set spaceId(String v) { + _spaceId = v; + _spaceIdSet = true; + } + + ContentValidationLookMLDashboard() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidationLookMLDashboard.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_spaceIdSet || _apiMapResponse.containsKey('space_id')) { + json['space_id'] = spaceId; + } + return json; + } +} + +class ContentValidationLookMLDashboardElement { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _lookmlLinkId; + bool _lookmlLinkIdSet = false; + + String _title; + bool _titleSet = false; + + /// Link ID of the LookML Dashboard Element (read-only) + + String get lookmlLinkId { + if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { + _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null + ? null + : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkIdSet = true; + } + return _lookmlLinkId; + } + + set lookmlLinkId(String v) { + _lookmlLinkId = v; + _lookmlLinkIdSet = true; + } + + /// Title of the LookML Dashboard Element (read-only) + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + ContentValidationLookMLDashboardElement() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidationLookMLDashboardElement.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_lookmlLinkIdSet || _apiMapResponse.containsKey('lookml_link_id')) { + json['lookml_link_id'] = lookmlLinkId; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + return json; + } +} + +class ContentValidationScheduledPlan { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _lookId; + bool _lookIdSet = false; + + int _id; + bool _idSet = false; + + /// Name of this scheduled plan + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Id of a look + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + ContentValidationScheduledPlan() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidationScheduledPlan.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + return json; + } +} + +class ContentValidatorError { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + ContentValidationLook _look; + bool _lookSet = false; + + ContentValidationDashboard _dashboard; + bool _dashboardSet = false; + + ContentValidationDashboardElement _dashboardElement; + bool _dashboardElementSet = false; + + ContentValidationDashboardFilter _dashboardFilter; + bool _dashboardFilterSet = false; + + ContentValidationScheduledPlan _scheduledPlan; + bool _scheduledPlanSet = false; + + ContentValidationAlert _alert; + bool _alertSet = false; + + ContentValidationLookMLDashboard _lookmlDashboard; + bool _lookmlDashboardSet = false; + + ContentValidationLookMLDashboardElement _lookmlDashboardElement; + bool _lookmlDashboardElementSet = false; + + List _errors; + bool _errorsSet = false; + + String _id; + bool _idSet = false; + + ContentValidationLook get look { + if (!_lookSet && _apiMapResponse.containsKey('look')) { + _look = _apiMapResponse['look'] == null + ? null + : ContentValidationLook.fromResponse( + _apiMapResponse['look'], apiResponseContentType); + _lookSet = true; + } + return _look; + } + + set look(ContentValidationLook v) { + _look = v; + _lookSet = true; + } + + ContentValidationDashboard get dashboard { + if (!_dashboardSet && _apiMapResponse.containsKey('dashboard')) { + _dashboard = _apiMapResponse['dashboard'] == null + ? null + : ContentValidationDashboard.fromResponse( + _apiMapResponse['dashboard'], apiResponseContentType); + _dashboardSet = true; + } + return _dashboard; + } + + set dashboard(ContentValidationDashboard v) { + _dashboard = v; + _dashboardSet = true; + } + + ContentValidationDashboardElement get dashboardElement { + if (!_dashboardElementSet && + _apiMapResponse.containsKey('dashboard_element')) { + _dashboardElement = _apiMapResponse['dashboard_element'] == null + ? null + : ContentValidationDashboardElement.fromResponse( + _apiMapResponse['dashboard_element'], apiResponseContentType); + _dashboardElementSet = true; + } + return _dashboardElement; + } + + set dashboardElement(ContentValidationDashboardElement v) { + _dashboardElement = v; + _dashboardElementSet = true; + } + + ContentValidationDashboardFilter get dashboardFilter { + if (!_dashboardFilterSet && + _apiMapResponse.containsKey('dashboard_filter')) { + _dashboardFilter = _apiMapResponse['dashboard_filter'] == null + ? null + : ContentValidationDashboardFilter.fromResponse( + _apiMapResponse['dashboard_filter'], apiResponseContentType); + _dashboardFilterSet = true; + } + return _dashboardFilter; + } + + set dashboardFilter(ContentValidationDashboardFilter v) { + _dashboardFilter = v; + _dashboardFilterSet = true; + } + + ContentValidationScheduledPlan get scheduledPlan { + if (!_scheduledPlanSet && _apiMapResponse.containsKey('scheduled_plan')) { + _scheduledPlan = _apiMapResponse['scheduled_plan'] == null + ? null + : ContentValidationScheduledPlan.fromResponse( + _apiMapResponse['scheduled_plan'], apiResponseContentType); + _scheduledPlanSet = true; + } + return _scheduledPlan; + } + + set scheduledPlan(ContentValidationScheduledPlan v) { + _scheduledPlan = v; + _scheduledPlanSet = true; + } + + ContentValidationAlert get alert { + if (!_alertSet && _apiMapResponse.containsKey('alert')) { + _alert = _apiMapResponse['alert'] == null + ? null + : ContentValidationAlert.fromResponse( + _apiMapResponse['alert'], apiResponseContentType); + _alertSet = true; + } + return _alert; + } + + set alert(ContentValidationAlert v) { + _alert = v; + _alertSet = true; + } + + ContentValidationLookMLDashboard get lookmlDashboard { + if (!_lookmlDashboardSet && + _apiMapResponse.containsKey('lookml_dashboard')) { + _lookmlDashboard = _apiMapResponse['lookml_dashboard'] == null + ? null + : ContentValidationLookMLDashboard.fromResponse( + _apiMapResponse['lookml_dashboard'], apiResponseContentType); + _lookmlDashboardSet = true; + } + return _lookmlDashboard; + } + + set lookmlDashboard(ContentValidationLookMLDashboard v) { + _lookmlDashboard = v; + _lookmlDashboardSet = true; + } + + ContentValidationLookMLDashboardElement get lookmlDashboardElement { + if (!_lookmlDashboardElementSet && + _apiMapResponse.containsKey('lookml_dashboard_element')) { + _lookmlDashboardElement = + _apiMapResponse['lookml_dashboard_element'] == null + ? null + : ContentValidationLookMLDashboardElement.fromResponse( + _apiMapResponse['lookml_dashboard_element'], + apiResponseContentType); + _lookmlDashboardElementSet = true; + } + return _lookmlDashboardElement; + } + + set lookmlDashboardElement(ContentValidationLookMLDashboardElement v) { + _lookmlDashboardElement = v; + _lookmlDashboardElementSet = true; + } + + /// A list of errors found for this piece of content (read-only) + + List get errors { + if (!_errorsSet && _apiMapResponse.containsKey('errors')) { + _errors = _apiMapResponse['errors'] == null + ? null + : (_apiMapResponse['errors'] as List) + .map((i) => ContentValidationError.fromResponse( + i, apiResponseContentType)) + .toList(); + _errorsSet = true; + } + return _errors; + } + + set errors(List v) { + _errors = v; + _errorsSet = true; + } + + /// An id unique to this piece of content for this validation run (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + ContentValidatorError() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentValidatorError.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_lookSet || _apiMapResponse.containsKey('look')) { + json['look'] = look == null ? null : look.toJson(); + } + if (_dashboardSet || _apiMapResponse.containsKey('dashboard')) { + json['dashboard'] = dashboard == null ? null : dashboard.toJson(); + } + if (_dashboardElementSet || + _apiMapResponse.containsKey('dashboard_element')) { + json['dashboard_element'] = + dashboardElement == null ? null : dashboardElement.toJson(); + } + if (_dashboardFilterSet || + _apiMapResponse.containsKey('dashboard_filter')) { + json['dashboard_filter'] = + dashboardFilter == null ? null : dashboardFilter.toJson(); + } + if (_scheduledPlanSet || _apiMapResponse.containsKey('scheduled_plan')) { + json['scheduled_plan'] = + scheduledPlan == null ? null : scheduledPlan.toJson(); + } + if (_alertSet || _apiMapResponse.containsKey('alert')) { + json['alert'] = alert == null ? null : alert.toJson(); + } + if (_lookmlDashboardSet || + _apiMapResponse.containsKey('lookml_dashboard')) { + json['lookml_dashboard'] = + lookmlDashboard == null ? null : lookmlDashboard.toJson(); + } + if (_lookmlDashboardElementSet || + _apiMapResponse.containsKey('lookml_dashboard_element')) { + json['lookml_dashboard_element'] = lookmlDashboardElement == null + ? null + : lookmlDashboardElement.toJson(); + } + if (_errorsSet || _apiMapResponse.containsKey('errors')) { + json['errors'] = + errors == null ? null : errors.map((i) => i.toJson()).toList(); + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + return json; + } +} + +class ContentView { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _lookId; + bool _lookIdSet = false; + + int _dashboardId; + bool _dashboardIdSet = false; + + String _title; + bool _titleSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + int _userId; + bool _userIdSet = false; + + int _groupId; + bool _groupIdSet = false; + + int _viewCount; + bool _viewCountSet = false; + + int _favoriteCount; + bool _favoriteCountSet = false; + + String _lastViewedAt; + bool _lastViewedAtSet = false; + + String _startOfWeekDate; + bool _startOfWeekDateSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Id of viewed Look (read-only) + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Id of the viewed Dashboard (read-only) + + int get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id']; + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(int v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Name or title of underlying content (read-only) + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Content metadata id of the Look or Dashboard (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Id of user content was viewed by (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Id of group content was viewed by (read-only) + + int get groupId { + if (!_groupIdSet && _apiMapResponse.containsKey('group_id')) { + _groupId = _apiMapResponse['group_id']; + _groupIdSet = true; + } + return _groupId; + } + + set groupId(int v) { + _groupId = v; + _groupIdSet = true; + } + + /// Number of times piece of content was viewed (read-only) + + int get viewCount { + if (!_viewCountSet && _apiMapResponse.containsKey('view_count')) { + _viewCount = _apiMapResponse['view_count']; + _viewCountSet = true; + } + return _viewCount; + } + + set viewCount(int v) { + _viewCount = v; + _viewCountSet = true; + } + + /// Number of times piece of content was favorited (read-only) + + int get favoriteCount { + if (!_favoriteCountSet && _apiMapResponse.containsKey('favorite_count')) { + _favoriteCount = _apiMapResponse['favorite_count']; + _favoriteCountSet = true; + } + return _favoriteCount; + } + + set favoriteCount(int v) { + _favoriteCount = v; + _favoriteCountSet = true; + } + + /// Date the piece of content was last viewed (read-only) + + String get lastViewedAt { + if (!_lastViewedAtSet && _apiMapResponse.containsKey('last_viewed_at')) { + _lastViewedAt = _apiMapResponse['last_viewed_at'] == null + ? null + : _apiMapResponse['last_viewed_at'].toString(); + _lastViewedAtSet = true; + } + return _lastViewedAt; + } + + set lastViewedAt(String v) { + _lastViewedAt = v; + _lastViewedAtSet = true; + } + + /// Week start date for the view and favorite count during that given week (read-only) + + String get startOfWeekDate { + if (!_startOfWeekDateSet && + _apiMapResponse.containsKey('start_of_week_date')) { + _startOfWeekDate = _apiMapResponse['start_of_week_date'] == null + ? null + : _apiMapResponse['start_of_week_date'].toString(); + _startOfWeekDateSet = true; + } + return _startOfWeekDate; + } + + set startOfWeekDate(String v) { + _startOfWeekDate = v; + _startOfWeekDateSet = true; + } + + ContentView() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContentView.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_groupIdSet || _apiMapResponse.containsKey('group_id')) { + json['group_id'] = groupId; + } + if (_viewCountSet || _apiMapResponse.containsKey('view_count')) { + json['view_count'] = viewCount; + } + if (_favoriteCountSet || _apiMapResponse.containsKey('favorite_count')) { + json['favorite_count'] = favoriteCount; + } + if (_lastViewedAtSet || _apiMapResponse.containsKey('last_viewed_at')) { + json['last_viewed_at'] = lastViewedAt; + } + if (_startOfWeekDateSet || + _apiMapResponse.containsKey('start_of_week_date')) { + json['start_of_week_date'] = startOfWeekDate; + } + return json; + } +} + +class ContinuousPalette { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _id; + bool _idSet = false; + + String _label; + bool _labelSet = false; + + String _type; + bool _typeSet = false; + + List _stops; + bool _stopsSet = false; + + /// Unique identity string (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Label for palette + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Type of palette + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Array of ColorStops in the palette + + List get stops { + if (!_stopsSet && _apiMapResponse.containsKey('stops')) { + _stops = _apiMapResponse['stops'] == null + ? null + : (_apiMapResponse['stops'] as List) + .map((i) => ColorStop.fromResponse(i, apiResponseContentType)) + .toList(); + _stopsSet = true; + } + return _stops; + } + + set stops(List v) { + _stops = v; + _stopsSet = true; + } + + ContinuousPalette() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ContinuousPalette.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_stopsSet || _apiMapResponse.containsKey('stops')) { + json['stops'] = + stops == null ? null : stops.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class CostEstimate { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _cost; + bool _costSet = false; + + bool _cacheHit; + bool _cacheHitSet = false; + + String _costUnit; + bool _costUnitSet = false; + + String _message; + bool _messageSet = false; + + /// Cost of SQL statement (read-only) + + int get cost { + if (!_costSet && _apiMapResponse.containsKey('cost')) { + _cost = _apiMapResponse['cost']; + _costSet = true; + } + return _cost; + } + + set cost(int v) { + _cost = v; + _costSet = true; + } + + /// Does the result come from the cache? (read-only) + + bool get cacheHit { + if (!_cacheHitSet && _apiMapResponse.containsKey('cache_hit')) { + _cacheHit = _apiMapResponse['cache_hit']; + _cacheHitSet = true; + } + return _cacheHit; + } + + set cacheHit(bool v) { + _cacheHit = v; + _cacheHitSet = true; + } + + /// Cost measurement size (read-only) + + String get costUnit { + if (!_costUnitSet && _apiMapResponse.containsKey('cost_unit')) { + _costUnit = _apiMapResponse['cost_unit'] == null + ? null + : _apiMapResponse['cost_unit'].toString(); + _costUnitSet = true; + } + return _costUnit; + } + + set costUnit(String v) { + _costUnit = v; + _costUnitSet = true; + } + + /// Human-friendly message (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + CostEstimate() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CostEstimate.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_costSet || _apiMapResponse.containsKey('cost')) { + json['cost'] = cost; + } + if (_cacheHitSet || _apiMapResponse.containsKey('cache_hit')) { + json['cache_hit'] = cacheHit; + } + if (_costUnitSet || _apiMapResponse.containsKey('cost_unit')) { + json['cost_unit'] = costUnit; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + return json; + } +} + +/// WARNING: no writeable properties found for POST, PUT, or PATCH +class CreateCostEstimate { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _sql; + bool _sqlSet = false; + + /// SQL statement to estimate (read-only) + + String get sql { + if (!_sqlSet && _apiMapResponse.containsKey('sql')) { + _sql = _apiMapResponse['sql'] == null + ? null + : _apiMapResponse['sql'].toString(); + _sqlSet = true; + } + return _sql; + } + + set sql(String v) { + _sql = v; + _sqlSet = true; + } + + CreateCostEstimate() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CreateCostEstimate.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_sqlSet || _apiMapResponse.containsKey('sql')) { + json['sql'] = sql; + } + return json; + } +} + +class CreateCredentialsApi3 { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _clientId; + bool _clientIdSet = false; + + String _createdAt; + bool _createdAtSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _type; + bool _typeSet = false; + + String _clientSecret; + bool _clientSecretSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// API key client_id (read-only) + + String get clientId { + if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { + _clientId = _apiMapResponse['client_id'] == null + ? null + : _apiMapResponse['client_id'].toString(); + _clientIdSet = true; + } + return _clientId; + } + + set clientId(String v) { + _clientId = v; + _clientIdSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// API key client_secret (read-only) + + String get clientSecret { + if (!_clientSecretSet && _apiMapResponse.containsKey('client_secret')) { + _clientSecret = _apiMapResponse['client_secret'] == null + ? null + : _apiMapResponse['client_secret'].toString(); + _clientSecretSet = true; + } + return _clientSecret; + } + + set clientSecret(String v) { + _clientSecret = v; + _clientSecretSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + CreateCredentialsApi3() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CreateCredentialsApi3.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_clientIdSet || _apiMapResponse.containsKey('client_id')) { + json['client_id'] = clientId; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_clientSecretSet || _apiMapResponse.containsKey('client_secret')) { + json['client_secret'] = clientSecret; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class CreateDashboardFilter { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _id; + bool _idSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _name; + bool _nameSet = false; + + String _title; + bool _titleSet = false; + + String _type; + bool _typeSet = false; + + String _defaultValue; + bool _defaultValueSet = false; + + String _model; + bool _modelSet = false; + + String _explore; + bool _exploreSet = false; + + String _dimension; + bool _dimensionSet = false; + + Map _field; + bool _fieldSet = false; + + int _row; + bool _rowSet = false; + + List _listensToFilters; + bool _listensToFiltersSet = false; + + bool _allowMultipleValues; + bool _allowMultipleValuesSet = false; + + bool _required; + bool _requiredSet = false; + + Map _uiConfig; + bool _uiConfigSet = false; + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id of Dashboard + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Name of filter + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Title of filter + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Type of filter: one of date, number, string, or field + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Default value of filter + + String get defaultValue { + if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { + _defaultValue = _apiMapResponse['default_value'] == null + ? null + : _apiMapResponse['default_value'].toString(); + _defaultValueSet = true; + } + return _defaultValue; + } + + set defaultValue(String v) { + _defaultValue = v; + _defaultValueSet = true; + } + + /// Model of filter (required if type = field) + + String get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : _apiMapResponse['model'].toString(); + _modelSet = true; + } + return _model; + } + + set model(String v) { + _model = v; + _modelSet = true; + } + + /// Explore of filter (required if type = field) + + String get explore { + if (!_exploreSet && _apiMapResponse.containsKey('explore')) { + _explore = _apiMapResponse['explore'] == null + ? null + : _apiMapResponse['explore'].toString(); + _exploreSet = true; + } + return _explore; + } + + set explore(String v) { + _explore = v; + _exploreSet = true; + } + + /// Dimension of filter (required if type = field) + + String get dimension { + if (!_dimensionSet && _apiMapResponse.containsKey('dimension')) { + _dimension = _apiMapResponse['dimension'] == null + ? null + : _apiMapResponse['dimension'].toString(); + _dimensionSet = true; + } + return _dimension; + } + + set dimension(String v) { + _dimension = v; + _dimensionSet = true; + } + + /// Field information (read-only) + + Map get field { + if (!_fieldSet && _apiMapResponse.containsKey('field')) { + _field = _apiMapResponse['field']; + _fieldSet = true; + } + return _field; + } + + set field(Map v) { + _field = v; + _fieldSet = true; + } + + /// Display order of this filter relative to other filters + + int get row { + if (!_rowSet && _apiMapResponse.containsKey('row')) { + _row = _apiMapResponse['row']; + _rowSet = true; + } + return _row; + } + + set row(int v) { + _row = v; + _rowSet = true; + } + + /// Array of listeners for faceted filters + + List get listensToFilters { + if (!_listensToFiltersSet && + _apiMapResponse.containsKey('listens_to_filters')) { + _listensToFilters = _apiMapResponse['listens_to_filters'] == null + ? null + : _apiMapResponse['listens_to_filters'] + .map((i) => i as String) + .toList(); + _listensToFiltersSet = true; + } + return _listensToFilters; + } + + set listensToFilters(List v) { + _listensToFilters = v; + _listensToFiltersSet = true; + } + + /// Whether the filter allows multiple filter values (deprecated in the latest version of dashboards) + + bool get allowMultipleValues { + if (!_allowMultipleValuesSet && + _apiMapResponse.containsKey('allow_multiple_values')) { + _allowMultipleValues = _apiMapResponse['allow_multiple_values']; + _allowMultipleValuesSet = true; + } + return _allowMultipleValues; + } + + set allowMultipleValues(bool v) { + _allowMultipleValues = v; + _allowMultipleValuesSet = true; + } + + /// Whether the filter requires a value to run the dashboard + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// The visual configuration for this filter. Used to set up how the UI for this filter should appear. + + Map get uiConfig { + if (!_uiConfigSet && _apiMapResponse.containsKey('ui_config')) { + _uiConfig = _apiMapResponse['ui_config']; + _uiConfigSet = true; + } + return _uiConfig; + } + + set uiConfig(Map v) { + _uiConfig = v; + _uiConfigSet = true; + } + + CreateDashboardFilter() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CreateDashboardFilter.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_defaultValueSet || _apiMapResponse.containsKey('default_value')) { + json['default_value'] = defaultValue; + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model; + } + if (_exploreSet || _apiMapResponse.containsKey('explore')) { + json['explore'] = explore; + } + if (_dimensionSet || _apiMapResponse.containsKey('dimension')) { + json['dimension'] = dimension; + } + if (_fieldSet || _apiMapResponse.containsKey('field')) { + json['field'] = field; + } + if (_rowSet || _apiMapResponse.containsKey('row')) { + json['row'] = row; + } + if (_listensToFiltersSet || + _apiMapResponse.containsKey('listens_to_filters')) { + json['listens_to_filters'] = listensToFilters; + } + if (_allowMultipleValuesSet || + _apiMapResponse.containsKey('allow_multiple_values')) { + json['allow_multiple_values'] = allowMultipleValues; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_uiConfigSet || _apiMapResponse.containsKey('ui_config')) { + json['ui_config'] = uiConfig; + } + return json; + } +} + +class CreateDashboardRenderTask { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _dashboardFilters; + bool _dashboardFiltersSet = false; + + String _dashboardStyle; + bool _dashboardStyleSet = false; + + /// Filter values to apply to the dashboard queries, in URL query format + + String get dashboardFilters { + if (!_dashboardFiltersSet && + _apiMapResponse.containsKey('dashboard_filters')) { + _dashboardFilters = _apiMapResponse['dashboard_filters'] == null + ? null + : _apiMapResponse['dashboard_filters'].toString(); + _dashboardFiltersSet = true; + } + return _dashboardFilters; + } + + set dashboardFilters(String v) { + _dashboardFilters = v; + _dashboardFiltersSet = true; + } + + /// Dashboard layout style: single_column or tiled + + String get dashboardStyle { + if (!_dashboardStyleSet && _apiMapResponse.containsKey('dashboard_style')) { + _dashboardStyle = _apiMapResponse['dashboard_style'] == null + ? null + : _apiMapResponse['dashboard_style'].toString(); + _dashboardStyleSet = true; + } + return _dashboardStyle; + } + + set dashboardStyle(String v) { + _dashboardStyle = v; + _dashboardStyleSet = true; + } + + CreateDashboardRenderTask() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CreateDashboardRenderTask.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dashboardFiltersSet || + _apiMapResponse.containsKey('dashboard_filters')) { + json['dashboard_filters'] = dashboardFilters; + } + if (_dashboardStyleSet || _apiMapResponse.containsKey('dashboard_style')) { + json['dashboard_style'] = dashboardStyle; + } + return json; + } +} + +class CreateEmbedUserRequest { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _externalUserId; + bool _externalUserIdSet = false; + + String get externalUserId { + if (!_externalUserIdSet && + _apiMapResponse.containsKey('external_user_id')) { + _externalUserId = _apiMapResponse['external_user_id'] == null + ? null + : _apiMapResponse['external_user_id'].toString(); + _externalUserIdSet = true; + } + return _externalUserId; + } + + set externalUserId(String v) { + _externalUserId = v; + _externalUserIdSet = true; + } + + CreateEmbedUserRequest() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CreateEmbedUserRequest.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_externalUserIdSet || _apiMapResponse.containsKey('external_user_id')) { + json['external_user_id'] = externalUserId; + } + return json; + } +} + +class CreateFolder { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _parentId; + bool _parentIdSet = false; + + /// Unique Name + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Id of Parent. If the parent id is null, this is a root-level entry + + String get parentId { + if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { + _parentId = _apiMapResponse['parent_id'] == null + ? null + : _apiMapResponse['parent_id'].toString(); + _parentIdSet = true; + } + return _parentId; + } + + set parentId(String v) { + _parentId = v; + _parentIdSet = true; + } + + CreateFolder() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CreateFolder.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_parentIdSet || _apiMapResponse.containsKey('parent_id')) { + json['parent_id'] = parentId; + } + return json; + } +} + +class CreateOAuthApplicationUserStateRequest { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _userId; + bool _userIdSet = false; + + String _oauthApplicationId; + bool _oauthApplicationIdSet = false; + + String _accessToken; + bool _accessTokenSet = false; + + DateTime _accessTokenExpiresAt; + bool _accessTokenExpiresAtSet = false; + + String _refreshToken; + bool _refreshTokenSet = false; + + DateTime _refreshTokenExpiresAt; + bool _refreshTokenExpiresAtSet = false; + + String get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id'] == null + ? null + : _apiMapResponse['user_id'].toString(); + _userIdSet = true; + } + return _userId; + } + + set userId(String v) { + _userId = v; + _userIdSet = true; + } + + String get oauthApplicationId { + if (!_oauthApplicationIdSet && + _apiMapResponse.containsKey('oauth_application_id')) { + _oauthApplicationId = _apiMapResponse['oauth_application_id'] == null + ? null + : _apiMapResponse['oauth_application_id'].toString(); + _oauthApplicationIdSet = true; + } + return _oauthApplicationId; + } + + set oauthApplicationId(String v) { + _oauthApplicationId = v; + _oauthApplicationIdSet = true; + } + + String get accessToken { + if (!_accessTokenSet && _apiMapResponse.containsKey('access_token')) { + _accessToken = _apiMapResponse['access_token'] == null + ? null + : _apiMapResponse['access_token'].toString(); + _accessTokenSet = true; + } + return _accessToken; + } + + set accessToken(String v) { + _accessToken = v; + _accessTokenSet = true; + } + + DateTime get accessTokenExpiresAt { + if (!_accessTokenExpiresAtSet && + _apiMapResponse.containsKey('access_token_expires_at')) { + _accessTokenExpiresAt = _apiMapResponse['access_token_expires_at'] == null + ? null + : DateTime.parse(_apiMapResponse['access_token_expires_at']); + _accessTokenExpiresAtSet = true; + } + return _accessTokenExpiresAt; + } + + set accessTokenExpiresAt(DateTime v) { + _accessTokenExpiresAt = v; + _accessTokenExpiresAtSet = true; + } + + String get refreshToken { + if (!_refreshTokenSet && _apiMapResponse.containsKey('refresh_token')) { + _refreshToken = _apiMapResponse['refresh_token'] == null + ? null + : _apiMapResponse['refresh_token'].toString(); + _refreshTokenSet = true; + } + return _refreshToken; + } + + set refreshToken(String v) { + _refreshToken = v; + _refreshTokenSet = true; + } + + DateTime get refreshTokenExpiresAt { + if (!_refreshTokenExpiresAtSet && + _apiMapResponse.containsKey('refresh_token_expires_at')) { + _refreshTokenExpiresAt = + _apiMapResponse['refresh_token_expires_at'] == null + ? null + : DateTime.parse(_apiMapResponse['refresh_token_expires_at']); + _refreshTokenExpiresAtSet = true; + } + return _refreshTokenExpiresAt; + } + + set refreshTokenExpiresAt(DateTime v) { + _refreshTokenExpiresAt = v; + _refreshTokenExpiresAtSet = true; + } + + CreateOAuthApplicationUserStateRequest() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CreateOAuthApplicationUserStateRequest.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_oauthApplicationIdSet || + _apiMapResponse.containsKey('oauth_application_id')) { + json['oauth_application_id'] = oauthApplicationId; + } + if (_accessTokenSet || _apiMapResponse.containsKey('access_token')) { + json['access_token'] = accessToken; + } + if (_accessTokenExpiresAtSet || + _apiMapResponse.containsKey('access_token_expires_at')) { + json['access_token_expires_at'] = accessTokenExpiresAt == null + ? null + : accessTokenExpiresAt.toIso8601String(); + } + if (_refreshTokenSet || _apiMapResponse.containsKey('refresh_token')) { + json['refresh_token'] = refreshToken; + } + if (_refreshTokenExpiresAtSet || + _apiMapResponse.containsKey('refresh_token_expires_at')) { + json['refresh_token_expires_at'] = refreshTokenExpiresAt == null + ? null + : refreshTokenExpiresAt.toIso8601String(); + } + return json; + } +} + +class CreateOAuthApplicationUserStateResponse { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _userId; + bool _userIdSet = false; + + int _oauthApplicationId; + bool _oauthApplicationIdSet = false; + + /// User Id (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// OAuth Application ID (read-only) + + int get oauthApplicationId { + if (!_oauthApplicationIdSet && + _apiMapResponse.containsKey('oauth_application_id')) { + _oauthApplicationId = _apiMapResponse['oauth_application_id']; + _oauthApplicationIdSet = true; + } + return _oauthApplicationId; + } + + set oauthApplicationId(int v) { + _oauthApplicationId = v; + _oauthApplicationIdSet = true; + } + + CreateOAuthApplicationUserStateResponse() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CreateOAuthApplicationUserStateResponse.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_oauthApplicationIdSet || + _apiMapResponse.containsKey('oauth_application_id')) { + json['oauth_application_id'] = oauthApplicationId; + } + return json; + } +} + +class CreateQueryTask { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _queryId; + bool _queryIdSet = false; + + ResultFormat _resultFormat; + bool _resultFormatSet = false; + + String _source; + bool _sourceSet = false; + + bool _deferred; + bool _deferredSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Id of query to run + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "csv", "html", "md", "txt", "xlsx", "gsxml". + + ResultFormat get resultFormat { + if (!_resultFormatSet && _apiMapResponse.containsKey('result_format')) { + _resultFormat = + ResultFormatMapper.fromStringValue(_apiMapResponse['result_format']); + _resultFormatSet = true; + } + return _resultFormat; + } + + set resultFormat(ResultFormat v) { + _resultFormat = v; + _resultFormatSet = true; + } + + /// Source of query task + + String get source { + if (!_sourceSet && _apiMapResponse.containsKey('source')) { + _source = _apiMapResponse['source'] == null + ? null + : _apiMapResponse['source'].toString(); + _sourceSet = true; + } + return _source; + } + + set source(String v) { + _source = v; + _sourceSet = true; + } + + /// Create the task but defer execution + + bool get deferred { + if (!_deferredSet && _apiMapResponse.containsKey('deferred')) { + _deferred = _apiMapResponse['deferred']; + _deferredSet = true; + } + return _deferred; + } + + set deferred(bool v) { + _deferred = v; + _deferredSet = true; + } + + /// Id of look associated with query. + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Id of dashboard associated with query. + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + CreateQueryTask() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CreateQueryTask.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_resultFormatSet || _apiMapResponse.containsKey('result_format')) { + json['result_format'] = ResultFormatMapper.toStringValue(resultFormat); + } + if (_sourceSet || _apiMapResponse.containsKey('source')) { + json['source'] = source; + } + if (_deferredSet || _apiMapResponse.containsKey('deferred')) { + json['deferred'] = deferred; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + return json; + } +} + +class CredentialsApi3 { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _clientId; + bool _clientIdSet = false; + + String _createdAt; + bool _createdAtSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _type; + bool _typeSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// API key client_id (read-only) + + String get clientId { + if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { + _clientId = _apiMapResponse['client_id'] == null + ? null + : _apiMapResponse['client_id'].toString(); + _clientIdSet = true; + } + return _clientId; + } + + set clientId(String v) { + _clientId = v; + _clientIdSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + CredentialsApi3() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CredentialsApi3.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_clientIdSet || _apiMapResponse.containsKey('client_id')) { + json['client_id'] = clientId; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class CredentialsEmail { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _email; + bool _emailSet = false; + + bool _forcedPasswordResetAtNextLogin; + bool _forcedPasswordResetAtNextLoginSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _loggedInAt; + bool _loggedInAtSet = false; + + String _passwordResetUrl; + bool _passwordResetUrlSet = false; + + String _type; + bool _typeSet = false; + + String _url; + bool _urlSet = false; + + String _userUrl; + bool _userUrlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// EMail address used for user login + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// Force the user to change their password upon their next login + + bool get forcedPasswordResetAtNextLogin { + if (!_forcedPasswordResetAtNextLoginSet && + _apiMapResponse.containsKey('forced_password_reset_at_next_login')) { + _forcedPasswordResetAtNextLogin = + _apiMapResponse['forced_password_reset_at_next_login']; + _forcedPasswordResetAtNextLoginSet = true; + } + return _forcedPasswordResetAtNextLogin; + } + + set forcedPasswordResetAtNextLogin(bool v) { + _forcedPasswordResetAtNextLogin = v; + _forcedPasswordResetAtNextLoginSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Timestamp for most recent login using credential (read-only) + + String get loggedInAt { + if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { + _loggedInAt = _apiMapResponse['logged_in_at'] == null + ? null + : _apiMapResponse['logged_in_at'].toString(); + _loggedInAtSet = true; + } + return _loggedInAt; + } + + set loggedInAt(String v) { + _loggedInAt = v; + _loggedInAtSet = true; + } + + /// Url with one-time use secret token that the user can use to reset password (read-only) + + String get passwordResetUrl { + if (!_passwordResetUrlSet && + _apiMapResponse.containsKey('password_reset_url')) { + _passwordResetUrl = _apiMapResponse['password_reset_url'] == null + ? null + : _apiMapResponse['password_reset_url'].toString(); + _passwordResetUrlSet = true; + } + return _passwordResetUrl; + } + + set passwordResetUrl(String v) { + _passwordResetUrl = v; + _passwordResetUrlSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Link to get this user (read-only) + + String get userUrl { + if (!_userUrlSet && _apiMapResponse.containsKey('user_url')) { + _userUrl = _apiMapResponse['user_url'] == null + ? null + : _apiMapResponse['user_url'].toString(); + _userUrlSet = true; + } + return _userUrl; + } + + set userUrl(String v) { + _userUrl = v; + _userUrlSet = true; + } + + CredentialsEmail() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CredentialsEmail.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_forcedPasswordResetAtNextLoginSet || + _apiMapResponse.containsKey('forced_password_reset_at_next_login')) { + json['forced_password_reset_at_next_login'] = + forcedPasswordResetAtNextLogin; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_loggedInAtSet || _apiMapResponse.containsKey('logged_in_at')) { + json['logged_in_at'] = loggedInAt; + } + if (_passwordResetUrlSet || + _apiMapResponse.containsKey('password_reset_url')) { + json['password_reset_url'] = passwordResetUrl; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_userUrlSet || _apiMapResponse.containsKey('user_url')) { + json['user_url'] = userUrl; + } + return json; + } +} + +class CredentialsEmailSearch { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _email; + bool _emailSet = false; + + bool _forcedPasswordResetAtNextLogin; + bool _forcedPasswordResetAtNextLoginSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _loggedInAt; + bool _loggedInAtSet = false; + + String _passwordResetUrl; + bool _passwordResetUrlSet = false; + + String _type; + bool _typeSet = false; + + String _url; + bool _urlSet = false; + + String _userUrl; + bool _userUrlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// EMail address used for user login + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// Force the user to change their password upon their next login + + bool get forcedPasswordResetAtNextLogin { + if (!_forcedPasswordResetAtNextLoginSet && + _apiMapResponse.containsKey('forced_password_reset_at_next_login')) { + _forcedPasswordResetAtNextLogin = + _apiMapResponse['forced_password_reset_at_next_login']; + _forcedPasswordResetAtNextLoginSet = true; + } + return _forcedPasswordResetAtNextLogin; + } + + set forcedPasswordResetAtNextLogin(bool v) { + _forcedPasswordResetAtNextLogin = v; + _forcedPasswordResetAtNextLoginSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Timestamp for most recent login using credential (read-only) + + String get loggedInAt { + if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { + _loggedInAt = _apiMapResponse['logged_in_at'] == null + ? null + : _apiMapResponse['logged_in_at'].toString(); + _loggedInAtSet = true; + } + return _loggedInAt; + } + + set loggedInAt(String v) { + _loggedInAt = v; + _loggedInAtSet = true; + } + + /// Url with one-time use secret token that the user can use to reset password (read-only) + + String get passwordResetUrl { + if (!_passwordResetUrlSet && + _apiMapResponse.containsKey('password_reset_url')) { + _passwordResetUrl = _apiMapResponse['password_reset_url'] == null + ? null + : _apiMapResponse['password_reset_url'].toString(); + _passwordResetUrlSet = true; + } + return _passwordResetUrl; + } + + set passwordResetUrl(String v) { + _passwordResetUrl = v; + _passwordResetUrlSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Link to get this user (read-only) + + String get userUrl { + if (!_userUrlSet && _apiMapResponse.containsKey('user_url')) { + _userUrl = _apiMapResponse['user_url'] == null + ? null + : _apiMapResponse['user_url'].toString(); + _userUrlSet = true; + } + return _userUrl; + } + + set userUrl(String v) { + _userUrl = v; + _userUrlSet = true; + } + + CredentialsEmailSearch() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CredentialsEmailSearch.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_forcedPasswordResetAtNextLoginSet || + _apiMapResponse.containsKey('forced_password_reset_at_next_login')) { + json['forced_password_reset_at_next_login'] = + forcedPasswordResetAtNextLogin; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_loggedInAtSet || _apiMapResponse.containsKey('logged_in_at')) { + json['logged_in_at'] = loggedInAt; + } + if (_passwordResetUrlSet || + _apiMapResponse.containsKey('password_reset_url')) { + json['password_reset_url'] = passwordResetUrl; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_userUrlSet || _apiMapResponse.containsKey('user_url')) { + json['user_url'] = userUrl; + } + return json; + } +} + +class CredentialsEmbed { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _externalGroupId; + bool _externalGroupIdSet = false; + + String _externalUserId; + bool _externalUserIdSet = false; + + int _id; + bool _idSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _loggedInAt; + bool _loggedInAtSet = false; + + String _type; + bool _typeSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Embedder's id for a group to which this user was added during the most recent login (read-only) + + String get externalGroupId { + if (!_externalGroupIdSet && + _apiMapResponse.containsKey('external_group_id')) { + _externalGroupId = _apiMapResponse['external_group_id'] == null + ? null + : _apiMapResponse['external_group_id'].toString(); + _externalGroupIdSet = true; + } + return _externalGroupId; + } + + set externalGroupId(String v) { + _externalGroupId = v; + _externalGroupIdSet = true; + } + + /// Embedder's unique id for the user (read-only) + + String get externalUserId { + if (!_externalUserIdSet && + _apiMapResponse.containsKey('external_user_id')) { + _externalUserId = _apiMapResponse['external_user_id'] == null + ? null + : _apiMapResponse['external_user_id'].toString(); + _externalUserIdSet = true; + } + return _externalUserId; + } + + set externalUserId(String v) { + _externalUserId = v; + _externalUserIdSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Timestamp for most recent login using credential (read-only) + + String get loggedInAt { + if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { + _loggedInAt = _apiMapResponse['logged_in_at'] == null + ? null + : _apiMapResponse['logged_in_at'].toString(); + _loggedInAtSet = true; + } + return _loggedInAt; + } + + set loggedInAt(String v) { + _loggedInAt = v; + _loggedInAtSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + CredentialsEmbed() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CredentialsEmbed.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_externalGroupIdSet || + _apiMapResponse.containsKey('external_group_id')) { + json['external_group_id'] = externalGroupId; + } + if (_externalUserIdSet || _apiMapResponse.containsKey('external_user_id')) { + json['external_user_id'] = externalUserId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_loggedInAtSet || _apiMapResponse.containsKey('logged_in_at')) { + json['logged_in_at'] = loggedInAt; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class CredentialsGoogle { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _domain; + bool _domainSet = false; + + String _email; + bool _emailSet = false; + + String _googleUserId; + bool _googleUserIdSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _loggedInAt; + bool _loggedInAtSet = false; + + String _type; + bool _typeSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Google domain (read-only) + + String get domain { + if (!_domainSet && _apiMapResponse.containsKey('domain')) { + _domain = _apiMapResponse['domain'] == null + ? null + : _apiMapResponse['domain'].toString(); + _domainSet = true; + } + return _domain; + } + + set domain(String v) { + _domain = v; + _domainSet = true; + } + + /// EMail address (read-only) + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// Google's Unique ID for this user (read-only) + + String get googleUserId { + if (!_googleUserIdSet && _apiMapResponse.containsKey('google_user_id')) { + _googleUserId = _apiMapResponse['google_user_id'] == null + ? null + : _apiMapResponse['google_user_id'].toString(); + _googleUserIdSet = true; + } + return _googleUserId; + } + + set googleUserId(String v) { + _googleUserId = v; + _googleUserIdSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Timestamp for most recent login using credential (read-only) + + String get loggedInAt { + if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { + _loggedInAt = _apiMapResponse['logged_in_at'] == null + ? null + : _apiMapResponse['logged_in_at'].toString(); + _loggedInAtSet = true; + } + return _loggedInAt; + } + + set loggedInAt(String v) { + _loggedInAt = v; + _loggedInAtSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + CredentialsGoogle() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CredentialsGoogle.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_domainSet || _apiMapResponse.containsKey('domain')) { + json['domain'] = domain; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_googleUserIdSet || _apiMapResponse.containsKey('google_user_id')) { + json['google_user_id'] = googleUserId; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_loggedInAtSet || _apiMapResponse.containsKey('logged_in_at')) { + json['logged_in_at'] = loggedInAt; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class CredentialsLDAP { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _email; + bool _emailSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _ldapDn; + bool _ldapDnSet = false; + + String _ldapId; + bool _ldapIdSet = false; + + String _loggedInAt; + bool _loggedInAtSet = false; + + String _type; + bool _typeSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// EMail address (read-only) + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// LDAP Distinguished name for this user (as-of the last login) (read-only) + + String get ldapDn { + if (!_ldapDnSet && _apiMapResponse.containsKey('ldap_dn')) { + _ldapDn = _apiMapResponse['ldap_dn'] == null + ? null + : _apiMapResponse['ldap_dn'].toString(); + _ldapDnSet = true; + } + return _ldapDn; + } + + set ldapDn(String v) { + _ldapDn = v; + _ldapDnSet = true; + } + + /// LDAP Unique ID for this user (read-only) + + String get ldapId { + if (!_ldapIdSet && _apiMapResponse.containsKey('ldap_id')) { + _ldapId = _apiMapResponse['ldap_id'] == null + ? null + : _apiMapResponse['ldap_id'].toString(); + _ldapIdSet = true; + } + return _ldapId; + } + + set ldapId(String v) { + _ldapId = v; + _ldapIdSet = true; + } + + /// Timestamp for most recent login using credential (read-only) + + String get loggedInAt { + if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { + _loggedInAt = _apiMapResponse['logged_in_at'] == null + ? null + : _apiMapResponse['logged_in_at'].toString(); + _loggedInAtSet = true; + } + return _loggedInAt; + } + + set loggedInAt(String v) { + _loggedInAt = v; + _loggedInAtSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + CredentialsLDAP() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CredentialsLDAP.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_ldapDnSet || _apiMapResponse.containsKey('ldap_dn')) { + json['ldap_dn'] = ldapDn; + } + if (_ldapIdSet || _apiMapResponse.containsKey('ldap_id')) { + json['ldap_id'] = ldapId; + } + if (_loggedInAtSet || _apiMapResponse.containsKey('logged_in_at')) { + json['logged_in_at'] = loggedInAt; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class CredentialsLookerOpenid { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _email; + bool _emailSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _loggedInAt; + bool _loggedInAtSet = false; + + String _loggedInIp; + bool _loggedInIpSet = false; + + String _type; + bool _typeSet = false; + + String _url; + bool _urlSet = false; + + String _userUrl; + bool _userUrlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// EMail address used for user login (read-only) + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Timestamp for most recent login using credential (read-only) + + String get loggedInAt { + if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { + _loggedInAt = _apiMapResponse['logged_in_at'] == null + ? null + : _apiMapResponse['logged_in_at'].toString(); + _loggedInAtSet = true; + } + return _loggedInAt; + } + + set loggedInAt(String v) { + _loggedInAt = v; + _loggedInAtSet = true; + } + + /// IP address of client for most recent login using credential (read-only) + + String get loggedInIp { + if (!_loggedInIpSet && _apiMapResponse.containsKey('logged_in_ip')) { + _loggedInIp = _apiMapResponse['logged_in_ip'] == null + ? null + : _apiMapResponse['logged_in_ip'].toString(); + _loggedInIpSet = true; + } + return _loggedInIp; + } + + set loggedInIp(String v) { + _loggedInIp = v; + _loggedInIpSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Link to get this user (read-only) + + String get userUrl { + if (!_userUrlSet && _apiMapResponse.containsKey('user_url')) { + _userUrl = _apiMapResponse['user_url'] == null + ? null + : _apiMapResponse['user_url'].toString(); + _userUrlSet = true; + } + return _userUrl; + } + + set userUrl(String v) { + _userUrl = v; + _userUrlSet = true; + } + + CredentialsLookerOpenid() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CredentialsLookerOpenid.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_loggedInAtSet || _apiMapResponse.containsKey('logged_in_at')) { + json['logged_in_at'] = loggedInAt; + } + if (_loggedInIpSet || _apiMapResponse.containsKey('logged_in_ip')) { + json['logged_in_ip'] = loggedInIp; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_userUrlSet || _apiMapResponse.containsKey('user_url')) { + json['user_url'] = userUrl; + } + return json; + } +} + +class CredentialsOIDC { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _email; + bool _emailSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _loggedInAt; + bool _loggedInAtSet = false; + + String _oidcUserId; + bool _oidcUserIdSet = false; + + String _type; + bool _typeSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// EMail address (read-only) + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Timestamp for most recent login using credential (read-only) + + String get loggedInAt { + if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { + _loggedInAt = _apiMapResponse['logged_in_at'] == null + ? null + : _apiMapResponse['logged_in_at'].toString(); + _loggedInAtSet = true; + } + return _loggedInAt; + } + + set loggedInAt(String v) { + _loggedInAt = v; + _loggedInAtSet = true; + } + + /// OIDC OP's Unique ID for this user (read-only) + + String get oidcUserId { + if (!_oidcUserIdSet && _apiMapResponse.containsKey('oidc_user_id')) { + _oidcUserId = _apiMapResponse['oidc_user_id'] == null + ? null + : _apiMapResponse['oidc_user_id'].toString(); + _oidcUserIdSet = true; + } + return _oidcUserId; + } + + set oidcUserId(String v) { + _oidcUserId = v; + _oidcUserIdSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + CredentialsOIDC() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CredentialsOIDC.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_loggedInAtSet || _apiMapResponse.containsKey('logged_in_at')) { + json['logged_in_at'] = loggedInAt; + } + if (_oidcUserIdSet || _apiMapResponse.containsKey('oidc_user_id')) { + json['oidc_user_id'] = oidcUserId; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class CredentialsSaml { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _email; + bool _emailSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _loggedInAt; + bool _loggedInAtSet = false; + + String _samlUserId; + bool _samlUserIdSet = false; + + String _type; + bool _typeSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// EMail address (read-only) + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Timestamp for most recent login using credential (read-only) + + String get loggedInAt { + if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { + _loggedInAt = _apiMapResponse['logged_in_at'] == null + ? null + : _apiMapResponse['logged_in_at'].toString(); + _loggedInAtSet = true; + } + return _loggedInAt; + } + + set loggedInAt(String v) { + _loggedInAt = v; + _loggedInAtSet = true; + } + + /// Saml IdP's Unique ID for this user (read-only) + + String get samlUserId { + if (!_samlUserIdSet && _apiMapResponse.containsKey('saml_user_id')) { + _samlUserId = _apiMapResponse['saml_user_id'] == null + ? null + : _apiMapResponse['saml_user_id'].toString(); + _samlUserIdSet = true; + } + return _samlUserId; + } + + set samlUserId(String v) { + _samlUserId = v; + _samlUserIdSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + CredentialsSaml() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CredentialsSaml.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_loggedInAtSet || _apiMapResponse.containsKey('logged_in_at')) { + json['logged_in_at'] = loggedInAt; + } + if (_samlUserIdSet || _apiMapResponse.containsKey('saml_user_id')) { + json['saml_user_id'] = samlUserId; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +/// WARNING: no writeable properties found for POST, PUT, or PATCH +class CredentialsTotp { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _createdAt; + bool _createdAtSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _type; + bool _typeSet = false; + + bool _verified; + bool _verifiedSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Timestamp for the creation of this credential (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Has this credential been disabled? (read-only) + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Short name for the type of this kind of credential (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// User has verified (read-only) + + bool get verified { + if (!_verifiedSet && _apiMapResponse.containsKey('verified')) { + _verified = _apiMapResponse['verified']; + _verifiedSet = true; + } + return _verified; + } + + set verified(bool v) { + _verified = v; + _verifiedSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + CredentialsTotp() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CredentialsTotp.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_verifiedSet || _apiMapResponse.containsKey('verified')) { + json['verified'] = verified; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class CustomWelcomeEmail { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _enabled; + bool _enabledSet = false; + + String _content; + bool _contentSet = false; + + String _subject; + bool _subjectSet = false; + + String _header; + bool _headerSet = false; + + /// If true, custom email content will replace the default body of welcome emails + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// The HTML to use as custom content for welcome emails. Script elements and other potentially dangerous markup will be removed. + + String get content { + if (!_contentSet && _apiMapResponse.containsKey('content')) { + _content = _apiMapResponse['content'] == null + ? null + : _apiMapResponse['content'].toString(); + _contentSet = true; + } + return _content; + } + + set content(String v) { + _content = v; + _contentSet = true; + } + + /// The text to appear in the email subject line. Only available with a whitelabel license and whitelabel_configuration.advanced_custom_welcome_email enabled. + + String get subject { + if (!_subjectSet && _apiMapResponse.containsKey('subject')) { + _subject = _apiMapResponse['subject'] == null + ? null + : _apiMapResponse['subject'].toString(); + _subjectSet = true; + } + return _subject; + } + + set subject(String v) { + _subject = v; + _subjectSet = true; + } + + /// The text to appear in the header line of the email body. Only available with a whitelabel license and whitelabel_configuration.advanced_custom_welcome_email enabled. + + String get header { + if (!_headerSet && _apiMapResponse.containsKey('header')) { + _header = _apiMapResponse['header'] == null + ? null + : _apiMapResponse['header'].toString(); + _headerSet = true; + } + return _header; + } + + set header(String v) { + _header = v; + _headerSet = true; + } + + CustomWelcomeEmail() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + CustomWelcomeEmail.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_contentSet || _apiMapResponse.containsKey('content')) { + json['content'] = content; + } + if (_subjectSet || _apiMapResponse.containsKey('subject')) { + json['subject'] = subject; + } + if (_headerSet || _apiMapResponse.containsKey('header')) { + json['header'] = header; + } + return json; + } +} + +class Dashboard { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _contentFavoriteId; + bool _contentFavoriteIdSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + String _description; + bool _descriptionSet = false; + + bool _hidden; + bool _hiddenSet = false; + + String _id; + bool _idSet = false; + + LookModel _model; + bool _modelSet = false; + + String _queryTimezone; + bool _queryTimezoneSet = false; + + bool _readonly; + bool _readonlySet = false; + + String _refreshInterval; + bool _refreshIntervalSet = false; + + int _refreshIntervalToI; + bool _refreshIntervalToISet = false; + + FolderBase _folder; + bool _folderSet = false; + + String _title; + bool _titleSet = false; + + int _userId; + bool _userIdSet = false; + + String _slug; + bool _slugSet = false; + + String _preferredViewer; + bool _preferredViewerSet = false; + + bool _alertSyncWithDashboardFilterEnabled; + bool _alertSyncWithDashboardFilterEnabledSet = false; + + String _backgroundColor; + bool _backgroundColorSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + bool _crossfilterEnabled; + bool _crossfilterEnabledSet = false; + + List _dashboardElements; + bool _dashboardElementsSet = false; + + List _dashboardFilters; + bool _dashboardFiltersSet = false; + + List _dashboardLayouts; + bool _dashboardLayoutsSet = false; + + bool _deleted; + bool _deletedSet = false; + + DateTime _deletedAt; + bool _deletedAtSet = false; + + int _deleterId; + bool _deleterIdSet = false; + + String _editUri; + bool _editUriSet = false; + + int _favoriteCount; + bool _favoriteCountSet = false; + + bool _filtersBarCollapsed; + bool _filtersBarCollapsedSet = false; + + DateTime _lastAccessedAt; + bool _lastAccessedAtSet = false; + + DateTime _lastViewedAt; + bool _lastViewedAtSet = false; + + DateTime _updatedAt; + bool _updatedAtSet = false; + + int _lastUpdaterId; + bool _lastUpdaterIdSet = false; + + String _lastUpdaterName; + bool _lastUpdaterNameSet = false; + + String _userName; + bool _userNameSet = false; + + String _loadConfiguration; + bool _loadConfigurationSet = false; + + String _lookmlLinkId; + bool _lookmlLinkIdSet = false; + + bool _showFiltersBar; + bool _showFiltersBarSet = false; + + bool _showTitle; + bool _showTitleSet = false; + + String _folderId; + bool _folderIdSet = false; + + String _textTileTextColor; + bool _textTileTextColorSet = false; + + String _tileBackgroundColor; + bool _tileBackgroundColorSet = false; + + String _tileTextColor; + bool _tileTextColorSet = false; + + String _titleColor; + bool _titleColorSet = false; + + int _viewCount; + bool _viewCountSet = false; + + DashboardAppearance _appearance; + bool _appearanceSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Content Favorite Id (read-only) + + int get contentFavoriteId { + if (!_contentFavoriteIdSet && + _apiMapResponse.containsKey('content_favorite_id')) { + _contentFavoriteId = _apiMapResponse['content_favorite_id']; + _contentFavoriteIdSet = true; + } + return _contentFavoriteId; + } + + set contentFavoriteId(int v) { + _contentFavoriteId = v; + _contentFavoriteIdSet = true; + } + + /// Id of content metadata (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Description + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Is Hidden + + bool get hidden { + if (!_hiddenSet && _apiMapResponse.containsKey('hidden')) { + _hidden = _apiMapResponse['hidden']; + _hiddenSet = true; + } + return _hidden; + } + + set hidden(bool v) { + _hidden = v; + _hiddenSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + LookModel get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : LookModel.fromResponse( + _apiMapResponse['model'], apiResponseContentType); + _modelSet = true; + } + return _model; + } + + set model(LookModel v) { + _model = v; + _modelSet = true; + } + + /// Timezone in which the Dashboard will run by default. + + String get queryTimezone { + if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { + _queryTimezone = _apiMapResponse['query_timezone'] == null + ? null + : _apiMapResponse['query_timezone'].toString(); + _queryTimezoneSet = true; + } + return _queryTimezone; + } + + set queryTimezone(String v) { + _queryTimezone = v; + _queryTimezoneSet = true; + } + + /// Is Read-only (read-only) + + bool get readonly { + if (!_readonlySet && _apiMapResponse.containsKey('readonly')) { + _readonly = _apiMapResponse['readonly']; + _readonlySet = true; + } + return _readonly; + } + + set readonly(bool v) { + _readonly = v; + _readonlySet = true; + } + + /// Refresh Interval, as a time duration phrase like "2 hours 30 minutes". A number with no time units will be interpreted as whole seconds. + + String get refreshInterval { + if (!_refreshIntervalSet && + _apiMapResponse.containsKey('refresh_interval')) { + _refreshInterval = _apiMapResponse['refresh_interval'] == null + ? null + : _apiMapResponse['refresh_interval'].toString(); + _refreshIntervalSet = true; + } + return _refreshInterval; + } + + set refreshInterval(String v) { + _refreshInterval = v; + _refreshIntervalSet = true; + } + + /// Refresh Interval in milliseconds (read-only) + + int get refreshIntervalToI { + if (!_refreshIntervalToISet && + _apiMapResponse.containsKey('refresh_interval_to_i')) { + _refreshIntervalToI = _apiMapResponse['refresh_interval_to_i']; + _refreshIntervalToISet = true; + } + return _refreshIntervalToI; + } + + set refreshIntervalToI(int v) { + _refreshIntervalToI = v; + _refreshIntervalToISet = true; + } + + FolderBase get folder { + if (!_folderSet && _apiMapResponse.containsKey('folder')) { + _folder = _apiMapResponse['folder'] == null + ? null + : FolderBase.fromResponse( + _apiMapResponse['folder'], apiResponseContentType); + _folderSet = true; + } + return _folder; + } + + set folder(FolderBase v) { + _folder = v; + _folderSet = true; + } + + /// Dashboard Title + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Id of User (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Content Metadata Slug + + String get slug { + if (!_slugSet && _apiMapResponse.containsKey('slug')) { + _slug = _apiMapResponse['slug'] == null + ? null + : _apiMapResponse['slug'].toString(); + _slugSet = true; + } + return _slug; + } + + set slug(String v) { + _slug = v; + _slugSet = true; + } + + /// The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) + + String get preferredViewer { + if (!_preferredViewerSet && + _apiMapResponse.containsKey('preferred_viewer')) { + _preferredViewer = _apiMapResponse['preferred_viewer'] == null + ? null + : _apiMapResponse['preferred_viewer'].toString(); + _preferredViewerSet = true; + } + return _preferredViewer; + } + + set preferredViewer(String v) { + _preferredViewer = v; + _preferredViewerSet = true; + } + + /// Enables alerts to keep in sync with dashboard filter changes + + bool get alertSyncWithDashboardFilterEnabled { + if (!_alertSyncWithDashboardFilterEnabledSet && + _apiMapResponse + .containsKey('alert_sync_with_dashboard_filter_enabled')) { + _alertSyncWithDashboardFilterEnabled = + _apiMapResponse['alert_sync_with_dashboard_filter_enabled']; + _alertSyncWithDashboardFilterEnabledSet = true; + } + return _alertSyncWithDashboardFilterEnabled; + } + + set alertSyncWithDashboardFilterEnabled(bool v) { + _alertSyncWithDashboardFilterEnabled = v; + _alertSyncWithDashboardFilterEnabledSet = true; + } + + /// Background color + + String get backgroundColor { + if (!_backgroundColorSet && + _apiMapResponse.containsKey('background_color')) { + _backgroundColor = _apiMapResponse['background_color'] == null + ? null + : _apiMapResponse['background_color'].toString(); + _backgroundColorSet = true; + } + return _backgroundColor; + } + + set backgroundColor(String v) { + _backgroundColor = v; + _backgroundColorSet = true; + } + + /// Time that the Dashboard was created. (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Enables crossfiltering in dashboards - only available in dashboards-next (beta) + + bool get crossfilterEnabled { + if (!_crossfilterEnabledSet && + _apiMapResponse.containsKey('crossfilter_enabled')) { + _crossfilterEnabled = _apiMapResponse['crossfilter_enabled']; + _crossfilterEnabledSet = true; + } + return _crossfilterEnabled; + } + + set crossfilterEnabled(bool v) { + _crossfilterEnabled = v; + _crossfilterEnabledSet = true; + } + + /// Elements (read-only) + + List get dashboardElements { + if (!_dashboardElementsSet && + _apiMapResponse.containsKey('dashboard_elements')) { + _dashboardElements = _apiMapResponse['dashboard_elements'] == null + ? null + : (_apiMapResponse['dashboard_elements'] as List) + .map((i) => + DashboardElement.fromResponse(i, apiResponseContentType)) + .toList(); + _dashboardElementsSet = true; + } + return _dashboardElements; + } + + set dashboardElements(List v) { + _dashboardElements = v; + _dashboardElementsSet = true; + } + + /// Filters (read-only) + + List get dashboardFilters { + if (!_dashboardFiltersSet && + _apiMapResponse.containsKey('dashboard_filters')) { + _dashboardFilters = _apiMapResponse['dashboard_filters'] == null + ? null + : (_apiMapResponse['dashboard_filters'] as List) + .map((i) => + DashboardFilter.fromResponse(i, apiResponseContentType)) + .toList(); + _dashboardFiltersSet = true; + } + return _dashboardFilters; + } + + set dashboardFilters(List v) { + _dashboardFilters = v; + _dashboardFiltersSet = true; + } + + /// Layouts (read-only) + + List get dashboardLayouts { + if (!_dashboardLayoutsSet && + _apiMapResponse.containsKey('dashboard_layouts')) { + _dashboardLayouts = _apiMapResponse['dashboard_layouts'] == null + ? null + : (_apiMapResponse['dashboard_layouts'] as List) + .map((i) => + DashboardLayout.fromResponse(i, apiResponseContentType)) + .toList(); + _dashboardLayoutsSet = true; + } + return _dashboardLayouts; + } + + set dashboardLayouts(List v) { + _dashboardLayouts = v; + _dashboardLayoutsSet = true; + } + + /// Whether or not a dashboard is 'soft' deleted. + + bool get deleted { + if (!_deletedSet && _apiMapResponse.containsKey('deleted')) { + _deleted = _apiMapResponse['deleted']; + _deletedSet = true; + } + return _deleted; + } + + set deleted(bool v) { + _deleted = v; + _deletedSet = true; + } + + /// Time that the Dashboard was 'soft' deleted. (read-only) + + DateTime get deletedAt { + if (!_deletedAtSet && _apiMapResponse.containsKey('deleted_at')) { + _deletedAt = _apiMapResponse['deleted_at'] == null + ? null + : DateTime.parse(_apiMapResponse['deleted_at']); + _deletedAtSet = true; + } + return _deletedAt; + } + + set deletedAt(DateTime v) { + _deletedAt = v; + _deletedAtSet = true; + } + + /// Id of User that 'soft' deleted the dashboard. (read-only) + + int get deleterId { + if (!_deleterIdSet && _apiMapResponse.containsKey('deleter_id')) { + _deleterId = _apiMapResponse['deleter_id']; + _deleterIdSet = true; + } + return _deleterId; + } + + set deleterId(int v) { + _deleterId = v; + _deleterIdSet = true; + } + + /// Relative path of URI of LookML file to edit the dashboard (LookML dashboard only). (read-only) + + String get editUri { + if (!_editUriSet && _apiMapResponse.containsKey('edit_uri')) { + _editUri = _apiMapResponse['edit_uri'] == null + ? null + : _apiMapResponse['edit_uri'].toString(); + _editUriSet = true; + } + return _editUri; + } + + set editUri(String v) { + _editUri = v; + _editUriSet = true; + } + + /// Number of times favorited (read-only) + + int get favoriteCount { + if (!_favoriteCountSet && _apiMapResponse.containsKey('favorite_count')) { + _favoriteCount = _apiMapResponse['favorite_count']; + _favoriteCountSet = true; + } + return _favoriteCount; + } + + set favoriteCount(int v) { + _favoriteCount = v; + _favoriteCountSet = true; + } + + /// Sets the default state of the filters bar to collapsed or open + + bool get filtersBarCollapsed { + if (!_filtersBarCollapsedSet && + _apiMapResponse.containsKey('filters_bar_collapsed')) { + _filtersBarCollapsed = _apiMapResponse['filters_bar_collapsed']; + _filtersBarCollapsedSet = true; + } + return _filtersBarCollapsed; + } + + set filtersBarCollapsed(bool v) { + _filtersBarCollapsed = v; + _filtersBarCollapsedSet = true; + } + + /// Time the dashboard was last accessed (read-only) + + DateTime get lastAccessedAt { + if (!_lastAccessedAtSet && + _apiMapResponse.containsKey('last_accessed_at')) { + _lastAccessedAt = _apiMapResponse['last_accessed_at'] == null + ? null + : DateTime.parse(_apiMapResponse['last_accessed_at']); + _lastAccessedAtSet = true; + } + return _lastAccessedAt; + } + + set lastAccessedAt(DateTime v) { + _lastAccessedAt = v; + _lastAccessedAtSet = true; + } + + /// Time last viewed in the Looker web UI (read-only) + + DateTime get lastViewedAt { + if (!_lastViewedAtSet && _apiMapResponse.containsKey('last_viewed_at')) { + _lastViewedAt = _apiMapResponse['last_viewed_at'] == null + ? null + : DateTime.parse(_apiMapResponse['last_viewed_at']); + _lastViewedAtSet = true; + } + return _lastViewedAt; + } + + set lastViewedAt(DateTime v) { + _lastViewedAt = v; + _lastViewedAtSet = true; + } + + /// Time that the Dashboard was most recently updated. (read-only) + + DateTime get updatedAt { + if (!_updatedAtSet && _apiMapResponse.containsKey('updated_at')) { + _updatedAt = _apiMapResponse['updated_at'] == null + ? null + : DateTime.parse(_apiMapResponse['updated_at']); + _updatedAtSet = true; + } + return _updatedAt; + } + + set updatedAt(DateTime v) { + _updatedAt = v; + _updatedAtSet = true; + } + + /// Id of User that most recently updated the dashboard. (read-only) + + int get lastUpdaterId { + if (!_lastUpdaterIdSet && _apiMapResponse.containsKey('last_updater_id')) { + _lastUpdaterId = _apiMapResponse['last_updater_id']; + _lastUpdaterIdSet = true; + } + return _lastUpdaterId; + } + + set lastUpdaterId(int v) { + _lastUpdaterId = v; + _lastUpdaterIdSet = true; + } + + /// Name of User that most recently updated the dashboard. (read-only) + + String get lastUpdaterName { + if (!_lastUpdaterNameSet && + _apiMapResponse.containsKey('last_updater_name')) { + _lastUpdaterName = _apiMapResponse['last_updater_name'] == null + ? null + : _apiMapResponse['last_updater_name'].toString(); + _lastUpdaterNameSet = true; + } + return _lastUpdaterName; + } + + set lastUpdaterName(String v) { + _lastUpdaterName = v; + _lastUpdaterNameSet = true; + } + + /// Name of User that created the dashboard. (read-only) + + String get userName { + if (!_userNameSet && _apiMapResponse.containsKey('user_name')) { + _userName = _apiMapResponse['user_name'] == null + ? null + : _apiMapResponse['user_name'].toString(); + _userNameSet = true; + } + return _userName; + } + + set userName(String v) { + _userName = v; + _userNameSet = true; + } + + /// configuration option that governs how dashboard loading will happen. + + String get loadConfiguration { + if (!_loadConfigurationSet && + _apiMapResponse.containsKey('load_configuration')) { + _loadConfiguration = _apiMapResponse['load_configuration'] == null + ? null + : _apiMapResponse['load_configuration'].toString(); + _loadConfigurationSet = true; + } + return _loadConfiguration; + } + + set loadConfiguration(String v) { + _loadConfiguration = v; + _loadConfigurationSet = true; + } + + /// Links this dashboard to a particular LookML dashboard such that calling a **sync** operation on that LookML dashboard will update this dashboard to match. + + String get lookmlLinkId { + if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { + _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null + ? null + : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkIdSet = true; + } + return _lookmlLinkId; + } + + set lookmlLinkId(String v) { + _lookmlLinkId = v; + _lookmlLinkIdSet = true; + } + + /// Show filters bar. **Security Note:** This property only affects the *cosmetic* appearance of the dashboard, not a user's ability to access data. Hiding the filters bar does **NOT** prevent users from changing filters by other means. For information on how to set up secure data access control policies, see [Control User Access to Data](https://looker.com/docs/r/api/control-access) + + bool get showFiltersBar { + if (!_showFiltersBarSet && + _apiMapResponse.containsKey('show_filters_bar')) { + _showFiltersBar = _apiMapResponse['show_filters_bar']; + _showFiltersBarSet = true; + } + return _showFiltersBar; + } + + set showFiltersBar(bool v) { + _showFiltersBar = v; + _showFiltersBarSet = true; + } + + /// Show title + + bool get showTitle { + if (!_showTitleSet && _apiMapResponse.containsKey('show_title')) { + _showTitle = _apiMapResponse['show_title']; + _showTitleSet = true; + } + return _showTitle; + } + + set showTitle(bool v) { + _showTitle = v; + _showTitleSet = true; + } + + /// Id of folder + + String get folderId { + if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { + _folderId = _apiMapResponse['folder_id'] == null + ? null + : _apiMapResponse['folder_id'].toString(); + _folderIdSet = true; + } + return _folderId; + } + + set folderId(String v) { + _folderId = v; + _folderIdSet = true; + } + + /// Color of text on text tiles + + String get textTileTextColor { + if (!_textTileTextColorSet && + _apiMapResponse.containsKey('text_tile_text_color')) { + _textTileTextColor = _apiMapResponse['text_tile_text_color'] == null + ? null + : _apiMapResponse['text_tile_text_color'].toString(); + _textTileTextColorSet = true; + } + return _textTileTextColor; + } + + set textTileTextColor(String v) { + _textTileTextColor = v; + _textTileTextColorSet = true; + } + + /// Tile background color + + String get tileBackgroundColor { + if (!_tileBackgroundColorSet && + _apiMapResponse.containsKey('tile_background_color')) { + _tileBackgroundColor = _apiMapResponse['tile_background_color'] == null + ? null + : _apiMapResponse['tile_background_color'].toString(); + _tileBackgroundColorSet = true; + } + return _tileBackgroundColor; + } + + set tileBackgroundColor(String v) { + _tileBackgroundColor = v; + _tileBackgroundColorSet = true; + } + + /// Tile text color + + String get tileTextColor { + if (!_tileTextColorSet && _apiMapResponse.containsKey('tile_text_color')) { + _tileTextColor = _apiMapResponse['tile_text_color'] == null + ? null + : _apiMapResponse['tile_text_color'].toString(); + _tileTextColorSet = true; + } + return _tileTextColor; + } + + set tileTextColor(String v) { + _tileTextColor = v; + _tileTextColorSet = true; + } + + /// Title color + + String get titleColor { + if (!_titleColorSet && _apiMapResponse.containsKey('title_color')) { + _titleColor = _apiMapResponse['title_color'] == null + ? null + : _apiMapResponse['title_color'].toString(); + _titleColorSet = true; + } + return _titleColor; + } + + set titleColor(String v) { + _titleColor = v; + _titleColorSet = true; + } + + /// Number of times viewed in the Looker web UI (read-only) + + int get viewCount { + if (!_viewCountSet && _apiMapResponse.containsKey('view_count')) { + _viewCount = _apiMapResponse['view_count']; + _viewCountSet = true; + } + return _viewCount; + } + + set viewCount(int v) { + _viewCount = v; + _viewCountSet = true; + } + + DashboardAppearance get appearance { + if (!_appearanceSet && _apiMapResponse.containsKey('appearance')) { + _appearance = _apiMapResponse['appearance'] == null + ? null + : DashboardAppearance.fromResponse( + _apiMapResponse['appearance'], apiResponseContentType); + _appearanceSet = true; + } + return _appearance; + } + + set appearance(DashboardAppearance v) { + _appearance = v; + _appearanceSet = true; + } + + /// Relative URL of the dashboard (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + Dashboard() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Dashboard.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_contentFavoriteIdSet || + _apiMapResponse.containsKey('content_favorite_id')) { + json['content_favorite_id'] = contentFavoriteId; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_hiddenSet || _apiMapResponse.containsKey('hidden')) { + json['hidden'] = hidden; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model == null ? null : model.toJson(); + } + if (_queryTimezoneSet || _apiMapResponse.containsKey('query_timezone')) { + json['query_timezone'] = queryTimezone; + } + if (_readonlySet || _apiMapResponse.containsKey('readonly')) { + json['readonly'] = readonly; + } + if (_refreshIntervalSet || + _apiMapResponse.containsKey('refresh_interval')) { + json['refresh_interval'] = refreshInterval; + } + if (_refreshIntervalToISet || + _apiMapResponse.containsKey('refresh_interval_to_i')) { + json['refresh_interval_to_i'] = refreshIntervalToI; + } + if (_folderSet || _apiMapResponse.containsKey('folder')) { + json['folder'] = folder == null ? null : folder.toJson(); + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_slugSet || _apiMapResponse.containsKey('slug')) { + json['slug'] = slug; + } + if (_preferredViewerSet || + _apiMapResponse.containsKey('preferred_viewer')) { + json['preferred_viewer'] = preferredViewer; + } + if (_alertSyncWithDashboardFilterEnabledSet || + _apiMapResponse + .containsKey('alert_sync_with_dashboard_filter_enabled')) { + json['alert_sync_with_dashboard_filter_enabled'] = + alertSyncWithDashboardFilterEnabled; + } + if (_backgroundColorSet || + _apiMapResponse.containsKey('background_color')) { + json['background_color'] = backgroundColor; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + if (_crossfilterEnabledSet || + _apiMapResponse.containsKey('crossfilter_enabled')) { + json['crossfilter_enabled'] = crossfilterEnabled; + } + if (_dashboardElementsSet || + _apiMapResponse.containsKey('dashboard_elements')) { + json['dashboard_elements'] = dashboardElements == null + ? null + : dashboardElements.map((i) => i.toJson()).toList(); + } + if (_dashboardFiltersSet || + _apiMapResponse.containsKey('dashboard_filters')) { + json['dashboard_filters'] = dashboardFilters == null + ? null + : dashboardFilters.map((i) => i.toJson()).toList(); + } + if (_dashboardLayoutsSet || + _apiMapResponse.containsKey('dashboard_layouts')) { + json['dashboard_layouts'] = dashboardLayouts == null + ? null + : dashboardLayouts.map((i) => i.toJson()).toList(); + } + if (_deletedSet || _apiMapResponse.containsKey('deleted')) { + json['deleted'] = deleted; + } + if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { + json['deleted_at'] = + deletedAt == null ? null : deletedAt.toIso8601String(); + } + if (_deleterIdSet || _apiMapResponse.containsKey('deleter_id')) { + json['deleter_id'] = deleterId; + } + if (_editUriSet || _apiMapResponse.containsKey('edit_uri')) { + json['edit_uri'] = editUri; + } + if (_favoriteCountSet || _apiMapResponse.containsKey('favorite_count')) { + json['favorite_count'] = favoriteCount; + } + if (_filtersBarCollapsedSet || + _apiMapResponse.containsKey('filters_bar_collapsed')) { + json['filters_bar_collapsed'] = filtersBarCollapsed; + } + if (_lastAccessedAtSet || _apiMapResponse.containsKey('last_accessed_at')) { + json['last_accessed_at'] = + lastAccessedAt == null ? null : lastAccessedAt.toIso8601String(); + } + if (_lastViewedAtSet || _apiMapResponse.containsKey('last_viewed_at')) { + json['last_viewed_at'] = + lastViewedAt == null ? null : lastViewedAt.toIso8601String(); + } + if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { + json['updated_at'] = + updatedAt == null ? null : updatedAt.toIso8601String(); + } + if (_lastUpdaterIdSet || _apiMapResponse.containsKey('last_updater_id')) { + json['last_updater_id'] = lastUpdaterId; + } + if (_lastUpdaterNameSet || + _apiMapResponse.containsKey('last_updater_name')) { + json['last_updater_name'] = lastUpdaterName; + } + if (_userNameSet || _apiMapResponse.containsKey('user_name')) { + json['user_name'] = userName; + } + if (_loadConfigurationSet || + _apiMapResponse.containsKey('load_configuration')) { + json['load_configuration'] = loadConfiguration; + } + if (_lookmlLinkIdSet || _apiMapResponse.containsKey('lookml_link_id')) { + json['lookml_link_id'] = lookmlLinkId; + } + if (_showFiltersBarSet || _apiMapResponse.containsKey('show_filters_bar')) { + json['show_filters_bar'] = showFiltersBar; + } + if (_showTitleSet || _apiMapResponse.containsKey('show_title')) { + json['show_title'] = showTitle; + } + if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { + json['folder_id'] = folderId; + } + if (_textTileTextColorSet || + _apiMapResponse.containsKey('text_tile_text_color')) { + json['text_tile_text_color'] = textTileTextColor; + } + if (_tileBackgroundColorSet || + _apiMapResponse.containsKey('tile_background_color')) { + json['tile_background_color'] = tileBackgroundColor; + } + if (_tileTextColorSet || _apiMapResponse.containsKey('tile_text_color')) { + json['tile_text_color'] = tileTextColor; + } + if (_titleColorSet || _apiMapResponse.containsKey('title_color')) { + json['title_color'] = titleColor; + } + if (_viewCountSet || _apiMapResponse.containsKey('view_count')) { + json['view_count'] = viewCount; + } + if (_appearanceSet || _apiMapResponse.containsKey('appearance')) { + json['appearance'] = appearance == null ? null : appearance.toJson(); + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class DashboardAggregateTableLookml { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _aggregateTableLookml; + bool _aggregateTableLookmlSet = false; + + /// Dashboard Id (read-only) + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Aggregate Table LookML (read-only) + + String get aggregateTableLookml { + if (!_aggregateTableLookmlSet && + _apiMapResponse.containsKey('aggregate_table_lookml')) { + _aggregateTableLookml = _apiMapResponse['aggregate_table_lookml'] == null + ? null + : _apiMapResponse['aggregate_table_lookml'].toString(); + _aggregateTableLookmlSet = true; + } + return _aggregateTableLookml; + } + + set aggregateTableLookml(String v) { + _aggregateTableLookml = v; + _aggregateTableLookmlSet = true; + } + + DashboardAggregateTableLookml() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DashboardAggregateTableLookml.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_aggregateTableLookmlSet || + _apiMapResponse.containsKey('aggregate_table_lookml')) { + json['aggregate_table_lookml'] = aggregateTableLookml; + } + return json; + } +} + +class DashboardAppearance { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _pageSideMargins; + bool _pageSideMarginsSet = false; + + String _pageBackgroundColor; + bool _pageBackgroundColorSet = false; + + String _tileTitleAlignment; + bool _tileTitleAlignmentSet = false; + + int _tileSpaceBetween; + bool _tileSpaceBetweenSet = false; + + String _tileBackgroundColor; + bool _tileBackgroundColorSet = false; + + bool _tileShadow; + bool _tileShadowSet = false; + + String _keyColor; + bool _keyColorSet = false; + + /// Page margin (side) width + + int get pageSideMargins { + if (!_pageSideMarginsSet && + _apiMapResponse.containsKey('page_side_margins')) { + _pageSideMargins = _apiMapResponse['page_side_margins']; + _pageSideMarginsSet = true; + } + return _pageSideMargins; + } + + set pageSideMargins(int v) { + _pageSideMargins = v; + _pageSideMarginsSet = true; + } + + /// Background color for the dashboard + + String get pageBackgroundColor { + if (!_pageBackgroundColorSet && + _apiMapResponse.containsKey('page_background_color')) { + _pageBackgroundColor = _apiMapResponse['page_background_color'] == null + ? null + : _apiMapResponse['page_background_color'].toString(); + _pageBackgroundColorSet = true; + } + return _pageBackgroundColor; + } + + set pageBackgroundColor(String v) { + _pageBackgroundColor = v; + _pageBackgroundColorSet = true; + } + + /// Title alignment on dashboard tiles + + String get tileTitleAlignment { + if (!_tileTitleAlignmentSet && + _apiMapResponse.containsKey('tile_title_alignment')) { + _tileTitleAlignment = _apiMapResponse['tile_title_alignment'] == null + ? null + : _apiMapResponse['tile_title_alignment'].toString(); + _tileTitleAlignmentSet = true; + } + return _tileTitleAlignment; + } + + set tileTitleAlignment(String v) { + _tileTitleAlignment = v; + _tileTitleAlignmentSet = true; + } + + /// Space between tiles + + int get tileSpaceBetween { + if (!_tileSpaceBetweenSet && + _apiMapResponse.containsKey('tile_space_between')) { + _tileSpaceBetween = _apiMapResponse['tile_space_between']; + _tileSpaceBetweenSet = true; + } + return _tileSpaceBetween; + } + + set tileSpaceBetween(int v) { + _tileSpaceBetween = v; + _tileSpaceBetweenSet = true; + } + + /// Background color for tiles + + String get tileBackgroundColor { + if (!_tileBackgroundColorSet && + _apiMapResponse.containsKey('tile_background_color')) { + _tileBackgroundColor = _apiMapResponse['tile_background_color'] == null + ? null + : _apiMapResponse['tile_background_color'].toString(); + _tileBackgroundColorSet = true; + } + return _tileBackgroundColor; + } + + set tileBackgroundColor(String v) { + _tileBackgroundColor = v; + _tileBackgroundColorSet = true; + } + + /// Tile shadow on/off + + bool get tileShadow { + if (!_tileShadowSet && _apiMapResponse.containsKey('tile_shadow')) { + _tileShadow = _apiMapResponse['tile_shadow']; + _tileShadowSet = true; + } + return _tileShadow; + } + + set tileShadow(bool v) { + _tileShadow = v; + _tileShadowSet = true; + } + + /// Key color + + String get keyColor { + if (!_keyColorSet && _apiMapResponse.containsKey('key_color')) { + _keyColor = _apiMapResponse['key_color'] == null + ? null + : _apiMapResponse['key_color'].toString(); + _keyColorSet = true; + } + return _keyColor; + } + + set keyColor(String v) { + _keyColor = v; + _keyColorSet = true; + } + + DashboardAppearance() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DashboardAppearance.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_pageSideMarginsSet || + _apiMapResponse.containsKey('page_side_margins')) { + json['page_side_margins'] = pageSideMargins; + } + if (_pageBackgroundColorSet || + _apiMapResponse.containsKey('page_background_color')) { + json['page_background_color'] = pageBackgroundColor; + } + if (_tileTitleAlignmentSet || + _apiMapResponse.containsKey('tile_title_alignment')) { + json['tile_title_alignment'] = tileTitleAlignment; + } + if (_tileSpaceBetweenSet || + _apiMapResponse.containsKey('tile_space_between')) { + json['tile_space_between'] = tileSpaceBetween; + } + if (_tileBackgroundColorSet || + _apiMapResponse.containsKey('tile_background_color')) { + json['tile_background_color'] = tileBackgroundColor; + } + if (_tileShadowSet || _apiMapResponse.containsKey('tile_shadow')) { + json['tile_shadow'] = tileShadow; + } + if (_keyColorSet || _apiMapResponse.containsKey('key_color')) { + json['key_color'] = keyColor; + } + return json; + } +} + +class DashboardBase { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _contentFavoriteId; + bool _contentFavoriteIdSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + String _description; + bool _descriptionSet = false; + + bool _hidden; + bool _hiddenSet = false; + + String _id; + bool _idSet = false; + + LookModel _model; + bool _modelSet = false; + + String _queryTimezone; + bool _queryTimezoneSet = false; + + bool _readonly; + bool _readonlySet = false; + + String _refreshInterval; + bool _refreshIntervalSet = false; + + int _refreshIntervalToI; + bool _refreshIntervalToISet = false; + + FolderBase _folder; + bool _folderSet = false; + + String _title; + bool _titleSet = false; + + int _userId; + bool _userIdSet = false; + + String _slug; + bool _slugSet = false; + + String _preferredViewer; + bool _preferredViewerSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Content Favorite Id (read-only) + + int get contentFavoriteId { + if (!_contentFavoriteIdSet && + _apiMapResponse.containsKey('content_favorite_id')) { + _contentFavoriteId = _apiMapResponse['content_favorite_id']; + _contentFavoriteIdSet = true; + } + return _contentFavoriteId; + } + + set contentFavoriteId(int v) { + _contentFavoriteId = v; + _contentFavoriteIdSet = true; + } + + /// Id of content metadata (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Description (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Is Hidden (read-only) + + bool get hidden { + if (!_hiddenSet && _apiMapResponse.containsKey('hidden')) { + _hidden = _apiMapResponse['hidden']; + _hiddenSet = true; + } + return _hidden; + } + + set hidden(bool v) { + _hidden = v; + _hiddenSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + LookModel get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : LookModel.fromResponse( + _apiMapResponse['model'], apiResponseContentType); + _modelSet = true; + } + return _model; + } + + set model(LookModel v) { + _model = v; + _modelSet = true; + } + + /// Timezone in which the Dashboard will run by default. (read-only) + + String get queryTimezone { + if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { + _queryTimezone = _apiMapResponse['query_timezone'] == null + ? null + : _apiMapResponse['query_timezone'].toString(); + _queryTimezoneSet = true; + } + return _queryTimezone; + } + + set queryTimezone(String v) { + _queryTimezone = v; + _queryTimezoneSet = true; + } + + /// Is Read-only (read-only) + + bool get readonly { + if (!_readonlySet && _apiMapResponse.containsKey('readonly')) { + _readonly = _apiMapResponse['readonly']; + _readonlySet = true; + } + return _readonly; + } + + set readonly(bool v) { + _readonly = v; + _readonlySet = true; + } + + /// Refresh Interval, as a time duration phrase like "2 hours 30 minutes". A number with no time units will be interpreted as whole seconds. (read-only) + + String get refreshInterval { + if (!_refreshIntervalSet && + _apiMapResponse.containsKey('refresh_interval')) { + _refreshInterval = _apiMapResponse['refresh_interval'] == null + ? null + : _apiMapResponse['refresh_interval'].toString(); + _refreshIntervalSet = true; + } + return _refreshInterval; + } + + set refreshInterval(String v) { + _refreshInterval = v; + _refreshIntervalSet = true; + } + + /// Refresh Interval in milliseconds (read-only) + + int get refreshIntervalToI { + if (!_refreshIntervalToISet && + _apiMapResponse.containsKey('refresh_interval_to_i')) { + _refreshIntervalToI = _apiMapResponse['refresh_interval_to_i']; + _refreshIntervalToISet = true; + } + return _refreshIntervalToI; + } + + set refreshIntervalToI(int v) { + _refreshIntervalToI = v; + _refreshIntervalToISet = true; + } + + FolderBase get folder { + if (!_folderSet && _apiMapResponse.containsKey('folder')) { + _folder = _apiMapResponse['folder'] == null + ? null + : FolderBase.fromResponse( + _apiMapResponse['folder'], apiResponseContentType); + _folderSet = true; + } + return _folder; + } + + set folder(FolderBase v) { + _folder = v; + _folderSet = true; + } + + /// Dashboard Title (read-only) + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Id of User (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Content Metadata Slug (read-only) + + String get slug { + if (!_slugSet && _apiMapResponse.containsKey('slug')) { + _slug = _apiMapResponse['slug'] == null + ? null + : _apiMapResponse['slug'].toString(); + _slugSet = true; + } + return _slug; + } + + set slug(String v) { + _slug = v; + _slugSet = true; + } + + /// The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) (read-only) + + String get preferredViewer { + if (!_preferredViewerSet && + _apiMapResponse.containsKey('preferred_viewer')) { + _preferredViewer = _apiMapResponse['preferred_viewer'] == null + ? null + : _apiMapResponse['preferred_viewer'].toString(); + _preferredViewerSet = true; + } + return _preferredViewer; + } + + set preferredViewer(String v) { + _preferredViewer = v; + _preferredViewerSet = true; + } + + DashboardBase() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DashboardBase.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_contentFavoriteIdSet || + _apiMapResponse.containsKey('content_favorite_id')) { + json['content_favorite_id'] = contentFavoriteId; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_hiddenSet || _apiMapResponse.containsKey('hidden')) { + json['hidden'] = hidden; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model == null ? null : model.toJson(); + } + if (_queryTimezoneSet || _apiMapResponse.containsKey('query_timezone')) { + json['query_timezone'] = queryTimezone; + } + if (_readonlySet || _apiMapResponse.containsKey('readonly')) { + json['readonly'] = readonly; + } + if (_refreshIntervalSet || + _apiMapResponse.containsKey('refresh_interval')) { + json['refresh_interval'] = refreshInterval; + } + if (_refreshIntervalToISet || + _apiMapResponse.containsKey('refresh_interval_to_i')) { + json['refresh_interval_to_i'] = refreshIntervalToI; + } + if (_folderSet || _apiMapResponse.containsKey('folder')) { + json['folder'] = folder == null ? null : folder.toJson(); + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_slugSet || _apiMapResponse.containsKey('slug')) { + json['slug'] = slug; + } + if (_preferredViewerSet || + _apiMapResponse.containsKey('preferred_viewer')) { + json['preferred_viewer'] = preferredViewer; + } + return json; + } +} + +class DashboardElement { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _bodyText; + bool _bodyTextSet = false; + + String _bodyTextAsHtml; + bool _bodyTextAsHtmlSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _editUri; + bool _editUriSet = false; + + String _id; + bool _idSet = false; + + LookWithQuery _look; + bool _lookSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _lookmlLinkId; + bool _lookmlLinkIdSet = false; + + String _mergeResultId; + bool _mergeResultIdSet = false; + + String _noteDisplay; + bool _noteDisplaySet = false; + + String _noteState; + bool _noteStateSet = false; + + String _noteText; + bool _noteTextSet = false; + + String _noteTextAsHtml; + bool _noteTextAsHtmlSet = false; + + Query _query; + bool _querySet = false; + + int _queryId; + bool _queryIdSet = false; + + String _refreshInterval; + bool _refreshIntervalSet = false; + + int _refreshIntervalToI; + bool _refreshIntervalToISet = false; + + ResultMakerWithIdVisConfigAndDynamicFields _resultMaker; + bool _resultMakerSet = false; + + int _resultMakerId; + bool _resultMakerIdSet = false; + + String _subtitleText; + bool _subtitleTextSet = false; + + String _title; + bool _titleSet = false; + + bool _titleHidden; + bool _titleHiddenSet = false; + + String _titleText; + bool _titleTextSet = false; + + String _type; + bool _typeSet = false; + + int _alertCount; + bool _alertCountSet = false; + + String _titleTextAsHtml; + bool _titleTextAsHtmlSet = false; + + String _subtitleTextAsHtml; + bool _subtitleTextAsHtmlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Text tile body text + + String get bodyText { + if (!_bodyTextSet && _apiMapResponse.containsKey('body_text')) { + _bodyText = _apiMapResponse['body_text'] == null + ? null + : _apiMapResponse['body_text'].toString(); + _bodyTextSet = true; + } + return _bodyText; + } + + set bodyText(String v) { + _bodyText = v; + _bodyTextSet = true; + } + + /// Text tile body text as Html (read-only) + + String get bodyTextAsHtml { + if (!_bodyTextAsHtmlSet && + _apiMapResponse.containsKey('body_text_as_html')) { + _bodyTextAsHtml = _apiMapResponse['body_text_as_html'] == null + ? null + : _apiMapResponse['body_text_as_html'].toString(); + _bodyTextAsHtmlSet = true; + } + return _bodyTextAsHtml; + } + + set bodyTextAsHtml(String v) { + _bodyTextAsHtml = v; + _bodyTextAsHtmlSet = true; + } + + /// Id of Dashboard + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Relative path of URI of LookML file to edit the dashboard element (LookML dashboard only). (read-only) + + String get editUri { + if (!_editUriSet && _apiMapResponse.containsKey('edit_uri')) { + _editUri = _apiMapResponse['edit_uri'] == null + ? null + : _apiMapResponse['edit_uri'].toString(); + _editUriSet = true; + } + return _editUri; + } + + set editUri(String v) { + _editUri = v; + _editUriSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + LookWithQuery get look { + if (!_lookSet && _apiMapResponse.containsKey('look')) { + _look = _apiMapResponse['look'] == null + ? null + : LookWithQuery.fromResponse( + _apiMapResponse['look'], apiResponseContentType); + _lookSet = true; + } + return _look; + } + + set look(LookWithQuery v) { + _look = v; + _lookSet = true; + } + + /// Id Of Look + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// LookML link ID (read-only) + + String get lookmlLinkId { + if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { + _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null + ? null + : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkIdSet = true; + } + return _lookmlLinkId; + } + + set lookmlLinkId(String v) { + _lookmlLinkId = v; + _lookmlLinkIdSet = true; + } + + /// ID of merge result + + String get mergeResultId { + if (!_mergeResultIdSet && _apiMapResponse.containsKey('merge_result_id')) { + _mergeResultId = _apiMapResponse['merge_result_id'] == null + ? null + : _apiMapResponse['merge_result_id'].toString(); + _mergeResultIdSet = true; + } + return _mergeResultId; + } + + set mergeResultId(String v) { + _mergeResultId = v; + _mergeResultIdSet = true; + } + + /// Note Display + + String get noteDisplay { + if (!_noteDisplaySet && _apiMapResponse.containsKey('note_display')) { + _noteDisplay = _apiMapResponse['note_display'] == null + ? null + : _apiMapResponse['note_display'].toString(); + _noteDisplaySet = true; + } + return _noteDisplay; + } + + set noteDisplay(String v) { + _noteDisplay = v; + _noteDisplaySet = true; + } + + /// Note State + + String get noteState { + if (!_noteStateSet && _apiMapResponse.containsKey('note_state')) { + _noteState = _apiMapResponse['note_state'] == null + ? null + : _apiMapResponse['note_state'].toString(); + _noteStateSet = true; + } + return _noteState; + } + + set noteState(String v) { + _noteState = v; + _noteStateSet = true; + } + + /// Note Text + + String get noteText { + if (!_noteTextSet && _apiMapResponse.containsKey('note_text')) { + _noteText = _apiMapResponse['note_text'] == null + ? null + : _apiMapResponse['note_text'].toString(); + _noteTextSet = true; + } + return _noteText; + } + + set noteText(String v) { + _noteText = v; + _noteTextSet = true; + } + + /// Note Text as Html (read-only) + + String get noteTextAsHtml { + if (!_noteTextAsHtmlSet && + _apiMapResponse.containsKey('note_text_as_html')) { + _noteTextAsHtml = _apiMapResponse['note_text_as_html'] == null + ? null + : _apiMapResponse['note_text_as_html'].toString(); + _noteTextAsHtmlSet = true; + } + return _noteTextAsHtml; + } + + set noteTextAsHtml(String v) { + _noteTextAsHtml = v; + _noteTextAsHtmlSet = true; + } + + Query get query { + if (!_querySet && _apiMapResponse.containsKey('query')) { + _query = _apiMapResponse['query'] == null + ? null + : Query.fromResponse( + _apiMapResponse['query'], apiResponseContentType); + _querySet = true; + } + return _query; + } + + set query(Query v) { + _query = v; + _querySet = true; + } + + /// Id Of Query + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// Refresh Interval + + String get refreshInterval { + if (!_refreshIntervalSet && + _apiMapResponse.containsKey('refresh_interval')) { + _refreshInterval = _apiMapResponse['refresh_interval'] == null + ? null + : _apiMapResponse['refresh_interval'].toString(); + _refreshIntervalSet = true; + } + return _refreshInterval; + } + + set refreshInterval(String v) { + _refreshInterval = v; + _refreshIntervalSet = true; + } + + /// Refresh Interval as integer (read-only) + + int get refreshIntervalToI { + if (!_refreshIntervalToISet && + _apiMapResponse.containsKey('refresh_interval_to_i')) { + _refreshIntervalToI = _apiMapResponse['refresh_interval_to_i']; + _refreshIntervalToISet = true; + } + return _refreshIntervalToI; + } + + set refreshIntervalToI(int v) { + _refreshIntervalToI = v; + _refreshIntervalToISet = true; + } + + ResultMakerWithIdVisConfigAndDynamicFields get resultMaker { + if (!_resultMakerSet && _apiMapResponse.containsKey('result_maker')) { + _resultMaker = _apiMapResponse['result_maker'] == null + ? null + : ResultMakerWithIdVisConfigAndDynamicFields.fromResponse( + _apiMapResponse['result_maker'], apiResponseContentType); + _resultMakerSet = true; + } + return _resultMaker; + } + + set resultMaker(ResultMakerWithIdVisConfigAndDynamicFields v) { + _resultMaker = v; + _resultMakerSet = true; + } + + /// ID of the ResultMakerLookup entry. + + int get resultMakerId { + if (!_resultMakerIdSet && _apiMapResponse.containsKey('result_maker_id')) { + _resultMakerId = _apiMapResponse['result_maker_id']; + _resultMakerIdSet = true; + } + return _resultMakerId; + } + + set resultMakerId(int v) { + _resultMakerId = v; + _resultMakerIdSet = true; + } + + /// Text tile subtitle text + + String get subtitleText { + if (!_subtitleTextSet && _apiMapResponse.containsKey('subtitle_text')) { + _subtitleText = _apiMapResponse['subtitle_text'] == null + ? null + : _apiMapResponse['subtitle_text'].toString(); + _subtitleTextSet = true; + } + return _subtitleText; + } + + set subtitleText(String v) { + _subtitleText = v; + _subtitleTextSet = true; + } + + /// Title of dashboard element + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Whether title is hidden + + bool get titleHidden { + if (!_titleHiddenSet && _apiMapResponse.containsKey('title_hidden')) { + _titleHidden = _apiMapResponse['title_hidden']; + _titleHiddenSet = true; + } + return _titleHidden; + } + + set titleHidden(bool v) { + _titleHidden = v; + _titleHiddenSet = true; + } + + /// Text tile title + + String get titleText { + if (!_titleTextSet && _apiMapResponse.containsKey('title_text')) { + _titleText = _apiMapResponse['title_text'] == null + ? null + : _apiMapResponse['title_text'].toString(); + _titleTextSet = true; + } + return _titleText; + } + + set titleText(String v) { + _titleText = v; + _titleTextSet = true; + } + + /// Type + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Count of Alerts associated to a dashboard element (read-only) + + int get alertCount { + if (!_alertCountSet && _apiMapResponse.containsKey('alert_count')) { + _alertCount = _apiMapResponse['alert_count']; + _alertCountSet = true; + } + return _alertCount; + } + + set alertCount(int v) { + _alertCount = v; + _alertCountSet = true; + } + + /// Text tile title text as Html (read-only) + + String get titleTextAsHtml { + if (!_titleTextAsHtmlSet && + _apiMapResponse.containsKey('title_text_as_html')) { + _titleTextAsHtml = _apiMapResponse['title_text_as_html'] == null + ? null + : _apiMapResponse['title_text_as_html'].toString(); + _titleTextAsHtmlSet = true; + } + return _titleTextAsHtml; + } + + set titleTextAsHtml(String v) { + _titleTextAsHtml = v; + _titleTextAsHtmlSet = true; + } + + /// Text tile subtitle text as Html (read-only) + + String get subtitleTextAsHtml { + if (!_subtitleTextAsHtmlSet && + _apiMapResponse.containsKey('subtitle_text_as_html')) { + _subtitleTextAsHtml = _apiMapResponse['subtitle_text_as_html'] == null + ? null + : _apiMapResponse['subtitle_text_as_html'].toString(); + _subtitleTextAsHtmlSet = true; + } + return _subtitleTextAsHtml; + } + + set subtitleTextAsHtml(String v) { + _subtitleTextAsHtml = v; + _subtitleTextAsHtmlSet = true; + } + + DashboardElement() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DashboardElement.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_bodyTextSet || _apiMapResponse.containsKey('body_text')) { + json['body_text'] = bodyText; + } + if (_bodyTextAsHtmlSet || + _apiMapResponse.containsKey('body_text_as_html')) { + json['body_text_as_html'] = bodyTextAsHtml; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_editUriSet || _apiMapResponse.containsKey('edit_uri')) { + json['edit_uri'] = editUri; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookSet || _apiMapResponse.containsKey('look')) { + json['look'] = look == null ? null : look.toJson(); + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_lookmlLinkIdSet || _apiMapResponse.containsKey('lookml_link_id')) { + json['lookml_link_id'] = lookmlLinkId; + } + if (_mergeResultIdSet || _apiMapResponse.containsKey('merge_result_id')) { + json['merge_result_id'] = mergeResultId; + } + if (_noteDisplaySet || _apiMapResponse.containsKey('note_display')) { + json['note_display'] = noteDisplay; + } + if (_noteStateSet || _apiMapResponse.containsKey('note_state')) { + json['note_state'] = noteState; + } + if (_noteTextSet || _apiMapResponse.containsKey('note_text')) { + json['note_text'] = noteText; + } + if (_noteTextAsHtmlSet || + _apiMapResponse.containsKey('note_text_as_html')) { + json['note_text_as_html'] = noteTextAsHtml; + } + if (_querySet || _apiMapResponse.containsKey('query')) { + json['query'] = query == null ? null : query.toJson(); + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_refreshIntervalSet || + _apiMapResponse.containsKey('refresh_interval')) { + json['refresh_interval'] = refreshInterval; + } + if (_refreshIntervalToISet || + _apiMapResponse.containsKey('refresh_interval_to_i')) { + json['refresh_interval_to_i'] = refreshIntervalToI; + } + if (_resultMakerSet || _apiMapResponse.containsKey('result_maker')) { + json['result_maker'] = resultMaker == null ? null : resultMaker.toJson(); + } + if (_resultMakerIdSet || _apiMapResponse.containsKey('result_maker_id')) { + json['result_maker_id'] = resultMakerId; + } + if (_subtitleTextSet || _apiMapResponse.containsKey('subtitle_text')) { + json['subtitle_text'] = subtitleText; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_titleHiddenSet || _apiMapResponse.containsKey('title_hidden')) { + json['title_hidden'] = titleHidden; + } + if (_titleTextSet || _apiMapResponse.containsKey('title_text')) { + json['title_text'] = titleText; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_alertCountSet || _apiMapResponse.containsKey('alert_count')) { + json['alert_count'] = alertCount; + } + if (_titleTextAsHtmlSet || + _apiMapResponse.containsKey('title_text_as_html')) { + json['title_text_as_html'] = titleTextAsHtml; + } + if (_subtitleTextAsHtmlSet || + _apiMapResponse.containsKey('subtitle_text_as_html')) { + json['subtitle_text_as_html'] = subtitleTextAsHtml; + } + return json; + } +} + +class DashboardFilter { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _name; + bool _nameSet = false; + + String _title; + bool _titleSet = false; + + String _type; + bool _typeSet = false; + + String _defaultValue; + bool _defaultValueSet = false; + + String _model; + bool _modelSet = false; + + String _explore; + bool _exploreSet = false; + + String _dimension; + bool _dimensionSet = false; + + Map _field; + bool _fieldSet = false; + + int _row; + bool _rowSet = false; + + List _listensToFilters; + bool _listensToFiltersSet = false; + + bool _allowMultipleValues; + bool _allowMultipleValuesSet = false; + + bool _required; + bool _requiredSet = false; + + Map _uiConfig; + bool _uiConfigSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id of Dashboard (read-only) + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Name of filter + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Title of filter + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Type of filter: one of date, number, string, or field + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Default value of filter + + String get defaultValue { + if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { + _defaultValue = _apiMapResponse['default_value'] == null + ? null + : _apiMapResponse['default_value'].toString(); + _defaultValueSet = true; + } + return _defaultValue; + } + + set defaultValue(String v) { + _defaultValue = v; + _defaultValueSet = true; + } + + /// Model of filter (required if type = field) + + String get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : _apiMapResponse['model'].toString(); + _modelSet = true; + } + return _model; + } + + set model(String v) { + _model = v; + _modelSet = true; + } + + /// Explore of filter (required if type = field) + + String get explore { + if (!_exploreSet && _apiMapResponse.containsKey('explore')) { + _explore = _apiMapResponse['explore'] == null + ? null + : _apiMapResponse['explore'].toString(); + _exploreSet = true; + } + return _explore; + } + + set explore(String v) { + _explore = v; + _exploreSet = true; + } + + /// Dimension of filter (required if type = field) + + String get dimension { + if (!_dimensionSet && _apiMapResponse.containsKey('dimension')) { + _dimension = _apiMapResponse['dimension'] == null + ? null + : _apiMapResponse['dimension'].toString(); + _dimensionSet = true; + } + return _dimension; + } + + set dimension(String v) { + _dimension = v; + _dimensionSet = true; + } + + /// Field information (read-only) + + Map get field { + if (!_fieldSet && _apiMapResponse.containsKey('field')) { + _field = _apiMapResponse['field']; + _fieldSet = true; + } + return _field; + } + + set field(Map v) { + _field = v; + _fieldSet = true; + } + + /// Display order of this filter relative to other filters + + int get row { + if (!_rowSet && _apiMapResponse.containsKey('row')) { + _row = _apiMapResponse['row']; + _rowSet = true; + } + return _row; + } + + set row(int v) { + _row = v; + _rowSet = true; + } + + /// Array of listeners for faceted filters + + List get listensToFilters { + if (!_listensToFiltersSet && + _apiMapResponse.containsKey('listens_to_filters')) { + _listensToFilters = _apiMapResponse['listens_to_filters'] == null + ? null + : _apiMapResponse['listens_to_filters'] + .map((i) => i as String) + .toList(); + _listensToFiltersSet = true; + } + return _listensToFilters; + } + + set listensToFilters(List v) { + _listensToFilters = v; + _listensToFiltersSet = true; + } + + /// Whether the filter allows multiple filter values (deprecated in the latest version of dashboards) + + bool get allowMultipleValues { + if (!_allowMultipleValuesSet && + _apiMapResponse.containsKey('allow_multiple_values')) { + _allowMultipleValues = _apiMapResponse['allow_multiple_values']; + _allowMultipleValuesSet = true; + } + return _allowMultipleValues; + } + + set allowMultipleValues(bool v) { + _allowMultipleValues = v; + _allowMultipleValuesSet = true; + } + + /// Whether the filter requires a value to run the dashboard + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// The visual configuration for this filter. Used to set up how the UI for this filter should appear. + + Map get uiConfig { + if (!_uiConfigSet && _apiMapResponse.containsKey('ui_config')) { + _uiConfig = _apiMapResponse['ui_config']; + _uiConfigSet = true; + } + return _uiConfig; + } + + set uiConfig(Map v) { + _uiConfig = v; + _uiConfigSet = true; + } + + DashboardFilter() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DashboardFilter.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_defaultValueSet || _apiMapResponse.containsKey('default_value')) { + json['default_value'] = defaultValue; + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model; + } + if (_exploreSet || _apiMapResponse.containsKey('explore')) { + json['explore'] = explore; + } + if (_dimensionSet || _apiMapResponse.containsKey('dimension')) { + json['dimension'] = dimension; + } + if (_fieldSet || _apiMapResponse.containsKey('field')) { + json['field'] = field; + } + if (_rowSet || _apiMapResponse.containsKey('row')) { + json['row'] = row; + } + if (_listensToFiltersSet || + _apiMapResponse.containsKey('listens_to_filters')) { + json['listens_to_filters'] = listensToFilters; + } + if (_allowMultipleValuesSet || + _apiMapResponse.containsKey('allow_multiple_values')) { + json['allow_multiple_values'] = allowMultipleValues; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_uiConfigSet || _apiMapResponse.containsKey('ui_config')) { + json['ui_config'] = uiConfig; + } + return json; + } +} + +class DashboardLayout { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _type; + bool _typeSet = false; + + bool _active; + bool _activeSet = false; + + int _columnWidth; + bool _columnWidthSet = false; + + int _width; + bool _widthSet = false; + + bool _deleted; + bool _deletedSet = false; + + String _dashboardTitle; + bool _dashboardTitleSet = false; + + List _dashboardLayoutComponents; + bool _dashboardLayoutComponentsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id of Dashboard + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Type + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Is Active + + bool get active { + if (!_activeSet && _apiMapResponse.containsKey('active')) { + _active = _apiMapResponse['active']; + _activeSet = true; + } + return _active; + } + + set active(bool v) { + _active = v; + _activeSet = true; + } + + /// Column Width + + int get columnWidth { + if (!_columnWidthSet && _apiMapResponse.containsKey('column_width')) { + _columnWidth = _apiMapResponse['column_width']; + _columnWidthSet = true; + } + return _columnWidth; + } + + set columnWidth(int v) { + _columnWidth = v; + _columnWidthSet = true; + } + + /// Width + + int get width { + if (!_widthSet && _apiMapResponse.containsKey('width')) { + _width = _apiMapResponse['width']; + _widthSet = true; + } + return _width; + } + + set width(int v) { + _width = v; + _widthSet = true; + } + + /// Whether or not the dashboard layout is deleted. (read-only) + + bool get deleted { + if (!_deletedSet && _apiMapResponse.containsKey('deleted')) { + _deleted = _apiMapResponse['deleted']; + _deletedSet = true; + } + return _deleted; + } + + set deleted(bool v) { + _deleted = v; + _deletedSet = true; + } + + /// Title extracted from the dashboard this layout represents. (read-only) + + String get dashboardTitle { + if (!_dashboardTitleSet && _apiMapResponse.containsKey('dashboard_title')) { + _dashboardTitle = _apiMapResponse['dashboard_title'] == null + ? null + : _apiMapResponse['dashboard_title'].toString(); + _dashboardTitleSet = true; + } + return _dashboardTitle; + } + + set dashboardTitle(String v) { + _dashboardTitle = v; + _dashboardTitleSet = true; + } + + /// Components (read-only) + + List get dashboardLayoutComponents { + if (!_dashboardLayoutComponentsSet && + _apiMapResponse.containsKey('dashboard_layout_components')) { + _dashboardLayoutComponents = + _apiMapResponse['dashboard_layout_components'] == null + ? null + : (_apiMapResponse['dashboard_layout_components'] as List) + .map((i) => DashboardLayoutComponent.fromResponse( + i, apiResponseContentType)) + .toList(); + _dashboardLayoutComponentsSet = true; + } + return _dashboardLayoutComponents; + } + + set dashboardLayoutComponents(List v) { + _dashboardLayoutComponents = v; + _dashboardLayoutComponentsSet = true; + } + + DashboardLayout() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DashboardLayout.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_activeSet || _apiMapResponse.containsKey('active')) { + json['active'] = active; + } + if (_columnWidthSet || _apiMapResponse.containsKey('column_width')) { + json['column_width'] = columnWidth; + } + if (_widthSet || _apiMapResponse.containsKey('width')) { + json['width'] = width; + } + if (_deletedSet || _apiMapResponse.containsKey('deleted')) { + json['deleted'] = deleted; + } + if (_dashboardTitleSet || _apiMapResponse.containsKey('dashboard_title')) { + json['dashboard_title'] = dashboardTitle; + } + if (_dashboardLayoutComponentsSet || + _apiMapResponse.containsKey('dashboard_layout_components')) { + json['dashboard_layout_components'] = dashboardLayoutComponents == null + ? null + : dashboardLayoutComponents.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class DashboardLayoutComponent { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + String _dashboardLayoutId; + bool _dashboardLayoutIdSet = false; + + String _dashboardElementId; + bool _dashboardElementIdSet = false; + + int _row; + bool _rowSet = false; + + int _column; + bool _columnSet = false; + + int _width; + bool _widthSet = false; + + int _height; + bool _heightSet = false; + + bool _deleted; + bool _deletedSet = false; + + String _elementTitle; + bool _elementTitleSet = false; + + bool _elementTitleHidden; + bool _elementTitleHiddenSet = false; + + String _visType; + bool _visTypeSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id of Dashboard Layout + + String get dashboardLayoutId { + if (!_dashboardLayoutIdSet && + _apiMapResponse.containsKey('dashboard_layout_id')) { + _dashboardLayoutId = _apiMapResponse['dashboard_layout_id'] == null + ? null + : _apiMapResponse['dashboard_layout_id'].toString(); + _dashboardLayoutIdSet = true; + } + return _dashboardLayoutId; + } + + set dashboardLayoutId(String v) { + _dashboardLayoutId = v; + _dashboardLayoutIdSet = true; + } + + /// Id Of Dashboard Element + + String get dashboardElementId { + if (!_dashboardElementIdSet && + _apiMapResponse.containsKey('dashboard_element_id')) { + _dashboardElementId = _apiMapResponse['dashboard_element_id'] == null + ? null + : _apiMapResponse['dashboard_element_id'].toString(); + _dashboardElementIdSet = true; + } + return _dashboardElementId; + } + + set dashboardElementId(String v) { + _dashboardElementId = v; + _dashboardElementIdSet = true; + } + + /// Row + + int get row { + if (!_rowSet && _apiMapResponse.containsKey('row')) { + _row = _apiMapResponse['row']; + _rowSet = true; + } + return _row; + } + + set row(int v) { + _row = v; + _rowSet = true; + } + + /// Column + + int get column { + if (!_columnSet && _apiMapResponse.containsKey('column')) { + _column = _apiMapResponse['column']; + _columnSet = true; + } + return _column; + } + + set column(int v) { + _column = v; + _columnSet = true; + } + + /// Width + + int get width { + if (!_widthSet && _apiMapResponse.containsKey('width')) { + _width = _apiMapResponse['width']; + _widthSet = true; + } + return _width; + } + + set width(int v) { + _width = v; + _widthSet = true; + } + + /// Height + + int get height { + if (!_heightSet && _apiMapResponse.containsKey('height')) { + _height = _apiMapResponse['height']; + _heightSet = true; + } + return _height; + } + + set height(int v) { + _height = v; + _heightSet = true; + } + + /// Whether or not the dashboard layout component is deleted (read-only) + + bool get deleted { + if (!_deletedSet && _apiMapResponse.containsKey('deleted')) { + _deleted = _apiMapResponse['deleted']; + _deletedSet = true; + } + return _deleted; + } + + set deleted(bool v) { + _deleted = v; + _deletedSet = true; + } + + /// Dashboard element title, extracted from the Dashboard Element. (read-only) + + String get elementTitle { + if (!_elementTitleSet && _apiMapResponse.containsKey('element_title')) { + _elementTitle = _apiMapResponse['element_title'] == null + ? null + : _apiMapResponse['element_title'].toString(); + _elementTitleSet = true; + } + return _elementTitle; + } + + set elementTitle(String v) { + _elementTitle = v; + _elementTitleSet = true; + } + + /// Whether or not the dashboard element title is displayed. (read-only) + + bool get elementTitleHidden { + if (!_elementTitleHiddenSet && + _apiMapResponse.containsKey('element_title_hidden')) { + _elementTitleHidden = _apiMapResponse['element_title_hidden']; + _elementTitleHiddenSet = true; + } + return _elementTitleHidden; + } + + set elementTitleHidden(bool v) { + _elementTitleHidden = v; + _elementTitleHiddenSet = true; + } + + /// Visualization type, extracted from a query's vis_config (read-only) + + String get visType { + if (!_visTypeSet && _apiMapResponse.containsKey('vis_type')) { + _visType = _apiMapResponse['vis_type'] == null + ? null + : _apiMapResponse['vis_type'].toString(); + _visTypeSet = true; + } + return _visType; + } + + set visType(String v) { + _visType = v; + _visTypeSet = true; + } + + DashboardLayoutComponent() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DashboardLayoutComponent.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_dashboardLayoutIdSet || + _apiMapResponse.containsKey('dashboard_layout_id')) { + json['dashboard_layout_id'] = dashboardLayoutId; + } + if (_dashboardElementIdSet || + _apiMapResponse.containsKey('dashboard_element_id')) { + json['dashboard_element_id'] = dashboardElementId; + } + if (_rowSet || _apiMapResponse.containsKey('row')) { + json['row'] = row; + } + if (_columnSet || _apiMapResponse.containsKey('column')) { + json['column'] = column; + } + if (_widthSet || _apiMapResponse.containsKey('width')) { + json['width'] = width; + } + if (_heightSet || _apiMapResponse.containsKey('height')) { + json['height'] = height; + } + if (_deletedSet || _apiMapResponse.containsKey('deleted')) { + json['deleted'] = deleted; + } + if (_elementTitleSet || _apiMapResponse.containsKey('element_title')) { + json['element_title'] = elementTitle; + } + if (_elementTitleHiddenSet || + _apiMapResponse.containsKey('element_title_hidden')) { + json['element_title_hidden'] = elementTitleHidden; + } + if (_visTypeSet || _apiMapResponse.containsKey('vis_type')) { + json['vis_type'] = visType; + } + return json; + } +} + +class DashboardLookml { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _lookml; + bool _lookmlSet = false; + + /// Id of Dashboard (read-only) + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// lookml of UDD (read-only) + + String get lookml { + if (!_lookmlSet && _apiMapResponse.containsKey('lookml')) { + _lookml = _apiMapResponse['lookml'] == null + ? null + : _apiMapResponse['lookml'].toString(); + _lookmlSet = true; + } + return _lookml; + } + + set lookml(String v) { + _lookml = v; + _lookmlSet = true; + } + + DashboardLookml() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DashboardLookml.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_lookmlSet || _apiMapResponse.containsKey('lookml')) { + json['lookml'] = lookml; + } + return json; + } +} + +class DataActionForm { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + DataActionUserState _state; + bool _stateSet = false; + + List _fields; + bool _fieldsSet = false; + + DataActionUserState get state { + if (!_stateSet && _apiMapResponse.containsKey('state')) { + _state = _apiMapResponse['state'] == null + ? null + : DataActionUserState.fromResponse( + _apiMapResponse['state'], apiResponseContentType); + _stateSet = true; + } + return _state; + } + + set state(DataActionUserState v) { + _state = v; + _stateSet = true; + } + + /// Array of form fields. (read-only) + + List get fields { + if (!_fieldsSet && _apiMapResponse.containsKey('fields')) { + _fields = _apiMapResponse['fields'] == null + ? null + : (_apiMapResponse['fields'] as List) + .map((i) => + DataActionFormField.fromResponse(i, apiResponseContentType)) + .toList(); + _fieldsSet = true; + } + return _fields; + } + + set fields(List v) { + _fields = v; + _fieldsSet = true; + } + + DataActionForm() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DataActionForm.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_stateSet || _apiMapResponse.containsKey('state')) { + json['state'] = state == null ? null : state.toJson(); + } + if (_fieldsSet || _apiMapResponse.containsKey('fields')) { + json['fields'] = + fields == null ? null : fields.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class DataActionFormField { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _label; + bool _labelSet = false; + + String _description; + bool _descriptionSet = false; + + String _type; + bool _typeSet = false; + + String _defaultValue; + bool _defaultValueSet = false; + + String _oauthUrl; + bool _oauthUrlSet = false; + + bool _interactive; + bool _interactiveSet = false; + + bool _required; + bool _requiredSet = false; + + List _options; + bool _optionsSet = false; + + /// Name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Human-readable label (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Description of field (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Type of field. (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Default value of the field. (read-only) + + String get defaultValue { + if (!_defaultValueSet && _apiMapResponse.containsKey('default')) { + _defaultValue = _apiMapResponse['default'] == null + ? null + : _apiMapResponse['default'].toString(); + _defaultValueSet = true; + } + return _defaultValue; + } + + set defaultValue(String v) { + _defaultValue = v; + _defaultValueSet = true; + } + + /// The URL for an oauth link, if type is 'oauth_link'. (read-only) + + String get oauthUrl { + if (!_oauthUrlSet && _apiMapResponse.containsKey('oauth_url')) { + _oauthUrl = _apiMapResponse['oauth_url'] == null + ? null + : _apiMapResponse['oauth_url'].toString(); + _oauthUrlSet = true; + } + return _oauthUrl; + } + + set oauthUrl(String v) { + _oauthUrl = v; + _oauthUrlSet = true; + } + + /// Whether or not a field supports interactive forms. (read-only) + + bool get interactive { + if (!_interactiveSet && _apiMapResponse.containsKey('interactive')) { + _interactive = _apiMapResponse['interactive']; + _interactiveSet = true; + } + return _interactive; + } + + set interactive(bool v) { + _interactive = v; + _interactiveSet = true; + } + + /// Whether or not the field is required. This is a user-interface hint. A user interface displaying this form should not submit it without a value for this field. The action server must also perform this validation. (read-only) + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// If the form type is 'select', a list of options to be selected from. (read-only) + + List get options { + if (!_optionsSet && _apiMapResponse.containsKey('options')) { + _options = _apiMapResponse['options'] == null + ? null + : (_apiMapResponse['options'] as List) + .map((i) => DataActionFormSelectOption.fromResponse( + i, apiResponseContentType)) + .toList(); + _optionsSet = true; + } + return _options; + } + + set options(List v) { + _options = v; + _optionsSet = true; + } + + DataActionFormField() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DataActionFormField.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_defaultValueSet || _apiMapResponse.containsKey('default')) { + json['default'] = defaultValue; + } + if (_oauthUrlSet || _apiMapResponse.containsKey('oauth_url')) { + json['oauth_url'] = oauthUrl; + } + if (_interactiveSet || _apiMapResponse.containsKey('interactive')) { + json['interactive'] = interactive; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_optionsSet || _apiMapResponse.containsKey('options')) { + json['options'] = + options == null ? null : options.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class DataActionFormSelectOption { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _label; + bool _labelSet = false; + + /// Name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Human-readable label (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + DataActionFormSelectOption() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DataActionFormSelectOption.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + return json; + } +} + +class DataActionRequest { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _action; + bool _actionSet = false; + + Map _formValues; + bool _formValuesSet = false; + + /// The JSON describing the data action. This JSON should be considered opaque and should be passed through unmodified from the query result it came from. + + Map get action { + if (!_actionSet && _apiMapResponse.containsKey('action')) { + _action = _apiMapResponse['action']; + _actionSet = true; + } + return _action; + } + + set action(Map v) { + _action = v; + _actionSet = true; + } + + /// User input for any form values the data action might use. + + Map get formValues { + if (!_formValuesSet && _apiMapResponse.containsKey('form_values')) { + _formValues = _apiMapResponse['form_values']; + _formValuesSet = true; + } + return _formValues; + } + + set formValues(Map v) { + _formValues = v; + _formValuesSet = true; + } + + DataActionRequest() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DataActionRequest.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_actionSet || _apiMapResponse.containsKey('action')) { + json['action'] = action; + } + if (_formValuesSet || _apiMapResponse.containsKey('form_values')) { + json['form_values'] = formValues; + } + return json; + } +} + +class DataActionResponse { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _webhookId; + bool _webhookIdSet = false; + + bool _success; + bool _successSet = false; + + bool _refreshQuery; + bool _refreshQuerySet = false; + + ValidationError _validationErrors; + bool _validationErrorsSet = false; + + String _message; + bool _messageSet = false; + + /// ID of the webhook event that sent this data action. In some error conditions, this may be null. (read-only) + + String get webhookId { + if (!_webhookIdSet && _apiMapResponse.containsKey('webhook_id')) { + _webhookId = _apiMapResponse['webhook_id'] == null + ? null + : _apiMapResponse['webhook_id'].toString(); + _webhookIdSet = true; + } + return _webhookId; + } + + set webhookId(String v) { + _webhookId = v; + _webhookIdSet = true; + } + + /// Whether the data action was successful. (read-only) + + bool get success { + if (!_successSet && _apiMapResponse.containsKey('success')) { + _success = _apiMapResponse['success']; + _successSet = true; + } + return _success; + } + + set success(bool v) { + _success = v; + _successSet = true; + } + + /// When true, indicates that the client should refresh (rerun) the source query because the data may have been changed by the action. (read-only) + + bool get refreshQuery { + if (!_refreshQuerySet && _apiMapResponse.containsKey('refresh_query')) { + _refreshQuery = _apiMapResponse['refresh_query']; + _refreshQuerySet = true; + } + return _refreshQuery; + } + + set refreshQuery(bool v) { + _refreshQuery = v; + _refreshQuerySet = true; + } + + ValidationError get validationErrors { + if (!_validationErrorsSet && + _apiMapResponse.containsKey('validation_errors')) { + _validationErrors = _apiMapResponse['validation_errors'] == null + ? null + : ValidationError.fromResponse( + _apiMapResponse['validation_errors'], apiResponseContentType); + _validationErrorsSet = true; + } + return _validationErrors; + } + + set validationErrors(ValidationError v) { + _validationErrors = v; + _validationErrorsSet = true; + } + + /// Optional message returned by the data action server describing the state of the action that took place. This can be used to implement custom failure messages. If a failure is related to a particular form field, the server should send back a validation error instead. The Looker web UI does not currently display any message if the action indicates 'success', but may do so in the future. (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + DataActionResponse() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DataActionResponse.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_webhookIdSet || _apiMapResponse.containsKey('webhook_id')) { + json['webhook_id'] = webhookId; + } + if (_successSet || _apiMapResponse.containsKey('success')) { + json['success'] = success; + } + if (_refreshQuerySet || _apiMapResponse.containsKey('refresh_query')) { + json['refresh_query'] = refreshQuery; + } + if (_validationErrorsSet || + _apiMapResponse.containsKey('validation_errors')) { + json['validation_errors'] = + validationErrors == null ? null : validationErrors.toJson(); + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + return json; + } +} + +class DataActionUserState { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _data; + bool _dataSet = false; + + int _refreshTime; + bool _refreshTimeSet = false; + + /// User state data (read-only) + + String get data { + if (!_dataSet && _apiMapResponse.containsKey('data')) { + _data = _apiMapResponse['data'] == null + ? null + : _apiMapResponse['data'].toString(); + _dataSet = true; + } + return _data; + } + + set data(String v) { + _data = v; + _dataSet = true; + } + + /// Time in seconds until the state needs to be refreshed (read-only) + + int get refreshTime { + if (!_refreshTimeSet && _apiMapResponse.containsKey('refresh_time')) { + _refreshTime = _apiMapResponse['refresh_time']; + _refreshTimeSet = true; + } + return _refreshTime; + } + + set refreshTime(int v) { + _refreshTime = v; + _refreshTimeSet = true; + } + + DataActionUserState() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DataActionUserState.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dataSet || _apiMapResponse.containsKey('data')) { + json['data'] = data; + } + if (_refreshTimeSet || _apiMapResponse.containsKey('refresh_time')) { + json['refresh_time'] = refreshTime; + } + return json; + } +} + +class Datagroup { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _createdAt; + bool _createdAtSet = false; + + int _id; + bool _idSet = false; + + String _modelName; + bool _modelNameSet = false; + + String _name; + bool _nameSet = false; + + int _staleBefore; + bool _staleBeforeSet = false; + + int _triggerCheckAt; + bool _triggerCheckAtSet = false; + + String _triggerError; + bool _triggerErrorSet = false; + + String _triggerValue; + bool _triggerValueSet = false; + + int _triggeredAt; + bool _triggeredAtSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// UNIX timestamp at which this entry was created. (read-only) + + int get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at']; + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(int v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Unique ID of the datagroup (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Name of the model containing the datagroup. Unique when combined with name. (read-only) + + String get modelName { + if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { + _modelName = _apiMapResponse['model_name'] == null + ? null + : _apiMapResponse['model_name'].toString(); + _modelNameSet = true; + } + return _modelName; + } + + set modelName(String v) { + _modelName = v; + _modelNameSet = true; + } + + /// Name of the datagroup. Unique when combined with model_name. (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// UNIX timestamp before which cache entries are considered stale. Cannot be in the future. + + int get staleBefore { + if (!_staleBeforeSet && _apiMapResponse.containsKey('stale_before')) { + _staleBefore = _apiMapResponse['stale_before']; + _staleBeforeSet = true; + } + return _staleBefore; + } + + set staleBefore(int v) { + _staleBefore = v; + _staleBeforeSet = true; + } + + /// UNIX timestamp at which this entry trigger was last checked. (read-only) + + int get triggerCheckAt { + if (!_triggerCheckAtSet && + _apiMapResponse.containsKey('trigger_check_at')) { + _triggerCheckAt = _apiMapResponse['trigger_check_at']; + _triggerCheckAtSet = true; + } + return _triggerCheckAt; + } + + set triggerCheckAt(int v) { + _triggerCheckAt = v; + _triggerCheckAtSet = true; + } + + /// The message returned with the error of the last trigger check. (read-only) + + String get triggerError { + if (!_triggerErrorSet && _apiMapResponse.containsKey('trigger_error')) { + _triggerError = _apiMapResponse['trigger_error'] == null + ? null + : _apiMapResponse['trigger_error'].toString(); + _triggerErrorSet = true; + } + return _triggerError; + } + + set triggerError(String v) { + _triggerError = v; + _triggerErrorSet = true; + } + + /// The value of the trigger when last checked. (read-only) + + String get triggerValue { + if (!_triggerValueSet && _apiMapResponse.containsKey('trigger_value')) { + _triggerValue = _apiMapResponse['trigger_value'] == null + ? null + : _apiMapResponse['trigger_value'].toString(); + _triggerValueSet = true; + } + return _triggerValue; + } + + set triggerValue(String v) { + _triggerValue = v; + _triggerValueSet = true; + } + + /// UNIX timestamp at which this entry became triggered. Cannot be in the future. + + int get triggeredAt { + if (!_triggeredAtSet && _apiMapResponse.containsKey('triggered_at')) { + _triggeredAt = _apiMapResponse['triggered_at']; + _triggeredAtSet = true; + } + return _triggeredAt; + } + + set triggeredAt(int v) { + _triggeredAt = v; + _triggeredAtSet = true; + } + + Datagroup() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Datagroup.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_modelNameSet || _apiMapResponse.containsKey('model_name')) { + json['model_name'] = modelName; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_staleBeforeSet || _apiMapResponse.containsKey('stale_before')) { + json['stale_before'] = staleBefore; + } + if (_triggerCheckAtSet || _apiMapResponse.containsKey('trigger_check_at')) { + json['trigger_check_at'] = triggerCheckAt; + } + if (_triggerErrorSet || _apiMapResponse.containsKey('trigger_error')) { + json['trigger_error'] = triggerError; + } + if (_triggerValueSet || _apiMapResponse.containsKey('trigger_value')) { + json['trigger_value'] = triggerValue; + } + if (_triggeredAtSet || _apiMapResponse.containsKey('triggered_at')) { + json['triggered_at'] = triggeredAt; + } + return json; + } +} + +class DBConnection { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _name; + bool _nameSet = false; + + Dialect _dialect; + bool _dialectSet = false; + + List _snippets; + bool _snippetsSet = false; + + bool _pdtsEnabled; + bool _pdtsEnabledSet = false; + + String _host; + bool _hostSet = false; + + String _port; + bool _portSet = false; + + String _username; + bool _usernameSet = false; + + String _password; + bool _passwordSet = false; + + bool _usesOauth; + bool _usesOauthSet = false; + + String _certificate; + bool _certificateSet = false; + + String _fileType; + bool _fileTypeSet = false; + + String _database; + bool _databaseSet = false; + + String _dbTimezone; + bool _dbTimezoneSet = false; + + String _queryTimezone; + bool _queryTimezoneSet = false; + + String _schema; + bool _schemaSet = false; + + int _maxConnections; + bool _maxConnectionsSet = false; + + String _maxBillingGigabytes; + bool _maxBillingGigabytesSet = false; + + bool _ssl; + bool _sslSet = false; + + bool _verifySsl; + bool _verifySslSet = false; + + String _tmpDbName; + bool _tmpDbNameSet = false; + + String _jdbcAdditionalParams; + bool _jdbcAdditionalParamsSet = false; + + int _poolTimeout; + bool _poolTimeoutSet = false; + + String _dialectName; + bool _dialectNameSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _userId; + bool _userIdSet = false; + + bool _example; + bool _exampleSet = false; + + bool _userDbCredentials; + bool _userDbCredentialsSet = false; + + List _userAttributeFields; + bool _userAttributeFieldsSet = false; + + String _maintenanceCron; + bool _maintenanceCronSet = false; + + String _lastRegenAt; + bool _lastRegenAtSet = false; + + String _lastReapAt; + bool _lastReapAtSet = false; + + bool _sqlRunnerPrecacheTables; + bool _sqlRunnerPrecacheTablesSet = false; + + bool _sqlWritingWithInfoSchema; + bool _sqlWritingWithInfoSchemaSet = false; + + String _afterConnectStatements; + bool _afterConnectStatementsSet = false; + + DBConnectionOverride _pdtContextOverride; + bool _pdtContextOverrideSet = false; + + bool _managed; + bool _managedSet = false; + + String _tunnelId; + bool _tunnelIdSet = false; + + int _pdtConcurrency; + bool _pdtConcurrencySet = false; + + bool _disableContextComment; + bool _disableContextCommentSet = false; + + int _oauthApplicationId; + bool _oauthApplicationIdSet = false; + + bool _alwaysRetryFailedBuilds; + bool _alwaysRetryFailedBuildsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Name of the connection. Also used as the unique identifier + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + Dialect get dialect { + if (!_dialectSet && _apiMapResponse.containsKey('dialect')) { + _dialect = _apiMapResponse['dialect'] == null + ? null + : Dialect.fromResponse( + _apiMapResponse['dialect'], apiResponseContentType); + _dialectSet = true; + } + return _dialect; + } + + set dialect(Dialect v) { + _dialect = v; + _dialectSet = true; + } + + /// SQL Runner snippets for this connection (read-only) + + List get snippets { + if (!_snippetsSet && _apiMapResponse.containsKey('snippets')) { + _snippets = _apiMapResponse['snippets'] == null + ? null + : (_apiMapResponse['snippets'] as List) + .map((i) => Snippet.fromResponse(i, apiResponseContentType)) + .toList(); + _snippetsSet = true; + } + return _snippets; + } + + set snippets(List v) { + _snippets = v; + _snippetsSet = true; + } + + /// True if PDTs are enabled on this connection (read-only) + + bool get pdtsEnabled { + if (!_pdtsEnabledSet && _apiMapResponse.containsKey('pdts_enabled')) { + _pdtsEnabled = _apiMapResponse['pdts_enabled']; + _pdtsEnabledSet = true; + } + return _pdtsEnabled; + } + + set pdtsEnabled(bool v) { + _pdtsEnabled = v; + _pdtsEnabledSet = true; + } + + /// Host name/address of server + + String get host { + if (!_hostSet && _apiMapResponse.containsKey('host')) { + _host = _apiMapResponse['host'] == null + ? null + : _apiMapResponse['host'].toString(); + _hostSet = true; + } + return _host; + } + + set host(String v) { + _host = v; + _hostSet = true; + } + + /// Port number on server + + String get port { + if (!_portSet && _apiMapResponse.containsKey('port')) { + _port = _apiMapResponse['port'] == null + ? null + : _apiMapResponse['port'].toString(); + _portSet = true; + } + return _port; + } + + set port(String v) { + _port = v; + _portSet = true; + } + + /// Username for server authentication + + String get username { + if (!_usernameSet && _apiMapResponse.containsKey('username')) { + _username = _apiMapResponse['username'] == null + ? null + : _apiMapResponse['username'].toString(); + _usernameSet = true; + } + return _username; + } + + set username(String v) { + _username = v; + _usernameSet = true; + } + + /// (Write-Only) Password for server authentication + + String get password { + if (!_passwordSet && _apiMapResponse.containsKey('password')) { + _password = _apiMapResponse['password'] == null + ? null + : _apiMapResponse['password'].toString(); + _passwordSet = true; + } + return _password; + } + + set password(String v) { + _password = v; + _passwordSet = true; + } + + /// Whether the connection uses OAuth for authentication. (read-only) + + bool get usesOauth { + if (!_usesOauthSet && _apiMapResponse.containsKey('uses_oauth')) { + _usesOauth = _apiMapResponse['uses_oauth']; + _usesOauthSet = true; + } + return _usesOauth; + } + + set usesOauth(bool v) { + _usesOauth = v; + _usesOauthSet = true; + } + + /// (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). + + String get certificate { + if (!_certificateSet && _apiMapResponse.containsKey('certificate')) { + _certificate = _apiMapResponse['certificate'] == null + ? null + : _apiMapResponse['certificate'].toString(); + _certificateSet = true; + } + return _certificate; + } + + set certificate(String v) { + _certificate = v; + _certificateSet = true; + } + + /// (Write-Only) Certificate keyfile type - .json or .p12 + + String get fileType { + if (!_fileTypeSet && _apiMapResponse.containsKey('file_type')) { + _fileType = _apiMapResponse['file_type'] == null + ? null + : _apiMapResponse['file_type'].toString(); + _fileTypeSet = true; + } + return _fileType; + } + + set fileType(String v) { + _fileType = v; + _fileTypeSet = true; + } + + /// Database name + + String get database { + if (!_databaseSet && _apiMapResponse.containsKey('database')) { + _database = _apiMapResponse['database'] == null + ? null + : _apiMapResponse['database'].toString(); + _databaseSet = true; + } + return _database; + } + + set database(String v) { + _database = v; + _databaseSet = true; + } + + /// Time zone of database + + String get dbTimezone { + if (!_dbTimezoneSet && _apiMapResponse.containsKey('db_timezone')) { + _dbTimezone = _apiMapResponse['db_timezone'] == null + ? null + : _apiMapResponse['db_timezone'].toString(); + _dbTimezoneSet = true; + } + return _dbTimezone; + } + + set dbTimezone(String v) { + _dbTimezone = v; + _dbTimezoneSet = true; + } + + /// Timezone to use in queries + + String get queryTimezone { + if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { + _queryTimezone = _apiMapResponse['query_timezone'] == null + ? null + : _apiMapResponse['query_timezone'].toString(); + _queryTimezoneSet = true; + } + return _queryTimezone; + } + + set queryTimezone(String v) { + _queryTimezone = v; + _queryTimezoneSet = true; + } + + /// Scheme name + + String get schema { + if (!_schemaSet && _apiMapResponse.containsKey('schema')) { + _schema = _apiMapResponse['schema'] == null + ? null + : _apiMapResponse['schema'].toString(); + _schemaSet = true; + } + return _schema; + } + + set schema(String v) { + _schema = v; + _schemaSet = true; + } + + /// Maximum number of concurrent connection to use + + int get maxConnections { + if (!_maxConnectionsSet && _apiMapResponse.containsKey('max_connections')) { + _maxConnections = _apiMapResponse['max_connections']; + _maxConnectionsSet = true; + } + return _maxConnections; + } + + set maxConnections(int v) { + _maxConnections = v; + _maxConnectionsSet = true; + } + + /// Maximum size of query in GBs (BigQuery only, can be a user_attribute name) + + String get maxBillingGigabytes { + if (!_maxBillingGigabytesSet && + _apiMapResponse.containsKey('max_billing_gigabytes')) { + _maxBillingGigabytes = _apiMapResponse['max_billing_gigabytes'] == null + ? null + : _apiMapResponse['max_billing_gigabytes'].toString(); + _maxBillingGigabytesSet = true; + } + return _maxBillingGigabytes; + } + + set maxBillingGigabytes(String v) { + _maxBillingGigabytes = v; + _maxBillingGigabytesSet = true; + } + + /// Use SSL/TLS when connecting to server + + bool get ssl { + if (!_sslSet && _apiMapResponse.containsKey('ssl')) { + _ssl = _apiMapResponse['ssl']; + _sslSet = true; + } + return _ssl; + } + + set ssl(bool v) { + _ssl = v; + _sslSet = true; + } + + /// Verify the SSL + + bool get verifySsl { + if (!_verifySslSet && _apiMapResponse.containsKey('verify_ssl')) { + _verifySsl = _apiMapResponse['verify_ssl']; + _verifySslSet = true; + } + return _verifySsl; + } + + set verifySsl(bool v) { + _verifySsl = v; + _verifySslSet = true; + } + + /// Name of temporary database (if used) + + String get tmpDbName { + if (!_tmpDbNameSet && _apiMapResponse.containsKey('tmp_db_name')) { + _tmpDbName = _apiMapResponse['tmp_db_name'] == null + ? null + : _apiMapResponse['tmp_db_name'].toString(); + _tmpDbNameSet = true; + } + return _tmpDbName; + } + + set tmpDbName(String v) { + _tmpDbName = v; + _tmpDbNameSet = true; + } + + /// Additional params to add to JDBC connection string + + String get jdbcAdditionalParams { + if (!_jdbcAdditionalParamsSet && + _apiMapResponse.containsKey('jdbc_additional_params')) { + _jdbcAdditionalParams = _apiMapResponse['jdbc_additional_params'] == null + ? null + : _apiMapResponse['jdbc_additional_params'].toString(); + _jdbcAdditionalParamsSet = true; + } + return _jdbcAdditionalParams; + } + + set jdbcAdditionalParams(String v) { + _jdbcAdditionalParams = v; + _jdbcAdditionalParamsSet = true; + } + + /// Connection Pool Timeout, in seconds + + int get poolTimeout { + if (!_poolTimeoutSet && _apiMapResponse.containsKey('pool_timeout')) { + _poolTimeout = _apiMapResponse['pool_timeout']; + _poolTimeoutSet = true; + } + return _poolTimeout; + } + + set poolTimeout(int v) { + _poolTimeout = v; + _poolTimeoutSet = true; + } + + /// (Read/Write) SQL Dialect name + + String get dialectName { + if (!_dialectNameSet && _apiMapResponse.containsKey('dialect_name')) { + _dialectName = _apiMapResponse['dialect_name'] == null + ? null + : _apiMapResponse['dialect_name'].toString(); + _dialectNameSet = true; + } + return _dialectName; + } + + set dialectName(String v) { + _dialectName = v; + _dialectNameSet = true; + } + + /// Creation date for this connection (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Id of user who last modified this connection configuration (read-only) + + String get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id'] == null + ? null + : _apiMapResponse['user_id'].toString(); + _userIdSet = true; + } + return _userId; + } + + set userId(String v) { + _userId = v; + _userIdSet = true; + } + + /// Is this an example connection? (read-only) + + bool get example { + if (!_exampleSet && _apiMapResponse.containsKey('example')) { + _example = _apiMapResponse['example']; + _exampleSet = true; + } + return _example; + } + + set example(bool v) { + _example = v; + _exampleSet = true; + } + + /// (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password + + bool get userDbCredentials { + if (!_userDbCredentialsSet && + _apiMapResponse.containsKey('user_db_credentials')) { + _userDbCredentials = _apiMapResponse['user_db_credentials']; + _userDbCredentialsSet = true; + } + return _userDbCredentials; + } + + set userDbCredentials(bool v) { + _userDbCredentials = v; + _userDbCredentialsSet = true; + } + + /// Fields whose values map to user attribute names + + List get userAttributeFields { + if (!_userAttributeFieldsSet && + _apiMapResponse.containsKey('user_attribute_fields')) { + _userAttributeFields = _apiMapResponse['user_attribute_fields'] == null + ? null + : _apiMapResponse['user_attribute_fields'] + .map((i) => i as String) + .toList(); + _userAttributeFieldsSet = true; + } + return _userAttributeFields; + } + + set userAttributeFields(List v) { + _userAttributeFields = v; + _userAttributeFieldsSet = true; + } + + /// Cron string specifying when maintenance such as PDT trigger checks and drops should be performed + + String get maintenanceCron { + if (!_maintenanceCronSet && + _apiMapResponse.containsKey('maintenance_cron')) { + _maintenanceCron = _apiMapResponse['maintenance_cron'] == null + ? null + : _apiMapResponse['maintenance_cron'].toString(); + _maintenanceCronSet = true; + } + return _maintenanceCron; + } + + set maintenanceCron(String v) { + _maintenanceCron = v; + _maintenanceCronSet = true; + } + + /// Unix timestamp at start of last completed PDT trigger check process (read-only) + + String get lastRegenAt { + if (!_lastRegenAtSet && _apiMapResponse.containsKey('last_regen_at')) { + _lastRegenAt = _apiMapResponse['last_regen_at'] == null + ? null + : _apiMapResponse['last_regen_at'].toString(); + _lastRegenAtSet = true; + } + return _lastRegenAt; + } + + set lastRegenAt(String v) { + _lastRegenAt = v; + _lastRegenAtSet = true; + } + + /// Unix timestamp at start of last completed PDT reap process (read-only) + + String get lastReapAt { + if (!_lastReapAtSet && _apiMapResponse.containsKey('last_reap_at')) { + _lastReapAt = _apiMapResponse['last_reap_at'] == null + ? null + : _apiMapResponse['last_reap_at'].toString(); + _lastReapAtSet = true; + } + return _lastReapAt; + } + + set lastReapAt(String v) { + _lastReapAt = v; + _lastReapAtSet = true; + } + + /// Precache tables in the SQL Runner + + bool get sqlRunnerPrecacheTables { + if (!_sqlRunnerPrecacheTablesSet && + _apiMapResponse.containsKey('sql_runner_precache_tables')) { + _sqlRunnerPrecacheTables = _apiMapResponse['sql_runner_precache_tables']; + _sqlRunnerPrecacheTablesSet = true; + } + return _sqlRunnerPrecacheTables; + } + + set sqlRunnerPrecacheTables(bool v) { + _sqlRunnerPrecacheTables = v; + _sqlRunnerPrecacheTablesSet = true; + } + + /// Fetch Information Schema For SQL Writing + + bool get sqlWritingWithInfoSchema { + if (!_sqlWritingWithInfoSchemaSet && + _apiMapResponse.containsKey('sql_writing_with_info_schema')) { + _sqlWritingWithInfoSchema = + _apiMapResponse['sql_writing_with_info_schema']; + _sqlWritingWithInfoSchemaSet = true; + } + return _sqlWritingWithInfoSchema; + } + + set sqlWritingWithInfoSchema(bool v) { + _sqlWritingWithInfoSchema = v; + _sqlWritingWithInfoSchemaSet = true; + } + + /// SQL statements (semicolon separated) to issue after connecting to the database. Requires `custom_after_connect_statements` license feature + + String get afterConnectStatements { + if (!_afterConnectStatementsSet && + _apiMapResponse.containsKey('after_connect_statements')) { + _afterConnectStatements = + _apiMapResponse['after_connect_statements'] == null + ? null + : _apiMapResponse['after_connect_statements'].toString(); + _afterConnectStatementsSet = true; + } + return _afterConnectStatements; + } + + set afterConnectStatements(String v) { + _afterConnectStatements = v; + _afterConnectStatementsSet = true; + } + + DBConnectionOverride get pdtContextOverride { + if (!_pdtContextOverrideSet && + _apiMapResponse.containsKey('pdt_context_override')) { + _pdtContextOverride = _apiMapResponse['pdt_context_override'] == null + ? null + : DBConnectionOverride.fromResponse( + _apiMapResponse['pdt_context_override'], apiResponseContentType); + _pdtContextOverrideSet = true; + } + return _pdtContextOverride; + } + + set pdtContextOverride(DBConnectionOverride v) { + _pdtContextOverride = v; + _pdtContextOverrideSet = true; + } + + /// Is this connection created and managed by Looker (read-only) + + bool get managed { + if (!_managedSet && _apiMapResponse.containsKey('managed')) { + _managed = _apiMapResponse['managed']; + _managedSet = true; + } + return _managed; + } + + set managed(bool v) { + _managed = v; + _managedSet = true; + } + + /// The Id of the ssh tunnel this connection uses + + String get tunnelId { + if (!_tunnelIdSet && _apiMapResponse.containsKey('tunnel_id')) { + _tunnelId = _apiMapResponse['tunnel_id'] == null + ? null + : _apiMapResponse['tunnel_id'].toString(); + _tunnelIdSet = true; + } + return _tunnelId; + } + + set tunnelId(String v) { + _tunnelId = v; + _tunnelIdSet = true; + } + + /// Maximum number of threads to use to build PDTs in parallel + + int get pdtConcurrency { + if (!_pdtConcurrencySet && _apiMapResponse.containsKey('pdt_concurrency')) { + _pdtConcurrency = _apiMapResponse['pdt_concurrency']; + _pdtConcurrencySet = true; + } + return _pdtConcurrency; + } + + set pdtConcurrency(int v) { + _pdtConcurrency = v; + _pdtConcurrencySet = true; + } + + /// When disable_context_comment is true comment will not be added to SQL + + bool get disableContextComment { + if (!_disableContextCommentSet && + _apiMapResponse.containsKey('disable_context_comment')) { + _disableContextComment = _apiMapResponse['disable_context_comment']; + _disableContextCommentSet = true; + } + return _disableContextComment; + } + + set disableContextComment(bool v) { + _disableContextComment = v; + _disableContextCommentSet = true; + } + + /// An External OAuth Application to use for authenticating to the database + + int get oauthApplicationId { + if (!_oauthApplicationIdSet && + _apiMapResponse.containsKey('oauth_application_id')) { + _oauthApplicationId = _apiMapResponse['oauth_application_id']; + _oauthApplicationIdSet = true; + } + return _oauthApplicationId; + } + + set oauthApplicationId(int v) { + _oauthApplicationId = v; + _oauthApplicationIdSet = true; + } + + /// When true, error PDTs will be retried every regenerator cycle + + bool get alwaysRetryFailedBuilds { + if (!_alwaysRetryFailedBuildsSet && + _apiMapResponse.containsKey('always_retry_failed_builds')) { + _alwaysRetryFailedBuilds = _apiMapResponse['always_retry_failed_builds']; + _alwaysRetryFailedBuildsSet = true; + } + return _alwaysRetryFailedBuilds; + } + + set alwaysRetryFailedBuilds(bool v) { + _alwaysRetryFailedBuilds = v; + _alwaysRetryFailedBuildsSet = true; + } + + DBConnection() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DBConnection.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_dialectSet || _apiMapResponse.containsKey('dialect')) { + json['dialect'] = dialect == null ? null : dialect.toJson(); + } + if (_snippetsSet || _apiMapResponse.containsKey('snippets')) { + json['snippets'] = + snippets == null ? null : snippets.map((i) => i.toJson()).toList(); + } + if (_pdtsEnabledSet || _apiMapResponse.containsKey('pdts_enabled')) { + json['pdts_enabled'] = pdtsEnabled; + } + if (_hostSet || _apiMapResponse.containsKey('host')) { + json['host'] = host; + } + if (_portSet || _apiMapResponse.containsKey('port')) { + json['port'] = port; + } + if (_usernameSet || _apiMapResponse.containsKey('username')) { + json['username'] = username; + } + if (_passwordSet || _apiMapResponse.containsKey('password')) { + json['password'] = password; + } + if (_usesOauthSet || _apiMapResponse.containsKey('uses_oauth')) { + json['uses_oauth'] = usesOauth; + } + if (_certificateSet || _apiMapResponse.containsKey('certificate')) { + json['certificate'] = certificate; + } + if (_fileTypeSet || _apiMapResponse.containsKey('file_type')) { + json['file_type'] = fileType; + } + if (_databaseSet || _apiMapResponse.containsKey('database')) { + json['database'] = database; + } + if (_dbTimezoneSet || _apiMapResponse.containsKey('db_timezone')) { + json['db_timezone'] = dbTimezone; + } + if (_queryTimezoneSet || _apiMapResponse.containsKey('query_timezone')) { + json['query_timezone'] = queryTimezone; + } + if (_schemaSet || _apiMapResponse.containsKey('schema')) { + json['schema'] = schema; + } + if (_maxConnectionsSet || _apiMapResponse.containsKey('max_connections')) { + json['max_connections'] = maxConnections; + } + if (_maxBillingGigabytesSet || + _apiMapResponse.containsKey('max_billing_gigabytes')) { + json['max_billing_gigabytes'] = maxBillingGigabytes; + } + if (_sslSet || _apiMapResponse.containsKey('ssl')) { + json['ssl'] = ssl; + } + if (_verifySslSet || _apiMapResponse.containsKey('verify_ssl')) { + json['verify_ssl'] = verifySsl; + } + if (_tmpDbNameSet || _apiMapResponse.containsKey('tmp_db_name')) { + json['tmp_db_name'] = tmpDbName; + } + if (_jdbcAdditionalParamsSet || + _apiMapResponse.containsKey('jdbc_additional_params')) { + json['jdbc_additional_params'] = jdbcAdditionalParams; + } + if (_poolTimeoutSet || _apiMapResponse.containsKey('pool_timeout')) { + json['pool_timeout'] = poolTimeout; + } + if (_dialectNameSet || _apiMapResponse.containsKey('dialect_name')) { + json['dialect_name'] = dialectName; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_exampleSet || _apiMapResponse.containsKey('example')) { + json['example'] = example; + } + if (_userDbCredentialsSet || + _apiMapResponse.containsKey('user_db_credentials')) { + json['user_db_credentials'] = userDbCredentials; + } + if (_userAttributeFieldsSet || + _apiMapResponse.containsKey('user_attribute_fields')) { + json['user_attribute_fields'] = userAttributeFields; + } + if (_maintenanceCronSet || + _apiMapResponse.containsKey('maintenance_cron')) { + json['maintenance_cron'] = maintenanceCron; + } + if (_lastRegenAtSet || _apiMapResponse.containsKey('last_regen_at')) { + json['last_regen_at'] = lastRegenAt; + } + if (_lastReapAtSet || _apiMapResponse.containsKey('last_reap_at')) { + json['last_reap_at'] = lastReapAt; + } + if (_sqlRunnerPrecacheTablesSet || + _apiMapResponse.containsKey('sql_runner_precache_tables')) { + json['sql_runner_precache_tables'] = sqlRunnerPrecacheTables; + } + if (_sqlWritingWithInfoSchemaSet || + _apiMapResponse.containsKey('sql_writing_with_info_schema')) { + json['sql_writing_with_info_schema'] = sqlWritingWithInfoSchema; + } + if (_afterConnectStatementsSet || + _apiMapResponse.containsKey('after_connect_statements')) { + json['after_connect_statements'] = afterConnectStatements; + } + if (_pdtContextOverrideSet || + _apiMapResponse.containsKey('pdt_context_override')) { + json['pdt_context_override'] = + pdtContextOverride == null ? null : pdtContextOverride.toJson(); + } + if (_managedSet || _apiMapResponse.containsKey('managed')) { + json['managed'] = managed; + } + if (_tunnelIdSet || _apiMapResponse.containsKey('tunnel_id')) { + json['tunnel_id'] = tunnelId; + } + if (_pdtConcurrencySet || _apiMapResponse.containsKey('pdt_concurrency')) { + json['pdt_concurrency'] = pdtConcurrency; + } + if (_disableContextCommentSet || + _apiMapResponse.containsKey('disable_context_comment')) { + json['disable_context_comment'] = disableContextComment; + } + if (_oauthApplicationIdSet || + _apiMapResponse.containsKey('oauth_application_id')) { + json['oauth_application_id'] = oauthApplicationId; + } + if (_alwaysRetryFailedBuildsSet || + _apiMapResponse.containsKey('always_retry_failed_builds')) { + json['always_retry_failed_builds'] = alwaysRetryFailedBuilds; + } + return json; + } +} + +class DBConnectionBase { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _name; + bool _nameSet = false; + + Dialect _dialect; + bool _dialectSet = false; + + List _snippets; + bool _snippetsSet = false; + + bool _pdtsEnabled; + bool _pdtsEnabledSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Name of the connection. Also used as the unique identifier (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + Dialect get dialect { + if (!_dialectSet && _apiMapResponse.containsKey('dialect')) { + _dialect = _apiMapResponse['dialect'] == null + ? null + : Dialect.fromResponse( + _apiMapResponse['dialect'], apiResponseContentType); + _dialectSet = true; + } + return _dialect; + } + + set dialect(Dialect v) { + _dialect = v; + _dialectSet = true; + } + + /// SQL Runner snippets for this connection (read-only) + + List get snippets { + if (!_snippetsSet && _apiMapResponse.containsKey('snippets')) { + _snippets = _apiMapResponse['snippets'] == null + ? null + : (_apiMapResponse['snippets'] as List) + .map((i) => Snippet.fromResponse(i, apiResponseContentType)) + .toList(); + _snippetsSet = true; + } + return _snippets; + } + + set snippets(List v) { + _snippets = v; + _snippetsSet = true; + } + + /// True if PDTs are enabled on this connection (read-only) + + bool get pdtsEnabled { + if (!_pdtsEnabledSet && _apiMapResponse.containsKey('pdts_enabled')) { + _pdtsEnabled = _apiMapResponse['pdts_enabled']; + _pdtsEnabledSet = true; + } + return _pdtsEnabled; + } + + set pdtsEnabled(bool v) { + _pdtsEnabled = v; + _pdtsEnabledSet = true; + } + + DBConnectionBase() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DBConnectionBase.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_dialectSet || _apiMapResponse.containsKey('dialect')) { + json['dialect'] = dialect == null ? null : dialect.toJson(); + } + if (_snippetsSet || _apiMapResponse.containsKey('snippets')) { + json['snippets'] = + snippets == null ? null : snippets.map((i) => i.toJson()).toList(); + } + if (_pdtsEnabledSet || _apiMapResponse.containsKey('pdts_enabled')) { + json['pdts_enabled'] = pdtsEnabled; + } + return json; + } +} + +class DBConnectionOverride { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _context; + bool _contextSet = false; + + String _host; + bool _hostSet = false; + + String _port; + bool _portSet = false; + + String _username; + bool _usernameSet = false; + + String _password; + bool _passwordSet = false; + + bool _hasPassword; + bool _hasPasswordSet = false; + + String _certificate; + bool _certificateSet = false; + + String _fileType; + bool _fileTypeSet = false; + + String _database; + bool _databaseSet = false; + + String _schema; + bool _schemaSet = false; + + String _jdbcAdditionalParams; + bool _jdbcAdditionalParamsSet = false; + + String _afterConnectStatements; + bool _afterConnectStatementsSet = false; + + /// Context in which to override (`pdt` is the only allowed value) + + String get context { + if (!_contextSet && _apiMapResponse.containsKey('context')) { + _context = _apiMapResponse['context'] == null + ? null + : _apiMapResponse['context'].toString(); + _contextSet = true; + } + return _context; + } + + set context(String v) { + _context = v; + _contextSet = true; + } + + /// Host name/address of server + + String get host { + if (!_hostSet && _apiMapResponse.containsKey('host')) { + _host = _apiMapResponse['host'] == null + ? null + : _apiMapResponse['host'].toString(); + _hostSet = true; + } + return _host; + } + + set host(String v) { + _host = v; + _hostSet = true; + } + + /// Port number on server + + String get port { + if (!_portSet && _apiMapResponse.containsKey('port')) { + _port = _apiMapResponse['port'] == null + ? null + : _apiMapResponse['port'].toString(); + _portSet = true; + } + return _port; + } + + set port(String v) { + _port = v; + _portSet = true; + } + + /// Username for server authentication + + String get username { + if (!_usernameSet && _apiMapResponse.containsKey('username')) { + _username = _apiMapResponse['username'] == null + ? null + : _apiMapResponse['username'].toString(); + _usernameSet = true; + } + return _username; + } + + set username(String v) { + _username = v; + _usernameSet = true; + } + + /// (Write-Only) Password for server authentication + + String get password { + if (!_passwordSet && _apiMapResponse.containsKey('password')) { + _password = _apiMapResponse['password'] == null + ? null + : _apiMapResponse['password'].toString(); + _passwordSet = true; + } + return _password; + } + + set password(String v) { + _password = v; + _passwordSet = true; + } + + /// Whether or not the password is overridden in this context (read-only) + + bool get hasPassword { + if (!_hasPasswordSet && _apiMapResponse.containsKey('has_password')) { + _hasPassword = _apiMapResponse['has_password']; + _hasPasswordSet = true; + } + return _hasPassword; + } + + set hasPassword(bool v) { + _hasPassword = v; + _hasPasswordSet = true; + } + + /// (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). + + String get certificate { + if (!_certificateSet && _apiMapResponse.containsKey('certificate')) { + _certificate = _apiMapResponse['certificate'] == null + ? null + : _apiMapResponse['certificate'].toString(); + _certificateSet = true; + } + return _certificate; + } + + set certificate(String v) { + _certificate = v; + _certificateSet = true; + } + + /// (Write-Only) Certificate keyfile type - .json or .p12 + + String get fileType { + if (!_fileTypeSet && _apiMapResponse.containsKey('file_type')) { + _fileType = _apiMapResponse['file_type'] == null + ? null + : _apiMapResponse['file_type'].toString(); + _fileTypeSet = true; + } + return _fileType; + } + + set fileType(String v) { + _fileType = v; + _fileTypeSet = true; + } + + /// Database name + + String get database { + if (!_databaseSet && _apiMapResponse.containsKey('database')) { + _database = _apiMapResponse['database'] == null + ? null + : _apiMapResponse['database'].toString(); + _databaseSet = true; + } + return _database; + } + + set database(String v) { + _database = v; + _databaseSet = true; + } + + /// Scheme name + + String get schema { + if (!_schemaSet && _apiMapResponse.containsKey('schema')) { + _schema = _apiMapResponse['schema'] == null + ? null + : _apiMapResponse['schema'].toString(); + _schemaSet = true; + } + return _schema; + } + + set schema(String v) { + _schema = v; + _schemaSet = true; + } + + /// Additional params to add to JDBC connection string + + String get jdbcAdditionalParams { + if (!_jdbcAdditionalParamsSet && + _apiMapResponse.containsKey('jdbc_additional_params')) { + _jdbcAdditionalParams = _apiMapResponse['jdbc_additional_params'] == null + ? null + : _apiMapResponse['jdbc_additional_params'].toString(); + _jdbcAdditionalParamsSet = true; + } + return _jdbcAdditionalParams; + } + + set jdbcAdditionalParams(String v) { + _jdbcAdditionalParams = v; + _jdbcAdditionalParamsSet = true; + } + + /// SQL statements (semicolon separated) to issue after connecting to the database. Requires `custom_after_connect_statements` license feature + + String get afterConnectStatements { + if (!_afterConnectStatementsSet && + _apiMapResponse.containsKey('after_connect_statements')) { + _afterConnectStatements = + _apiMapResponse['after_connect_statements'] == null + ? null + : _apiMapResponse['after_connect_statements'].toString(); + _afterConnectStatementsSet = true; + } + return _afterConnectStatements; + } + + set afterConnectStatements(String v) { + _afterConnectStatements = v; + _afterConnectStatementsSet = true; + } + + DBConnectionOverride() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DBConnectionOverride.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_contextSet || _apiMapResponse.containsKey('context')) { + json['context'] = context; + } + if (_hostSet || _apiMapResponse.containsKey('host')) { + json['host'] = host; + } + if (_portSet || _apiMapResponse.containsKey('port')) { + json['port'] = port; + } + if (_usernameSet || _apiMapResponse.containsKey('username')) { + json['username'] = username; + } + if (_passwordSet || _apiMapResponse.containsKey('password')) { + json['password'] = password; + } + if (_hasPasswordSet || _apiMapResponse.containsKey('has_password')) { + json['has_password'] = hasPassword; + } + if (_certificateSet || _apiMapResponse.containsKey('certificate')) { + json['certificate'] = certificate; + } + if (_fileTypeSet || _apiMapResponse.containsKey('file_type')) { + json['file_type'] = fileType; + } + if (_databaseSet || _apiMapResponse.containsKey('database')) { + json['database'] = database; + } + if (_schemaSet || _apiMapResponse.containsKey('schema')) { + json['schema'] = schema; + } + if (_jdbcAdditionalParamsSet || + _apiMapResponse.containsKey('jdbc_additional_params')) { + json['jdbc_additional_params'] = jdbcAdditionalParams; + } + if (_afterConnectStatementsSet || + _apiMapResponse.containsKey('after_connect_statements')) { + json['after_connect_statements'] = afterConnectStatements; + } + return json; + } +} + +class DBConnectionTestResult { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _connectionString; + bool _connectionStringSet = false; + + String _message; + bool _messageSet = false; + + String _name; + bool _nameSet = false; + + String _status; + bool _statusSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// JDBC connection string. (only populated in the 'connect' test) (read-only) + + String get connectionString { + if (!_connectionStringSet && + _apiMapResponse.containsKey('connection_string')) { + _connectionString = _apiMapResponse['connection_string'] == null + ? null + : _apiMapResponse['connection_string'].toString(); + _connectionStringSet = true; + } + return _connectionString; + } + + set connectionString(String v) { + _connectionString = v; + _connectionStringSet = true; + } + + /// Result message of test (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Name of test (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Result code of test (read-only) + + String get status { + if (!_statusSet && _apiMapResponse.containsKey('status')) { + _status = _apiMapResponse['status'] == null + ? null + : _apiMapResponse['status'].toString(); + _statusSet = true; + } + return _status; + } + + set status(String v) { + _status = v; + _statusSet = true; + } + + DBConnectionTestResult() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DBConnectionTestResult.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_connectionStringSet || + _apiMapResponse.containsKey('connection_string')) { + json['connection_string'] = connectionString; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_statusSet || _apiMapResponse.containsKey('status')) { + json['status'] = status; + } + return json; + } +} + +class DelegateOauthTest { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _installationTargetId; + bool _installationTargetIdSet = false; + + int _installationId; + bool _installationIdSet = false; + + bool _success; + bool _successSet = false; + + /// Delegate Oauth Connection Name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// The ID of the installation target. For Slack, this would be workspace id. (read-only) + + String get installationTargetId { + if (!_installationTargetIdSet && + _apiMapResponse.containsKey('installation_target_id')) { + _installationTargetId = _apiMapResponse['installation_target_id'] == null + ? null + : _apiMapResponse['installation_target_id'].toString(); + _installationTargetIdSet = true; + } + return _installationTargetId; + } + + set installationTargetId(String v) { + _installationTargetId = v; + _installationTargetIdSet = true; + } + + /// Installation ID (read-only) + + int get installationId { + if (!_installationIdSet && _apiMapResponse.containsKey('installation_id')) { + _installationId = _apiMapResponse['installation_id']; + _installationIdSet = true; + } + return _installationId; + } + + set installationId(int v) { + _installationId = v; + _installationIdSet = true; + } + + /// Whether or not the test was successful (read-only) + + bool get success { + if (!_successSet && _apiMapResponse.containsKey('success')) { + _success = _apiMapResponse['success']; + _successSet = true; + } + return _success; + } + + set success(bool v) { + _success = v; + _successSet = true; + } + + DelegateOauthTest() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DelegateOauthTest.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_installationTargetIdSet || + _apiMapResponse.containsKey('installation_target_id')) { + json['installation_target_id'] = installationTargetId; + } + if (_installationIdSet || _apiMapResponse.containsKey('installation_id')) { + json['installation_id'] = installationId; + } + if (_successSet || _apiMapResponse.containsKey('success')) { + json['success'] = success; + } + return json; + } +} + +class DependencyGraph { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _graphText; + bool _graphTextSet = false; + + /// The graph structure in the dot language that can be rendered into an image. (read-only) + + String get graphText { + if (!_graphTextSet && _apiMapResponse.containsKey('graph_text')) { + _graphText = _apiMapResponse['graph_text'] == null + ? null + : _apiMapResponse['graph_text'].toString(); + _graphTextSet = true; + } + return _graphText; + } + + set graphText(String v) { + _graphText = v; + _graphTextSet = true; + } + + DependencyGraph() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DependencyGraph.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_graphTextSet || _apiMapResponse.containsKey('graph_text')) { + json['graph_text'] = graphText; + } + return json; + } +} + +/// Status of the dependencies in your project. Valid values are: "lock_optional", "lock_required", "lock_error", "install_none". (Enum defined in ProjectWorkspace) +enum DependencyStatus { lockOptional, lockRequired, lockError, installNone } + +class DependencyStatusMapper { + static String toStringValue(DependencyStatus e) { + switch (e) { + case DependencyStatus.lockOptional: + return 'lock_optional'; + case DependencyStatus.lockRequired: + return 'lock_required'; + case DependencyStatus.lockError: + return 'lock_error'; + case DependencyStatus.installNone: + return 'install_none'; + + default: + return null; + } + } + + static DependencyStatus fromStringValue(String s) { + if (s == 'lock_optional') { + return DependencyStatus.lockOptional; + } + if (s == 'lock_required') { + return DependencyStatus.lockRequired; + } + if (s == 'lock_error') { + return DependencyStatus.lockError; + } + if (s == 'install_none') { + return DependencyStatus.installNone; + } + return null; + } +} + +/// Type of destination that the alert will be sent to Valid values are: "EMAIL", "ACTION_HUB". (Enum defined in AlertDestination) +enum DestinationType { EMAIL, ACTIONHUB } + +class DestinationTypeMapper { + static String toStringValue(DestinationType e) { + switch (e) { + case DestinationType.EMAIL: + return 'EMAIL'; + case DestinationType.ACTIONHUB: + return 'ACTION_HUB'; + + default: + return null; + } + } + + static DestinationType fromStringValue(String s) { + if (s == 'EMAIL') { + return DestinationType.EMAIL; + } + if (s == 'ACTION_HUB') { + return DestinationType.ACTIONHUB; + } + return null; + } +} + +class Dialect { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _label; + bool _labelSet = false; + + bool _supportsCostEstimate; + bool _supportsCostEstimateSet = false; + + String _persistentTableIndexes; + bool _persistentTableIndexesSet = false; + + String _persistentTableSortkeys; + bool _persistentTableSortkeysSet = false; + + String _persistentTableDistkey; + bool _persistentTableDistkeySet = false; + + bool _supportsStreaming; + bool _supportsStreamingSet = false; + + bool _automaticallyRunSqlRunnerSnippets; + bool _automaticallyRunSqlRunnerSnippetsSet = false; + + List _connectionTests; + bool _connectionTestsSet = false; + + bool _supportsInducer; + bool _supportsInducerSet = false; + + bool _supportsMultipleDatabases; + bool _supportsMultipleDatabasesSet = false; + + bool _supportsPersistentDerivedTables; + bool _supportsPersistentDerivedTablesSet = false; + + bool _hasSslSupport; + bool _hasSslSupportSet = false; + + /// The name of the dialect (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// The human-readable label of the connection (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Whether the dialect supports query cost estimates (read-only) + + bool get supportsCostEstimate { + if (!_supportsCostEstimateSet && + _apiMapResponse.containsKey('supports_cost_estimate')) { + _supportsCostEstimate = _apiMapResponse['supports_cost_estimate']; + _supportsCostEstimateSet = true; + } + return _supportsCostEstimate; + } + + set supportsCostEstimate(bool v) { + _supportsCostEstimate = v; + _supportsCostEstimateSet = true; + } + + /// PDT index columns (read-only) + + String get persistentTableIndexes { + if (!_persistentTableIndexesSet && + _apiMapResponse.containsKey('persistent_table_indexes')) { + _persistentTableIndexes = + _apiMapResponse['persistent_table_indexes'] == null + ? null + : _apiMapResponse['persistent_table_indexes'].toString(); + _persistentTableIndexesSet = true; + } + return _persistentTableIndexes; + } + + set persistentTableIndexes(String v) { + _persistentTableIndexes = v; + _persistentTableIndexesSet = true; + } + + /// PDT sortkey columns (read-only) + + String get persistentTableSortkeys { + if (!_persistentTableSortkeysSet && + _apiMapResponse.containsKey('persistent_table_sortkeys')) { + _persistentTableSortkeys = + _apiMapResponse['persistent_table_sortkeys'] == null + ? null + : _apiMapResponse['persistent_table_sortkeys'].toString(); + _persistentTableSortkeysSet = true; + } + return _persistentTableSortkeys; + } + + set persistentTableSortkeys(String v) { + _persistentTableSortkeys = v; + _persistentTableSortkeysSet = true; + } + + /// PDT distkey column (read-only) + + String get persistentTableDistkey { + if (!_persistentTableDistkeySet && + _apiMapResponse.containsKey('persistent_table_distkey')) { + _persistentTableDistkey = + _apiMapResponse['persistent_table_distkey'] == null + ? null + : _apiMapResponse['persistent_table_distkey'].toString(); + _persistentTableDistkeySet = true; + } + return _persistentTableDistkey; + } + + set persistentTableDistkey(String v) { + _persistentTableDistkey = v; + _persistentTableDistkeySet = true; + } + + /// Suports streaming results (read-only) + + bool get supportsStreaming { + if (!_supportsStreamingSet && + _apiMapResponse.containsKey('supports_streaming')) { + _supportsStreaming = _apiMapResponse['supports_streaming']; + _supportsStreamingSet = true; + } + return _supportsStreaming; + } + + set supportsStreaming(bool v) { + _supportsStreaming = v; + _supportsStreamingSet = true; + } + + /// Should SQL Runner snippets automatically be run (read-only) + + bool get automaticallyRunSqlRunnerSnippets { + if (!_automaticallyRunSqlRunnerSnippetsSet && + _apiMapResponse.containsKey('automatically_run_sql_runner_snippets')) { + _automaticallyRunSqlRunnerSnippets = + _apiMapResponse['automatically_run_sql_runner_snippets']; + _automaticallyRunSqlRunnerSnippetsSet = true; + } + return _automaticallyRunSqlRunnerSnippets; + } + + set automaticallyRunSqlRunnerSnippets(bool v) { + _automaticallyRunSqlRunnerSnippets = v; + _automaticallyRunSqlRunnerSnippetsSet = true; + } + + /// Array of names of the tests that can be run on a connection using this dialect (read-only) + + List get connectionTests { + if (!_connectionTestsSet && + _apiMapResponse.containsKey('connection_tests')) { + _connectionTests = _apiMapResponse['connection_tests'] == null + ? null + : _apiMapResponse['connection_tests'] + .map((i) => i as String) + .toList(); + _connectionTestsSet = true; + } + return _connectionTests; + } + + set connectionTests(List v) { + _connectionTests = v; + _connectionTestsSet = true; + } + + /// Is supported with the inducer (i.e. generate from sql) (read-only) + + bool get supportsInducer { + if (!_supportsInducerSet && + _apiMapResponse.containsKey('supports_inducer')) { + _supportsInducer = _apiMapResponse['supports_inducer']; + _supportsInducerSet = true; + } + return _supportsInducer; + } + + set supportsInducer(bool v) { + _supportsInducer = v; + _supportsInducerSet = true; + } + + /// Can multiple databases be accessed from a connection using this dialect (read-only) + + bool get supportsMultipleDatabases { + if (!_supportsMultipleDatabasesSet && + _apiMapResponse.containsKey('supports_multiple_databases')) { + _supportsMultipleDatabases = + _apiMapResponse['supports_multiple_databases']; + _supportsMultipleDatabasesSet = true; + } + return _supportsMultipleDatabases; + } + + set supportsMultipleDatabases(bool v) { + _supportsMultipleDatabases = v; + _supportsMultipleDatabasesSet = true; + } + + /// Whether the dialect supports allowing Looker to build persistent derived tables (read-only) + + bool get supportsPersistentDerivedTables { + if (!_supportsPersistentDerivedTablesSet && + _apiMapResponse.containsKey('supports_persistent_derived_tables')) { + _supportsPersistentDerivedTables = + _apiMapResponse['supports_persistent_derived_tables']; + _supportsPersistentDerivedTablesSet = true; + } + return _supportsPersistentDerivedTables; + } + + set supportsPersistentDerivedTables(bool v) { + _supportsPersistentDerivedTables = v; + _supportsPersistentDerivedTablesSet = true; + } + + /// Does the database have client SSL support settable through the JDBC string explicitly? (read-only) + + bool get hasSslSupport { + if (!_hasSslSupportSet && _apiMapResponse.containsKey('has_ssl_support')) { + _hasSslSupport = _apiMapResponse['has_ssl_support']; + _hasSslSupportSet = true; + } + return _hasSslSupport; + } + + set hasSslSupport(bool v) { + _hasSslSupport = v; + _hasSslSupportSet = true; + } + + Dialect() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Dialect.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_supportsCostEstimateSet || + _apiMapResponse.containsKey('supports_cost_estimate')) { + json['supports_cost_estimate'] = supportsCostEstimate; + } + if (_persistentTableIndexesSet || + _apiMapResponse.containsKey('persistent_table_indexes')) { + json['persistent_table_indexes'] = persistentTableIndexes; + } + if (_persistentTableSortkeysSet || + _apiMapResponse.containsKey('persistent_table_sortkeys')) { + json['persistent_table_sortkeys'] = persistentTableSortkeys; + } + if (_persistentTableDistkeySet || + _apiMapResponse.containsKey('persistent_table_distkey')) { + json['persistent_table_distkey'] = persistentTableDistkey; + } + if (_supportsStreamingSet || + _apiMapResponse.containsKey('supports_streaming')) { + json['supports_streaming'] = supportsStreaming; + } + if (_automaticallyRunSqlRunnerSnippetsSet || + _apiMapResponse.containsKey('automatically_run_sql_runner_snippets')) { + json['automatically_run_sql_runner_snippets'] = + automaticallyRunSqlRunnerSnippets; + } + if (_connectionTestsSet || + _apiMapResponse.containsKey('connection_tests')) { + json['connection_tests'] = connectionTests; + } + if (_supportsInducerSet || + _apiMapResponse.containsKey('supports_inducer')) { + json['supports_inducer'] = supportsInducer; + } + if (_supportsMultipleDatabasesSet || + _apiMapResponse.containsKey('supports_multiple_databases')) { + json['supports_multiple_databases'] = supportsMultipleDatabases; + } + if (_supportsPersistentDerivedTablesSet || + _apiMapResponse.containsKey('supports_persistent_derived_tables')) { + json['supports_persistent_derived_tables'] = + supportsPersistentDerivedTables; + } + if (_hasSslSupportSet || _apiMapResponse.containsKey('has_ssl_support')) { + json['has_ssl_support'] = hasSslSupport; + } + return json; + } +} + +class DialectInfo { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _defaultMaxConnections; + bool _defaultMaxConnectionsSet = false; + + String _defaultPort; + bool _defaultPortSet = false; + + bool _installed; + bool _installedSet = false; + + String _label; + bool _labelSet = false; + + String _labelForDatabaseEquivalent; + bool _labelForDatabaseEquivalentSet = false; + + String _name; + bool _nameSet = false; + + DialectInfoOptions _supportedOptions; + bool _supportedOptionsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Default number max connections (read-only) + + String get defaultMaxConnections { + if (!_defaultMaxConnectionsSet && + _apiMapResponse.containsKey('default_max_connections')) { + _defaultMaxConnections = + _apiMapResponse['default_max_connections'] == null + ? null + : _apiMapResponse['default_max_connections'].toString(); + _defaultMaxConnectionsSet = true; + } + return _defaultMaxConnections; + } + + set defaultMaxConnections(String v) { + _defaultMaxConnections = v; + _defaultMaxConnectionsSet = true; + } + + /// Default port number (read-only) + + String get defaultPort { + if (!_defaultPortSet && _apiMapResponse.containsKey('default_port')) { + _defaultPort = _apiMapResponse['default_port'] == null + ? null + : _apiMapResponse['default_port'].toString(); + _defaultPortSet = true; + } + return _defaultPort; + } + + set defaultPort(String v) { + _defaultPort = v; + _defaultPortSet = true; + } + + /// Is the supporting driver installed (read-only) + + bool get installed { + if (!_installedSet && _apiMapResponse.containsKey('installed')) { + _installed = _apiMapResponse['installed']; + _installedSet = true; + } + return _installed; + } + + set installed(bool v) { + _installed = v; + _installedSet = true; + } + + /// The human-readable label of the connection (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// What the dialect calls the equivalent of a normal SQL table (read-only) + + String get labelForDatabaseEquivalent { + if (!_labelForDatabaseEquivalentSet && + _apiMapResponse.containsKey('label_for_database_equivalent')) { + _labelForDatabaseEquivalent = + _apiMapResponse['label_for_database_equivalent'] == null + ? null + : _apiMapResponse['label_for_database_equivalent'].toString(); + _labelForDatabaseEquivalentSet = true; + } + return _labelForDatabaseEquivalent; + } + + set labelForDatabaseEquivalent(String v) { + _labelForDatabaseEquivalent = v; + _labelForDatabaseEquivalentSet = true; + } + + /// The name of the dialect (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + DialectInfoOptions get supportedOptions { + if (!_supportedOptionsSet && + _apiMapResponse.containsKey('supported_options')) { + _supportedOptions = _apiMapResponse['supported_options'] == null + ? null + : DialectInfoOptions.fromResponse( + _apiMapResponse['supported_options'], apiResponseContentType); + _supportedOptionsSet = true; + } + return _supportedOptions; + } + + set supportedOptions(DialectInfoOptions v) { + _supportedOptions = v; + _supportedOptionsSet = true; + } + + DialectInfo() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DialectInfo.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_defaultMaxConnectionsSet || + _apiMapResponse.containsKey('default_max_connections')) { + json['default_max_connections'] = defaultMaxConnections; + } + if (_defaultPortSet || _apiMapResponse.containsKey('default_port')) { + json['default_port'] = defaultPort; + } + if (_installedSet || _apiMapResponse.containsKey('installed')) { + json['installed'] = installed; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_labelForDatabaseEquivalentSet || + _apiMapResponse.containsKey('label_for_database_equivalent')) { + json['label_for_database_equivalent'] = labelForDatabaseEquivalent; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_supportedOptionsSet || + _apiMapResponse.containsKey('supported_options')) { + json['supported_options'] = + supportedOptions == null ? null : supportedOptions.toJson(); + } + return json; + } +} + +class DialectInfoOptions { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _additionalParams; + bool _additionalParamsSet = false; + + bool _auth; + bool _authSet = false; + + bool _host; + bool _hostSet = false; + + bool _oauthCredentials; + bool _oauthCredentialsSet = false; + + bool _projectName; + bool _projectNameSet = false; + + bool _schema; + bool _schemaSet = false; + + bool _ssl; + bool _sslSet = false; + + bool _timezone; + bool _timezoneSet = false; + + bool _tmpTable; + bool _tmpTableSet = false; + + bool _usernameRequired; + bool _usernameRequiredSet = false; + + /// Has additional params support (read-only) + + bool get additionalParams { + if (!_additionalParamsSet && + _apiMapResponse.containsKey('additional_params')) { + _additionalParams = _apiMapResponse['additional_params']; + _additionalParamsSet = true; + } + return _additionalParams; + } + + set additionalParams(bool v) { + _additionalParams = v; + _additionalParamsSet = true; + } + + /// Has auth support (read-only) + + bool get auth { + if (!_authSet && _apiMapResponse.containsKey('auth')) { + _auth = _apiMapResponse['auth']; + _authSet = true; + } + return _auth; + } + + set auth(bool v) { + _auth = v; + _authSet = true; + } + + /// Has host support (read-only) + + bool get host { + if (!_hostSet && _apiMapResponse.containsKey('host')) { + _host = _apiMapResponse['host']; + _hostSet = true; + } + return _host; + } + + set host(bool v) { + _host = v; + _hostSet = true; + } + + /// Has support for a service account (read-only) + + bool get oauthCredentials { + if (!_oauthCredentialsSet && + _apiMapResponse.containsKey('oauth_credentials')) { + _oauthCredentials = _apiMapResponse['oauth_credentials']; + _oauthCredentialsSet = true; + } + return _oauthCredentials; + } + + set oauthCredentials(bool v) { + _oauthCredentials = v; + _oauthCredentialsSet = true; + } + + /// Has project name support (read-only) + + bool get projectName { + if (!_projectNameSet && _apiMapResponse.containsKey('project_name')) { + _projectName = _apiMapResponse['project_name']; + _projectNameSet = true; + } + return _projectName; + } + + set projectName(bool v) { + _projectName = v; + _projectNameSet = true; + } + + /// Has schema support (read-only) + + bool get schema { + if (!_schemaSet && _apiMapResponse.containsKey('schema')) { + _schema = _apiMapResponse['schema']; + _schemaSet = true; + } + return _schema; + } + + set schema(bool v) { + _schema = v; + _schemaSet = true; + } + + /// Has SSL support (read-only) + + bool get ssl { + if (!_sslSet && _apiMapResponse.containsKey('ssl')) { + _ssl = _apiMapResponse['ssl']; + _sslSet = true; + } + return _ssl; + } + + set ssl(bool v) { + _ssl = v; + _sslSet = true; + } + + /// Has timezone support (read-only) + + bool get timezone { + if (!_timezoneSet && _apiMapResponse.containsKey('timezone')) { + _timezone = _apiMapResponse['timezone']; + _timezoneSet = true; + } + return _timezone; + } + + set timezone(bool v) { + _timezone = v; + _timezoneSet = true; + } + + /// Has tmp table support (read-only) + + bool get tmpTable { + if (!_tmpTableSet && _apiMapResponse.containsKey('tmp_table')) { + _tmpTable = _apiMapResponse['tmp_table']; + _tmpTableSet = true; + } + return _tmpTable; + } + + set tmpTable(bool v) { + _tmpTable = v; + _tmpTableSet = true; + } + + /// Username is required (read-only) + + bool get usernameRequired { + if (!_usernameRequiredSet && + _apiMapResponse.containsKey('username_required')) { + _usernameRequired = _apiMapResponse['username_required']; + _usernameRequiredSet = true; + } + return _usernameRequired; + } + + set usernameRequired(bool v) { + _usernameRequired = v; + _usernameRequiredSet = true; + } + + DialectInfoOptions() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DialectInfoOptions.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_additionalParamsSet || + _apiMapResponse.containsKey('additional_params')) { + json['additional_params'] = additionalParams; + } + if (_authSet || _apiMapResponse.containsKey('auth')) { + json['auth'] = auth; + } + if (_hostSet || _apiMapResponse.containsKey('host')) { + json['host'] = host; + } + if (_oauthCredentialsSet || + _apiMapResponse.containsKey('oauth_credentials')) { + json['oauth_credentials'] = oauthCredentials; + } + if (_projectNameSet || _apiMapResponse.containsKey('project_name')) { + json['project_name'] = projectName; + } + if (_schemaSet || _apiMapResponse.containsKey('schema')) { + json['schema'] = schema; + } + if (_sslSet || _apiMapResponse.containsKey('ssl')) { + json['ssl'] = ssl; + } + if (_timezoneSet || _apiMapResponse.containsKey('timezone')) { + json['timezone'] = timezone; + } + if (_tmpTableSet || _apiMapResponse.containsKey('tmp_table')) { + json['tmp_table'] = tmpTable; + } + if (_usernameRequiredSet || + _apiMapResponse.containsKey('username_required')) { + json['username_required'] = usernameRequired; + } + return json; + } +} + +class DigestEmails { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _isEnabled; + bool _isEnabledSet = false; + + /// Whether or not digest emails are enabled + + bool get isEnabled { + if (!_isEnabledSet && _apiMapResponse.containsKey('is_enabled')) { + _isEnabled = _apiMapResponse['is_enabled']; + _isEnabledSet = true; + } + return _isEnabled; + } + + set isEnabled(bool v) { + _isEnabled = v; + _isEnabledSet = true; + } + + DigestEmails() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DigestEmails.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_isEnabledSet || _apiMapResponse.containsKey('is_enabled')) { + json['is_enabled'] = isEnabled; + } + return json; + } +} + +class DigestEmailSend { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _configurationDelivered; + bool _configurationDeliveredSet = false; + + /// True if content was successfully generated and delivered + + bool get configurationDelivered { + if (!_configurationDeliveredSet && + _apiMapResponse.containsKey('configuration_delivered')) { + _configurationDelivered = _apiMapResponse['configuration_delivered']; + _configurationDeliveredSet = true; + } + return _configurationDelivered; + } + + set configurationDelivered(bool v) { + _configurationDelivered = v; + _configurationDeliveredSet = true; + } + + DigestEmailSend() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DigestEmailSend.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_configurationDeliveredSet || + _apiMapResponse.containsKey('configuration_delivered')) { + json['configuration_delivered'] = configurationDelivered; + } + return json; + } +} + +class DiscretePalette { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _id; + bool _idSet = false; + + String _label; + bool _labelSet = false; + + String _type; + bool _typeSet = false; + + List _colors; + bool _colorsSet = false; + + /// Unique identity string (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Label for palette + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Type of palette + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Array of colors in the palette + + List get colors { + if (!_colorsSet && _apiMapResponse.containsKey('colors')) { + _colors = _apiMapResponse['colors'] == null + ? null + : _apiMapResponse['colors'].map((i) => i as String).toList(); + _colorsSet = true; + } + return _colors; + } + + set colors(List v) { + _colors = v; + _colorsSet = true; + } + + DiscretePalette() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + DiscretePalette.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_colorsSet || _apiMapResponse.containsKey('colors')) { + json['colors'] = colors; + } + return json; + } +} + +class EmbedParams { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _targetUrl; + bool _targetUrlSet = false; + + int _sessionLength; + bool _sessionLengthSet = false; + + bool _forceLogoutLogin; + bool _forceLogoutLoginSet = false; + + /// The complete URL of the Looker UI page to display in the embed context. For example, to display the dashboard with id 34, `target_url` would look like: `https://mycompany.looker.com:9999/dashboards/34`. `target_uri` MUST contain a scheme (HTTPS), domain name, and URL path. Port must be included if it is required to reach the Looker server from browser clients. If the Looker instance is behind a load balancer or other proxy, `target_uri` must be the public-facing domain name and port required to reach the Looker instance, not the actual internal network machine name of the Looker instance. + + String get targetUrl { + if (!_targetUrlSet && _apiMapResponse.containsKey('target_url')) { + _targetUrl = _apiMapResponse['target_url'] == null + ? null + : _apiMapResponse['target_url'].toString(); + _targetUrlSet = true; + } + return _targetUrl; + } + + set targetUrl(String v) { + _targetUrl = v; + _targetUrlSet = true; + } + + /// Number of seconds the SSO embed session will be valid after the embed session is started. Defaults to 300 seconds. Maximum session length accepted is 2592000 seconds (30 days). + + int get sessionLength { + if (!_sessionLengthSet && _apiMapResponse.containsKey('session_length')) { + _sessionLength = _apiMapResponse['session_length']; + _sessionLengthSet = true; + } + return _sessionLength; + } + + set sessionLength(int v) { + _sessionLength = v; + _sessionLengthSet = true; + } + + /// When true, the embed session will purge any residual Looker login state (such as in browser cookies) before creating a new login state with the given embed user info. Defaults to true. + + bool get forceLogoutLogin { + if (!_forceLogoutLoginSet && + _apiMapResponse.containsKey('force_logout_login')) { + _forceLogoutLogin = _apiMapResponse['force_logout_login']; + _forceLogoutLoginSet = true; + } + return _forceLogoutLogin; + } + + set forceLogoutLogin(bool v) { + _forceLogoutLogin = v; + _forceLogoutLoginSet = true; + } + + EmbedParams() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + EmbedParams.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_targetUrlSet || _apiMapResponse.containsKey('target_url')) { + json['target_url'] = targetUrl; + } + if (_sessionLengthSet || _apiMapResponse.containsKey('session_length')) { + json['session_length'] = sessionLength; + } + if (_forceLogoutLoginSet || + _apiMapResponse.containsKey('force_logout_login')) { + json['force_logout_login'] = forceLogoutLogin; + } + return json; + } +} + +class EmbedSecret { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _algorithm; + bool _algorithmSet = false; + + String _createdAt; + bool _createdAtSet = false; + + bool _enabled; + bool _enabledSet = false; + + int _id; + bool _idSet = false; + + String _secret; + bool _secretSet = false; + + int _userId; + bool _userIdSet = false; + + /// Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + + String get algorithm { + if (!_algorithmSet && _apiMapResponse.containsKey('algorithm')) { + _algorithm = _apiMapResponse['algorithm'] == null + ? null + : _apiMapResponse['algorithm'].toString(); + _algorithmSet = true; + } + return _algorithm; + } + + set algorithm(String v) { + _algorithm = v; + _algorithmSet = true; + } + + /// When secret was created (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Is this secret currently enabled + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Secret for use with SSO embedding (read-only) + + String get secret { + if (!_secretSet && _apiMapResponse.containsKey('secret')) { + _secret = _apiMapResponse['secret'] == null + ? null + : _apiMapResponse['secret'].toString(); + _secretSet = true; + } + return _secret; + } + + set secret(String v) { + _secret = v; + _secretSet = true; + } + + /// Id of user who created this secret (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + EmbedSecret() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + EmbedSecret.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_algorithmSet || _apiMapResponse.containsKey('algorithm')) { + json['algorithm'] = algorithm; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_secretSet || _apiMapResponse.containsKey('secret')) { + json['secret'] = secret; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + return json; + } +} + +class EmbedSsoParams { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _targetUrl; + bool _targetUrlSet = false; + + int _sessionLength; + bool _sessionLengthSet = false; + + bool _forceLogoutLogin; + bool _forceLogoutLoginSet = false; + + String _externalUserId; + bool _externalUserIdSet = false; + + String _firstName; + bool _firstNameSet = false; + + String _lastName; + bool _lastNameSet = false; + + String _userTimezone; + bool _userTimezoneSet = false; + + List _permissions; + bool _permissionsSet = false; + + List _models; + bool _modelsSet = false; + + List _groupIds; + bool _groupIdsSet = false; + + String _externalGroupId; + bool _externalGroupIdSet = false; + + Map _userAttributes; + bool _userAttributesSet = false; + + int _secretId; + bool _secretIdSet = false; + + /// The complete URL of the Looker UI page to display in the embed context. For example, to display the dashboard with id 34, `target_url` would look like: `https://mycompany.looker.com:9999/dashboards/34`. `target_uri` MUST contain a scheme (HTTPS), domain name, and URL path. Port must be included if it is required to reach the Looker server from browser clients. If the Looker instance is behind a load balancer or other proxy, `target_uri` must be the public-facing domain name and port required to reach the Looker instance, not the actual internal network machine name of the Looker instance. + + String get targetUrl { + if (!_targetUrlSet && _apiMapResponse.containsKey('target_url')) { + _targetUrl = _apiMapResponse['target_url'] == null + ? null + : _apiMapResponse['target_url'].toString(); + _targetUrlSet = true; + } + return _targetUrl; + } + + set targetUrl(String v) { + _targetUrl = v; + _targetUrlSet = true; + } + + /// Number of seconds the SSO embed session will be valid after the embed session is started. Defaults to 300 seconds. Maximum session length accepted is 2592000 seconds (30 days). + + int get sessionLength { + if (!_sessionLengthSet && _apiMapResponse.containsKey('session_length')) { + _sessionLength = _apiMapResponse['session_length']; + _sessionLengthSet = true; + } + return _sessionLength; + } + + set sessionLength(int v) { + _sessionLength = v; + _sessionLengthSet = true; + } + + /// When true, the embed session will purge any residual Looker login state (such as in browser cookies) before creating a new login state with the given embed user info. Defaults to true. + + bool get forceLogoutLogin { + if (!_forceLogoutLoginSet && + _apiMapResponse.containsKey('force_logout_login')) { + _forceLogoutLogin = _apiMapResponse['force_logout_login']; + _forceLogoutLoginSet = true; + } + return _forceLogoutLogin; + } + + set forceLogoutLogin(bool v) { + _forceLogoutLogin = v; + _forceLogoutLoginSet = true; + } + + /// A value from an external system that uniquely identifies the embed user. Since the user_ids of Looker embed users may change with every embed session, external_user_id provides a way to assign a known, stable user identifier across multiple embed sessions. + + String get externalUserId { + if (!_externalUserIdSet && + _apiMapResponse.containsKey('external_user_id')) { + _externalUserId = _apiMapResponse['external_user_id'] == null + ? null + : _apiMapResponse['external_user_id'].toString(); + _externalUserIdSet = true; + } + return _externalUserId; + } + + set externalUserId(String v) { + _externalUserId = v; + _externalUserIdSet = true; + } + + /// First name of the embed user. Defaults to 'Embed' if not specified + + String get firstName { + if (!_firstNameSet && _apiMapResponse.containsKey('first_name')) { + _firstName = _apiMapResponse['first_name'] == null + ? null + : _apiMapResponse['first_name'].toString(); + _firstNameSet = true; + } + return _firstName; + } + + set firstName(String v) { + _firstName = v; + _firstNameSet = true; + } + + /// Last name of the embed user. Defaults to 'User' if not specified + + String get lastName { + if (!_lastNameSet && _apiMapResponse.containsKey('last_name')) { + _lastName = _apiMapResponse['last_name'] == null + ? null + : _apiMapResponse['last_name'].toString(); + _lastNameSet = true; + } + return _lastName; + } + + set lastName(String v) { + _lastName = v; + _lastNameSet = true; + } + + /// Sets the user timezone for the embed user session, if the User Specific Timezones setting is enabled in the Looker admin settings. A value of `null` forces the embed user to use the Looker Application Default Timezone. You MUST omit this property from the request if the User Specific Timezones setting is disabled. Timezone values are validated against the IANA Timezone standard and can be seen in the Application Time Zone dropdown list on the Looker General Settings admin page. + + String get userTimezone { + if (!_userTimezoneSet && _apiMapResponse.containsKey('user_timezone')) { + _userTimezone = _apiMapResponse['user_timezone'] == null + ? null + : _apiMapResponse['user_timezone'].toString(); + _userTimezoneSet = true; + } + return _userTimezone; + } + + set userTimezone(String v) { + _userTimezone = v; + _userTimezoneSet = true; + } + + /// List of Looker permission names to grant to the embed user. Requested permissions will be filtered to permissions allowed for embed sessions. + + List get permissions { + if (!_permissionsSet && _apiMapResponse.containsKey('permissions')) { + _permissions = _apiMapResponse['permissions'] == null + ? null + : _apiMapResponse['permissions'] + .map((i) => i as String) + .toList(); + _permissionsSet = true; + } + return _permissions; + } + + set permissions(List v) { + _permissions = v; + _permissionsSet = true; + } + + /// List of model names that the embed user may access + + List get models { + if (!_modelsSet && _apiMapResponse.containsKey('models')) { + _models = _apiMapResponse['models'] == null + ? null + : _apiMapResponse['models'].map((i) => i as String).toList(); + _modelsSet = true; + } + return _models; + } + + set models(List v) { + _models = v; + _modelsSet = true; + } + + /// List of Looker group ids in which to enroll the embed user + + List get groupIds { + if (!_groupIdsSet && _apiMapResponse.containsKey('group_ids')) { + _groupIds = _apiMapResponse['group_ids'] == null + ? null + : _apiMapResponse['group_ids'].map((i) => i as int).toList(); + _groupIdsSet = true; + } + return _groupIds; + } + + set groupIds(List v) { + _groupIds = v; + _groupIdsSet = true; + } + + /// A unique value identifying an embed-exclusive group. Multiple embed users using the same `external_group_id` value will be able to share Looker content with each other. Content and embed users associated with the `external_group_id` will not be accessible to normal Looker users or embed users not associated with this `external_group_id`. + + String get externalGroupId { + if (!_externalGroupIdSet && + _apiMapResponse.containsKey('external_group_id')) { + _externalGroupId = _apiMapResponse['external_group_id'] == null + ? null + : _apiMapResponse['external_group_id'].toString(); + _externalGroupIdSet = true; + } + return _externalGroupId; + } + + set externalGroupId(String v) { + _externalGroupId = v; + _externalGroupIdSet = true; + } + + /// A dictionary of name-value pairs associating a Looker user attribute name with a value. + + Map get userAttributes { + if (!_userAttributesSet && _apiMapResponse.containsKey('user_attributes')) { + _userAttributes = _apiMapResponse['user_attributes']; + _userAttributesSet = true; + } + return _userAttributes; + } + + set userAttributes(Map v) { + _userAttributes = v; + _userAttributesSet = true; + } + + /// Id of the embed secret to use to sign this SSO url. If specified, the value must be an id of a valid (active) secret defined in the Looker instance. If not specified, the URL will be signed with the newest active embed secret defined in the Looker instance. + + int get secretId { + if (!_secretIdSet && _apiMapResponse.containsKey('secret_id')) { + _secretId = _apiMapResponse['secret_id']; + _secretIdSet = true; + } + return _secretId; + } + + set secretId(int v) { + _secretId = v; + _secretIdSet = true; + } + + EmbedSsoParams() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + EmbedSsoParams.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_targetUrlSet || _apiMapResponse.containsKey('target_url')) { + json['target_url'] = targetUrl; + } + if (_sessionLengthSet || _apiMapResponse.containsKey('session_length')) { + json['session_length'] = sessionLength; + } + if (_forceLogoutLoginSet || + _apiMapResponse.containsKey('force_logout_login')) { + json['force_logout_login'] = forceLogoutLogin; + } + if (_externalUserIdSet || _apiMapResponse.containsKey('external_user_id')) { + json['external_user_id'] = externalUserId; + } + if (_firstNameSet || _apiMapResponse.containsKey('first_name')) { + json['first_name'] = firstName; + } + if (_lastNameSet || _apiMapResponse.containsKey('last_name')) { + json['last_name'] = lastName; + } + if (_userTimezoneSet || _apiMapResponse.containsKey('user_timezone')) { + json['user_timezone'] = userTimezone; + } + if (_permissionsSet || _apiMapResponse.containsKey('permissions')) { + json['permissions'] = permissions; + } + if (_modelsSet || _apiMapResponse.containsKey('models')) { + json['models'] = models; + } + if (_groupIdsSet || _apiMapResponse.containsKey('group_ids')) { + json['group_ids'] = groupIds; + } + if (_externalGroupIdSet || + _apiMapResponse.containsKey('external_group_id')) { + json['external_group_id'] = externalGroupId; + } + if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { + json['user_attributes'] = userAttributes; + } + if (_secretIdSet || _apiMapResponse.containsKey('secret_id')) { + json['secret_id'] = secretId; + } + return json; + } +} + +class EmbedUrlResponse { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _url; + bool _urlSet = false; + + /// The embed URL. Any modification to this string will make the URL unusable. (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + EmbedUrlResponse() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + EmbedUrlResponse.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class Error { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _message; + bool _messageSet = false; + + String _documentationUrl; + bool _documentationUrlSet = false; + + /// Error details (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Documentation link (read-only) + + String get documentationUrl { + if (!_documentationUrlSet && + _apiMapResponse.containsKey('documentation_url')) { + _documentationUrl = _apiMapResponse['documentation_url'] == null + ? null + : _apiMapResponse['documentation_url'].toString(); + _documentationUrlSet = true; + } + return _documentationUrl; + } + + set documentationUrl(String v) { + _documentationUrl = v; + _documentationUrlSet = true; + } + + Error() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Error.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_documentationUrlSet || + _apiMapResponse.containsKey('documentation_url')) { + json['documentation_url'] = documentationUrl; + } + return json; + } +} + +class ExternalOauthApplication { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _name; + bool _nameSet = false; + + String _clientId; + bool _clientIdSet = false; + + String _clientSecret; + bool _clientSecretSet = false; + + String _dialectName; + bool _dialectNameSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// ID of this OAuth Application (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// The name of this application. For Snowflake connections, this should be the name of the host database. + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// The OAuth Client ID for this application + + String get clientId { + if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { + _clientId = _apiMapResponse['client_id'] == null + ? null + : _apiMapResponse['client_id'].toString(); + _clientIdSet = true; + } + return _clientId; + } + + set clientId(String v) { + _clientId = v; + _clientIdSet = true; + } + + /// (Write-Only) The OAuth Client Secret for this application + + String get clientSecret { + if (!_clientSecretSet && _apiMapResponse.containsKey('client_secret')) { + _clientSecret = _apiMapResponse['client_secret'] == null + ? null + : _apiMapResponse['client_secret'].toString(); + _clientSecretSet = true; + } + return _clientSecret; + } + + set clientSecret(String v) { + _clientSecret = v; + _clientSecretSet = true; + } + + /// The database dialect for this application. + + String get dialectName { + if (!_dialectNameSet && _apiMapResponse.containsKey('dialect_name')) { + _dialectName = _apiMapResponse['dialect_name'] == null + ? null + : _apiMapResponse['dialect_name'].toString(); + _dialectNameSet = true; + } + return _dialectName; + } + + set dialectName(String v) { + _dialectName = v; + _dialectNameSet = true; + } + + /// Creation time for this application (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + ExternalOauthApplication() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ExternalOauthApplication.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_clientIdSet || _apiMapResponse.containsKey('client_id')) { + json['client_id'] = clientId; + } + if (_clientSecretSet || _apiMapResponse.containsKey('client_secret')) { + json['client_secret'] = clientSecret; + } + if (_dialectNameSet || _apiMapResponse.containsKey('dialect_name')) { + json['dialect_name'] = dialectName; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + return json; + } +} + +/// The style of dimension fill that is possible for this field. Null if no dimension fill is possible. Valid values are: "enumeration", "range". (Enum defined in LookmlModelExploreField) +enum FillStyle { enumeration, range } + +class FillStyleMapper { + static String toStringValue(FillStyle e) { + switch (e) { + case FillStyle.enumeration: + return 'enumeration'; + case FillStyle.range: + return 'range'; + + default: + return null; + } + } + + static FillStyle fromStringValue(String s) { + if (s == 'enumeration') { + return FillStyle.enumeration; + } + if (s == 'range') { + return FillStyle.range; + } + return null; + } +} + +class Folder { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _parentId; + bool _parentIdSet = false; + + String _id; + bool _idSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + int _creatorId; + bool _creatorIdSet = false; + + int _childCount; + bool _childCountSet = false; + + String _externalId; + bool _externalIdSet = false; + + bool _isEmbed; + bool _isEmbedSet = false; + + bool _isEmbedSharedRoot; + bool _isEmbedSharedRootSet = false; + + bool _isEmbedUsersRoot; + bool _isEmbedUsersRootSet = false; + + bool _isPersonal; + bool _isPersonalSet = false; + + bool _isPersonalDescendant; + bool _isPersonalDescendantSet = false; + + bool _isSharedRoot; + bool _isSharedRootSet = false; + + bool _isUsersRoot; + bool _isUsersRootSet = false; + + Map _can; + bool _canSet = false; + + List _dashboards; + bool _dashboardsSet = false; + + List _looks; + bool _looksSet = false; + + /// Unique Name + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Id of Parent. If the parent id is null, this is a root-level entry + + String get parentId { + if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { + _parentId = _apiMapResponse['parent_id'] == null + ? null + : _apiMapResponse['parent_id'].toString(); + _parentIdSet = true; + } + return _parentId; + } + + set parentId(String v) { + _parentId = v; + _parentIdSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id of content metadata (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Time the space was created (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + /// User Id of Creator (read-only) + + int get creatorId { + if (!_creatorIdSet && _apiMapResponse.containsKey('creator_id')) { + _creatorId = _apiMapResponse['creator_id']; + _creatorIdSet = true; + } + return _creatorId; + } + + set creatorId(int v) { + _creatorId = v; + _creatorIdSet = true; + } + + /// Children Count (read-only) + + int get childCount { + if (!_childCountSet && _apiMapResponse.containsKey('child_count')) { + _childCount = _apiMapResponse['child_count']; + _childCountSet = true; + } + return _childCount; + } + + set childCount(int v) { + _childCount = v; + _childCountSet = true; + } + + /// Embedder's Id if this folder was autogenerated as an embedding shared folder via 'external_group_id' in an SSO embed login (read-only) + + String get externalId { + if (!_externalIdSet && _apiMapResponse.containsKey('external_id')) { + _externalId = _apiMapResponse['external_id'] == null + ? null + : _apiMapResponse['external_id'].toString(); + _externalIdSet = true; + } + return _externalId; + } + + set externalId(String v) { + _externalId = v; + _externalIdSet = true; + } + + /// Folder is an embed folder (read-only) + + bool get isEmbed { + if (!_isEmbedSet && _apiMapResponse.containsKey('is_embed')) { + _isEmbed = _apiMapResponse['is_embed']; + _isEmbedSet = true; + } + return _isEmbed; + } + + set isEmbed(bool v) { + _isEmbed = v; + _isEmbedSet = true; + } + + /// Folder is the root embed shared folder (read-only) + + bool get isEmbedSharedRoot { + if (!_isEmbedSharedRootSet && + _apiMapResponse.containsKey('is_embed_shared_root')) { + _isEmbedSharedRoot = _apiMapResponse['is_embed_shared_root']; + _isEmbedSharedRootSet = true; + } + return _isEmbedSharedRoot; + } + + set isEmbedSharedRoot(bool v) { + _isEmbedSharedRoot = v; + _isEmbedSharedRootSet = true; + } + + /// Folder is the root embed users folder (read-only) + + bool get isEmbedUsersRoot { + if (!_isEmbedUsersRootSet && + _apiMapResponse.containsKey('is_embed_users_root')) { + _isEmbedUsersRoot = _apiMapResponse['is_embed_users_root']; + _isEmbedUsersRootSet = true; + } + return _isEmbedUsersRoot; + } + + set isEmbedUsersRoot(bool v) { + _isEmbedUsersRoot = v; + _isEmbedUsersRootSet = true; + } + + /// Folder is a user's personal folder (read-only) + + bool get isPersonal { + if (!_isPersonalSet && _apiMapResponse.containsKey('is_personal')) { + _isPersonal = _apiMapResponse['is_personal']; + _isPersonalSet = true; + } + return _isPersonal; + } + + set isPersonal(bool v) { + _isPersonal = v; + _isPersonalSet = true; + } + + /// Folder is descendant of a user's personal folder (read-only) + + bool get isPersonalDescendant { + if (!_isPersonalDescendantSet && + _apiMapResponse.containsKey('is_personal_descendant')) { + _isPersonalDescendant = _apiMapResponse['is_personal_descendant']; + _isPersonalDescendantSet = true; + } + return _isPersonalDescendant; + } + + set isPersonalDescendant(bool v) { + _isPersonalDescendant = v; + _isPersonalDescendantSet = true; + } + + /// Folder is the root shared folder (read-only) + + bool get isSharedRoot { + if (!_isSharedRootSet && _apiMapResponse.containsKey('is_shared_root')) { + _isSharedRoot = _apiMapResponse['is_shared_root']; + _isSharedRootSet = true; + } + return _isSharedRoot; + } + + set isSharedRoot(bool v) { + _isSharedRoot = v; + _isSharedRootSet = true; + } + + /// Folder is the root user folder (read-only) + + bool get isUsersRoot { + if (!_isUsersRootSet && _apiMapResponse.containsKey('is_users_root')) { + _isUsersRoot = _apiMapResponse['is_users_root']; + _isUsersRootSet = true; + } + return _isUsersRoot; + } + + set isUsersRoot(bool v) { + _isUsersRoot = v; + _isUsersRootSet = true; + } + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Dashboards (read-only) + + List get dashboards { + if (!_dashboardsSet && _apiMapResponse.containsKey('dashboards')) { + _dashboards = _apiMapResponse['dashboards'] == null + ? null + : (_apiMapResponse['dashboards'] as List) + .map((i) => DashboardBase.fromResponse(i, apiResponseContentType)) + .toList(); + _dashboardsSet = true; + } + return _dashboards; + } + + set dashboards(List v) { + _dashboards = v; + _dashboardsSet = true; + } + + /// Looks (read-only) + + List get looks { + if (!_looksSet && _apiMapResponse.containsKey('looks')) { + _looks = _apiMapResponse['looks'] == null + ? null + : (_apiMapResponse['looks'] as List) + .map((i) => + LookWithDashboards.fromResponse(i, apiResponseContentType)) + .toList(); + _looksSet = true; + } + return _looks; + } + + set looks(List v) { + _looks = v; + _looksSet = true; + } + + Folder() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Folder.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_parentIdSet || _apiMapResponse.containsKey('parent_id')) { + json['parent_id'] = parentId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + if (_creatorIdSet || _apiMapResponse.containsKey('creator_id')) { + json['creator_id'] = creatorId; + } + if (_childCountSet || _apiMapResponse.containsKey('child_count')) { + json['child_count'] = childCount; + } + if (_externalIdSet || _apiMapResponse.containsKey('external_id')) { + json['external_id'] = externalId; + } + if (_isEmbedSet || _apiMapResponse.containsKey('is_embed')) { + json['is_embed'] = isEmbed; + } + if (_isEmbedSharedRootSet || + _apiMapResponse.containsKey('is_embed_shared_root')) { + json['is_embed_shared_root'] = isEmbedSharedRoot; + } + if (_isEmbedUsersRootSet || + _apiMapResponse.containsKey('is_embed_users_root')) { + json['is_embed_users_root'] = isEmbedUsersRoot; + } + if (_isPersonalSet || _apiMapResponse.containsKey('is_personal')) { + json['is_personal'] = isPersonal; + } + if (_isPersonalDescendantSet || + _apiMapResponse.containsKey('is_personal_descendant')) { + json['is_personal_descendant'] = isPersonalDescendant; + } + if (_isSharedRootSet || _apiMapResponse.containsKey('is_shared_root')) { + json['is_shared_root'] = isSharedRoot; + } + if (_isUsersRootSet || _apiMapResponse.containsKey('is_users_root')) { + json['is_users_root'] = isUsersRoot; + } + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_dashboardsSet || _apiMapResponse.containsKey('dashboards')) { + json['dashboards'] = dashboards == null + ? null + : dashboards.map((i) => i.toJson()).toList(); + } + if (_looksSet || _apiMapResponse.containsKey('looks')) { + json['looks'] = + looks == null ? null : looks.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class FolderBase { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _parentId; + bool _parentIdSet = false; + + String _id; + bool _idSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + int _creatorId; + bool _creatorIdSet = false; + + int _childCount; + bool _childCountSet = false; + + String _externalId; + bool _externalIdSet = false; + + bool _isEmbed; + bool _isEmbedSet = false; + + bool _isEmbedSharedRoot; + bool _isEmbedSharedRootSet = false; + + bool _isEmbedUsersRoot; + bool _isEmbedUsersRootSet = false; + + bool _isPersonal; + bool _isPersonalSet = false; + + bool _isPersonalDescendant; + bool _isPersonalDescendantSet = false; + + bool _isSharedRoot; + bool _isSharedRootSet = false; + + bool _isUsersRoot; + bool _isUsersRootSet = false; + + Map _can; + bool _canSet = false; + + /// Unique Name + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Id of Parent. If the parent id is null, this is a root-level entry + + String get parentId { + if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { + _parentId = _apiMapResponse['parent_id'] == null + ? null + : _apiMapResponse['parent_id'].toString(); + _parentIdSet = true; + } + return _parentId; + } + + set parentId(String v) { + _parentId = v; + _parentIdSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id of content metadata (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Time the folder was created (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + /// User Id of Creator (read-only) + + int get creatorId { + if (!_creatorIdSet && _apiMapResponse.containsKey('creator_id')) { + _creatorId = _apiMapResponse['creator_id']; + _creatorIdSet = true; + } + return _creatorId; + } + + set creatorId(int v) { + _creatorId = v; + _creatorIdSet = true; + } + + /// Children Count (read-only) + + int get childCount { + if (!_childCountSet && _apiMapResponse.containsKey('child_count')) { + _childCount = _apiMapResponse['child_count']; + _childCountSet = true; + } + return _childCount; + } + + set childCount(int v) { + _childCount = v; + _childCountSet = true; + } + + /// Embedder's Id if this folder was autogenerated as an embedding shared folder via 'external_group_id' in an SSO embed login (read-only) + + String get externalId { + if (!_externalIdSet && _apiMapResponse.containsKey('external_id')) { + _externalId = _apiMapResponse['external_id'] == null + ? null + : _apiMapResponse['external_id'].toString(); + _externalIdSet = true; + } + return _externalId; + } + + set externalId(String v) { + _externalId = v; + _externalIdSet = true; + } + + /// Folder is an embed folder (read-only) + + bool get isEmbed { + if (!_isEmbedSet && _apiMapResponse.containsKey('is_embed')) { + _isEmbed = _apiMapResponse['is_embed']; + _isEmbedSet = true; + } + return _isEmbed; + } + + set isEmbed(bool v) { + _isEmbed = v; + _isEmbedSet = true; + } + + /// Folder is the root embed shared folder (read-only) + + bool get isEmbedSharedRoot { + if (!_isEmbedSharedRootSet && + _apiMapResponse.containsKey('is_embed_shared_root')) { + _isEmbedSharedRoot = _apiMapResponse['is_embed_shared_root']; + _isEmbedSharedRootSet = true; + } + return _isEmbedSharedRoot; + } + + set isEmbedSharedRoot(bool v) { + _isEmbedSharedRoot = v; + _isEmbedSharedRootSet = true; + } + + /// Folder is the root embed users folder (read-only) + + bool get isEmbedUsersRoot { + if (!_isEmbedUsersRootSet && + _apiMapResponse.containsKey('is_embed_users_root')) { + _isEmbedUsersRoot = _apiMapResponse['is_embed_users_root']; + _isEmbedUsersRootSet = true; + } + return _isEmbedUsersRoot; + } + + set isEmbedUsersRoot(bool v) { + _isEmbedUsersRoot = v; + _isEmbedUsersRootSet = true; + } + + /// Folder is a user's personal folder (read-only) + + bool get isPersonal { + if (!_isPersonalSet && _apiMapResponse.containsKey('is_personal')) { + _isPersonal = _apiMapResponse['is_personal']; + _isPersonalSet = true; + } + return _isPersonal; + } + + set isPersonal(bool v) { + _isPersonal = v; + _isPersonalSet = true; + } + + /// Folder is descendant of a user's personal folder (read-only) + + bool get isPersonalDescendant { + if (!_isPersonalDescendantSet && + _apiMapResponse.containsKey('is_personal_descendant')) { + _isPersonalDescendant = _apiMapResponse['is_personal_descendant']; + _isPersonalDescendantSet = true; + } + return _isPersonalDescendant; + } + + set isPersonalDescendant(bool v) { + _isPersonalDescendant = v; + _isPersonalDescendantSet = true; + } + + /// Folder is the root shared folder (read-only) + + bool get isSharedRoot { + if (!_isSharedRootSet && _apiMapResponse.containsKey('is_shared_root')) { + _isSharedRoot = _apiMapResponse['is_shared_root']; + _isSharedRootSet = true; + } + return _isSharedRoot; + } + + set isSharedRoot(bool v) { + _isSharedRoot = v; + _isSharedRootSet = true; + } + + /// Folder is the root user folder (read-only) + + bool get isUsersRoot { + if (!_isUsersRootSet && _apiMapResponse.containsKey('is_users_root')) { + _isUsersRoot = _apiMapResponse['is_users_root']; + _isUsersRootSet = true; + } + return _isUsersRoot; + } + + set isUsersRoot(bool v) { + _isUsersRoot = v; + _isUsersRootSet = true; + } + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + FolderBase() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + FolderBase.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_parentIdSet || _apiMapResponse.containsKey('parent_id')) { + json['parent_id'] = parentId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + if (_creatorIdSet || _apiMapResponse.containsKey('creator_id')) { + json['creator_id'] = creatorId; + } + if (_childCountSet || _apiMapResponse.containsKey('child_count')) { + json['child_count'] = childCount; + } + if (_externalIdSet || _apiMapResponse.containsKey('external_id')) { + json['external_id'] = externalId; + } + if (_isEmbedSet || _apiMapResponse.containsKey('is_embed')) { + json['is_embed'] = isEmbed; + } + if (_isEmbedSharedRootSet || + _apiMapResponse.containsKey('is_embed_shared_root')) { + json['is_embed_shared_root'] = isEmbedSharedRoot; + } + if (_isEmbedUsersRootSet || + _apiMapResponse.containsKey('is_embed_users_root')) { + json['is_embed_users_root'] = isEmbedUsersRoot; + } + if (_isPersonalSet || _apiMapResponse.containsKey('is_personal')) { + json['is_personal'] = isPersonal; + } + if (_isPersonalDescendantSet || + _apiMapResponse.containsKey('is_personal_descendant')) { + json['is_personal_descendant'] = isPersonalDescendant; + } + if (_isSharedRootSet || _apiMapResponse.containsKey('is_shared_root')) { + json['is_shared_root'] = isSharedRoot; + } + if (_isUsersRootSet || _apiMapResponse.containsKey('is_users_root')) { + json['is_users_root'] = isUsersRoot; + } + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + return json; + } +} + +/// Specifies the data format of the region information. Valid values are: "topojson", "vector_tile_region". (Enum defined in LookmlModelExploreFieldMapLayer) +enum Format { topojson, vectorTileRegion } + +class FormatMapper { + static String toStringValue(Format e) { + switch (e) { + case Format.topojson: + return 'topojson'; + case Format.vectorTileRegion: + return 'vector_tile_region'; + + default: + return null; + } + } + + static Format fromStringValue(String s) { + if (s == 'topojson') { + return Format.topojson; + } + if (s == 'vector_tile_region') { + return Format.vectorTileRegion; + } + return null; + } +} + +class GitBranch { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _name; + bool _nameSet = false; + + String _remote; + bool _remoteSet = false; + + String _remoteName; + bool _remoteNameSet = false; + + String _error; + bool _errorSet = false; + + String _message; + bool _messageSet = false; + + String _ownerName; + bool _ownerNameSet = false; + + bool _readonly; + bool _readonlySet = false; + + bool _personal; + bool _personalSet = false; + + bool _isLocal; + bool _isLocalSet = false; + + bool _isRemote; + bool _isRemoteSet = false; + + bool _isProduction; + bool _isProductionSet = false; + + int _aheadCount; + bool _aheadCountSet = false; + + int _behindCount; + bool _behindCountSet = false; + + int _commitAt; + bool _commitAtSet = false; + + String _ref; + bool _refSet = false; + + String _remoteRef; + bool _remoteRefSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// The short name on the local. Updating `name` results in `git checkout ` + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// The name of the remote (read-only) + + String get remote { + if (!_remoteSet && _apiMapResponse.containsKey('remote')) { + _remote = _apiMapResponse['remote'] == null + ? null + : _apiMapResponse['remote'].toString(); + _remoteSet = true; + } + return _remote; + } + + set remote(String v) { + _remote = v; + _remoteSet = true; + } + + /// The short name on the remote (read-only) + + String get remoteName { + if (!_remoteNameSet && _apiMapResponse.containsKey('remote_name')) { + _remoteName = _apiMapResponse['remote_name'] == null + ? null + : _apiMapResponse['remote_name'].toString(); + _remoteNameSet = true; + } + return _remoteName; + } + + set remoteName(String v) { + _remoteName = v; + _remoteNameSet = true; + } + + /// Name of error (read-only) + + String get error { + if (!_errorSet && _apiMapResponse.containsKey('error')) { + _error = _apiMapResponse['error'] == null + ? null + : _apiMapResponse['error'].toString(); + _errorSet = true; + } + return _error; + } + + set error(String v) { + _error = v; + _errorSet = true; + } + + /// Message describing an error if present (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Name of the owner of a personal branch (read-only) + + String get ownerName { + if (!_ownerNameSet && _apiMapResponse.containsKey('owner_name')) { + _ownerName = _apiMapResponse['owner_name'] == null + ? null + : _apiMapResponse['owner_name'].toString(); + _ownerNameSet = true; + } + return _ownerName; + } + + set ownerName(String v) { + _ownerName = v; + _ownerNameSet = true; + } + + /// Whether or not this branch is readonly (read-only) + + bool get readonly { + if (!_readonlySet && _apiMapResponse.containsKey('readonly')) { + _readonly = _apiMapResponse['readonly']; + _readonlySet = true; + } + return _readonly; + } + + set readonly(bool v) { + _readonly = v; + _readonlySet = true; + } + + /// Whether or not this branch is a personal branch - readonly for all developers except the owner (read-only) + + bool get personal { + if (!_personalSet && _apiMapResponse.containsKey('personal')) { + _personal = _apiMapResponse['personal']; + _personalSet = true; + } + return _personal; + } + + set personal(bool v) { + _personal = v; + _personalSet = true; + } + + /// Whether or not a local ref exists for the branch (read-only) + + bool get isLocal { + if (!_isLocalSet && _apiMapResponse.containsKey('is_local')) { + _isLocal = _apiMapResponse['is_local']; + _isLocalSet = true; + } + return _isLocal; + } + + set isLocal(bool v) { + _isLocal = v; + _isLocalSet = true; + } + + /// Whether or not a remote ref exists for the branch (read-only) + + bool get isRemote { + if (!_isRemoteSet && _apiMapResponse.containsKey('is_remote')) { + _isRemote = _apiMapResponse['is_remote']; + _isRemoteSet = true; + } + return _isRemote; + } + + set isRemote(bool v) { + _isRemote = v; + _isRemoteSet = true; + } + + /// Whether or not this is the production branch (read-only) + + bool get isProduction { + if (!_isProductionSet && _apiMapResponse.containsKey('is_production')) { + _isProduction = _apiMapResponse['is_production']; + _isProductionSet = true; + } + return _isProduction; + } + + set isProduction(bool v) { + _isProduction = v; + _isProductionSet = true; + } + + /// Number of commits the local branch is ahead of the remote (read-only) + + int get aheadCount { + if (!_aheadCountSet && _apiMapResponse.containsKey('ahead_count')) { + _aheadCount = _apiMapResponse['ahead_count']; + _aheadCountSet = true; + } + return _aheadCount; + } + + set aheadCount(int v) { + _aheadCount = v; + _aheadCountSet = true; + } + + /// Number of commits the local branch is behind the remote (read-only) + + int get behindCount { + if (!_behindCountSet && _apiMapResponse.containsKey('behind_count')) { + _behindCount = _apiMapResponse['behind_count']; + _behindCountSet = true; + } + return _behindCount; + } + + set behindCount(int v) { + _behindCount = v; + _behindCountSet = true; + } + + /// UNIX timestamp at which this branch was last committed. (read-only) + + int get commitAt { + if (!_commitAtSet && _apiMapResponse.containsKey('commit_at')) { + _commitAt = _apiMapResponse['commit_at']; + _commitAtSet = true; + } + return _commitAt; + } + + set commitAt(int v) { + _commitAt = v; + _commitAtSet = true; + } + + /// The resolved ref of this branch. Updating `ref` results in `git reset --hard ``. + + String get ref { + if (!_refSet && _apiMapResponse.containsKey('ref')) { + _ref = _apiMapResponse['ref'] == null + ? null + : _apiMapResponse['ref'].toString(); + _refSet = true; + } + return _ref; + } + + set ref(String v) { + _ref = v; + _refSet = true; + } + + /// The resolved ref of this branch remote. (read-only) + + String get remoteRef { + if (!_remoteRefSet && _apiMapResponse.containsKey('remote_ref')) { + _remoteRef = _apiMapResponse['remote_ref'] == null + ? null + : _apiMapResponse['remote_ref'].toString(); + _remoteRefSet = true; + } + return _remoteRef; + } + + set remoteRef(String v) { + _remoteRef = v; + _remoteRefSet = true; + } + + GitBranch() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + GitBranch.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_remoteSet || _apiMapResponse.containsKey('remote')) { + json['remote'] = remote; + } + if (_remoteNameSet || _apiMapResponse.containsKey('remote_name')) { + json['remote_name'] = remoteName; + } + if (_errorSet || _apiMapResponse.containsKey('error')) { + json['error'] = error; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_ownerNameSet || _apiMapResponse.containsKey('owner_name')) { + json['owner_name'] = ownerName; + } + if (_readonlySet || _apiMapResponse.containsKey('readonly')) { + json['readonly'] = readonly; + } + if (_personalSet || _apiMapResponse.containsKey('personal')) { + json['personal'] = personal; + } + if (_isLocalSet || _apiMapResponse.containsKey('is_local')) { + json['is_local'] = isLocal; + } + if (_isRemoteSet || _apiMapResponse.containsKey('is_remote')) { + json['is_remote'] = isRemote; + } + if (_isProductionSet || _apiMapResponse.containsKey('is_production')) { + json['is_production'] = isProduction; + } + if (_aheadCountSet || _apiMapResponse.containsKey('ahead_count')) { + json['ahead_count'] = aheadCount; + } + if (_behindCountSet || _apiMapResponse.containsKey('behind_count')) { + json['behind_count'] = behindCount; + } + if (_commitAtSet || _apiMapResponse.containsKey('commit_at')) { + json['commit_at'] = commitAt; + } + if (_refSet || _apiMapResponse.containsKey('ref')) { + json['ref'] = ref; + } + if (_remoteRefSet || _apiMapResponse.containsKey('remote_ref')) { + json['remote_ref'] = remoteRef; + } + return json; + } +} + +class GitConnectionTest { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _description; + bool _descriptionSet = false; + + String _id; + bool _idSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Human readable string describing the test (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// A short string, uniquely naming this test (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + GitConnectionTest() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + GitConnectionTest.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + return json; + } +} + +class GitConnectionTestResult { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + String _message; + bool _messageSet = false; + + String _status; + bool _statusSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// A short string, uniquely naming this test (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Additional data from the test (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Either 'pass' or 'fail' (read-only) + + String get status { + if (!_statusSet && _apiMapResponse.containsKey('status')) { + _status = _apiMapResponse['status'] == null + ? null + : _apiMapResponse['status'].toString(); + _statusSet = true; + } + return _status; + } + + set status(String v) { + _status = v; + _statusSet = true; + } + + GitConnectionTestResult() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + GitConnectionTestResult.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_statusSet || _apiMapResponse.containsKey('status')) { + json['status'] = status; + } + return json; + } +} + +class GitStatus { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _action; + bool _actionSet = false; + + bool _conflict; + bool _conflictSet = false; + + bool _revertable; + bool _revertableSet = false; + + String _text; + bool _textSet = false; + + /// Git action: add, delete, etc (read-only) + + String get action { + if (!_actionSet && _apiMapResponse.containsKey('action')) { + _action = _apiMapResponse['action'] == null + ? null + : _apiMapResponse['action'].toString(); + _actionSet = true; + } + return _action; + } + + set action(String v) { + _action = v; + _actionSet = true; + } + + /// When true, changes to the local file conflict with the remote repository (read-only) + + bool get conflict { + if (!_conflictSet && _apiMapResponse.containsKey('conflict')) { + _conflict = _apiMapResponse['conflict']; + _conflictSet = true; + } + return _conflict; + } + + set conflict(bool v) { + _conflict = v; + _conflictSet = true; + } + + /// When true, the file can be reverted to an earlier state (read-only) + + bool get revertable { + if (!_revertableSet && _apiMapResponse.containsKey('revertable')) { + _revertable = _apiMapResponse['revertable']; + _revertableSet = true; + } + return _revertable; + } + + set revertable(bool v) { + _revertable = v; + _revertableSet = true; + } + + /// Git description of the action (read-only) + + String get text { + if (!_textSet && _apiMapResponse.containsKey('text')) { + _text = _apiMapResponse['text'] == null + ? null + : _apiMapResponse['text'].toString(); + _textSet = true; + } + return _text; + } + + set text(String v) { + _text = v; + _textSet = true; + } + + GitStatus() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + GitStatus.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_actionSet || _apiMapResponse.containsKey('action')) { + json['action'] = action; + } + if (_conflictSet || _apiMapResponse.containsKey('conflict')) { + json['conflict'] = conflict; + } + if (_revertableSet || _apiMapResponse.containsKey('revertable')) { + json['revertable'] = revertable; + } + if (_textSet || _apiMapResponse.containsKey('text')) { + json['text'] = text; + } + return json; + } +} + +class Group { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + bool _canAddToContentMetadata; + bool _canAddToContentMetadataSet = false; + + bool _containsCurrentUser; + bool _containsCurrentUserSet = false; + + String _externalGroupId; + bool _externalGroupIdSet = false; + + bool _externallyManaged; + bool _externallyManagedSet = false; + + int _id; + bool _idSet = false; + + bool _includeByDefault; + bool _includeByDefaultSet = false; + + String _name; + bool _nameSet = false; + + int _userCount; + bool _userCountSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Group can be used in content access controls + + bool get canAddToContentMetadata { + if (!_canAddToContentMetadataSet && + _apiMapResponse.containsKey('can_add_to_content_metadata')) { + _canAddToContentMetadata = _apiMapResponse['can_add_to_content_metadata']; + _canAddToContentMetadataSet = true; + } + return _canAddToContentMetadata; + } + + set canAddToContentMetadata(bool v) { + _canAddToContentMetadata = v; + _canAddToContentMetadataSet = true; + } + + /// Currently logged in user is group member (read-only) + + bool get containsCurrentUser { + if (!_containsCurrentUserSet && + _apiMapResponse.containsKey('contains_current_user')) { + _containsCurrentUser = _apiMapResponse['contains_current_user']; + _containsCurrentUserSet = true; + } + return _containsCurrentUser; + } + + set containsCurrentUser(bool v) { + _containsCurrentUser = v; + _containsCurrentUserSet = true; + } + + /// External Id group if embed group (read-only) + + String get externalGroupId { + if (!_externalGroupIdSet && + _apiMapResponse.containsKey('external_group_id')) { + _externalGroupId = _apiMapResponse['external_group_id'] == null + ? null + : _apiMapResponse['external_group_id'].toString(); + _externalGroupIdSet = true; + } + return _externalGroupId; + } + + set externalGroupId(String v) { + _externalGroupId = v; + _externalGroupIdSet = true; + } + + /// Group membership controlled outside of Looker (read-only) + + bool get externallyManaged { + if (!_externallyManagedSet && + _apiMapResponse.containsKey('externally_managed')) { + _externallyManaged = _apiMapResponse['externally_managed']; + _externallyManagedSet = true; + } + return _externallyManaged; + } + + set externallyManaged(bool v) { + _externallyManaged = v; + _externallyManagedSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// New users are added to this group by default (read-only) + + bool get includeByDefault { + if (!_includeByDefaultSet && + _apiMapResponse.containsKey('include_by_default')) { + _includeByDefault = _apiMapResponse['include_by_default']; + _includeByDefaultSet = true; + } + return _includeByDefault; + } + + set includeByDefault(bool v) { + _includeByDefault = v; + _includeByDefaultSet = true; + } + + /// Name of group + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Number of users included in this group (read-only) + + int get userCount { + if (!_userCountSet && _apiMapResponse.containsKey('user_count')) { + _userCount = _apiMapResponse['user_count']; + _userCountSet = true; + } + return _userCount; + } + + set userCount(int v) { + _userCount = v; + _userCountSet = true; + } + + Group() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Group.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_canAddToContentMetadataSet || + _apiMapResponse.containsKey('can_add_to_content_metadata')) { + json['can_add_to_content_metadata'] = canAddToContentMetadata; + } + if (_containsCurrentUserSet || + _apiMapResponse.containsKey('contains_current_user')) { + json['contains_current_user'] = containsCurrentUser; + } + if (_externalGroupIdSet || + _apiMapResponse.containsKey('external_group_id')) { + json['external_group_id'] = externalGroupId; + } + if (_externallyManagedSet || + _apiMapResponse.containsKey('externally_managed')) { + json['externally_managed'] = externallyManaged; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_includeByDefaultSet || + _apiMapResponse.containsKey('include_by_default')) { + json['include_by_default'] = includeByDefault; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_userCountSet || _apiMapResponse.containsKey('user_count')) { + json['user_count'] = userCount; + } + return json; + } +} + +class GroupHierarchy { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + bool _canAddToContentMetadata; + bool _canAddToContentMetadataSet = false; + + bool _containsCurrentUser; + bool _containsCurrentUserSet = false; + + String _externalGroupId; + bool _externalGroupIdSet = false; + + bool _externallyManaged; + bool _externallyManagedSet = false; + + int _id; + bool _idSet = false; + + bool _includeByDefault; + bool _includeByDefaultSet = false; + + String _name; + bool _nameSet = false; + + int _userCount; + bool _userCountSet = false; + + List _parentGroupIds; + bool _parentGroupIdsSet = false; + + List _roleIds; + bool _roleIdsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Group can be used in content access controls + + bool get canAddToContentMetadata { + if (!_canAddToContentMetadataSet && + _apiMapResponse.containsKey('can_add_to_content_metadata')) { + _canAddToContentMetadata = _apiMapResponse['can_add_to_content_metadata']; + _canAddToContentMetadataSet = true; + } + return _canAddToContentMetadata; + } + + set canAddToContentMetadata(bool v) { + _canAddToContentMetadata = v; + _canAddToContentMetadataSet = true; + } + + /// Currently logged in user is group member (read-only) + + bool get containsCurrentUser { + if (!_containsCurrentUserSet && + _apiMapResponse.containsKey('contains_current_user')) { + _containsCurrentUser = _apiMapResponse['contains_current_user']; + _containsCurrentUserSet = true; + } + return _containsCurrentUser; + } + + set containsCurrentUser(bool v) { + _containsCurrentUser = v; + _containsCurrentUserSet = true; + } + + /// External Id group if embed group (read-only) + + String get externalGroupId { + if (!_externalGroupIdSet && + _apiMapResponse.containsKey('external_group_id')) { + _externalGroupId = _apiMapResponse['external_group_id'] == null + ? null + : _apiMapResponse['external_group_id'].toString(); + _externalGroupIdSet = true; + } + return _externalGroupId; + } + + set externalGroupId(String v) { + _externalGroupId = v; + _externalGroupIdSet = true; + } + + /// Group membership controlled outside of Looker (read-only) + + bool get externallyManaged { + if (!_externallyManagedSet && + _apiMapResponse.containsKey('externally_managed')) { + _externallyManaged = _apiMapResponse['externally_managed']; + _externallyManagedSet = true; + } + return _externallyManaged; + } + + set externallyManaged(bool v) { + _externallyManaged = v; + _externallyManagedSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// New users are added to this group by default (read-only) + + bool get includeByDefault { + if (!_includeByDefaultSet && + _apiMapResponse.containsKey('include_by_default')) { + _includeByDefault = _apiMapResponse['include_by_default']; + _includeByDefaultSet = true; + } + return _includeByDefault; + } + + set includeByDefault(bool v) { + _includeByDefault = v; + _includeByDefaultSet = true; + } + + /// Name of group + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Number of users included in this group (read-only) + + int get userCount { + if (!_userCountSet && _apiMapResponse.containsKey('user_count')) { + _userCount = _apiMapResponse['user_count']; + _userCountSet = true; + } + return _userCount; + } + + set userCount(int v) { + _userCount = v; + _userCountSet = true; + } + + /// IDs of parents of this group (read-only) + + List get parentGroupIds { + if (!_parentGroupIdsSet && + _apiMapResponse.containsKey('parent_group_ids')) { + _parentGroupIds = _apiMapResponse['parent_group_ids'] == null + ? null + : _apiMapResponse['parent_group_ids'] + .map((i) => i as int) + .toList(); + _parentGroupIdsSet = true; + } + return _parentGroupIds; + } + + set parentGroupIds(List v) { + _parentGroupIds = v; + _parentGroupIdsSet = true; + } + + /// Role IDs assigned to group (read-only) + + List get roleIds { + if (!_roleIdsSet && _apiMapResponse.containsKey('role_ids')) { + _roleIds = _apiMapResponse['role_ids'] == null + ? null + : _apiMapResponse['role_ids'].map((i) => i as int).toList(); + _roleIdsSet = true; + } + return _roleIds; + } + + set roleIds(List v) { + _roleIds = v; + _roleIdsSet = true; + } + + GroupHierarchy() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + GroupHierarchy.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_canAddToContentMetadataSet || + _apiMapResponse.containsKey('can_add_to_content_metadata')) { + json['can_add_to_content_metadata'] = canAddToContentMetadata; + } + if (_containsCurrentUserSet || + _apiMapResponse.containsKey('contains_current_user')) { + json['contains_current_user'] = containsCurrentUser; + } + if (_externalGroupIdSet || + _apiMapResponse.containsKey('external_group_id')) { + json['external_group_id'] = externalGroupId; + } + if (_externallyManagedSet || + _apiMapResponse.containsKey('externally_managed')) { + json['externally_managed'] = externallyManaged; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_includeByDefaultSet || + _apiMapResponse.containsKey('include_by_default')) { + json['include_by_default'] = includeByDefault; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_userCountSet || _apiMapResponse.containsKey('user_count')) { + json['user_count'] = userCount; + } + if (_parentGroupIdsSet || _apiMapResponse.containsKey('parent_group_ids')) { + json['parent_group_ids'] = parentGroupIds; + } + if (_roleIdsSet || _apiMapResponse.containsKey('role_ids')) { + json['role_ids'] = roleIds; + } + return json; + } +} + +/// WARNING: no writeable properties found for POST, PUT, or PATCH +class GroupIdForGroupInclusion { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _groupId; + bool _groupIdSet = false; + + /// Id of group (read-only) + + int get groupId { + if (!_groupIdSet && _apiMapResponse.containsKey('group_id')) { + _groupId = _apiMapResponse['group_id']; + _groupIdSet = true; + } + return _groupId; + } + + set groupId(int v) { + _groupId = v; + _groupIdSet = true; + } + + GroupIdForGroupInclusion() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + GroupIdForGroupInclusion.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_groupIdSet || _apiMapResponse.containsKey('group_id')) { + json['group_id'] = groupId; + } + return json; + } +} + +/// WARNING: no writeable properties found for POST, PUT, or PATCH +class GroupIdForGroupUserInclusion { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _userId; + bool _userIdSet = false; + + /// Id of user (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + GroupIdForGroupUserInclusion() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + GroupIdForGroupUserInclusion.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + return json; + } +} + +class GroupSearch { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + bool _canAddToContentMetadata; + bool _canAddToContentMetadataSet = false; + + bool _containsCurrentUser; + bool _containsCurrentUserSet = false; + + String _externalGroupId; + bool _externalGroupIdSet = false; + + bool _externallyManaged; + bool _externallyManagedSet = false; + + int _id; + bool _idSet = false; + + bool _includeByDefault; + bool _includeByDefaultSet = false; + + String _name; + bool _nameSet = false; + + int _userCount; + bool _userCountSet = false; + + List _roles; + bool _rolesSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Group can be used in content access controls + + bool get canAddToContentMetadata { + if (!_canAddToContentMetadataSet && + _apiMapResponse.containsKey('can_add_to_content_metadata')) { + _canAddToContentMetadata = _apiMapResponse['can_add_to_content_metadata']; + _canAddToContentMetadataSet = true; + } + return _canAddToContentMetadata; + } + + set canAddToContentMetadata(bool v) { + _canAddToContentMetadata = v; + _canAddToContentMetadataSet = true; + } + + /// Currently logged in user is group member (read-only) + + bool get containsCurrentUser { + if (!_containsCurrentUserSet && + _apiMapResponse.containsKey('contains_current_user')) { + _containsCurrentUser = _apiMapResponse['contains_current_user']; + _containsCurrentUserSet = true; + } + return _containsCurrentUser; + } + + set containsCurrentUser(bool v) { + _containsCurrentUser = v; + _containsCurrentUserSet = true; + } + + /// External Id group if embed group (read-only) + + String get externalGroupId { + if (!_externalGroupIdSet && + _apiMapResponse.containsKey('external_group_id')) { + _externalGroupId = _apiMapResponse['external_group_id'] == null + ? null + : _apiMapResponse['external_group_id'].toString(); + _externalGroupIdSet = true; + } + return _externalGroupId; + } + + set externalGroupId(String v) { + _externalGroupId = v; + _externalGroupIdSet = true; + } + + /// Group membership controlled outside of Looker (read-only) + + bool get externallyManaged { + if (!_externallyManagedSet && + _apiMapResponse.containsKey('externally_managed')) { + _externallyManaged = _apiMapResponse['externally_managed']; + _externallyManagedSet = true; + } + return _externallyManaged; + } + + set externallyManaged(bool v) { + _externallyManaged = v; + _externallyManagedSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// New users are added to this group by default (read-only) + + bool get includeByDefault { + if (!_includeByDefaultSet && + _apiMapResponse.containsKey('include_by_default')) { + _includeByDefault = _apiMapResponse['include_by_default']; + _includeByDefaultSet = true; + } + return _includeByDefault; + } + + set includeByDefault(bool v) { + _includeByDefault = v; + _includeByDefaultSet = true; + } + + /// Name of group + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Number of users included in this group (read-only) + + int get userCount { + if (!_userCountSet && _apiMapResponse.containsKey('user_count')) { + _userCount = _apiMapResponse['user_count']; + _userCountSet = true; + } + return _userCount; + } + + set userCount(int v) { + _userCount = v; + _userCountSet = true; + } + + /// Roles assigned to group (read-only) + + List get roles { + if (!_rolesSet && _apiMapResponse.containsKey('roles')) { + _roles = _apiMapResponse['roles'] == null + ? null + : (_apiMapResponse['roles'] as List) + .map((i) => Role.fromResponse(i, apiResponseContentType)) + .toList(); + _rolesSet = true; + } + return _roles; + } + + set roles(List v) { + _roles = v; + _rolesSet = true; + } + + GroupSearch() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + GroupSearch.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_canAddToContentMetadataSet || + _apiMapResponse.containsKey('can_add_to_content_metadata')) { + json['can_add_to_content_metadata'] = canAddToContentMetadata; + } + if (_containsCurrentUserSet || + _apiMapResponse.containsKey('contains_current_user')) { + json['contains_current_user'] = containsCurrentUser; + } + if (_externalGroupIdSet || + _apiMapResponse.containsKey('external_group_id')) { + json['external_group_id'] = externalGroupId; + } + if (_externallyManagedSet || + _apiMapResponse.containsKey('externally_managed')) { + json['externally_managed'] = externallyManaged; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_includeByDefaultSet || + _apiMapResponse.containsKey('include_by_default')) { + json['include_by_default'] = includeByDefault; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_userCountSet || _apiMapResponse.containsKey('user_count')) { + json['user_count'] = userCount; + } + if (_rolesSet || _apiMapResponse.containsKey('roles')) { + json['roles'] = + roles == null ? null : roles.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class HomepageItem { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _contentCreatedBy; + bool _contentCreatedBySet = false; + + int _contentFavoriteId; + bool _contentFavoriteIdSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + String _contentUpdatedAt; + bool _contentUpdatedAtSet = false; + + String _customDescription; + bool _customDescriptionSet = false; + + String _customImageDataBase64; + bool _customImageDataBase64Set = false; + + String _customImageUrl; + bool _customImageUrlSet = false; + + String _customTitle; + bool _customTitleSet = false; + + String _customUrl; + bool _customUrlSet = false; + + int _dashboardId; + bool _dashboardIdSet = false; + + String _description; + bool _descriptionSet = false; + + int _favoriteCount; + bool _favoriteCountSet = false; + + int _homepageSectionId; + bool _homepageSectionIdSet = false; + + int _id; + bool _idSet = false; + + String _imageUrl; + bool _imageUrlSet = false; + + String _location; + bool _locationSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _lookmlDashboardId; + bool _lookmlDashboardIdSet = false; + + int _order; + bool _orderSet = false; + + double _sectionFetchTime; + bool _sectionFetchTimeSet = false; + + String _title; + bool _titleSet = false; + + String _url; + bool _urlSet = false; + + bool _useCustomDescription; + bool _useCustomDescriptionSet = false; + + bool _useCustomImage; + bool _useCustomImageSet = false; + + bool _useCustomTitle; + bool _useCustomTitleSet = false; + + bool _useCustomUrl; + bool _useCustomUrlSet = false; + + int _viewCount; + bool _viewCountSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Name of user who created the content this item is based on (read-only) + + String get contentCreatedBy { + if (!_contentCreatedBySet && + _apiMapResponse.containsKey('content_created_by')) { + _contentCreatedBy = _apiMapResponse['content_created_by'] == null + ? null + : _apiMapResponse['content_created_by'].toString(); + _contentCreatedBySet = true; + } + return _contentCreatedBy; + } + + set contentCreatedBy(String v) { + _contentCreatedBy = v; + _contentCreatedBySet = true; + } + + /// Content favorite id associated with the item this content is based on (read-only) + + int get contentFavoriteId { + if (!_contentFavoriteIdSet && + _apiMapResponse.containsKey('content_favorite_id')) { + _contentFavoriteId = _apiMapResponse['content_favorite_id']; + _contentFavoriteIdSet = true; + } + return _contentFavoriteId; + } + + set contentFavoriteId(int v) { + _contentFavoriteId = v; + _contentFavoriteIdSet = true; + } + + /// Content metadata id associated with the item this content is based on (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Last time the content that this item is based on was updated (read-only) + + String get contentUpdatedAt { + if (!_contentUpdatedAtSet && + _apiMapResponse.containsKey('content_updated_at')) { + _contentUpdatedAt = _apiMapResponse['content_updated_at'] == null + ? null + : _apiMapResponse['content_updated_at'].toString(); + _contentUpdatedAtSet = true; + } + return _contentUpdatedAt; + } + + set contentUpdatedAt(String v) { + _contentUpdatedAt = v; + _contentUpdatedAtSet = true; + } + + /// Custom description entered by the user, if present + + String get customDescription { + if (!_customDescriptionSet && + _apiMapResponse.containsKey('custom_description')) { + _customDescription = _apiMapResponse['custom_description'] == null + ? null + : _apiMapResponse['custom_description'].toString(); + _customDescriptionSet = true; + } + return _customDescription; + } + + set customDescription(String v) { + _customDescription = v; + _customDescriptionSet = true; + } + + /// (Write-Only) base64 encoded image data + + String get customImageDataBase64 { + if (!_customImageDataBase64Set && + _apiMapResponse.containsKey('custom_image_data_base64')) { + _customImageDataBase64 = + _apiMapResponse['custom_image_data_base64'] == null + ? null + : _apiMapResponse['custom_image_data_base64'].toString(); + _customImageDataBase64Set = true; + } + return _customImageDataBase64; + } + + set customImageDataBase64(String v) { + _customImageDataBase64 = v; + _customImageDataBase64Set = true; + } + + /// Custom image_url entered by the user, if present (read-only) + + String get customImageUrl { + if (!_customImageUrlSet && + _apiMapResponse.containsKey('custom_image_url')) { + _customImageUrl = _apiMapResponse['custom_image_url'] == null + ? null + : _apiMapResponse['custom_image_url'].toString(); + _customImageUrlSet = true; + } + return _customImageUrl; + } + + set customImageUrl(String v) { + _customImageUrl = v; + _customImageUrlSet = true; + } + + /// Custom title entered by the user, if present + + String get customTitle { + if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { + _customTitle = _apiMapResponse['custom_title'] == null + ? null + : _apiMapResponse['custom_title'].toString(); + _customTitleSet = true; + } + return _customTitle; + } + + set customTitle(String v) { + _customTitle = v; + _customTitleSet = true; + } + + /// Custom url entered by the user, if present + + String get customUrl { + if (!_customUrlSet && _apiMapResponse.containsKey('custom_url')) { + _customUrl = _apiMapResponse['custom_url'] == null + ? null + : _apiMapResponse['custom_url'].toString(); + _customUrlSet = true; + } + return _customUrl; + } + + set customUrl(String v) { + _customUrl = v; + _customUrlSet = true; + } + + /// Dashboard to base this item on + + int get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id']; + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(int v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// The actual description for display (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Number of times content has been favorited, if present (read-only) + + int get favoriteCount { + if (!_favoriteCountSet && _apiMapResponse.containsKey('favorite_count')) { + _favoriteCount = _apiMapResponse['favorite_count']; + _favoriteCountSet = true; + } + return _favoriteCount; + } + + set favoriteCount(int v) { + _favoriteCount = v; + _favoriteCountSet = true; + } + + /// Associated Homepage Section + + int get homepageSectionId { + if (!_homepageSectionIdSet && + _apiMapResponse.containsKey('homepage_section_id')) { + _homepageSectionId = _apiMapResponse['homepage_section_id']; + _homepageSectionIdSet = true; + } + return _homepageSectionId; + } + + set homepageSectionId(int v) { + _homepageSectionId = v; + _homepageSectionIdSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// The actual image_url for display (read-only) + + String get imageUrl { + if (!_imageUrlSet && _apiMapResponse.containsKey('image_url')) { + _imageUrl = _apiMapResponse['image_url'] == null + ? null + : _apiMapResponse['image_url'].toString(); + _imageUrlSet = true; + } + return _imageUrl; + } + + set imageUrl(String v) { + _imageUrl = v; + _imageUrlSet = true; + } + + /// The container folder name of the content (read-only) + + String get location { + if (!_locationSet && _apiMapResponse.containsKey('location')) { + _location = _apiMapResponse['location'] == null + ? null + : _apiMapResponse['location'].toString(); + _locationSet = true; + } + return _location; + } + + set location(String v) { + _location = v; + _locationSet = true; + } + + /// Look to base this item on + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// LookML Dashboard to base this item on + + String get lookmlDashboardId { + if (!_lookmlDashboardIdSet && + _apiMapResponse.containsKey('lookml_dashboard_id')) { + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null + ? null + : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardIdSet = true; + } + return _lookmlDashboardId; + } + + set lookmlDashboardId(String v) { + _lookmlDashboardId = v; + _lookmlDashboardIdSet = true; + } + + /// An arbitrary integer representing the sort order within the section + + int get order { + if (!_orderSet && _apiMapResponse.containsKey('order')) { + _order = _apiMapResponse['order']; + _orderSet = true; + } + return _order; + } + + set order(int v) { + _order = v; + _orderSet = true; + } + + /// Number of seconds it took to fetch the section this item is in (read-only) + + double get sectionFetchTime { + if (!_sectionFetchTimeSet && + _apiMapResponse.containsKey('section_fetch_time')) { + _sectionFetchTime = _apiMapResponse['section_fetch_time']; + _sectionFetchTimeSet = true; + } + return _sectionFetchTime; + } + + set sectionFetchTime(double v) { + _sectionFetchTime = v; + _sectionFetchTimeSet = true; + } + + /// The actual title for display (read-only) + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// The actual url for display (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Whether the custom description should be used instead of the content description, if the item is associated with content + + bool get useCustomDescription { + if (!_useCustomDescriptionSet && + _apiMapResponse.containsKey('use_custom_description')) { + _useCustomDescription = _apiMapResponse['use_custom_description']; + _useCustomDescriptionSet = true; + } + return _useCustomDescription; + } + + set useCustomDescription(bool v) { + _useCustomDescription = v; + _useCustomDescriptionSet = true; + } + + /// Whether the custom image should be used instead of the content image, if the item is associated with content + + bool get useCustomImage { + if (!_useCustomImageSet && + _apiMapResponse.containsKey('use_custom_image')) { + _useCustomImage = _apiMapResponse['use_custom_image']; + _useCustomImageSet = true; + } + return _useCustomImage; + } + + set useCustomImage(bool v) { + _useCustomImage = v; + _useCustomImageSet = true; + } + + /// Whether the custom title should be used instead of the content title, if the item is associated with content + + bool get useCustomTitle { + if (!_useCustomTitleSet && + _apiMapResponse.containsKey('use_custom_title')) { + _useCustomTitle = _apiMapResponse['use_custom_title']; + _useCustomTitleSet = true; + } + return _useCustomTitle; + } + + set useCustomTitle(bool v) { + _useCustomTitle = v; + _useCustomTitleSet = true; + } + + /// Whether the custom url should be used instead of the content url, if the item is associated with content + + bool get useCustomUrl { + if (!_useCustomUrlSet && _apiMapResponse.containsKey('use_custom_url')) { + _useCustomUrl = _apiMapResponse['use_custom_url']; + _useCustomUrlSet = true; + } + return _useCustomUrl; + } + + set useCustomUrl(bool v) { + _useCustomUrl = v; + _useCustomUrlSet = true; + } + + /// Number of times content has been viewed, if present (read-only) + + int get viewCount { + if (!_viewCountSet && _apiMapResponse.containsKey('view_count')) { + _viewCount = _apiMapResponse['view_count']; + _viewCountSet = true; + } + return _viewCount; + } + + set viewCount(int v) { + _viewCount = v; + _viewCountSet = true; + } + + HomepageItem() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + HomepageItem.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_contentCreatedBySet || + _apiMapResponse.containsKey('content_created_by')) { + json['content_created_by'] = contentCreatedBy; + } + if (_contentFavoriteIdSet || + _apiMapResponse.containsKey('content_favorite_id')) { + json['content_favorite_id'] = contentFavoriteId; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_contentUpdatedAtSet || + _apiMapResponse.containsKey('content_updated_at')) { + json['content_updated_at'] = contentUpdatedAt; + } + if (_customDescriptionSet || + _apiMapResponse.containsKey('custom_description')) { + json['custom_description'] = customDescription; + } + if (_customImageDataBase64Set || + _apiMapResponse.containsKey('custom_image_data_base64')) { + json['custom_image_data_base64'] = customImageDataBase64; + } + if (_customImageUrlSet || _apiMapResponse.containsKey('custom_image_url')) { + json['custom_image_url'] = customImageUrl; + } + if (_customTitleSet || _apiMapResponse.containsKey('custom_title')) { + json['custom_title'] = customTitle; + } + if (_customUrlSet || _apiMapResponse.containsKey('custom_url')) { + json['custom_url'] = customUrl; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_favoriteCountSet || _apiMapResponse.containsKey('favorite_count')) { + json['favorite_count'] = favoriteCount; + } + if (_homepageSectionIdSet || + _apiMapResponse.containsKey('homepage_section_id')) { + json['homepage_section_id'] = homepageSectionId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_imageUrlSet || _apiMapResponse.containsKey('image_url')) { + json['image_url'] = imageUrl; + } + if (_locationSet || _apiMapResponse.containsKey('location')) { + json['location'] = location; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_lookmlDashboardIdSet || + _apiMapResponse.containsKey('lookml_dashboard_id')) { + json['lookml_dashboard_id'] = lookmlDashboardId; + } + if (_orderSet || _apiMapResponse.containsKey('order')) { + json['order'] = order; + } + if (_sectionFetchTimeSet || + _apiMapResponse.containsKey('section_fetch_time')) { + json['section_fetch_time'] = sectionFetchTime; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_useCustomDescriptionSet || + _apiMapResponse.containsKey('use_custom_description')) { + json['use_custom_description'] = useCustomDescription; + } + if (_useCustomImageSet || _apiMapResponse.containsKey('use_custom_image')) { + json['use_custom_image'] = useCustomImage; + } + if (_useCustomTitleSet || _apiMapResponse.containsKey('use_custom_title')) { + json['use_custom_title'] = useCustomTitle; + } + if (_useCustomUrlSet || _apiMapResponse.containsKey('use_custom_url')) { + json['use_custom_url'] = useCustomUrl; + } + if (_viewCountSet || _apiMapResponse.containsKey('view_count')) { + json['view_count'] = viewCount; + } + return json; + } +} + +class HomepageSection { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + DateTime _deletedAt; + bool _deletedAtSet = false; + + String _detailUrl; + bool _detailUrlSet = false; + + int _homepageId; + bool _homepageIdSet = false; + + List _homepageItems; + bool _homepageItemsSet = false; + + int _id; + bool _idSet = false; + + bool _isHeader; + bool _isHeaderSet = false; + + List _itemOrder; + bool _itemOrderSet = false; + + String _title; + bool _titleSet = false; + + DateTime _updatedAt; + bool _updatedAtSet = false; + + String _description; + bool _descriptionSet = false; + + List _visibleItemOrder; + bool _visibleItemOrderSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Time at which this section was created. (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Time at which this section was deleted. + + DateTime get deletedAt { + if (!_deletedAtSet && _apiMapResponse.containsKey('deleted_at')) { + _deletedAt = _apiMapResponse['deleted_at'] == null + ? null + : DateTime.parse(_apiMapResponse['deleted_at']); + _deletedAtSet = true; + } + return _deletedAt; + } + + set deletedAt(DateTime v) { + _deletedAt = v; + _deletedAtSet = true; + } + + /// A URL pointing to a page showing further information about the content in the section. (read-only) + + String get detailUrl { + if (!_detailUrlSet && _apiMapResponse.containsKey('detail_url')) { + _detailUrl = _apiMapResponse['detail_url'] == null + ? null + : _apiMapResponse['detail_url'].toString(); + _detailUrlSet = true; + } + return _detailUrl; + } + + set detailUrl(String v) { + _detailUrl = v; + _detailUrlSet = true; + } + + /// Id reference to parent homepage + + int get homepageId { + if (!_homepageIdSet && _apiMapResponse.containsKey('homepage_id')) { + _homepageId = _apiMapResponse['homepage_id']; + _homepageIdSet = true; + } + return _homepageId; + } + + set homepageId(int v) { + _homepageId = v; + _homepageIdSet = true; + } + + /// Items in the homepage section (read-only) + + List get homepageItems { + if (!_homepageItemsSet && _apiMapResponse.containsKey('homepage_items')) { + _homepageItems = _apiMapResponse['homepage_items'] == null + ? null + : (_apiMapResponse['homepage_items'] as List) + .map((i) => HomepageItem.fromResponse(i, apiResponseContentType)) + .toList(); + _homepageItemsSet = true; + } + return _homepageItems; + } + + set homepageItems(List v) { + _homepageItems = v; + _homepageItemsSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Is this a header section (has no items) (read-only) + + bool get isHeader { + if (!_isHeaderSet && _apiMapResponse.containsKey('is_header')) { + _isHeader = _apiMapResponse['is_header']; + _isHeaderSet = true; + } + return _isHeader; + } + + set isHeader(bool v) { + _isHeader = v; + _isHeaderSet = true; + } + + /// ids of the homepage items in the order they should be displayed + + List get itemOrder { + if (!_itemOrderSet && _apiMapResponse.containsKey('item_order')) { + _itemOrder = _apiMapResponse['item_order'] == null + ? null + : _apiMapResponse['item_order'].map((i) => i as int).toList(); + _itemOrderSet = true; + } + return _itemOrder; + } + + set itemOrder(List v) { + _itemOrder = v; + _itemOrderSet = true; + } + + /// Name of row + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Time at which this section was last updated. (read-only) + + DateTime get updatedAt { + if (!_updatedAtSet && _apiMapResponse.containsKey('updated_at')) { + _updatedAt = _apiMapResponse['updated_at'] == null + ? null + : DateTime.parse(_apiMapResponse['updated_at']); + _updatedAtSet = true; + } + return _updatedAt; + } + + set updatedAt(DateTime v) { + _updatedAt = v; + _updatedAtSet = true; + } + + /// Description of the content found in this section. + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// ids of the homepage items the user can see in the order they should be displayed (read-only) + + List get visibleItemOrder { + if (!_visibleItemOrderSet && + _apiMapResponse.containsKey('visible_item_order')) { + _visibleItemOrder = _apiMapResponse['visible_item_order'] == null + ? null + : _apiMapResponse['visible_item_order'] + .map((i) => i as int) + .toList(); + _visibleItemOrderSet = true; + } + return _visibleItemOrder; + } + + set visibleItemOrder(List v) { + _visibleItemOrder = v; + _visibleItemOrderSet = true; + } + + HomepageSection() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + HomepageSection.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { + json['deleted_at'] = + deletedAt == null ? null : deletedAt.toIso8601String(); + } + if (_detailUrlSet || _apiMapResponse.containsKey('detail_url')) { + json['detail_url'] = detailUrl; + } + if (_homepageIdSet || _apiMapResponse.containsKey('homepage_id')) { + json['homepage_id'] = homepageId; + } + if (_homepageItemsSet || _apiMapResponse.containsKey('homepage_items')) { + json['homepage_items'] = homepageItems == null + ? null + : homepageItems.map((i) => i.toJson()).toList(); + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_isHeaderSet || _apiMapResponse.containsKey('is_header')) { + json['is_header'] = isHeader; + } + if (_itemOrderSet || _apiMapResponse.containsKey('item_order')) { + json['item_order'] = itemOrder; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { + json['updated_at'] = + updatedAt == null ? null : updatedAt.toIso8601String(); + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_visibleItemOrderSet || + _apiMapResponse.containsKey('visible_item_order')) { + json['visible_item_order'] = visibleItemOrder; + } + return json; + } +} + +class ImportedProject { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _url; + bool _urlSet = false; + + String _ref; + bool _refSet = false; + + bool _isRemote; + bool _isRemoteSet = false; + + /// Dependency name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Url for a remote dependency (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Ref for a remote dependency (read-only) + + String get ref { + if (!_refSet && _apiMapResponse.containsKey('ref')) { + _ref = _apiMapResponse['ref'] == null + ? null + : _apiMapResponse['ref'].toString(); + _refSet = true; + } + return _ref; + } + + set ref(String v) { + _ref = v; + _refSet = true; + } + + /// Flag signifying if a dependency is remote or local (read-only) + + bool get isRemote { + if (!_isRemoteSet && _apiMapResponse.containsKey('is_remote')) { + _isRemote = _apiMapResponse['is_remote']; + _isRemoteSet = true; + } + return _isRemote; + } + + set isRemote(bool v) { + _isRemote = v; + _isRemoteSet = true; + } + + ImportedProject() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ImportedProject.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_refSet || _apiMapResponse.containsKey('ref')) { + json['ref'] = ref; + } + if (_isRemoteSet || _apiMapResponse.containsKey('is_remote')) { + json['is_remote'] = isRemote; + } + return json; + } +} + +class Integration { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + int _integrationHubId; + bool _integrationHubIdSet = false; + + String _label; + bool _labelSet = false; + + String _description; + bool _descriptionSet = false; + + bool _enabled; + bool _enabledSet = false; + + List _params; + bool _paramsSet = false; + + List _supportedFormats; + bool _supportedFormatsSet = false; + + List _supportedActionTypes; + bool _supportedActionTypesSet = false; + + List _supportedFormattings; + bool _supportedFormattingsSet = false; + + List _supportedVisualizationFormattings; + bool _supportedVisualizationFormattingsSet = false; + + List _supportedDownloadSettings; + bool _supportedDownloadSettingsSet = false; + + String _iconUrl; + bool _iconUrlSet = false; + + bool _usesOauth; + bool _usesOauthSet = false; + + List _requiredFields; + bool _requiredFieldsSet = false; + + bool _delegateOauth; + bool _delegateOauthSet = false; + + List _installedDelegateOauthTargets; + bool _installedDelegateOauthTargetsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// ID of the integration. (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// ID of the integration hub. (read-only) + + int get integrationHubId { + if (!_integrationHubIdSet && + _apiMapResponse.containsKey('integration_hub_id')) { + _integrationHubId = _apiMapResponse['integration_hub_id']; + _integrationHubIdSet = true; + } + return _integrationHubId; + } + + set integrationHubId(int v) { + _integrationHubId = v; + _integrationHubIdSet = true; + } + + /// Label for the integration. (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Description of the integration. (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Whether the integration is available to users. + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Array of params for the integration. + + List get params { + if (!_paramsSet && _apiMapResponse.containsKey('params')) { + _params = _apiMapResponse['params'] == null + ? null + : (_apiMapResponse['params'] as List) + .map((i) => + IntegrationParam.fromResponse(i, apiResponseContentType)) + .toList(); + _paramsSet = true; + } + return _params; + } + + set params(List v) { + _params = v; + _paramsSet = true; + } + + /// A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only) + + List get supportedFormats { + if (!_supportedFormatsSet && + _apiMapResponse.containsKey('supported_formats')) { + _supportedFormats = _apiMapResponse['supported_formats'] == null + ? null + : _apiMapResponse['supported_formats'] + .map((i) => i as SupportedFormats) + .toList(); + _supportedFormatsSet = true; + } + return _supportedFormats; + } + + set supportedFormats(List v) { + _supportedFormats = v; + _supportedFormatsSet = true; + } + + /// A list of action types the integration supports. Valid values are: "cell", "query", "dashboard". (read-only) + + List get supportedActionTypes { + if (!_supportedActionTypesSet && + _apiMapResponse.containsKey('supported_action_types')) { + _supportedActionTypes = _apiMapResponse['supported_action_types'] == null + ? null + : _apiMapResponse['supported_action_types'] + .map((i) => i as SupportedActionTypes) + .toList(); + _supportedActionTypesSet = true; + } + return _supportedActionTypes; + } + + set supportedActionTypes(List v) { + _supportedActionTypes = v; + _supportedActionTypesSet = true; + } + + /// A list of formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: "formatted", "unformatted". (read-only) + + List get supportedFormattings { + if (!_supportedFormattingsSet && + _apiMapResponse.containsKey('supported_formattings')) { + _supportedFormattings = _apiMapResponse['supported_formattings'] == null + ? null + : _apiMapResponse['supported_formattings'] + .map((i) => i as SupportedFormattings) + .toList(); + _supportedFormattingsSet = true; + } + return _supportedFormattings; + } + + set supportedFormattings(List v) { + _supportedFormattings = v; + _supportedFormattingsSet = true; + } + + /// A list of visualization formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: "apply", "noapply". (read-only) + + List + get supportedVisualizationFormattings { + if (!_supportedVisualizationFormattingsSet && + _apiMapResponse.containsKey('supported_visualization_formattings')) { + _supportedVisualizationFormattings = + _apiMapResponse['supported_visualization_formattings'] == null + ? null + : _apiMapResponse['supported_visualization_formattings'] + .map( + (i) => i as SupportedVisualizationFormattings) + .toList(); + _supportedVisualizationFormattingsSet = true; + } + return _supportedVisualizationFormattings; + } + + set supportedVisualizationFormattings( + List v) { + _supportedVisualizationFormattings = v; + _supportedVisualizationFormattingsSet = true; + } + + /// A list of all the download mechanisms the integration supports. The order of values is not significant: Looker will select the most appropriate supported download mechanism for a given query. The integration must ensure it can handle any of the mechanisms it claims to support. If unspecified, this defaults to all download setting values. Valid values are: "push", "url". (read-only) + + List get supportedDownloadSettings { + if (!_supportedDownloadSettingsSet && + _apiMapResponse.containsKey('supported_download_settings')) { + _supportedDownloadSettings = + _apiMapResponse['supported_download_settings'] == null + ? null + : _apiMapResponse['supported_download_settings'] + .map( + (i) => i as SupportedDownloadSettings) + .toList(); + _supportedDownloadSettingsSet = true; + } + return _supportedDownloadSettings; + } + + set supportedDownloadSettings(List v) { + _supportedDownloadSettings = v; + _supportedDownloadSettingsSet = true; + } + + /// URL to an icon for the integration. (read-only) + + String get iconUrl { + if (!_iconUrlSet && _apiMapResponse.containsKey('icon_url')) { + _iconUrl = _apiMapResponse['icon_url'] == null + ? null + : _apiMapResponse['icon_url'].toString(); + _iconUrlSet = true; + } + return _iconUrl; + } + + set iconUrl(String v) { + _iconUrl = v; + _iconUrlSet = true; + } + + /// Whether the integration uses oauth. (read-only) + + bool get usesOauth { + if (!_usesOauthSet && _apiMapResponse.containsKey('uses_oauth')) { + _usesOauth = _apiMapResponse['uses_oauth']; + _usesOauthSet = true; + } + return _usesOauth; + } + + set usesOauth(bool v) { + _usesOauth = v; + _usesOauthSet = true; + } + + /// A list of descriptions of required fields that this integration is compatible with. If there are multiple entries in this list, the integration requires more than one field. If unspecified, no fields will be required. (read-only) + + List get requiredFields { + if (!_requiredFieldsSet && _apiMapResponse.containsKey('required_fields')) { + _requiredFields = _apiMapResponse['required_fields'] == null + ? null + : (_apiMapResponse['required_fields'] as List) + .map((i) => IntegrationRequiredField.fromResponse( + i, apiResponseContentType)) + .toList(); + _requiredFieldsSet = true; + } + return _requiredFields; + } + + set requiredFields(List v) { + _requiredFields = v; + _requiredFieldsSet = true; + } + + /// Whether the integration uses delegate oauth, which allows federation between an integration installation scope specific entity (like org, group, and team, etc.) and Looker. (read-only) + + bool get delegateOauth { + if (!_delegateOauthSet && _apiMapResponse.containsKey('delegate_oauth')) { + _delegateOauth = _apiMapResponse['delegate_oauth']; + _delegateOauthSet = true; + } + return _delegateOauth; + } + + set delegateOauth(bool v) { + _delegateOauth = v; + _delegateOauthSet = true; + } + + /// Whether the integration is available to users. + + List get installedDelegateOauthTargets { + if (!_installedDelegateOauthTargetsSet && + _apiMapResponse.containsKey('installed_delegate_oauth_targets')) { + _installedDelegateOauthTargets = + _apiMapResponse['installed_delegate_oauth_targets'] == null + ? null + : _apiMapResponse['installed_delegate_oauth_targets'] + .map((i) => i as int) + .toList(); + _installedDelegateOauthTargetsSet = true; + } + return _installedDelegateOauthTargets; + } + + set installedDelegateOauthTargets(List v) { + _installedDelegateOauthTargets = v; + _installedDelegateOauthTargetsSet = true; + } + + Integration() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Integration.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_integrationHubIdSet || + _apiMapResponse.containsKey('integration_hub_id')) { + json['integration_hub_id'] = integrationHubId; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_paramsSet || _apiMapResponse.containsKey('params')) { + json['params'] = + params == null ? null : params.map((i) => i.toJson()).toList(); + } + if (_supportedFormatsSet || + _apiMapResponse.containsKey('supported_formats')) { + json['supported_formats'] = supportedFormats; + } + if (_supportedActionTypesSet || + _apiMapResponse.containsKey('supported_action_types')) { + json['supported_action_types'] = supportedActionTypes; + } + if (_supportedFormattingsSet || + _apiMapResponse.containsKey('supported_formattings')) { + json['supported_formattings'] = supportedFormattings; + } + if (_supportedVisualizationFormattingsSet || + _apiMapResponse.containsKey('supported_visualization_formattings')) { + json['supported_visualization_formattings'] = + supportedVisualizationFormattings; + } + if (_supportedDownloadSettingsSet || + _apiMapResponse.containsKey('supported_download_settings')) { + json['supported_download_settings'] = supportedDownloadSettings; + } + if (_iconUrlSet || _apiMapResponse.containsKey('icon_url')) { + json['icon_url'] = iconUrl; + } + if (_usesOauthSet || _apiMapResponse.containsKey('uses_oauth')) { + json['uses_oauth'] = usesOauth; + } + if (_requiredFieldsSet || _apiMapResponse.containsKey('required_fields')) { + json['required_fields'] = requiredFields == null + ? null + : requiredFields.map((i) => i.toJson()).toList(); + } + if (_delegateOauthSet || _apiMapResponse.containsKey('delegate_oauth')) { + json['delegate_oauth'] = delegateOauth; + } + if (_installedDelegateOauthTargetsSet || + _apiMapResponse.containsKey('installed_delegate_oauth_targets')) { + json['installed_delegate_oauth_targets'] = installedDelegateOauthTargets; + } + return json; + } +} + +class IntegrationHub { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _url; + bool _urlSet = false; + + String _label; + bool _labelSet = false; + + bool _official; + bool _officialSet = false; + + String _fetchErrorMessage; + bool _fetchErrorMessageSet = false; + + String _authorizationToken; + bool _authorizationTokenSet = false; + + bool _hasAuthorizationToken; + bool _hasAuthorizationTokenSet = false; + + bool _legalAgreementSigned; + bool _legalAgreementSignedSet = false; + + bool _legalAgreementRequired; + bool _legalAgreementRequiredSet = false; + + String _legalAgreementText; + bool _legalAgreementTextSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// ID of the hub. (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// URL of the hub. + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Label of the hub. (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Whether this hub is a first-party integration hub operated by Looker. (read-only) + + bool get official { + if (!_officialSet && _apiMapResponse.containsKey('official')) { + _official = _apiMapResponse['official']; + _officialSet = true; + } + return _official; + } + + set official(bool v) { + _official = v; + _officialSet = true; + } + + /// An error message, present if the integration hub metadata could not be fetched. If this is present, the integration hub is unusable. (read-only) + + String get fetchErrorMessage { + if (!_fetchErrorMessageSet && + _apiMapResponse.containsKey('fetch_error_message')) { + _fetchErrorMessage = _apiMapResponse['fetch_error_message'] == null + ? null + : _apiMapResponse['fetch_error_message'].toString(); + _fetchErrorMessageSet = true; + } + return _fetchErrorMessage; + } + + set fetchErrorMessage(String v) { + _fetchErrorMessage = v; + _fetchErrorMessageSet = true; + } + + /// (Write-Only) An authorization key that will be sent to the integration hub on every request. + + String get authorizationToken { + if (!_authorizationTokenSet && + _apiMapResponse.containsKey('authorization_token')) { + _authorizationToken = _apiMapResponse['authorization_token'] == null + ? null + : _apiMapResponse['authorization_token'].toString(); + _authorizationTokenSet = true; + } + return _authorizationToken; + } + + set authorizationToken(String v) { + _authorizationToken = v; + _authorizationTokenSet = true; + } + + /// Whether the authorization_token is set for the hub. (read-only) + + bool get hasAuthorizationToken { + if (!_hasAuthorizationTokenSet && + _apiMapResponse.containsKey('has_authorization_token')) { + _hasAuthorizationToken = _apiMapResponse['has_authorization_token']; + _hasAuthorizationTokenSet = true; + } + return _hasAuthorizationToken; + } + + set hasAuthorizationToken(bool v) { + _hasAuthorizationToken = v; + _hasAuthorizationTokenSet = true; + } + + /// Whether the legal agreement message has been signed by the user. This only matters if legal_agreement_required is true. (read-only) + + bool get legalAgreementSigned { + if (!_legalAgreementSignedSet && + _apiMapResponse.containsKey('legal_agreement_signed')) { + _legalAgreementSigned = _apiMapResponse['legal_agreement_signed']; + _legalAgreementSignedSet = true; + } + return _legalAgreementSigned; + } + + set legalAgreementSigned(bool v) { + _legalAgreementSigned = v; + _legalAgreementSignedSet = true; + } + + /// Whether the legal terms for the integration hub are required before use. (read-only) + + bool get legalAgreementRequired { + if (!_legalAgreementRequiredSet && + _apiMapResponse.containsKey('legal_agreement_required')) { + _legalAgreementRequired = _apiMapResponse['legal_agreement_required']; + _legalAgreementRequiredSet = true; + } + return _legalAgreementRequired; + } + + set legalAgreementRequired(bool v) { + _legalAgreementRequired = v; + _legalAgreementRequiredSet = true; + } + + /// The legal agreement text for this integration hub. (read-only) + + String get legalAgreementText { + if (!_legalAgreementTextSet && + _apiMapResponse.containsKey('legal_agreement_text')) { + _legalAgreementText = _apiMapResponse['legal_agreement_text'] == null + ? null + : _apiMapResponse['legal_agreement_text'].toString(); + _legalAgreementTextSet = true; + } + return _legalAgreementText; + } + + set legalAgreementText(String v) { + _legalAgreementText = v; + _legalAgreementTextSet = true; + } + + IntegrationHub() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + IntegrationHub.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_officialSet || _apiMapResponse.containsKey('official')) { + json['official'] = official; + } + if (_fetchErrorMessageSet || + _apiMapResponse.containsKey('fetch_error_message')) { + json['fetch_error_message'] = fetchErrorMessage; + } + if (_authorizationTokenSet || + _apiMapResponse.containsKey('authorization_token')) { + json['authorization_token'] = authorizationToken; + } + if (_hasAuthorizationTokenSet || + _apiMapResponse.containsKey('has_authorization_token')) { + json['has_authorization_token'] = hasAuthorizationToken; + } + if (_legalAgreementSignedSet || + _apiMapResponse.containsKey('legal_agreement_signed')) { + json['legal_agreement_signed'] = legalAgreementSigned; + } + if (_legalAgreementRequiredSet || + _apiMapResponse.containsKey('legal_agreement_required')) { + json['legal_agreement_required'] = legalAgreementRequired; + } + if (_legalAgreementTextSet || + _apiMapResponse.containsKey('legal_agreement_text')) { + json['legal_agreement_text'] = legalAgreementText; + } + return json; + } +} + +class IntegrationParam { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _label; + bool _labelSet = false; + + String _description; + bool _descriptionSet = false; + + bool _required; + bool _requiredSet = false; + + bool _hasValue; + bool _hasValueSet = false; + + String _value; + bool _valueSet = false; + + String _userAttributeName; + bool _userAttributeNameSet = false; + + bool _sensitive; + bool _sensitiveSet = false; + + bool _perUser; + bool _perUserSet = false; + + String _delegateOauthUrl; + bool _delegateOauthUrlSet = false; + + /// Name of the parameter. + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Label of the parameter. (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Short description of the parameter. (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Whether the parameter is required to be set to use the destination. If unspecified, this defaults to false. (read-only) + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// Whether the parameter has a value set. (read-only) + + bool get hasValue { + if (!_hasValueSet && _apiMapResponse.containsKey('has_value')) { + _hasValue = _apiMapResponse['has_value']; + _hasValueSet = true; + } + return _hasValue; + } + + set hasValue(bool v) { + _hasValue = v; + _hasValueSet = true; + } + + /// The current value of the parameter. Always null if the value is sensitive. When writing, null values will be ignored. Set the value to an empty string to clear it. + + String get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value'] == null + ? null + : _apiMapResponse['value'].toString(); + _valueSet = true; + } + return _value; + } + + set value(String v) { + _value = v; + _valueSet = true; + } + + /// When present, the param's value comes from this user attribute instead of the 'value' parameter. Set to null to use the 'value'. + + String get userAttributeName { + if (!_userAttributeNameSet && + _apiMapResponse.containsKey('user_attribute_name')) { + _userAttributeName = _apiMapResponse['user_attribute_name'] == null + ? null + : _apiMapResponse['user_attribute_name'].toString(); + _userAttributeNameSet = true; + } + return _userAttributeName; + } + + set userAttributeName(String v) { + _userAttributeName = v; + _userAttributeNameSet = true; + } + + /// Whether the parameter contains sensitive data like API credentials. If unspecified, this defaults to true. (read-only) + + bool get sensitive { + if (!_sensitiveSet && _apiMapResponse.containsKey('sensitive')) { + _sensitive = _apiMapResponse['sensitive']; + _sensitiveSet = true; + } + return _sensitive; + } + + set sensitive(bool v) { + _sensitive = v; + _sensitiveSet = true; + } + + /// When true, this parameter must be assigned to a user attribute in the admin panel (instead of a constant value), and that value may be updated by the user as part of the integration flow. (read-only) + + bool get perUser { + if (!_perUserSet && _apiMapResponse.containsKey('per_user')) { + _perUser = _apiMapResponse['per_user']; + _perUserSet = true; + } + return _perUser; + } + + set perUser(bool v) { + _perUser = v; + _perUserSet = true; + } + + /// When present, the param represents the oauth url the user will be taken to. (read-only) + + String get delegateOauthUrl { + if (!_delegateOauthUrlSet && + _apiMapResponse.containsKey('delegate_oauth_url')) { + _delegateOauthUrl = _apiMapResponse['delegate_oauth_url'] == null + ? null + : _apiMapResponse['delegate_oauth_url'].toString(); + _delegateOauthUrlSet = true; + } + return _delegateOauthUrl; + } + + set delegateOauthUrl(String v) { + _delegateOauthUrl = v; + _delegateOauthUrlSet = true; + } + + IntegrationParam() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + IntegrationParam.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_hasValueSet || _apiMapResponse.containsKey('has_value')) { + json['has_value'] = hasValue; + } + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + if (_userAttributeNameSet || + _apiMapResponse.containsKey('user_attribute_name')) { + json['user_attribute_name'] = userAttributeName; + } + if (_sensitiveSet || _apiMapResponse.containsKey('sensitive')) { + json['sensitive'] = sensitive; + } + if (_perUserSet || _apiMapResponse.containsKey('per_user')) { + json['per_user'] = perUser; + } + if (_delegateOauthUrlSet || + _apiMapResponse.containsKey('delegate_oauth_url')) { + json['delegate_oauth_url'] = delegateOauthUrl; + } + return json; + } +} + +class IntegrationRequiredField { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _tag; + bool _tagSet = false; + + List _anyTag; + bool _anyTagSet = false; + + List _allTags; + bool _allTagsSet = false; + + /// Matches a field that has this tag. (read-only) + + String get tag { + if (!_tagSet && _apiMapResponse.containsKey('tag')) { + _tag = _apiMapResponse['tag'] == null + ? null + : _apiMapResponse['tag'].toString(); + _tagSet = true; + } + return _tag; + } + + set tag(String v) { + _tag = v; + _tagSet = true; + } + + /// If present, supercedes 'tag' and matches a field that has any of the provided tags. (read-only) + + List get anyTag { + if (!_anyTagSet && _apiMapResponse.containsKey('any_tag')) { + _anyTag = _apiMapResponse['any_tag'] == null + ? null + : _apiMapResponse['any_tag'].map((i) => i as String).toList(); + _anyTagSet = true; + } + return _anyTag; + } + + set anyTag(List v) { + _anyTag = v; + _anyTagSet = true; + } + + /// If present, supercedes 'tag' and matches a field that has all of the provided tags. (read-only) + + List get allTags { + if (!_allTagsSet && _apiMapResponse.containsKey('all_tags')) { + _allTags = _apiMapResponse['all_tags'] == null + ? null + : _apiMapResponse['all_tags'] + .map((i) => i as String) + .toList(); + _allTagsSet = true; + } + return _allTags; + } + + set allTags(List v) { + _allTags = v; + _allTagsSet = true; + } + + IntegrationRequiredField() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + IntegrationRequiredField.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_tagSet || _apiMapResponse.containsKey('tag')) { + json['tag'] = tag; + } + if (_anyTagSet || _apiMapResponse.containsKey('any_tag')) { + json['any_tag'] = anyTag; + } + if (_allTagsSet || _apiMapResponse.containsKey('all_tags')) { + json['all_tags'] = allTags; + } + return json; + } +} + +class IntegrationTestResult { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _success; + bool _successSet = false; + + String _message; + bool _messageSet = false; + + List _delegateOauthResult; + bool _delegateOauthResultSet = false; + + /// Whether or not the test was successful (read-only) + + bool get success { + if (!_successSet && _apiMapResponse.containsKey('success')) { + _success = _apiMapResponse['success']; + _successSet = true; + } + return _success; + } + + set success(bool v) { + _success = v; + _successSet = true; + } + + /// A message representing the results of the test. (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// An array of connection test result for delegate oauth actions. (read-only) + + List get delegateOauthResult { + if (!_delegateOauthResultSet && + _apiMapResponse.containsKey('delegate_oauth_result')) { + _delegateOauthResult = _apiMapResponse['delegate_oauth_result'] == null + ? null + : (_apiMapResponse['delegate_oauth_result'] as List) + .map((i) => + DelegateOauthTest.fromResponse(i, apiResponseContentType)) + .toList(); + _delegateOauthResultSet = true; + } + return _delegateOauthResult; + } + + set delegateOauthResult(List v) { + _delegateOauthResult = v; + _delegateOauthResultSet = true; + } + + IntegrationTestResult() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + IntegrationTestResult.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_successSet || _apiMapResponse.containsKey('success')) { + json['success'] = success; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_delegateOauthResultSet || + _apiMapResponse.containsKey('delegate_oauth_result')) { + json['delegate_oauth_result'] = delegateOauthResult == null + ? null + : delegateOauthResult.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class InternalHelpResources { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + bool _enabled; + bool _enabledSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// If true and internal help resources content is not blank then the link for internal help resources will be shown in the help menu and the content displayed within Looker + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + InternalHelpResources() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + InternalHelpResources.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + return json; + } +} + +class InternalHelpResourcesContent { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _organizationName; + bool _organizationNameSet = false; + + String _markdownContent; + bool _markdownContentSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Text to display in the help menu item which will display the internal help resources + + String get organizationName { + if (!_organizationNameSet && + _apiMapResponse.containsKey('organization_name')) { + _organizationName = _apiMapResponse['organization_name'] == null + ? null + : _apiMapResponse['organization_name'].toString(); + _organizationNameSet = true; + } + return _organizationName; + } + + set organizationName(String v) { + _organizationName = v; + _organizationNameSet = true; + } + + /// Content to be displayed in the internal help resources page/modal + + String get markdownContent { + if (!_markdownContentSet && + _apiMapResponse.containsKey('markdown_content')) { + _markdownContent = _apiMapResponse['markdown_content'] == null + ? null + : _apiMapResponse['markdown_content'].toString(); + _markdownContentSet = true; + } + return _markdownContent; + } + + set markdownContent(String v) { + _markdownContent = v; + _markdownContentSet = true; + } + + InternalHelpResourcesContent() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + InternalHelpResourcesContent.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_organizationNameSet || + _apiMapResponse.containsKey('organization_name')) { + json['organization_name'] = organizationName; + } + if (_markdownContentSet || + _apiMapResponse.containsKey('markdown_content')) { + json['markdown_content'] = markdownContent; + } + return json; + } +} + +/// The type of the investigative content Valid values are: "dashboard". (Enum defined in Alert) +enum InvestigativeContentType { dashboard } + +class InvestigativeContentTypeMapper { + static String toStringValue(InvestigativeContentType e) { + switch (e) { + case InvestigativeContentType.dashboard: + return 'dashboard'; + + default: + return null; + } + } + + static InvestigativeContentType fromStringValue(String s) { + if (s == 'dashboard') { + return InvestigativeContentType.dashboard; + } + return null; + } +} + +class LDAPConfig { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + bool _alternateEmailLoginAllowed; + bool _alternateEmailLoginAllowedSet = false; + + String _authPassword; + bool _authPasswordSet = false; + + bool _authRequiresRole; + bool _authRequiresRoleSet = false; + + String _authUsername; + bool _authUsernameSet = false; + + String _connectionHost; + bool _connectionHostSet = false; + + String _connectionPort; + bool _connectionPortSet = false; + + bool _connectionTls; + bool _connectionTlsSet = false; + + bool _connectionTlsNoVerify; + bool _connectionTlsNoVerifySet = false; + + List _defaultNewUserGroupIds; + bool _defaultNewUserGroupIdsSet = false; + + List _defaultNewUserGroups; + bool _defaultNewUserGroupsSet = false; + + List _defaultNewUserRoleIds; + bool _defaultNewUserRoleIdsSet = false; + + List _defaultNewUserRoles; + bool _defaultNewUserRolesSet = false; + + bool _enabled; + bool _enabledSet = false; + + bool _forceNoPage; + bool _forceNoPageSet = false; + + List _groups; + bool _groupsSet = false; + + String _groupsBaseDn; + bool _groupsBaseDnSet = false; + + String _groupsFinderType; + bool _groupsFinderTypeSet = false; + + String _groupsMemberAttribute; + bool _groupsMemberAttributeSet = false; + + String _groupsObjectclasses; + bool _groupsObjectclassesSet = false; + + String _groupsUserAttribute; + bool _groupsUserAttributeSet = false; + + List _groupsWithRoleIds; + bool _groupsWithRoleIdsSet = false; + + bool _hasAuthPassword; + bool _hasAuthPasswordSet = false; + + bool _mergeNewUsersByEmail; + bool _mergeNewUsersByEmailSet = false; + + String _modifiedAt; + bool _modifiedAtSet = false; + + String _modifiedBy; + bool _modifiedBySet = false; + + bool _setRolesFromGroups; + bool _setRolesFromGroupsSet = false; + + String _testLdapPassword; + bool _testLdapPasswordSet = false; + + String _testLdapUser; + bool _testLdapUserSet = false; + + String _userAttributeMapEmail; + bool _userAttributeMapEmailSet = false; + + String _userAttributeMapFirstName; + bool _userAttributeMapFirstNameSet = false; + + String _userAttributeMapLastName; + bool _userAttributeMapLastNameSet = false; + + String _userAttributeMapLdapId; + bool _userAttributeMapLdapIdSet = false; + + List _userAttributes; + bool _userAttributesSet = false; + + List _userAttributesWithIds; + bool _userAttributesWithIdsSet = false; + + String _userBindBaseDn; + bool _userBindBaseDnSet = false; + + String _userCustomFilter; + bool _userCustomFilterSet = false; + + String _userIdAttributeNames; + bool _userIdAttributeNamesSet = false; + + String _userObjectclass; + bool _userObjectclassSet = false; + + bool _allowNormalGroupMembership; + bool _allowNormalGroupMembershipSet = false; + + bool _allowRolesFromNormalGroups; + bool _allowRolesFromNormalGroupsSet = false; + + bool _allowDirectRoles; + bool _allowDirectRolesSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Allow alternate email-based login via '/login/email' for admins and for specified users with the 'login_special_email' permission. This option is useful as a fallback during ldap setup, if ldap config problems occur later, or if you need to support some users who are not in your ldap directory. Looker email/password logins are always disabled for regular users when ldap is enabled. + + bool get alternateEmailLoginAllowed { + if (!_alternateEmailLoginAllowedSet && + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + _alternateEmailLoginAllowed = + _apiMapResponse['alternate_email_login_allowed']; + _alternateEmailLoginAllowedSet = true; + } + return _alternateEmailLoginAllowed; + } + + set alternateEmailLoginAllowed(bool v) { + _alternateEmailLoginAllowed = v; + _alternateEmailLoginAllowedSet = true; + } + + /// (Write-Only) Password for the LDAP account used to access the LDAP server + + String get authPassword { + if (!_authPasswordSet && _apiMapResponse.containsKey('auth_password')) { + _authPassword = _apiMapResponse['auth_password'] == null + ? null + : _apiMapResponse['auth_password'].toString(); + _authPasswordSet = true; + } + return _authPassword; + } + + set authPassword(String v) { + _authPassword = v; + _authPasswordSet = true; + } + + /// Users will not be allowed to login at all unless a role for them is found in LDAP if set to true + + bool get authRequiresRole { + if (!_authRequiresRoleSet && + _apiMapResponse.containsKey('auth_requires_role')) { + _authRequiresRole = _apiMapResponse['auth_requires_role']; + _authRequiresRoleSet = true; + } + return _authRequiresRole; + } + + set authRequiresRole(bool v) { + _authRequiresRole = v; + _authRequiresRoleSet = true; + } + + /// Distinguished name of LDAP account used to access the LDAP server + + String get authUsername { + if (!_authUsernameSet && _apiMapResponse.containsKey('auth_username')) { + _authUsername = _apiMapResponse['auth_username'] == null + ? null + : _apiMapResponse['auth_username'].toString(); + _authUsernameSet = true; + } + return _authUsername; + } + + set authUsername(String v) { + _authUsername = v; + _authUsernameSet = true; + } + + /// LDAP server hostname + + String get connectionHost { + if (!_connectionHostSet && _apiMapResponse.containsKey('connection_host')) { + _connectionHost = _apiMapResponse['connection_host'] == null + ? null + : _apiMapResponse['connection_host'].toString(); + _connectionHostSet = true; + } + return _connectionHost; + } + + set connectionHost(String v) { + _connectionHost = v; + _connectionHostSet = true; + } + + /// LDAP host port + + String get connectionPort { + if (!_connectionPortSet && _apiMapResponse.containsKey('connection_port')) { + _connectionPort = _apiMapResponse['connection_port'] == null + ? null + : _apiMapResponse['connection_port'].toString(); + _connectionPortSet = true; + } + return _connectionPort; + } + + set connectionPort(String v) { + _connectionPort = v; + _connectionPortSet = true; + } + + /// Use Transport Layer Security + + bool get connectionTls { + if (!_connectionTlsSet && _apiMapResponse.containsKey('connection_tls')) { + _connectionTls = _apiMapResponse['connection_tls']; + _connectionTlsSet = true; + } + return _connectionTls; + } + + set connectionTls(bool v) { + _connectionTls = v; + _connectionTlsSet = true; + } + + /// Do not verify peer when using TLS + + bool get connectionTlsNoVerify { + if (!_connectionTlsNoVerifySet && + _apiMapResponse.containsKey('connection_tls_no_verify')) { + _connectionTlsNoVerify = _apiMapResponse['connection_tls_no_verify']; + _connectionTlsNoVerifySet = true; + } + return _connectionTlsNoVerify; + } + + set connectionTlsNoVerify(bool v) { + _connectionTlsNoVerify = v; + _connectionTlsNoVerifySet = true; + } + + /// (Write-Only) Array of ids of groups that will be applied to new users the first time they login via LDAP + + List get defaultNewUserGroupIds { + if (!_defaultNewUserGroupIdsSet && + _apiMapResponse.containsKey('default_new_user_group_ids')) { + _defaultNewUserGroupIds = + _apiMapResponse['default_new_user_group_ids'] == null + ? null + : _apiMapResponse['default_new_user_group_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserGroupIdsSet = true; + } + return _defaultNewUserGroupIds; + } + + set defaultNewUserGroupIds(List v) { + _defaultNewUserGroupIds = v; + _defaultNewUserGroupIdsSet = true; + } + + /// (Read-only) Groups that will be applied to new users the first time they login via LDAP (read-only) + + List get defaultNewUserGroups { + if (!_defaultNewUserGroupsSet && + _apiMapResponse.containsKey('default_new_user_groups')) { + _defaultNewUserGroups = _apiMapResponse['default_new_user_groups'] == null + ? null + : (_apiMapResponse['default_new_user_groups'] as List) + .map((i) => Group.fromResponse(i, apiResponseContentType)) + .toList(); + _defaultNewUserGroupsSet = true; + } + return _defaultNewUserGroups; + } + + set defaultNewUserGroups(List v) { + _defaultNewUserGroups = v; + _defaultNewUserGroupsSet = true; + } + + /// (Write-Only) Array of ids of roles that will be applied to new users the first time they login via LDAP + + List get defaultNewUserRoleIds { + if (!_defaultNewUserRoleIdsSet && + _apiMapResponse.containsKey('default_new_user_role_ids')) { + _defaultNewUserRoleIds = + _apiMapResponse['default_new_user_role_ids'] == null + ? null + : _apiMapResponse['default_new_user_role_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserRoleIdsSet = true; + } + return _defaultNewUserRoleIds; + } + + set defaultNewUserRoleIds(List v) { + _defaultNewUserRoleIds = v; + _defaultNewUserRoleIdsSet = true; + } + + /// (Read-only) Roles that will be applied to new users the first time they login via LDAP (read-only) + + List get defaultNewUserRoles { + if (!_defaultNewUserRolesSet && + _apiMapResponse.containsKey('default_new_user_roles')) { + _defaultNewUserRoles = _apiMapResponse['default_new_user_roles'] == null + ? null + : (_apiMapResponse['default_new_user_roles'] as List) + .map((i) => Role.fromResponse(i, apiResponseContentType)) + .toList(); + _defaultNewUserRolesSet = true; + } + return _defaultNewUserRoles; + } + + set defaultNewUserRoles(List v) { + _defaultNewUserRoles = v; + _defaultNewUserRolesSet = true; + } + + /// Enable/Disable LDAP authentication for the server + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Don't attempt to do LDAP search result paging (RFC 2696) even if the LDAP server claims to support it. + + bool get forceNoPage { + if (!_forceNoPageSet && _apiMapResponse.containsKey('force_no_page')) { + _forceNoPage = _apiMapResponse['force_no_page']; + _forceNoPageSet = true; + } + return _forceNoPage; + } + + set forceNoPage(bool v) { + _forceNoPage = v; + _forceNoPageSet = true; + } + + /// (Read-only) Array of mappings between LDAP Groups and Looker Roles (read-only) + + List get groups { + if (!_groupsSet && _apiMapResponse.containsKey('groups')) { + _groups = _apiMapResponse['groups'] == null + ? null + : (_apiMapResponse['groups'] as List) + .map((i) => LDAPGroupRead.fromResponse(i, apiResponseContentType)) + .toList(); + _groupsSet = true; + } + return _groups; + } + + set groups(List v) { + _groups = v; + _groupsSet = true; + } + + /// Base dn for finding groups in LDAP searches + + String get groupsBaseDn { + if (!_groupsBaseDnSet && _apiMapResponse.containsKey('groups_base_dn')) { + _groupsBaseDn = _apiMapResponse['groups_base_dn'] == null + ? null + : _apiMapResponse['groups_base_dn'].toString(); + _groupsBaseDnSet = true; + } + return _groupsBaseDn; + } + + set groupsBaseDn(String v) { + _groupsBaseDn = v; + _groupsBaseDnSet = true; + } + + /// Identifier for a strategy for how Looker will search for groups in the LDAP server + + String get groupsFinderType { + if (!_groupsFinderTypeSet && + _apiMapResponse.containsKey('groups_finder_type')) { + _groupsFinderType = _apiMapResponse['groups_finder_type'] == null + ? null + : _apiMapResponse['groups_finder_type'].toString(); + _groupsFinderTypeSet = true; + } + return _groupsFinderType; + } + + set groupsFinderType(String v) { + _groupsFinderType = v; + _groupsFinderTypeSet = true; + } + + /// LDAP Group attribute that signifies the members of the groups. Most commonly 'member' + + String get groupsMemberAttribute { + if (!_groupsMemberAttributeSet && + _apiMapResponse.containsKey('groups_member_attribute')) { + _groupsMemberAttribute = + _apiMapResponse['groups_member_attribute'] == null + ? null + : _apiMapResponse['groups_member_attribute'].toString(); + _groupsMemberAttributeSet = true; + } + return _groupsMemberAttribute; + } + + set groupsMemberAttribute(String v) { + _groupsMemberAttribute = v; + _groupsMemberAttributeSet = true; + } + + /// Optional comma-separated list of supported LDAP objectclass for groups when doing groups searches + + String get groupsObjectclasses { + if (!_groupsObjectclassesSet && + _apiMapResponse.containsKey('groups_objectclasses')) { + _groupsObjectclasses = _apiMapResponse['groups_objectclasses'] == null + ? null + : _apiMapResponse['groups_objectclasses'].toString(); + _groupsObjectclassesSet = true; + } + return _groupsObjectclasses; + } + + set groupsObjectclasses(String v) { + _groupsObjectclasses = v; + _groupsObjectclassesSet = true; + } + + /// LDAP Group attribute that signifies the user in a group. Most commonly 'dn' + + String get groupsUserAttribute { + if (!_groupsUserAttributeSet && + _apiMapResponse.containsKey('groups_user_attribute')) { + _groupsUserAttribute = _apiMapResponse['groups_user_attribute'] == null + ? null + : _apiMapResponse['groups_user_attribute'].toString(); + _groupsUserAttributeSet = true; + } + return _groupsUserAttribute; + } + + set groupsUserAttribute(String v) { + _groupsUserAttribute = v; + _groupsUserAttributeSet = true; + } + + /// (Read/Write) Array of mappings between LDAP Groups and arrays of Looker Role ids + + List get groupsWithRoleIds { + if (!_groupsWithRoleIdsSet && + _apiMapResponse.containsKey('groups_with_role_ids')) { + _groupsWithRoleIds = _apiMapResponse['groups_with_role_ids'] == null + ? null + : (_apiMapResponse['groups_with_role_ids'] as List) + .map( + (i) => LDAPGroupWrite.fromResponse(i, apiResponseContentType)) + .toList(); + _groupsWithRoleIdsSet = true; + } + return _groupsWithRoleIds; + } + + set groupsWithRoleIds(List v) { + _groupsWithRoleIds = v; + _groupsWithRoleIdsSet = true; + } + + /// (Read-only) Has the password been set for the LDAP account used to access the LDAP server (read-only) + + bool get hasAuthPassword { + if (!_hasAuthPasswordSet && + _apiMapResponse.containsKey('has_auth_password')) { + _hasAuthPassword = _apiMapResponse['has_auth_password']; + _hasAuthPasswordSet = true; + } + return _hasAuthPassword; + } + + set hasAuthPassword(bool v) { + _hasAuthPassword = v; + _hasAuthPasswordSet = true; + } + + /// Merge first-time ldap login to existing user account by email addresses. When a user logs in for the first time via ldap this option will connect this user into their existing account by finding the account with a matching email address. Otherwise a new user account will be created for the user. + + bool get mergeNewUsersByEmail { + if (!_mergeNewUsersByEmailSet && + _apiMapResponse.containsKey('merge_new_users_by_email')) { + _mergeNewUsersByEmail = _apiMapResponse['merge_new_users_by_email']; + _mergeNewUsersByEmailSet = true; + } + return _mergeNewUsersByEmail; + } + + set mergeNewUsersByEmail(bool v) { + _mergeNewUsersByEmail = v; + _mergeNewUsersByEmailSet = true; + } + + /// When this config was last modified (read-only) + + String get modifiedAt { + if (!_modifiedAtSet && _apiMapResponse.containsKey('modified_at')) { + _modifiedAt = _apiMapResponse['modified_at'] == null + ? null + : _apiMapResponse['modified_at'].toString(); + _modifiedAtSet = true; + } + return _modifiedAt; + } + + set modifiedAt(String v) { + _modifiedAt = v; + _modifiedAtSet = true; + } + + /// User id of user who last modified this config (read-only) + + String get modifiedBy { + if (!_modifiedBySet && _apiMapResponse.containsKey('modified_by')) { + _modifiedBy = _apiMapResponse['modified_by'] == null + ? null + : _apiMapResponse['modified_by'].toString(); + _modifiedBySet = true; + } + return _modifiedBy; + } + + set modifiedBy(String v) { + _modifiedBy = v; + _modifiedBySet = true; + } + + /// Set user roles in Looker based on groups from LDAP + + bool get setRolesFromGroups { + if (!_setRolesFromGroupsSet && + _apiMapResponse.containsKey('set_roles_from_groups')) { + _setRolesFromGroups = _apiMapResponse['set_roles_from_groups']; + _setRolesFromGroupsSet = true; + } + return _setRolesFromGroups; + } + + set setRolesFromGroups(bool v) { + _setRolesFromGroups = v; + _setRolesFromGroupsSet = true; + } + + /// (Write-Only) Test LDAP user password. For ldap tests only. + + String get testLdapPassword { + if (!_testLdapPasswordSet && + _apiMapResponse.containsKey('test_ldap_password')) { + _testLdapPassword = _apiMapResponse['test_ldap_password'] == null + ? null + : _apiMapResponse['test_ldap_password'].toString(); + _testLdapPasswordSet = true; + } + return _testLdapPassword; + } + + set testLdapPassword(String v) { + _testLdapPassword = v; + _testLdapPasswordSet = true; + } + + /// (Write-Only) Test LDAP user login id. For ldap tests only. + + String get testLdapUser { + if (!_testLdapUserSet && _apiMapResponse.containsKey('test_ldap_user')) { + _testLdapUser = _apiMapResponse['test_ldap_user'] == null + ? null + : _apiMapResponse['test_ldap_user'].toString(); + _testLdapUserSet = true; + } + return _testLdapUser; + } + + set testLdapUser(String v) { + _testLdapUser = v; + _testLdapUserSet = true; + } + + /// Name of user record attributes used to indicate email address field + + String get userAttributeMapEmail { + if (!_userAttributeMapEmailSet && + _apiMapResponse.containsKey('user_attribute_map_email')) { + _userAttributeMapEmail = + _apiMapResponse['user_attribute_map_email'] == null + ? null + : _apiMapResponse['user_attribute_map_email'].toString(); + _userAttributeMapEmailSet = true; + } + return _userAttributeMapEmail; + } + + set userAttributeMapEmail(String v) { + _userAttributeMapEmail = v; + _userAttributeMapEmailSet = true; + } + + /// Name of user record attributes used to indicate first name + + String get userAttributeMapFirstName { + if (!_userAttributeMapFirstNameSet && + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + _userAttributeMapFirstName = + _apiMapResponse['user_attribute_map_first_name'] == null + ? null + : _apiMapResponse['user_attribute_map_first_name'].toString(); + _userAttributeMapFirstNameSet = true; + } + return _userAttributeMapFirstName; + } + + set userAttributeMapFirstName(String v) { + _userAttributeMapFirstName = v; + _userAttributeMapFirstNameSet = true; + } + + /// Name of user record attributes used to indicate last name + + String get userAttributeMapLastName { + if (!_userAttributeMapLastNameSet && + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + _userAttributeMapLastName = + _apiMapResponse['user_attribute_map_last_name'] == null + ? null + : _apiMapResponse['user_attribute_map_last_name'].toString(); + _userAttributeMapLastNameSet = true; + } + return _userAttributeMapLastName; + } + + set userAttributeMapLastName(String v) { + _userAttributeMapLastName = v; + _userAttributeMapLastNameSet = true; + } + + /// Name of user record attributes used to indicate unique record id + + String get userAttributeMapLdapId { + if (!_userAttributeMapLdapIdSet && + _apiMapResponse.containsKey('user_attribute_map_ldap_id')) { + _userAttributeMapLdapId = + _apiMapResponse['user_attribute_map_ldap_id'] == null + ? null + : _apiMapResponse['user_attribute_map_ldap_id'].toString(); + _userAttributeMapLdapIdSet = true; + } + return _userAttributeMapLdapId; + } + + set userAttributeMapLdapId(String v) { + _userAttributeMapLdapId = v; + _userAttributeMapLdapIdSet = true; + } + + /// (Read-only) Array of mappings between LDAP User Attributes and Looker User Attributes (read-only) + + List get userAttributes { + if (!_userAttributesSet && _apiMapResponse.containsKey('user_attributes')) { + _userAttributes = _apiMapResponse['user_attributes'] == null + ? null + : (_apiMapResponse['user_attributes'] as List) + .map((i) => + LDAPUserAttributeRead.fromResponse(i, apiResponseContentType)) + .toList(); + _userAttributesSet = true; + } + return _userAttributes; + } + + set userAttributes(List v) { + _userAttributes = v; + _userAttributesSet = true; + } + + /// (Read/Write) Array of mappings between LDAP User Attributes and arrays of Looker User Attribute ids + + List get userAttributesWithIds { + if (!_userAttributesWithIdsSet && + _apiMapResponse.containsKey('user_attributes_with_ids')) { + _userAttributesWithIds = + _apiMapResponse['user_attributes_with_ids'] == null + ? null + : (_apiMapResponse['user_attributes_with_ids'] as List) + .map((i) => LDAPUserAttributeWrite.fromResponse( + i, apiResponseContentType)) + .toList(); + _userAttributesWithIdsSet = true; + } + return _userAttributesWithIds; + } + + set userAttributesWithIds(List v) { + _userAttributesWithIds = v; + _userAttributesWithIdsSet = true; + } + + /// Distinguished name of LDAP node used as the base for user searches + + String get userBindBaseDn { + if (!_userBindBaseDnSet && + _apiMapResponse.containsKey('user_bind_base_dn')) { + _userBindBaseDn = _apiMapResponse['user_bind_base_dn'] == null + ? null + : _apiMapResponse['user_bind_base_dn'].toString(); + _userBindBaseDnSet = true; + } + return _userBindBaseDn; + } + + set userBindBaseDn(String v) { + _userBindBaseDn = v; + _userBindBaseDnSet = true; + } + + /// (Optional) Custom RFC-2254 filter clause for use in finding user during login. Combined via 'and' with the other generated filter clauses. + + String get userCustomFilter { + if (!_userCustomFilterSet && + _apiMapResponse.containsKey('user_custom_filter')) { + _userCustomFilter = _apiMapResponse['user_custom_filter'] == null + ? null + : _apiMapResponse['user_custom_filter'].toString(); + _userCustomFilterSet = true; + } + return _userCustomFilter; + } + + set userCustomFilter(String v) { + _userCustomFilter = v; + _userCustomFilterSet = true; + } + + /// Name(s) of user record attributes used for matching user login id (comma separated list) + + String get userIdAttributeNames { + if (!_userIdAttributeNamesSet && + _apiMapResponse.containsKey('user_id_attribute_names')) { + _userIdAttributeNames = _apiMapResponse['user_id_attribute_names'] == null + ? null + : _apiMapResponse['user_id_attribute_names'].toString(); + _userIdAttributeNamesSet = true; + } + return _userIdAttributeNames; + } + + set userIdAttributeNames(String v) { + _userIdAttributeNames = v; + _userIdAttributeNamesSet = true; + } + + /// (Optional) Name of user record objectclass used for finding user during login id + + String get userObjectclass { + if (!_userObjectclassSet && + _apiMapResponse.containsKey('user_objectclass')) { + _userObjectclass = _apiMapResponse['user_objectclass'] == null + ? null + : _apiMapResponse['user_objectclass'].toString(); + _userObjectclassSet = true; + } + return _userObjectclass; + } + + set userObjectclass(String v) { + _userObjectclass = v; + _userObjectclassSet = true; + } + + /// Allow LDAP auth'd users to be members of non-reflected Looker groups. If 'false', user will be removed from non-reflected groups on login. + + bool get allowNormalGroupMembership { + if (!_allowNormalGroupMembershipSet && + _apiMapResponse.containsKey('allow_normal_group_membership')) { + _allowNormalGroupMembership = + _apiMapResponse['allow_normal_group_membership']; + _allowNormalGroupMembershipSet = true; + } + return _allowNormalGroupMembership; + } + + set allowNormalGroupMembership(bool v) { + _allowNormalGroupMembership = v; + _allowNormalGroupMembershipSet = true; + } + + /// LDAP auth'd users will be able to inherit roles from non-reflected Looker groups. + + bool get allowRolesFromNormalGroups { + if (!_allowRolesFromNormalGroupsSet && + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + _allowRolesFromNormalGroups = + _apiMapResponse['allow_roles_from_normal_groups']; + _allowRolesFromNormalGroupsSet = true; + } + return _allowRolesFromNormalGroups; + } + + set allowRolesFromNormalGroups(bool v) { + _allowRolesFromNormalGroups = v; + _allowRolesFromNormalGroupsSet = true; + } + + /// Allows roles to be directly assigned to LDAP auth'd users. + + bool get allowDirectRoles { + if (!_allowDirectRolesSet && + _apiMapResponse.containsKey('allow_direct_roles')) { + _allowDirectRoles = _apiMapResponse['allow_direct_roles']; + _allowDirectRolesSet = true; + } + return _allowDirectRoles; + } + + set allowDirectRoles(bool v) { + _allowDirectRoles = v; + _allowDirectRolesSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + LDAPConfig() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LDAPConfig.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_alternateEmailLoginAllowedSet || + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + json['alternate_email_login_allowed'] = alternateEmailLoginAllowed; + } + if (_authPasswordSet || _apiMapResponse.containsKey('auth_password')) { + json['auth_password'] = authPassword; + } + if (_authRequiresRoleSet || + _apiMapResponse.containsKey('auth_requires_role')) { + json['auth_requires_role'] = authRequiresRole; + } + if (_authUsernameSet || _apiMapResponse.containsKey('auth_username')) { + json['auth_username'] = authUsername; + } + if (_connectionHostSet || _apiMapResponse.containsKey('connection_host')) { + json['connection_host'] = connectionHost; + } + if (_connectionPortSet || _apiMapResponse.containsKey('connection_port')) { + json['connection_port'] = connectionPort; + } + if (_connectionTlsSet || _apiMapResponse.containsKey('connection_tls')) { + json['connection_tls'] = connectionTls; + } + if (_connectionTlsNoVerifySet || + _apiMapResponse.containsKey('connection_tls_no_verify')) { + json['connection_tls_no_verify'] = connectionTlsNoVerify; + } + if (_defaultNewUserGroupIdsSet || + _apiMapResponse.containsKey('default_new_user_group_ids')) { + json['default_new_user_group_ids'] = defaultNewUserGroupIds; + } + if (_defaultNewUserGroupsSet || + _apiMapResponse.containsKey('default_new_user_groups')) { + json['default_new_user_groups'] = defaultNewUserGroups == null + ? null + : defaultNewUserGroups.map((i) => i.toJson()).toList(); + } + if (_defaultNewUserRoleIdsSet || + _apiMapResponse.containsKey('default_new_user_role_ids')) { + json['default_new_user_role_ids'] = defaultNewUserRoleIds; + } + if (_defaultNewUserRolesSet || + _apiMapResponse.containsKey('default_new_user_roles')) { + json['default_new_user_roles'] = defaultNewUserRoles == null + ? null + : defaultNewUserRoles.map((i) => i.toJson()).toList(); + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_forceNoPageSet || _apiMapResponse.containsKey('force_no_page')) { + json['force_no_page'] = forceNoPage; + } + if (_groupsSet || _apiMapResponse.containsKey('groups')) { + json['groups'] = + groups == null ? null : groups.map((i) => i.toJson()).toList(); + } + if (_groupsBaseDnSet || _apiMapResponse.containsKey('groups_base_dn')) { + json['groups_base_dn'] = groupsBaseDn; + } + if (_groupsFinderTypeSet || + _apiMapResponse.containsKey('groups_finder_type')) { + json['groups_finder_type'] = groupsFinderType; + } + if (_groupsMemberAttributeSet || + _apiMapResponse.containsKey('groups_member_attribute')) { + json['groups_member_attribute'] = groupsMemberAttribute; + } + if (_groupsObjectclassesSet || + _apiMapResponse.containsKey('groups_objectclasses')) { + json['groups_objectclasses'] = groupsObjectclasses; + } + if (_groupsUserAttributeSet || + _apiMapResponse.containsKey('groups_user_attribute')) { + json['groups_user_attribute'] = groupsUserAttribute; + } + if (_groupsWithRoleIdsSet || + _apiMapResponse.containsKey('groups_with_role_ids')) { + json['groups_with_role_ids'] = groupsWithRoleIds == null + ? null + : groupsWithRoleIds.map((i) => i.toJson()).toList(); + } + if (_hasAuthPasswordSet || + _apiMapResponse.containsKey('has_auth_password')) { + json['has_auth_password'] = hasAuthPassword; + } + if (_mergeNewUsersByEmailSet || + _apiMapResponse.containsKey('merge_new_users_by_email')) { + json['merge_new_users_by_email'] = mergeNewUsersByEmail; + } + if (_modifiedAtSet || _apiMapResponse.containsKey('modified_at')) { + json['modified_at'] = modifiedAt; + } + if (_modifiedBySet || _apiMapResponse.containsKey('modified_by')) { + json['modified_by'] = modifiedBy; + } + if (_setRolesFromGroupsSet || + _apiMapResponse.containsKey('set_roles_from_groups')) { + json['set_roles_from_groups'] = setRolesFromGroups; + } + if (_testLdapPasswordSet || + _apiMapResponse.containsKey('test_ldap_password')) { + json['test_ldap_password'] = testLdapPassword; + } + if (_testLdapUserSet || _apiMapResponse.containsKey('test_ldap_user')) { + json['test_ldap_user'] = testLdapUser; + } + if (_userAttributeMapEmailSet || + _apiMapResponse.containsKey('user_attribute_map_email')) { + json['user_attribute_map_email'] = userAttributeMapEmail; + } + if (_userAttributeMapFirstNameSet || + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + json['user_attribute_map_first_name'] = userAttributeMapFirstName; + } + if (_userAttributeMapLastNameSet || + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + json['user_attribute_map_last_name'] = userAttributeMapLastName; + } + if (_userAttributeMapLdapIdSet || + _apiMapResponse.containsKey('user_attribute_map_ldap_id')) { + json['user_attribute_map_ldap_id'] = userAttributeMapLdapId; + } + if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { + json['user_attributes'] = userAttributes == null + ? null + : userAttributes.map((i) => i.toJson()).toList(); + } + if (_userAttributesWithIdsSet || + _apiMapResponse.containsKey('user_attributes_with_ids')) { + json['user_attributes_with_ids'] = userAttributesWithIds == null + ? null + : userAttributesWithIds.map((i) => i.toJson()).toList(); + } + if (_userBindBaseDnSet || + _apiMapResponse.containsKey('user_bind_base_dn')) { + json['user_bind_base_dn'] = userBindBaseDn; + } + if (_userCustomFilterSet || + _apiMapResponse.containsKey('user_custom_filter')) { + json['user_custom_filter'] = userCustomFilter; + } + if (_userIdAttributeNamesSet || + _apiMapResponse.containsKey('user_id_attribute_names')) { + json['user_id_attribute_names'] = userIdAttributeNames; + } + if (_userObjectclassSet || + _apiMapResponse.containsKey('user_objectclass')) { + json['user_objectclass'] = userObjectclass; + } + if (_allowNormalGroupMembershipSet || + _apiMapResponse.containsKey('allow_normal_group_membership')) { + json['allow_normal_group_membership'] = allowNormalGroupMembership; + } + if (_allowRolesFromNormalGroupsSet || + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + json['allow_roles_from_normal_groups'] = allowRolesFromNormalGroups; + } + if (_allowDirectRolesSet || + _apiMapResponse.containsKey('allow_direct_roles')) { + json['allow_direct_roles'] = allowDirectRoles; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class LDAPConfigTestIssue { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _severity; + bool _severitySet = false; + + String _message; + bool _messageSet = false; + + /// Severity of the issue. Error or Warning (read-only) + + String get severity { + if (!_severitySet && _apiMapResponse.containsKey('severity')) { + _severity = _apiMapResponse['severity'] == null + ? null + : _apiMapResponse['severity'].toString(); + _severitySet = true; + } + return _severity; + } + + set severity(String v) { + _severity = v; + _severitySet = true; + } + + /// Message describing the issue (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + LDAPConfigTestIssue() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LDAPConfigTestIssue.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_severitySet || _apiMapResponse.containsKey('severity')) { + json['severity'] = severity; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + return json; + } +} + +class LDAPConfigTestResult { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _details; + bool _detailsSet = false; + + List _issues; + bool _issuesSet = false; + + String _message; + bool _messageSet = false; + + String _status; + bool _statusSet = false; + + String _trace; + bool _traceSet = false; + + LDAPUser _user; + bool _userSet = false; + + String _url; + bool _urlSet = false; + + /// Additional details for error cases (read-only) + + String get details { + if (!_detailsSet && _apiMapResponse.containsKey('details')) { + _details = _apiMapResponse['details'] == null + ? null + : _apiMapResponse['details'].toString(); + _detailsSet = true; + } + return _details; + } + + set details(String v) { + _details = v; + _detailsSet = true; + } + + /// Array of issues/considerations about the result (read-only) + + List get issues { + if (!_issuesSet && _apiMapResponse.containsKey('issues')) { + _issues = _apiMapResponse['issues'] == null + ? null + : (_apiMapResponse['issues'] as List) + .map((i) => + LDAPConfigTestIssue.fromResponse(i, apiResponseContentType)) + .toList(); + _issuesSet = true; + } + return _issues; + } + + set issues(List v) { + _issues = v; + _issuesSet = true; + } + + /// Short human readable test about the result (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Test status code: always 'success' or 'error' (read-only) + + String get status { + if (!_statusSet && _apiMapResponse.containsKey('status')) { + _status = _apiMapResponse['status'] == null + ? null + : _apiMapResponse['status'].toString(); + _statusSet = true; + } + return _status; + } + + set status(String v) { + _status = v; + _statusSet = true; + } + + /// A more detailed trace of incremental results during auth tests (read-only) + + String get trace { + if (!_traceSet && _apiMapResponse.containsKey('trace')) { + _trace = _apiMapResponse['trace'] == null + ? null + : _apiMapResponse['trace'].toString(); + _traceSet = true; + } + return _trace; + } + + set trace(String v) { + _trace = v; + _traceSet = true; + } + + LDAPUser get user { + if (!_userSet && _apiMapResponse.containsKey('user')) { + _user = _apiMapResponse['user'] == null + ? null + : LDAPUser.fromResponse( + _apiMapResponse['user'], apiResponseContentType); + _userSet = true; + } + return _user; + } + + set user(LDAPUser v) { + _user = v; + _userSet = true; + } + + /// Link to ldap config (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + LDAPConfigTestResult() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LDAPConfigTestResult.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_detailsSet || _apiMapResponse.containsKey('details')) { + json['details'] = details; + } + if (_issuesSet || _apiMapResponse.containsKey('issues')) { + json['issues'] = + issues == null ? null : issues.map((i) => i.toJson()).toList(); + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_statusSet || _apiMapResponse.containsKey('status')) { + json['status'] = status; + } + if (_traceSet || _apiMapResponse.containsKey('trace')) { + json['trace'] = trace; + } + if (_userSet || _apiMapResponse.containsKey('user')) { + json['user'] = user == null ? null : user.toJson(); + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class LDAPGroupRead { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + int _lookerGroupId; + bool _lookerGroupIdSet = false; + + String _lookerGroupName; + bool _lookerGroupNameSet = false; + + String _name; + bool _nameSet = false; + + List _roles; + bool _rolesSet = false; + + String _url; + bool _urlSet = false; + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Unique Id of group in Looker (read-only) + + int get lookerGroupId { + if (!_lookerGroupIdSet && _apiMapResponse.containsKey('looker_group_id')) { + _lookerGroupId = _apiMapResponse['looker_group_id']; + _lookerGroupIdSet = true; + } + return _lookerGroupId; + } + + set lookerGroupId(int v) { + _lookerGroupId = v; + _lookerGroupIdSet = true; + } + + /// Name of group in Looker (read-only) + + String get lookerGroupName { + if (!_lookerGroupNameSet && + _apiMapResponse.containsKey('looker_group_name')) { + _lookerGroupName = _apiMapResponse['looker_group_name'] == null + ? null + : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupNameSet = true; + } + return _lookerGroupName; + } + + set lookerGroupName(String v) { + _lookerGroupName = v; + _lookerGroupNameSet = true; + } + + /// Name of group in LDAP (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Looker Roles (read-only) + + List get roles { + if (!_rolesSet && _apiMapResponse.containsKey('roles')) { + _roles = _apiMapResponse['roles'] == null + ? null + : (_apiMapResponse['roles'] as List) + .map((i) => Role.fromResponse(i, apiResponseContentType)) + .toList(); + _rolesSet = true; + } + return _roles; + } + + set roles(List v) { + _roles = v; + _rolesSet = true; + } + + /// Link to ldap config (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + LDAPGroupRead() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LDAPGroupRead.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookerGroupIdSet || _apiMapResponse.containsKey('looker_group_id')) { + json['looker_group_id'] = lookerGroupId; + } + if (_lookerGroupNameSet || + _apiMapResponse.containsKey('looker_group_name')) { + json['looker_group_name'] = lookerGroupName; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_rolesSet || _apiMapResponse.containsKey('roles')) { + json['roles'] = + roles == null ? null : roles.map((i) => i.toJson()).toList(); + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class LDAPGroupWrite { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + int _lookerGroupId; + bool _lookerGroupIdSet = false; + + String _lookerGroupName; + bool _lookerGroupNameSet = false; + + String _name; + bool _nameSet = false; + + List _roleIds; + bool _roleIdsSet = false; + + String _url; + bool _urlSet = false; + + /// Unique Id + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Unique Id of group in Looker (read-only) + + int get lookerGroupId { + if (!_lookerGroupIdSet && _apiMapResponse.containsKey('looker_group_id')) { + _lookerGroupId = _apiMapResponse['looker_group_id']; + _lookerGroupIdSet = true; + } + return _lookerGroupId; + } + + set lookerGroupId(int v) { + _lookerGroupId = v; + _lookerGroupIdSet = true; + } + + /// Name of group in Looker + + String get lookerGroupName { + if (!_lookerGroupNameSet && + _apiMapResponse.containsKey('looker_group_name')) { + _lookerGroupName = _apiMapResponse['looker_group_name'] == null + ? null + : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupNameSet = true; + } + return _lookerGroupName; + } + + set lookerGroupName(String v) { + _lookerGroupName = v; + _lookerGroupNameSet = true; + } + + /// Name of group in LDAP + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Looker Role Ids + + List get roleIds { + if (!_roleIdsSet && _apiMapResponse.containsKey('role_ids')) { + _roleIds = _apiMapResponse['role_ids'] == null + ? null + : _apiMapResponse['role_ids'].map((i) => i as int).toList(); + _roleIdsSet = true; + } + return _roleIds; + } + + set roleIds(List v) { + _roleIds = v; + _roleIdsSet = true; + } + + /// Link to ldap config (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + LDAPGroupWrite() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LDAPGroupWrite.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookerGroupIdSet || _apiMapResponse.containsKey('looker_group_id')) { + json['looker_group_id'] = lookerGroupId; + } + if (_lookerGroupNameSet || + _apiMapResponse.containsKey('looker_group_name')) { + json['looker_group_name'] = lookerGroupName; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_roleIdsSet || _apiMapResponse.containsKey('role_ids')) { + json['role_ids'] = roleIds; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class LDAPUser { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _allEmails; + bool _allEmailsSet = false; + + Map _attributes; + bool _attributesSet = false; + + String _email; + bool _emailSet = false; + + String _firstName; + bool _firstNameSet = false; + + List _groups; + bool _groupsSet = false; + + String _lastName; + bool _lastNameSet = false; + + String _ldapDn; + bool _ldapDnSet = false; + + String _ldapId; + bool _ldapIdSet = false; + + List _roles; + bool _rolesSet = false; + + String _url; + bool _urlSet = false; + + /// Array of user's email addresses and aliases for use in migration (read-only) + + List get allEmails { + if (!_allEmailsSet && _apiMapResponse.containsKey('all_emails')) { + _allEmails = _apiMapResponse['all_emails'] == null + ? null + : _apiMapResponse['all_emails'] + .map((i) => i as String) + .toList(); + _allEmailsSet = true; + } + return _allEmails; + } + + set allEmails(List v) { + _allEmails = v; + _allEmailsSet = true; + } + + /// Dictionary of user's attributes (name/value) (read-only) + + Map get attributes { + if (!_attributesSet && _apiMapResponse.containsKey('attributes')) { + _attributes = _apiMapResponse['attributes']; + _attributesSet = true; + } + return _attributes; + } + + set attributes(Map v) { + _attributes = v; + _attributesSet = true; + } + + /// Primary email address (read-only) + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// First name (read-only) + + String get firstName { + if (!_firstNameSet && _apiMapResponse.containsKey('first_name')) { + _firstName = _apiMapResponse['first_name'] == null + ? null + : _apiMapResponse['first_name'].toString(); + _firstNameSet = true; + } + return _firstName; + } + + set firstName(String v) { + _firstName = v; + _firstNameSet = true; + } + + /// Array of user's groups (group names only) (read-only) + + List get groups { + if (!_groupsSet && _apiMapResponse.containsKey('groups')) { + _groups = _apiMapResponse['groups'] == null + ? null + : _apiMapResponse['groups'].map((i) => i as String).toList(); + _groupsSet = true; + } + return _groups; + } + + set groups(List v) { + _groups = v; + _groupsSet = true; + } + + /// Last Name (read-only) + + String get lastName { + if (!_lastNameSet && _apiMapResponse.containsKey('last_name')) { + _lastName = _apiMapResponse['last_name'] == null + ? null + : _apiMapResponse['last_name'].toString(); + _lastNameSet = true; + } + return _lastName; + } + + set lastName(String v) { + _lastName = v; + _lastNameSet = true; + } + + /// LDAP's distinguished name for the user record (read-only) + + String get ldapDn { + if (!_ldapDnSet && _apiMapResponse.containsKey('ldap_dn')) { + _ldapDn = _apiMapResponse['ldap_dn'] == null + ? null + : _apiMapResponse['ldap_dn'].toString(); + _ldapDnSet = true; + } + return _ldapDn; + } + + set ldapDn(String v) { + _ldapDn = v; + _ldapDnSet = true; + } + + /// LDAP's Unique ID for the user (read-only) + + String get ldapId { + if (!_ldapIdSet && _apiMapResponse.containsKey('ldap_id')) { + _ldapId = _apiMapResponse['ldap_id'] == null + ? null + : _apiMapResponse['ldap_id'].toString(); + _ldapIdSet = true; + } + return _ldapId; + } + + set ldapId(String v) { + _ldapId = v; + _ldapIdSet = true; + } + + /// Array of user's roles (role names only) (read-only) + + List get roles { + if (!_rolesSet && _apiMapResponse.containsKey('roles')) { + _roles = _apiMapResponse['roles'] == null + ? null + : _apiMapResponse['roles'].map((i) => i as String).toList(); + _rolesSet = true; + } + return _roles; + } + + set roles(List v) { + _roles = v; + _rolesSet = true; + } + + /// Link to ldap config (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + LDAPUser() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LDAPUser.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_allEmailsSet || _apiMapResponse.containsKey('all_emails')) { + json['all_emails'] = allEmails; + } + if (_attributesSet || _apiMapResponse.containsKey('attributes')) { + json['attributes'] = attributes; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_firstNameSet || _apiMapResponse.containsKey('first_name')) { + json['first_name'] = firstName; + } + if (_groupsSet || _apiMapResponse.containsKey('groups')) { + json['groups'] = groups; + } + if (_lastNameSet || _apiMapResponse.containsKey('last_name')) { + json['last_name'] = lastName; + } + if (_ldapDnSet || _apiMapResponse.containsKey('ldap_dn')) { + json['ldap_dn'] = ldapDn; + } + if (_ldapIdSet || _apiMapResponse.containsKey('ldap_id')) { + json['ldap_id'] = ldapId; + } + if (_rolesSet || _apiMapResponse.containsKey('roles')) { + json['roles'] = roles; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class LDAPUserAttributeRead { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + bool _required; + bool _requiredSet = false; + + List _userAttributes; + bool _userAttributesSet = false; + + String _url; + bool _urlSet = false; + + /// Name of User Attribute in LDAP (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Required to be in LDAP assertion for login to be allowed to succeed (read-only) + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// Looker User Attributes (read-only) + + List get userAttributes { + if (!_userAttributesSet && _apiMapResponse.containsKey('user_attributes')) { + _userAttributes = _apiMapResponse['user_attributes'] == null + ? null + : (_apiMapResponse['user_attributes'] as List) + .map((i) => UserAttribute.fromResponse(i, apiResponseContentType)) + .toList(); + _userAttributesSet = true; + } + return _userAttributes; + } + + set userAttributes(List v) { + _userAttributes = v; + _userAttributesSet = true; + } + + /// Link to ldap config (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + LDAPUserAttributeRead() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LDAPUserAttributeRead.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { + json['user_attributes'] = userAttributes == null + ? null + : userAttributes.map((i) => i.toJson()).toList(); + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class LDAPUserAttributeWrite { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + bool _required; + bool _requiredSet = false; + + List _userAttributeIds; + bool _userAttributeIdsSet = false; + + String _url; + bool _urlSet = false; + + /// Name of User Attribute in LDAP + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Required to be in LDAP assertion for login to be allowed to succeed + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// Looker User Attribute Ids + + List get userAttributeIds { + if (!_userAttributeIdsSet && + _apiMapResponse.containsKey('user_attribute_ids')) { + _userAttributeIds = _apiMapResponse['user_attribute_ids'] == null + ? null + : _apiMapResponse['user_attribute_ids'] + .map((i) => i as int) + .toList(); + _userAttributeIdsSet = true; + } + return _userAttributeIds; + } + + set userAttributeIds(List v) { + _userAttributeIds = v; + _userAttributeIdsSet = true; + } + + /// Link to ldap config (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + LDAPUserAttributeWrite() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LDAPUserAttributeWrite.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_userAttributeIdsSet || + _apiMapResponse.containsKey('user_attribute_ids')) { + json['user_attribute_ids'] = userAttributeIds; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class LegacyFeature { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + String _name; + bool _nameSet = false; + + String _description; + bool _descriptionSet = false; + + bool _enabledLocally; + bool _enabledLocallySet = false; + + bool _enabled; + bool _enabledSet = false; + + String _disallowedAsOfVersion; + bool _disallowedAsOfVersionSet = false; + + String _disableOnUpgradeToVersion; + bool _disableOnUpgradeToVersionSet = false; + + String _endOfLifeVersion; + bool _endOfLifeVersionSet = false; + + String _documentationUrl; + bool _documentationUrlSet = false; + + DateTime _approximateDisableDate; + bool _approximateDisableDateSet = false; + + DateTime _approximateEndOfLifeDate; + bool _approximateEndOfLifeDateSet = false; + + bool _hasDisabledOnUpgrade; + bool _hasDisabledOnUpgradeSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Description (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Whether this feature has been enabled by a user + + bool get enabledLocally { + if (!_enabledLocallySet && _apiMapResponse.containsKey('enabled_locally')) { + _enabledLocally = _apiMapResponse['enabled_locally']; + _enabledLocallySet = true; + } + return _enabledLocally; + } + + set enabledLocally(bool v) { + _enabledLocally = v; + _enabledLocallySet = true; + } + + /// Whether this feature is currently enabled (read-only) + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Looker version where this feature became a legacy feature (read-only) + + String get disallowedAsOfVersion { + if (!_disallowedAsOfVersionSet && + _apiMapResponse.containsKey('disallowed_as_of_version')) { + _disallowedAsOfVersion = + _apiMapResponse['disallowed_as_of_version'] == null + ? null + : _apiMapResponse['disallowed_as_of_version'].toString(); + _disallowedAsOfVersionSet = true; + } + return _disallowedAsOfVersion; + } + + set disallowedAsOfVersion(String v) { + _disallowedAsOfVersion = v; + _disallowedAsOfVersionSet = true; + } + + /// Looker version where this feature will be automatically disabled (read-only) + + String get disableOnUpgradeToVersion { + if (!_disableOnUpgradeToVersionSet && + _apiMapResponse.containsKey('disable_on_upgrade_to_version')) { + _disableOnUpgradeToVersion = + _apiMapResponse['disable_on_upgrade_to_version'] == null + ? null + : _apiMapResponse['disable_on_upgrade_to_version'].toString(); + _disableOnUpgradeToVersionSet = true; + } + return _disableOnUpgradeToVersion; + } + + set disableOnUpgradeToVersion(String v) { + _disableOnUpgradeToVersion = v; + _disableOnUpgradeToVersionSet = true; + } + + /// Future Looker version where this feature will be removed (read-only) + + String get endOfLifeVersion { + if (!_endOfLifeVersionSet && + _apiMapResponse.containsKey('end_of_life_version')) { + _endOfLifeVersion = _apiMapResponse['end_of_life_version'] == null + ? null + : _apiMapResponse['end_of_life_version'].toString(); + _endOfLifeVersionSet = true; + } + return _endOfLifeVersion; + } + + set endOfLifeVersion(String v) { + _endOfLifeVersion = v; + _endOfLifeVersionSet = true; + } + + /// URL for documentation about this feature (read-only) + + String get documentationUrl { + if (!_documentationUrlSet && + _apiMapResponse.containsKey('documentation_url')) { + _documentationUrl = _apiMapResponse['documentation_url'] == null + ? null + : _apiMapResponse['documentation_url'].toString(); + _documentationUrlSet = true; + } + return _documentationUrl; + } + + set documentationUrl(String v) { + _documentationUrl = v; + _documentationUrlSet = true; + } + + /// Approximate date that this feature will be automatically disabled. (read-only) + + DateTime get approximateDisableDate { + if (!_approximateDisableDateSet && + _apiMapResponse.containsKey('approximate_disable_date')) { + _approximateDisableDate = + _apiMapResponse['approximate_disable_date'] == null + ? null + : DateTime.parse(_apiMapResponse['approximate_disable_date']); + _approximateDisableDateSet = true; + } + return _approximateDisableDate; + } + + set approximateDisableDate(DateTime v) { + _approximateDisableDate = v; + _approximateDisableDateSet = true; + } + + /// Approximate date that this feature will be removed. (read-only) + + DateTime get approximateEndOfLifeDate { + if (!_approximateEndOfLifeDateSet && + _apiMapResponse.containsKey('approximate_end_of_life_date')) { + _approximateEndOfLifeDate = + _apiMapResponse['approximate_end_of_life_date'] == null + ? null + : DateTime.parse(_apiMapResponse['approximate_end_of_life_date']); + _approximateEndOfLifeDateSet = true; + } + return _approximateEndOfLifeDate; + } + + set approximateEndOfLifeDate(DateTime v) { + _approximateEndOfLifeDate = v; + _approximateEndOfLifeDateSet = true; + } + + /// Whether this legacy feature may have been automatically disabled when upgrading to the current version. (read-only) + + bool get hasDisabledOnUpgrade { + if (!_hasDisabledOnUpgradeSet && + _apiMapResponse.containsKey('has_disabled_on_upgrade')) { + _hasDisabledOnUpgrade = _apiMapResponse['has_disabled_on_upgrade']; + _hasDisabledOnUpgradeSet = true; + } + return _hasDisabledOnUpgrade; + } + + set hasDisabledOnUpgrade(bool v) { + _hasDisabledOnUpgrade = v; + _hasDisabledOnUpgradeSet = true; + } + + LegacyFeature() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LegacyFeature.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_enabledLocallySet || _apiMapResponse.containsKey('enabled_locally')) { + json['enabled_locally'] = enabledLocally; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_disallowedAsOfVersionSet || + _apiMapResponse.containsKey('disallowed_as_of_version')) { + json['disallowed_as_of_version'] = disallowedAsOfVersion; + } + if (_disableOnUpgradeToVersionSet || + _apiMapResponse.containsKey('disable_on_upgrade_to_version')) { + json['disable_on_upgrade_to_version'] = disableOnUpgradeToVersion; + } + if (_endOfLifeVersionSet || + _apiMapResponse.containsKey('end_of_life_version')) { + json['end_of_life_version'] = endOfLifeVersion; + } + if (_documentationUrlSet || + _apiMapResponse.containsKey('documentation_url')) { + json['documentation_url'] = documentationUrl; + } + if (_approximateDisableDateSet || + _apiMapResponse.containsKey('approximate_disable_date')) { + json['approximate_disable_date'] = approximateDisableDate == null + ? null + : approximateDisableDate.toIso8601String(); + } + if (_approximateEndOfLifeDateSet || + _apiMapResponse.containsKey('approximate_end_of_life_date')) { + json['approximate_end_of_life_date'] = approximateEndOfLifeDate == null + ? null + : approximateEndOfLifeDate.toIso8601String(); + } + if (_hasDisabledOnUpgradeSet || + _apiMapResponse.containsKey('has_disabled_on_upgrade')) { + json['has_disabled_on_upgrade'] = hasDisabledOnUpgrade; + } + return json; + } +} + +/// Name of the command Valid values are: "dashboard", "lookml_dashboard". (Enum defined in Command) +enum LinkedContentType { dashboard, lookmlDashboard } + +class LinkedContentTypeMapper { + static String toStringValue(LinkedContentType e) { + switch (e) { + case LinkedContentType.dashboard: + return 'dashboard'; + case LinkedContentType.lookmlDashboard: + return 'lookml_dashboard'; + + default: + return null; + } + } + + static LinkedContentType fromStringValue(String s) { + if (s == 'dashboard') { + return LinkedContentType.dashboard; + } + if (s == 'lookml_dashboard') { + return LinkedContentType.lookmlDashboard; + } + return null; + } +} + +class Locale { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _code; + bool _codeSet = false; + + String _nativeName; + bool _nativeNameSet = false; + + String _englishName; + bool _englishNameSet = false; + + /// Code for Locale (read-only) + + String get code { + if (!_codeSet && _apiMapResponse.containsKey('code')) { + _code = _apiMapResponse['code'] == null + ? null + : _apiMapResponse['code'].toString(); + _codeSet = true; + } + return _code; + } + + set code(String v) { + _code = v; + _codeSet = true; + } + + /// Name of Locale in its own language (read-only) + + String get nativeName { + if (!_nativeNameSet && _apiMapResponse.containsKey('native_name')) { + _nativeName = _apiMapResponse['native_name'] == null + ? null + : _apiMapResponse['native_name'].toString(); + _nativeNameSet = true; + } + return _nativeName; + } + + set nativeName(String v) { + _nativeName = v; + _nativeNameSet = true; + } + + /// Name of Locale in English (read-only) + + String get englishName { + if (!_englishNameSet && _apiMapResponse.containsKey('english_name')) { + _englishName = _apiMapResponse['english_name'] == null + ? null + : _apiMapResponse['english_name'].toString(); + _englishNameSet = true; + } + return _englishName; + } + + set englishName(String v) { + _englishName = v; + _englishNameSet = true; + } + + Locale() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Locale.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_codeSet || _apiMapResponse.containsKey('code')) { + json['code'] = code; + } + if (_nativeNameSet || _apiMapResponse.containsKey('native_name')) { + json['native_name'] = nativeName; + } + if (_englishNameSet || _apiMapResponse.containsKey('english_name')) { + json['english_name'] = englishName; + } + return json; + } +} + +class LocalizationSettings { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _defaultLocale; + bool _defaultLocaleSet = false; + + String _localizationLevel; + bool _localizationLevelSet = false; + + /// Default locale for localization (read-only) + + String get defaultLocale { + if (!_defaultLocaleSet && _apiMapResponse.containsKey('default_locale')) { + _defaultLocale = _apiMapResponse['default_locale'] == null + ? null + : _apiMapResponse['default_locale'].toString(); + _defaultLocaleSet = true; + } + return _defaultLocale; + } + + set defaultLocale(String v) { + _defaultLocale = v; + _defaultLocaleSet = true; + } + + /// Localization level - strict or permissive (read-only) + + String get localizationLevel { + if (!_localizationLevelSet && + _apiMapResponse.containsKey('localization_level')) { + _localizationLevel = _apiMapResponse['localization_level'] == null + ? null + : _apiMapResponse['localization_level'].toString(); + _localizationLevelSet = true; + } + return _localizationLevel; + } + + set localizationLevel(String v) { + _localizationLevel = v; + _localizationLevelSet = true; + } + + LocalizationSettings() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LocalizationSettings.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_defaultLocaleSet || _apiMapResponse.containsKey('default_locale')) { + json['default_locale'] = defaultLocale; + } + if (_localizationLevelSet || + _apiMapResponse.containsKey('localization_level')) { + json['localization_level'] = localizationLevel; + } + return json; + } +} + +class Look { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + String _id; + bool _idSet = false; + + String _title; + bool _titleSet = false; + + int _userId; + bool _userIdSet = false; + + int _contentFavoriteId; + bool _contentFavoriteIdSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + bool _deleted; + bool _deletedSet = false; + + DateTime _deletedAt; + bool _deletedAtSet = false; + + int _deleterId; + bool _deleterIdSet = false; + + String _description; + bool _descriptionSet = false; + + String _embedUrl; + bool _embedUrlSet = false; + + String _excelFileUrl; + bool _excelFileUrlSet = false; + + int _favoriteCount; + bool _favoriteCountSet = false; + + String _googleSpreadsheetFormula; + bool _googleSpreadsheetFormulaSet = false; + + String _imageEmbedUrl; + bool _imageEmbedUrlSet = false; + + bool _isRunOnLoad; + bool _isRunOnLoadSet = false; + + DateTime _lastAccessedAt; + bool _lastAccessedAtSet = false; + + int _lastUpdaterId; + bool _lastUpdaterIdSet = false; + + DateTime _lastViewedAt; + bool _lastViewedAtSet = false; + + LookModel _model; + bool _modelSet = false; + + bool _public; + bool _publicSet = false; + + String _publicSlug; + bool _publicSlugSet = false; + + String _publicUrl; + bool _publicUrlSet = false; + + int _queryId; + bool _queryIdSet = false; + + String _shortUrl; + bool _shortUrlSet = false; + + FolderBase _folder; + bool _folderSet = false; + + String _folderId; + bool _folderIdSet = false; + + DateTime _updatedAt; + bool _updatedAtSet = false; + + int _viewCount; + bool _viewCountSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Id of content metadata (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Look Title + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// User Id + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Content Favorite Id (read-only) + + int get contentFavoriteId { + if (!_contentFavoriteIdSet && + _apiMapResponse.containsKey('content_favorite_id')) { + _contentFavoriteId = _apiMapResponse['content_favorite_id']; + _contentFavoriteIdSet = true; + } + return _contentFavoriteId; + } + + set contentFavoriteId(int v) { + _contentFavoriteId = v; + _contentFavoriteIdSet = true; + } + + /// Time that the Look was created. (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Whether or not a look is 'soft' deleted. + + bool get deleted { + if (!_deletedSet && _apiMapResponse.containsKey('deleted')) { + _deleted = _apiMapResponse['deleted']; + _deletedSet = true; + } + return _deleted; + } + + set deleted(bool v) { + _deleted = v; + _deletedSet = true; + } + + /// Time that the Look was deleted. (read-only) + + DateTime get deletedAt { + if (!_deletedAtSet && _apiMapResponse.containsKey('deleted_at')) { + _deletedAt = _apiMapResponse['deleted_at'] == null + ? null + : DateTime.parse(_apiMapResponse['deleted_at']); + _deletedAtSet = true; + } + return _deletedAt; + } + + set deletedAt(DateTime v) { + _deletedAt = v; + _deletedAtSet = true; + } + + /// Id of User that deleted the look. (read-only) + + int get deleterId { + if (!_deleterIdSet && _apiMapResponse.containsKey('deleter_id')) { + _deleterId = _apiMapResponse['deleter_id']; + _deleterIdSet = true; + } + return _deleterId; + } + + set deleterId(int v) { + _deleterId = v; + _deleterIdSet = true; + } + + /// Description + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Embed Url (read-only) + + String get embedUrl { + if (!_embedUrlSet && _apiMapResponse.containsKey('embed_url')) { + _embedUrl = _apiMapResponse['embed_url'] == null + ? null + : _apiMapResponse['embed_url'].toString(); + _embedUrlSet = true; + } + return _embedUrl; + } + + set embedUrl(String v) { + _embedUrl = v; + _embedUrlSet = true; + } + + /// Excel File Url (read-only) + + String get excelFileUrl { + if (!_excelFileUrlSet && _apiMapResponse.containsKey('excel_file_url')) { + _excelFileUrl = _apiMapResponse['excel_file_url'] == null + ? null + : _apiMapResponse['excel_file_url'].toString(); + _excelFileUrlSet = true; + } + return _excelFileUrl; + } + + set excelFileUrl(String v) { + _excelFileUrl = v; + _excelFileUrlSet = true; + } + + /// Number of times favorited (read-only) + + int get favoriteCount { + if (!_favoriteCountSet && _apiMapResponse.containsKey('favorite_count')) { + _favoriteCount = _apiMapResponse['favorite_count']; + _favoriteCountSet = true; + } + return _favoriteCount; + } + + set favoriteCount(int v) { + _favoriteCount = v; + _favoriteCountSet = true; + } + + /// Google Spreadsheet Formula (read-only) + + String get googleSpreadsheetFormula { + if (!_googleSpreadsheetFormulaSet && + _apiMapResponse.containsKey('google_spreadsheet_formula')) { + _googleSpreadsheetFormula = + _apiMapResponse['google_spreadsheet_formula'] == null + ? null + : _apiMapResponse['google_spreadsheet_formula'].toString(); + _googleSpreadsheetFormulaSet = true; + } + return _googleSpreadsheetFormula; + } + + set googleSpreadsheetFormula(String v) { + _googleSpreadsheetFormula = v; + _googleSpreadsheetFormulaSet = true; + } + + /// Image Embed Url (read-only) + + String get imageEmbedUrl { + if (!_imageEmbedUrlSet && _apiMapResponse.containsKey('image_embed_url')) { + _imageEmbedUrl = _apiMapResponse['image_embed_url'] == null + ? null + : _apiMapResponse['image_embed_url'].toString(); + _imageEmbedUrlSet = true; + } + return _imageEmbedUrl; + } + + set imageEmbedUrl(String v) { + _imageEmbedUrl = v; + _imageEmbedUrlSet = true; + } + + /// auto-run query when Look viewed + + bool get isRunOnLoad { + if (!_isRunOnLoadSet && _apiMapResponse.containsKey('is_run_on_load')) { + _isRunOnLoad = _apiMapResponse['is_run_on_load']; + _isRunOnLoadSet = true; + } + return _isRunOnLoad; + } + + set isRunOnLoad(bool v) { + _isRunOnLoad = v; + _isRunOnLoadSet = true; + } + + /// Time that the Look was last accessed by any user (read-only) + + DateTime get lastAccessedAt { + if (!_lastAccessedAtSet && + _apiMapResponse.containsKey('last_accessed_at')) { + _lastAccessedAt = _apiMapResponse['last_accessed_at'] == null + ? null + : DateTime.parse(_apiMapResponse['last_accessed_at']); + _lastAccessedAtSet = true; + } + return _lastAccessedAt; + } + + set lastAccessedAt(DateTime v) { + _lastAccessedAt = v; + _lastAccessedAtSet = true; + } + + /// Id of User that last updated the look. (read-only) + + int get lastUpdaterId { + if (!_lastUpdaterIdSet && _apiMapResponse.containsKey('last_updater_id')) { + _lastUpdaterId = _apiMapResponse['last_updater_id']; + _lastUpdaterIdSet = true; + } + return _lastUpdaterId; + } + + set lastUpdaterId(int v) { + _lastUpdaterId = v; + _lastUpdaterIdSet = true; + } + + /// Time last viewed in the Looker web UI (read-only) + + DateTime get lastViewedAt { + if (!_lastViewedAtSet && _apiMapResponse.containsKey('last_viewed_at')) { + _lastViewedAt = _apiMapResponse['last_viewed_at'] == null + ? null + : DateTime.parse(_apiMapResponse['last_viewed_at']); + _lastViewedAtSet = true; + } + return _lastViewedAt; + } + + set lastViewedAt(DateTime v) { + _lastViewedAt = v; + _lastViewedAtSet = true; + } + + LookModel get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : LookModel.fromResponse( + _apiMapResponse['model'], apiResponseContentType); + _modelSet = true; + } + return _model; + } + + set model(LookModel v) { + _model = v; + _modelSet = true; + } + + /// Is Public + + bool get public { + if (!_publicSet && _apiMapResponse.containsKey('public')) { + _public = _apiMapResponse['public']; + _publicSet = true; + } + return _public; + } + + set public(bool v) { + _public = v; + _publicSet = true; + } + + /// Public Slug (read-only) + + String get publicSlug { + if (!_publicSlugSet && _apiMapResponse.containsKey('public_slug')) { + _publicSlug = _apiMapResponse['public_slug'] == null + ? null + : _apiMapResponse['public_slug'].toString(); + _publicSlugSet = true; + } + return _publicSlug; + } + + set publicSlug(String v) { + _publicSlug = v; + _publicSlugSet = true; + } + + /// Public Url (read-only) + + String get publicUrl { + if (!_publicUrlSet && _apiMapResponse.containsKey('public_url')) { + _publicUrl = _apiMapResponse['public_url'] == null + ? null + : _apiMapResponse['public_url'].toString(); + _publicUrlSet = true; + } + return _publicUrl; + } + + set publicUrl(String v) { + _publicUrl = v; + _publicUrlSet = true; + } + + /// Query Id + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// Short Url (read-only) + + String get shortUrl { + if (!_shortUrlSet && _apiMapResponse.containsKey('short_url')) { + _shortUrl = _apiMapResponse['short_url'] == null + ? null + : _apiMapResponse['short_url'].toString(); + _shortUrlSet = true; + } + return _shortUrl; + } + + set shortUrl(String v) { + _shortUrl = v; + _shortUrlSet = true; + } + + FolderBase get folder { + if (!_folderSet && _apiMapResponse.containsKey('folder')) { + _folder = _apiMapResponse['folder'] == null + ? null + : FolderBase.fromResponse( + _apiMapResponse['folder'], apiResponseContentType); + _folderSet = true; + } + return _folder; + } + + set folder(FolderBase v) { + _folder = v; + _folderSet = true; + } + + /// Folder Id + + String get folderId { + if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { + _folderId = _apiMapResponse['folder_id'] == null + ? null + : _apiMapResponse['folder_id'].toString(); + _folderIdSet = true; + } + return _folderId; + } + + set folderId(String v) { + _folderId = v; + _folderIdSet = true; + } + + /// Time that the Look was updated. (read-only) + + DateTime get updatedAt { + if (!_updatedAtSet && _apiMapResponse.containsKey('updated_at')) { + _updatedAt = _apiMapResponse['updated_at'] == null + ? null + : DateTime.parse(_apiMapResponse['updated_at']); + _updatedAtSet = true; + } + return _updatedAt; + } + + set updatedAt(DateTime v) { + _updatedAt = v; + _updatedAtSet = true; + } + + /// Number of times viewed in the Looker web UI (read-only) + + int get viewCount { + if (!_viewCountSet && _apiMapResponse.containsKey('view_count')) { + _viewCount = _apiMapResponse['view_count']; + _viewCountSet = true; + } + return _viewCount; + } + + set viewCount(int v) { + _viewCount = v; + _viewCountSet = true; + } + + Look() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Look.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_contentFavoriteIdSet || + _apiMapResponse.containsKey('content_favorite_id')) { + json['content_favorite_id'] = contentFavoriteId; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + if (_deletedSet || _apiMapResponse.containsKey('deleted')) { + json['deleted'] = deleted; + } + if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { + json['deleted_at'] = + deletedAt == null ? null : deletedAt.toIso8601String(); + } + if (_deleterIdSet || _apiMapResponse.containsKey('deleter_id')) { + json['deleter_id'] = deleterId; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_embedUrlSet || _apiMapResponse.containsKey('embed_url')) { + json['embed_url'] = embedUrl; + } + if (_excelFileUrlSet || _apiMapResponse.containsKey('excel_file_url')) { + json['excel_file_url'] = excelFileUrl; + } + if (_favoriteCountSet || _apiMapResponse.containsKey('favorite_count')) { + json['favorite_count'] = favoriteCount; + } + if (_googleSpreadsheetFormulaSet || + _apiMapResponse.containsKey('google_spreadsheet_formula')) { + json['google_spreadsheet_formula'] = googleSpreadsheetFormula; + } + if (_imageEmbedUrlSet || _apiMapResponse.containsKey('image_embed_url')) { + json['image_embed_url'] = imageEmbedUrl; + } + if (_isRunOnLoadSet || _apiMapResponse.containsKey('is_run_on_load')) { + json['is_run_on_load'] = isRunOnLoad; + } + if (_lastAccessedAtSet || _apiMapResponse.containsKey('last_accessed_at')) { + json['last_accessed_at'] = + lastAccessedAt == null ? null : lastAccessedAt.toIso8601String(); + } + if (_lastUpdaterIdSet || _apiMapResponse.containsKey('last_updater_id')) { + json['last_updater_id'] = lastUpdaterId; + } + if (_lastViewedAtSet || _apiMapResponse.containsKey('last_viewed_at')) { + json['last_viewed_at'] = + lastViewedAt == null ? null : lastViewedAt.toIso8601String(); + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model == null ? null : model.toJson(); + } + if (_publicSet || _apiMapResponse.containsKey('public')) { + json['public'] = public; + } + if (_publicSlugSet || _apiMapResponse.containsKey('public_slug')) { + json['public_slug'] = publicSlug; + } + if (_publicUrlSet || _apiMapResponse.containsKey('public_url')) { + json['public_url'] = publicUrl; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_shortUrlSet || _apiMapResponse.containsKey('short_url')) { + json['short_url'] = shortUrl; + } + if (_folderSet || _apiMapResponse.containsKey('folder')) { + json['folder'] = folder == null ? null : folder.toJson(); + } + if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { + json['folder_id'] = folderId; + } + if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { + json['updated_at'] = + updatedAt == null ? null : updatedAt.toIso8601String(); + } + if (_viewCountSet || _apiMapResponse.containsKey('view_count')) { + json['view_count'] = viewCount; + } + return json; + } +} + +class LookBasic { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + int _id; + bool _idSet = false; + + String _title; + bool _titleSet = false; + + int _userId; + bool _userIdSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Id of content metadata (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Look Title (read-only) + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// User Id + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + LookBasic() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookBasic.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + return json; + } +} + +class LookmlModel { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + List _allowedDbConnectionNames; + bool _allowedDbConnectionNamesSet = false; + + List _explores; + bool _exploresSet = false; + + bool _hasContent; + bool _hasContentSet = false; + + String _label; + bool _labelSet = false; + + String _name; + bool _nameSet = false; + + String _projectName; + bool _projectNameSet = false; + + bool _unlimitedDbConnections; + bool _unlimitedDbConnectionsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Array of names of connections this model is allowed to use + + List get allowedDbConnectionNames { + if (!_allowedDbConnectionNamesSet && + _apiMapResponse.containsKey('allowed_db_connection_names')) { + _allowedDbConnectionNames = + _apiMapResponse['allowed_db_connection_names'] == null + ? null + : _apiMapResponse['allowed_db_connection_names'] + .map((i) => i as String) + .toList(); + _allowedDbConnectionNamesSet = true; + } + return _allowedDbConnectionNames; + } + + set allowedDbConnectionNames(List v) { + _allowedDbConnectionNames = v; + _allowedDbConnectionNamesSet = true; + } + + /// Array of explores (if has_content) (read-only) + + List get explores { + if (!_exploresSet && _apiMapResponse.containsKey('explores')) { + _explores = _apiMapResponse['explores'] == null + ? null + : (_apiMapResponse['explores'] as List) + .map((i) => + LookmlModelNavExplore.fromResponse(i, apiResponseContentType)) + .toList(); + _exploresSet = true; + } + return _explores; + } + + set explores(List v) { + _explores = v; + _exploresSet = true; + } + + /// Does this model declaration have have lookml content? (read-only) + + bool get hasContent { + if (!_hasContentSet && _apiMapResponse.containsKey('has_content')) { + _hasContent = _apiMapResponse['has_content']; + _hasContentSet = true; + } + return _hasContent; + } + + set hasContent(bool v) { + _hasContent = v; + _hasContentSet = true; + } + + /// UI-friendly name for this model (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Name of the model. Also used as the unique identifier + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Name of project containing the model + + String get projectName { + if (!_projectNameSet && _apiMapResponse.containsKey('project_name')) { + _projectName = _apiMapResponse['project_name'] == null + ? null + : _apiMapResponse['project_name'].toString(); + _projectNameSet = true; + } + return _projectName; + } + + set projectName(String v) { + _projectName = v; + _projectNameSet = true; + } + + /// Is this model allowed to use all current and future connections + + bool get unlimitedDbConnections { + if (!_unlimitedDbConnectionsSet && + _apiMapResponse.containsKey('unlimited_db_connections')) { + _unlimitedDbConnections = _apiMapResponse['unlimited_db_connections']; + _unlimitedDbConnectionsSet = true; + } + return _unlimitedDbConnections; + } + + set unlimitedDbConnections(bool v) { + _unlimitedDbConnections = v; + _unlimitedDbConnectionsSet = true; + } + + LookmlModel() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModel.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_allowedDbConnectionNamesSet || + _apiMapResponse.containsKey('allowed_db_connection_names')) { + json['allowed_db_connection_names'] = allowedDbConnectionNames; + } + if (_exploresSet || _apiMapResponse.containsKey('explores')) { + json['explores'] = + explores == null ? null : explores.map((i) => i.toJson()).toList(); + } + if (_hasContentSet || _apiMapResponse.containsKey('has_content')) { + json['has_content'] = hasContent; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_projectNameSet || _apiMapResponse.containsKey('project_name')) { + json['project_name'] = projectName; + } + if (_unlimitedDbConnectionsSet || + _apiMapResponse.containsKey('unlimited_db_connections')) { + json['unlimited_db_connections'] = unlimitedDbConnections; + } + return json; + } +} + +class LookmlModelExplore { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _id; + bool _idSet = false; + + String _name; + bool _nameSet = false; + + String _description; + bool _descriptionSet = false; + + String _label; + bool _labelSet = false; + + String _title; + bool _titleSet = false; + + List _scopes; + bool _scopesSet = false; + + bool _canTotal; + bool _canTotalSet = false; + + bool _canDevelop; + bool _canDevelopSet = false; + + bool _canSeeLookml; + bool _canSeeLookmlSet = false; + + String _lookmlLink; + bool _lookmlLinkSet = false; + + bool _canSave; + bool _canSaveSet = false; + + bool _canExplain; + bool _canExplainSet = false; + + bool _canPivotInDb; + bool _canPivotInDbSet = false; + + bool _canSubtotal; + bool _canSubtotalSet = false; + + bool _hasTimezoneSupport; + bool _hasTimezoneSupportSet = false; + + bool _supportsCostEstimate; + bool _supportsCostEstimateSet = false; + + String _connectionName; + bool _connectionNameSet = false; + + String _nullSortTreatment; + bool _nullSortTreatmentSet = false; + + List _files; + bool _filesSet = false; + + String _sourceFile; + bool _sourceFileSet = false; + + String _projectName; + bool _projectNameSet = false; + + String _modelName; + bool _modelNameSet = false; + + String _viewName; + bool _viewNameSet = false; + + bool _hidden; + bool _hiddenSet = false; + + String _sqlTableName; + bool _sqlTableNameSet = false; + + List _accessFilterFields; + bool _accessFilterFieldsSet = false; + + List _accessFilters; + bool _accessFiltersSet = false; + + List _aliases; + bool _aliasesSet = false; + + List _alwaysFilter; + bool _alwaysFilterSet = false; + + List _conditionallyFilter; + bool _conditionallyFilterSet = false; + + List _indexFields; + bool _indexFieldsSet = false; + + List _sets; + bool _setsSet = false; + + List _tags; + bool _tagsSet = false; + + List _errors; + bool _errorsSet = false; + + LookmlModelExploreFieldset _fields; + bool _fieldsSet = false; + + List _joins; + bool _joinsSet = false; + + String _groupLabel; + bool _groupLabelSet = false; + + List _supportedMeasureTypes; + bool _supportedMeasureTypesSet = false; + + List _alwaysJoin; + bool _alwaysJoinSet = false; + + /// Fully qualified explore name (model name plus explore name) (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Explore name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Description (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Label (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Explore title (read-only) + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Scopes (read-only) + + List get scopes { + if (!_scopesSet && _apiMapResponse.containsKey('scopes')) { + _scopes = _apiMapResponse['scopes'] == null + ? null + : _apiMapResponse['scopes'].map((i) => i as String).toList(); + _scopesSet = true; + } + return _scopes; + } + + set scopes(List v) { + _scopes = v; + _scopesSet = true; + } + + /// Can Total (read-only) + + bool get canTotal { + if (!_canTotalSet && _apiMapResponse.containsKey('can_total')) { + _canTotal = _apiMapResponse['can_total']; + _canTotalSet = true; + } + return _canTotal; + } + + set canTotal(bool v) { + _canTotal = v; + _canTotalSet = true; + } + + /// Can Develop LookML (read-only) + + bool get canDevelop { + if (!_canDevelopSet && _apiMapResponse.containsKey('can_develop')) { + _canDevelop = _apiMapResponse['can_develop']; + _canDevelopSet = true; + } + return _canDevelop; + } + + set canDevelop(bool v) { + _canDevelop = v; + _canDevelopSet = true; + } + + /// Can See LookML (read-only) + + bool get canSeeLookml { + if (!_canSeeLookmlSet && _apiMapResponse.containsKey('can_see_lookml')) { + _canSeeLookml = _apiMapResponse['can_see_lookml']; + _canSeeLookmlSet = true; + } + return _canSeeLookml; + } + + set canSeeLookml(bool v) { + _canSeeLookml = v; + _canSeeLookmlSet = true; + } + + /// A URL linking to the definition of this explore in the LookML IDE. (read-only) + + String get lookmlLink { + if (!_lookmlLinkSet && _apiMapResponse.containsKey('lookml_link')) { + _lookmlLink = _apiMapResponse['lookml_link'] == null + ? null + : _apiMapResponse['lookml_link'].toString(); + _lookmlLinkSet = true; + } + return _lookmlLink; + } + + set lookmlLink(String v) { + _lookmlLink = v; + _lookmlLinkSet = true; + } + + /// Can Save (read-only) + + bool get canSave { + if (!_canSaveSet && _apiMapResponse.containsKey('can_save')) { + _canSave = _apiMapResponse['can_save']; + _canSaveSet = true; + } + return _canSave; + } + + set canSave(bool v) { + _canSave = v; + _canSaveSet = true; + } + + /// Can Explain (read-only) + + bool get canExplain { + if (!_canExplainSet && _apiMapResponse.containsKey('can_explain')) { + _canExplain = _apiMapResponse['can_explain']; + _canExplainSet = true; + } + return _canExplain; + } + + set canExplain(bool v) { + _canExplain = v; + _canExplainSet = true; + } + + /// Can pivot in the DB (read-only) + + bool get canPivotInDb { + if (!_canPivotInDbSet && _apiMapResponse.containsKey('can_pivot_in_db')) { + _canPivotInDb = _apiMapResponse['can_pivot_in_db']; + _canPivotInDbSet = true; + } + return _canPivotInDb; + } + + set canPivotInDb(bool v) { + _canPivotInDb = v; + _canPivotInDbSet = true; + } + + /// Can use subtotals (read-only) + + bool get canSubtotal { + if (!_canSubtotalSet && _apiMapResponse.containsKey('can_subtotal')) { + _canSubtotal = _apiMapResponse['can_subtotal']; + _canSubtotalSet = true; + } + return _canSubtotal; + } + + set canSubtotal(bool v) { + _canSubtotal = v; + _canSubtotalSet = true; + } + + /// Has timezone support (read-only) + + bool get hasTimezoneSupport { + if (!_hasTimezoneSupportSet && + _apiMapResponse.containsKey('has_timezone_support')) { + _hasTimezoneSupport = _apiMapResponse['has_timezone_support']; + _hasTimezoneSupportSet = true; + } + return _hasTimezoneSupport; + } + + set hasTimezoneSupport(bool v) { + _hasTimezoneSupport = v; + _hasTimezoneSupportSet = true; + } + + /// Cost estimates supported (read-only) + + bool get supportsCostEstimate { + if (!_supportsCostEstimateSet && + _apiMapResponse.containsKey('supports_cost_estimate')) { + _supportsCostEstimate = _apiMapResponse['supports_cost_estimate']; + _supportsCostEstimateSet = true; + } + return _supportsCostEstimate; + } + + set supportsCostEstimate(bool v) { + _supportsCostEstimate = v; + _supportsCostEstimateSet = true; + } + + /// Connection name (read-only) + + String get connectionName { + if (!_connectionNameSet && _apiMapResponse.containsKey('connection_name')) { + _connectionName = _apiMapResponse['connection_name'] == null + ? null + : _apiMapResponse['connection_name'].toString(); + _connectionNameSet = true; + } + return _connectionName; + } + + set connectionName(String v) { + _connectionName = v; + _connectionNameSet = true; + } + + /// How nulls are sorted, possible values are "low", "high", "first" and "last" (read-only) + + String get nullSortTreatment { + if (!_nullSortTreatmentSet && + _apiMapResponse.containsKey('null_sort_treatment')) { + _nullSortTreatment = _apiMapResponse['null_sort_treatment'] == null + ? null + : _apiMapResponse['null_sort_treatment'].toString(); + _nullSortTreatmentSet = true; + } + return _nullSortTreatment; + } + + set nullSortTreatment(String v) { + _nullSortTreatment = v; + _nullSortTreatmentSet = true; + } + + /// List of model source files (read-only) + + List get files { + if (!_filesSet && _apiMapResponse.containsKey('files')) { + _files = _apiMapResponse['files'] == null + ? null + : _apiMapResponse['files'].map((i) => i as String).toList(); + _filesSet = true; + } + return _files; + } + + set files(List v) { + _files = v; + _filesSet = true; + } + + /// Primary source_file file (read-only) + + String get sourceFile { + if (!_sourceFileSet && _apiMapResponse.containsKey('source_file')) { + _sourceFile = _apiMapResponse['source_file'] == null + ? null + : _apiMapResponse['source_file'].toString(); + _sourceFileSet = true; + } + return _sourceFile; + } + + set sourceFile(String v) { + _sourceFile = v; + _sourceFileSet = true; + } + + /// Name of project (read-only) + + String get projectName { + if (!_projectNameSet && _apiMapResponse.containsKey('project_name')) { + _projectName = _apiMapResponse['project_name'] == null + ? null + : _apiMapResponse['project_name'].toString(); + _projectNameSet = true; + } + return _projectName; + } + + set projectName(String v) { + _projectName = v; + _projectNameSet = true; + } + + /// Name of model (read-only) + + String get modelName { + if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { + _modelName = _apiMapResponse['model_name'] == null + ? null + : _apiMapResponse['model_name'].toString(); + _modelNameSet = true; + } + return _modelName; + } + + set modelName(String v) { + _modelName = v; + _modelNameSet = true; + } + + /// Name of view (read-only) + + String get viewName { + if (!_viewNameSet && _apiMapResponse.containsKey('view_name')) { + _viewName = _apiMapResponse['view_name'] == null + ? null + : _apiMapResponse['view_name'].toString(); + _viewNameSet = true; + } + return _viewName; + } + + set viewName(String v) { + _viewName = v; + _viewNameSet = true; + } + + /// Is hidden (read-only) + + bool get hidden { + if (!_hiddenSet && _apiMapResponse.containsKey('hidden')) { + _hidden = _apiMapResponse['hidden']; + _hiddenSet = true; + } + return _hidden; + } + + set hidden(bool v) { + _hidden = v; + _hiddenSet = true; + } + + /// A sql_table_name expression that defines what sql table the view/explore maps onto. Example: "prod_orders2 AS orders" in a view named orders. (read-only) + + String get sqlTableName { + if (!_sqlTableNameSet && _apiMapResponse.containsKey('sql_table_name')) { + _sqlTableName = _apiMapResponse['sql_table_name'] == null + ? null + : _apiMapResponse['sql_table_name'].toString(); + _sqlTableNameSet = true; + } + return _sqlTableName; + } + + set sqlTableName(String v) { + _sqlTableName = v; + _sqlTableNameSet = true; + } + + /// (DEPRECATED) Array of access filter field names (read-only) + + List get accessFilterFields { + if (!_accessFilterFieldsSet && + _apiMapResponse.containsKey('access_filter_fields')) { + _accessFilterFields = _apiMapResponse['access_filter_fields'] == null + ? null + : _apiMapResponse['access_filter_fields'] + .map((i) => i as String) + .toList(); + _accessFilterFieldsSet = true; + } + return _accessFilterFields; + } + + set accessFilterFields(List v) { + _accessFilterFields = v; + _accessFilterFieldsSet = true; + } + + /// Access filters (read-only) + + List get accessFilters { + if (!_accessFiltersSet && _apiMapResponse.containsKey('access_filters')) { + _accessFilters = _apiMapResponse['access_filters'] == null + ? null + : (_apiMapResponse['access_filters'] as List) + .map((i) => LookmlModelExploreAccessFilter.fromResponse( + i, apiResponseContentType)) + .toList(); + _accessFiltersSet = true; + } + return _accessFilters; + } + + set accessFilters(List v) { + _accessFilters = v; + _accessFiltersSet = true; + } + + /// Aliases (read-only) + + List get aliases { + if (!_aliasesSet && _apiMapResponse.containsKey('aliases')) { + _aliases = _apiMapResponse['aliases'] == null + ? null + : (_apiMapResponse['aliases'] as List) + .map((i) => LookmlModelExploreAlias.fromResponse( + i, apiResponseContentType)) + .toList(); + _aliasesSet = true; + } + return _aliases; + } + + set aliases(List v) { + _aliases = v; + _aliasesSet = true; + } + + /// Always filter (read-only) + + List get alwaysFilter { + if (!_alwaysFilterSet && _apiMapResponse.containsKey('always_filter')) { + _alwaysFilter = _apiMapResponse['always_filter'] == null + ? null + : (_apiMapResponse['always_filter'] as List) + .map((i) => LookmlModelExploreAlwaysFilter.fromResponse( + i, apiResponseContentType)) + .toList(); + _alwaysFilterSet = true; + } + return _alwaysFilter; + } + + set alwaysFilter(List v) { + _alwaysFilter = v; + _alwaysFilterSet = true; + } + + /// Conditionally filter (read-only) + + List get conditionallyFilter { + if (!_conditionallyFilterSet && + _apiMapResponse.containsKey('conditionally_filter')) { + _conditionallyFilter = _apiMapResponse['conditionally_filter'] == null + ? null + : (_apiMapResponse['conditionally_filter'] as List) + .map((i) => LookmlModelExploreConditionallyFilter.fromResponse( + i, apiResponseContentType)) + .toList(); + _conditionallyFilterSet = true; + } + return _conditionallyFilter; + } + + set conditionallyFilter(List v) { + _conditionallyFilter = v; + _conditionallyFilterSet = true; + } + + /// Array of index fields (read-only) + + List get indexFields { + if (!_indexFieldsSet && _apiMapResponse.containsKey('index_fields')) { + _indexFields = _apiMapResponse['index_fields'] == null + ? null + : _apiMapResponse['index_fields'] + .map((i) => i as String) + .toList(); + _indexFieldsSet = true; + } + return _indexFields; + } + + set indexFields(List v) { + _indexFields = v; + _indexFieldsSet = true; + } + + /// Sets (read-only) + + List get sets { + if (!_setsSet && _apiMapResponse.containsKey('sets')) { + _sets = _apiMapResponse['sets'] == null + ? null + : (_apiMapResponse['sets'] as List) + .map((i) => + LookmlModelExploreSet.fromResponse(i, apiResponseContentType)) + .toList(); + _setsSet = true; + } + return _sets; + } + + set sets(List v) { + _sets = v; + _setsSet = true; + } + + /// An array of arbitrary string tags provided in the model for this explore. (read-only) + + List get tags { + if (!_tagsSet && _apiMapResponse.containsKey('tags')) { + _tags = _apiMapResponse['tags'] == null + ? null + : _apiMapResponse['tags'].map((i) => i as String).toList(); + _tagsSet = true; + } + return _tags; + } + + set tags(List v) { + _tags = v; + _tagsSet = true; + } + + /// Errors (read-only) + + List get errors { + if (!_errorsSet && _apiMapResponse.containsKey('errors')) { + _errors = _apiMapResponse['errors'] == null + ? null + : (_apiMapResponse['errors'] as List) + .map((i) => LookmlModelExploreError.fromResponse( + i, apiResponseContentType)) + .toList(); + _errorsSet = true; + } + return _errors; + } + + set errors(List v) { + _errors = v; + _errorsSet = true; + } + + LookmlModelExploreFieldset get fields { + if (!_fieldsSet && _apiMapResponse.containsKey('fields')) { + _fields = _apiMapResponse['fields'] == null + ? null + : LookmlModelExploreFieldset.fromResponse( + _apiMapResponse['fields'], apiResponseContentType); + _fieldsSet = true; + } + return _fields; + } + + set fields(LookmlModelExploreFieldset v) { + _fields = v; + _fieldsSet = true; + } + + /// Views joined into this explore (read-only) + + List get joins { + if (!_joinsSet && _apiMapResponse.containsKey('joins')) { + _joins = _apiMapResponse['joins'] == null + ? null + : (_apiMapResponse['joins'] as List) + .map((i) => LookmlModelExploreJoins.fromResponse( + i, apiResponseContentType)) + .toList(); + _joinsSet = true; + } + return _joins; + } + + set joins(List v) { + _joins = v; + _joinsSet = true; + } + + /// Label used to group explores in the navigation menus (read-only) + + String get groupLabel { + if (!_groupLabelSet && _apiMapResponse.containsKey('group_label')) { + _groupLabel = _apiMapResponse['group_label'] == null + ? null + : _apiMapResponse['group_label'].toString(); + _groupLabelSet = true; + } + return _groupLabel; + } + + set groupLabel(String v) { + _groupLabel = v; + _groupLabelSet = true; + } + + /// An array of items describing which custom measure types are supported for creating a custom measure 'based_on' each possible dimension type. (read-only) + + List get supportedMeasureTypes { + if (!_supportedMeasureTypesSet && + _apiMapResponse.containsKey('supported_measure_types')) { + _supportedMeasureTypes = _apiMapResponse['supported_measure_types'] == + null + ? null + : (_apiMapResponse['supported_measure_types'] as List) + .map((i) => LookmlModelExploreSupportedMeasureType.fromResponse( + i, apiResponseContentType)) + .toList(); + _supportedMeasureTypesSet = true; + } + return _supportedMeasureTypes; + } + + set supportedMeasureTypes(List v) { + _supportedMeasureTypes = v; + _supportedMeasureTypesSet = true; + } + + /// An array of joins that will always be included in the SQL for this explore, even if the user has not selected a field from the joined view. (read-only) + + List get alwaysJoin { + if (!_alwaysJoinSet && _apiMapResponse.containsKey('always_join')) { + _alwaysJoin = _apiMapResponse['always_join'] == null + ? null + : _apiMapResponse['always_join'] + .map((i) => i as String) + .toList(); + _alwaysJoinSet = true; + } + return _alwaysJoin; + } + + set alwaysJoin(List v) { + _alwaysJoin = v; + _alwaysJoinSet = true; + } + + LookmlModelExplore() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExplore.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_scopesSet || _apiMapResponse.containsKey('scopes')) { + json['scopes'] = scopes; + } + if (_canTotalSet || _apiMapResponse.containsKey('can_total')) { + json['can_total'] = canTotal; + } + if (_canDevelopSet || _apiMapResponse.containsKey('can_develop')) { + json['can_develop'] = canDevelop; + } + if (_canSeeLookmlSet || _apiMapResponse.containsKey('can_see_lookml')) { + json['can_see_lookml'] = canSeeLookml; + } + if (_lookmlLinkSet || _apiMapResponse.containsKey('lookml_link')) { + json['lookml_link'] = lookmlLink; + } + if (_canSaveSet || _apiMapResponse.containsKey('can_save')) { + json['can_save'] = canSave; + } + if (_canExplainSet || _apiMapResponse.containsKey('can_explain')) { + json['can_explain'] = canExplain; + } + if (_canPivotInDbSet || _apiMapResponse.containsKey('can_pivot_in_db')) { + json['can_pivot_in_db'] = canPivotInDb; + } + if (_canSubtotalSet || _apiMapResponse.containsKey('can_subtotal')) { + json['can_subtotal'] = canSubtotal; + } + if (_hasTimezoneSupportSet || + _apiMapResponse.containsKey('has_timezone_support')) { + json['has_timezone_support'] = hasTimezoneSupport; + } + if (_supportsCostEstimateSet || + _apiMapResponse.containsKey('supports_cost_estimate')) { + json['supports_cost_estimate'] = supportsCostEstimate; + } + if (_connectionNameSet || _apiMapResponse.containsKey('connection_name')) { + json['connection_name'] = connectionName; + } + if (_nullSortTreatmentSet || + _apiMapResponse.containsKey('null_sort_treatment')) { + json['null_sort_treatment'] = nullSortTreatment; + } + if (_filesSet || _apiMapResponse.containsKey('files')) { + json['files'] = files; + } + if (_sourceFileSet || _apiMapResponse.containsKey('source_file')) { + json['source_file'] = sourceFile; + } + if (_projectNameSet || _apiMapResponse.containsKey('project_name')) { + json['project_name'] = projectName; + } + if (_modelNameSet || _apiMapResponse.containsKey('model_name')) { + json['model_name'] = modelName; + } + if (_viewNameSet || _apiMapResponse.containsKey('view_name')) { + json['view_name'] = viewName; + } + if (_hiddenSet || _apiMapResponse.containsKey('hidden')) { + json['hidden'] = hidden; + } + if (_sqlTableNameSet || _apiMapResponse.containsKey('sql_table_name')) { + json['sql_table_name'] = sqlTableName; + } + if (_accessFilterFieldsSet || + _apiMapResponse.containsKey('access_filter_fields')) { + json['access_filter_fields'] = accessFilterFields; + } + if (_accessFiltersSet || _apiMapResponse.containsKey('access_filters')) { + json['access_filters'] = accessFilters == null + ? null + : accessFilters.map((i) => i.toJson()).toList(); + } + if (_aliasesSet || _apiMapResponse.containsKey('aliases')) { + json['aliases'] = + aliases == null ? null : aliases.map((i) => i.toJson()).toList(); + } + if (_alwaysFilterSet || _apiMapResponse.containsKey('always_filter')) { + json['always_filter'] = alwaysFilter == null + ? null + : alwaysFilter.map((i) => i.toJson()).toList(); + } + if (_conditionallyFilterSet || + _apiMapResponse.containsKey('conditionally_filter')) { + json['conditionally_filter'] = conditionallyFilter == null + ? null + : conditionallyFilter.map((i) => i.toJson()).toList(); + } + if (_indexFieldsSet || _apiMapResponse.containsKey('index_fields')) { + json['index_fields'] = indexFields; + } + if (_setsSet || _apiMapResponse.containsKey('sets')) { + json['sets'] = sets == null ? null : sets.map((i) => i.toJson()).toList(); + } + if (_tagsSet || _apiMapResponse.containsKey('tags')) { + json['tags'] = tags; + } + if (_errorsSet || _apiMapResponse.containsKey('errors')) { + json['errors'] = + errors == null ? null : errors.map((i) => i.toJson()).toList(); + } + if (_fieldsSet || _apiMapResponse.containsKey('fields')) { + json['fields'] = fields == null ? null : fields.toJson(); + } + if (_joinsSet || _apiMapResponse.containsKey('joins')) { + json['joins'] = + joins == null ? null : joins.map((i) => i.toJson()).toList(); + } + if (_groupLabelSet || _apiMapResponse.containsKey('group_label')) { + json['group_label'] = groupLabel; + } + if (_supportedMeasureTypesSet || + _apiMapResponse.containsKey('supported_measure_types')) { + json['supported_measure_types'] = supportedMeasureTypes == null + ? null + : supportedMeasureTypes.map((i) => i.toJson()).toList(); + } + if (_alwaysJoinSet || _apiMapResponse.containsKey('always_join')) { + json['always_join'] = alwaysJoin; + } + return json; + } +} + +class LookmlModelExploreAccessFilter { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _field; + bool _fieldSet = false; + + String _userAttribute; + bool _userAttributeSet = false; + + /// Field to be filtered (read-only) + + String get field { + if (!_fieldSet && _apiMapResponse.containsKey('field')) { + _field = _apiMapResponse['field'] == null + ? null + : _apiMapResponse['field'].toString(); + _fieldSet = true; + } + return _field; + } + + set field(String v) { + _field = v; + _fieldSet = true; + } + + /// User attribute name (read-only) + + String get userAttribute { + if (!_userAttributeSet && _apiMapResponse.containsKey('user_attribute')) { + _userAttribute = _apiMapResponse['user_attribute'] == null + ? null + : _apiMapResponse['user_attribute'].toString(); + _userAttributeSet = true; + } + return _userAttribute; + } + + set userAttribute(String v) { + _userAttribute = v; + _userAttributeSet = true; + } + + LookmlModelExploreAccessFilter() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreAccessFilter.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_fieldSet || _apiMapResponse.containsKey('field')) { + json['field'] = field; + } + if (_userAttributeSet || _apiMapResponse.containsKey('user_attribute')) { + json['user_attribute'] = userAttribute; + } + return json; + } +} + +class LookmlModelExploreAlias { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _value; + bool _valueSet = false; + + /// Name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Value (read-only) + + String get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value'] == null + ? null + : _apiMapResponse['value'].toString(); + _valueSet = true; + } + return _value; + } + + set value(String v) { + _value = v; + _valueSet = true; + } + + LookmlModelExploreAlias() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreAlias.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + return json; + } +} + +class LookmlModelExploreAlwaysFilter { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _value; + bool _valueSet = false; + + /// Name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Value (read-only) + + String get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value'] == null + ? null + : _apiMapResponse['value'].toString(); + _valueSet = true; + } + return _value; + } + + set value(String v) { + _value = v; + _valueSet = true; + } + + LookmlModelExploreAlwaysFilter() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreAlwaysFilter.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + return json; + } +} + +class LookmlModelExploreConditionallyFilter { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _value; + bool _valueSet = false; + + /// Name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Value (read-only) + + String get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value'] == null + ? null + : _apiMapResponse['value'].toString(); + _valueSet = true; + } + return _value; + } + + set value(String v) { + _value = v; + _valueSet = true; + } + + LookmlModelExploreConditionallyFilter() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreConditionallyFilter.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + return json; + } +} + +class LookmlModelExploreError { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _message; + bool _messageSet = false; + + dynamic _details; + bool _detailsSet = false; + + String _errorPos; + bool _errorPosSet = false; + + bool _fieldError; + bool _fieldErrorSet = false; + + /// Error Message (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Details (read-only) + + dynamic get details { + if (!_detailsSet && _apiMapResponse.containsKey('details')) { + _details = _apiMapResponse['details']; + _detailsSet = true; + } + return _details; + } + + set details(dynamic v) { + _details = v; + _detailsSet = true; + } + + /// Error source location (read-only) + + String get errorPos { + if (!_errorPosSet && _apiMapResponse.containsKey('error_pos')) { + _errorPos = _apiMapResponse['error_pos'] == null + ? null + : _apiMapResponse['error_pos'].toString(); + _errorPosSet = true; + } + return _errorPos; + } + + set errorPos(String v) { + _errorPos = v; + _errorPosSet = true; + } + + /// Is this a field error (read-only) + + bool get fieldError { + if (!_fieldErrorSet && _apiMapResponse.containsKey('field_error')) { + _fieldError = _apiMapResponse['field_error']; + _fieldErrorSet = true; + } + return _fieldError; + } + + set fieldError(bool v) { + _fieldError = v; + _fieldErrorSet = true; + } + + LookmlModelExploreError() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreError.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_detailsSet || _apiMapResponse.containsKey('details')) { + json['details'] = details; + } + if (_errorPosSet || _apiMapResponse.containsKey('error_pos')) { + json['error_pos'] = errorPos; + } + if (_fieldErrorSet || _apiMapResponse.containsKey('field_error')) { + json['field_error'] = fieldError; + } + return json; + } +} + +class LookmlModelExploreField { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Align _align; + bool _alignSet = false; + + bool _canFilter; + bool _canFilterSet = false; + + Category _category; + bool _categorySet = false; + + String _defaultFilterValue; + bool _defaultFilterValueSet = false; + + String _description; + bool _descriptionSet = false; + + String _dimensionGroup; + bool _dimensionGroupSet = false; + + List _enumerations; + bool _enumerationsSet = false; + + String _error; + bool _errorSet = false; + + String _fieldGroupLabel; + bool _fieldGroupLabelSet = false; + + String _fieldGroupVariant; + bool _fieldGroupVariantSet = false; + + FillStyle _fillStyle; + bool _fillStyleSet = false; + + int _fiscalMonthOffset; + bool _fiscalMonthOffsetSet = false; + + bool _hasAllowedValues; + bool _hasAllowedValuesSet = false; + + bool _hidden; + bool _hiddenSet = false; + + bool _isFilter; + bool _isFilterSet = false; + + bool _isFiscal; + bool _isFiscalSet = false; + + bool _isNumeric; + bool _isNumericSet = false; + + bool _isTimeframe; + bool _isTimeframeSet = false; + + bool _canTimeFilter; + bool _canTimeFilterSet = false; + + LookmlModelExploreFieldTimeInterval _timeInterval; + bool _timeIntervalSet = false; + + String _label; + bool _labelSet = false; + + String _labelFromParameter; + bool _labelFromParameterSet = false; + + String _labelShort; + bool _labelShortSet = false; + + String _lookmlLink; + bool _lookmlLinkSet = false; + + LookmlModelExploreFieldMapLayer _mapLayer; + bool _mapLayerSet = false; + + bool _measure; + bool _measureSet = false; + + String _name; + bool _nameSet = false; + + bool _strictValueFormat; + bool _strictValueFormatSet = false; + + bool _parameter; + bool _parameterSet = false; + + bool _permanent; + bool _permanentSet = false; + + bool _primaryKey; + bool _primaryKeySet = false; + + String _projectName; + bool _projectNameSet = false; + + bool _requiresRefreshOnSort; + bool _requiresRefreshOnSortSet = false; + + String _scope; + bool _scopeSet = false; + + bool _sortable; + bool _sortableSet = false; + + String _sourceFile; + bool _sourceFileSet = false; + + String _sourceFilePath; + bool _sourceFilePathSet = false; + + String _sql; + bool _sqlSet = false; + + List _sqlCase; + bool _sqlCaseSet = false; + + List _filters; + bool _filtersSet = false; + + String _suggestDimension; + bool _suggestDimensionSet = false; + + String _suggestExplore; + bool _suggestExploreSet = false; + + bool _suggestable; + bool _suggestableSet = false; + + List _suggestions; + bool _suggestionsSet = false; + + List _tags; + bool _tagsSet = false; + + String _type; + bool _typeSet = false; + + List _userAttributeFilterTypes; + bool _userAttributeFilterTypesSet = false; + + String _valueFormat; + bool _valueFormatSet = false; + + String _view; + bool _viewSet = false; + + String _viewLabel; + bool _viewLabelSet = false; + + bool _dynamic; + bool _dynamicSet = false; + + WeekStartDay _weekStartDay; + bool _weekStartDaySet = false; + + int _timesUsed; + bool _timesUsedSet = false; + + String _originalView; + bool _originalViewSet = false; + + /// The appropriate horizontal text alignment the values of this field should be displayed in. Valid values are: "left", "right". (read-only) + + Align get align { + if (!_alignSet && _apiMapResponse.containsKey('align')) { + _align = AlignMapper.fromStringValue(_apiMapResponse['align']); + _alignSet = true; + } + return _align; + } + + set align(Align v) { + _align = v; + _alignSet = true; + } + + /// Whether it's possible to filter on this field. (read-only) + + bool get canFilter { + if (!_canFilterSet && _apiMapResponse.containsKey('can_filter')) { + _canFilter = _apiMapResponse['can_filter']; + _canFilterSet = true; + } + return _canFilter; + } + + set canFilter(bool v) { + _canFilter = v; + _canFilterSet = true; + } + + /// Field category Valid values are: "parameter", "filter", "measure", "dimension". (read-only) + + Category get category { + if (!_categorySet && _apiMapResponse.containsKey('category')) { + _category = CategoryMapper.fromStringValue(_apiMapResponse['category']); + _categorySet = true; + } + return _category; + } + + set category(Category v) { + _category = v; + _categorySet = true; + } + + /// The default value that this field uses when filtering. Null if there is no default value. (read-only) + + String get defaultFilterValue { + if (!_defaultFilterValueSet && + _apiMapResponse.containsKey('default_filter_value')) { + _defaultFilterValue = _apiMapResponse['default_filter_value'] == null + ? null + : _apiMapResponse['default_filter_value'].toString(); + _defaultFilterValueSet = true; + } + return _defaultFilterValue; + } + + set defaultFilterValue(String v) { + _defaultFilterValue = v; + _defaultFilterValueSet = true; + } + + /// Description (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Dimension group if this field is part of a dimension group. If not, this will be null. (read-only) + + String get dimensionGroup { + if (!_dimensionGroupSet && _apiMapResponse.containsKey('dimension_group')) { + _dimensionGroup = _apiMapResponse['dimension_group'] == null + ? null + : _apiMapResponse['dimension_group'].toString(); + _dimensionGroupSet = true; + } + return _dimensionGroup; + } + + set dimensionGroup(String v) { + _dimensionGroup = v; + _dimensionGroupSet = true; + } + + /// An array enumerating all the possible values that this field can contain. When null, there is no limit to the set of possible values this field can contain. (read-only) + + List get enumerations { + if (!_enumerationsSet && _apiMapResponse.containsKey('enumerations')) { + _enumerations = _apiMapResponse['enumerations'] == null + ? null + : (_apiMapResponse['enumerations'] as List) + .map((i) => LookmlModelExploreFieldEnumeration.fromResponse( + i, apiResponseContentType)) + .toList(); + _enumerationsSet = true; + } + return _enumerations; + } + + set enumerations(List v) { + _enumerations = v; + _enumerationsSet = true; + } + + /// An error message indicating a problem with the definition of this field. If there are no errors, this will be null. (read-only) + + String get error { + if (!_errorSet && _apiMapResponse.containsKey('error')) { + _error = _apiMapResponse['error'] == null + ? null + : _apiMapResponse['error'].toString(); + _errorSet = true; + } + return _error; + } + + set error(String v) { + _error = v; + _errorSet = true; + } + + /// A label creating a grouping of fields. All fields with this label should be presented together when displayed in a UI. (read-only) + + String get fieldGroupLabel { + if (!_fieldGroupLabelSet && + _apiMapResponse.containsKey('field_group_label')) { + _fieldGroupLabel = _apiMapResponse['field_group_label'] == null + ? null + : _apiMapResponse['field_group_label'].toString(); + _fieldGroupLabelSet = true; + } + return _fieldGroupLabel; + } + + set fieldGroupLabel(String v) { + _fieldGroupLabel = v; + _fieldGroupLabelSet = true; + } + + /// When presented in a field group via field_group_label, a shorter name of the field to be displayed in that context. (read-only) + + String get fieldGroupVariant { + if (!_fieldGroupVariantSet && + _apiMapResponse.containsKey('field_group_variant')) { + _fieldGroupVariant = _apiMapResponse['field_group_variant'] == null + ? null + : _apiMapResponse['field_group_variant'].toString(); + _fieldGroupVariantSet = true; + } + return _fieldGroupVariant; + } + + set fieldGroupVariant(String v) { + _fieldGroupVariant = v; + _fieldGroupVariantSet = true; + } + + /// The style of dimension fill that is possible for this field. Null if no dimension fill is possible. Valid values are: "enumeration", "range". (read-only) + + FillStyle get fillStyle { + if (!_fillStyleSet && _apiMapResponse.containsKey('fill_style')) { + _fillStyle = + FillStyleMapper.fromStringValue(_apiMapResponse['fill_style']); + _fillStyleSet = true; + } + return _fillStyle; + } + + set fillStyle(FillStyle v) { + _fillStyle = v; + _fillStyleSet = true; + } + + /// An offset (in months) from the calendar start month to the fiscal start month defined in the LookML model this field belongs to. (read-only) + + int get fiscalMonthOffset { + if (!_fiscalMonthOffsetSet && + _apiMapResponse.containsKey('fiscal_month_offset')) { + _fiscalMonthOffset = _apiMapResponse['fiscal_month_offset']; + _fiscalMonthOffsetSet = true; + } + return _fiscalMonthOffset; + } + + set fiscalMonthOffset(int v) { + _fiscalMonthOffset = v; + _fiscalMonthOffsetSet = true; + } + + /// Whether this field has a set of allowed_values specified in LookML. (read-only) + + bool get hasAllowedValues { + if (!_hasAllowedValuesSet && + _apiMapResponse.containsKey('has_allowed_values')) { + _hasAllowedValues = _apiMapResponse['has_allowed_values']; + _hasAllowedValuesSet = true; + } + return _hasAllowedValues; + } + + set hasAllowedValues(bool v) { + _hasAllowedValues = v; + _hasAllowedValuesSet = true; + } + + /// Whether this field should be hidden from the user interface. (read-only) + + bool get hidden { + if (!_hiddenSet && _apiMapResponse.containsKey('hidden')) { + _hidden = _apiMapResponse['hidden']; + _hiddenSet = true; + } + return _hidden; + } + + set hidden(bool v) { + _hidden = v; + _hiddenSet = true; + } + + /// Whether this field is a filter. (read-only) + + bool get isFilter { + if (!_isFilterSet && _apiMapResponse.containsKey('is_filter')) { + _isFilter = _apiMapResponse['is_filter']; + _isFilterSet = true; + } + return _isFilter; + } + + set isFilter(bool v) { + _isFilter = v; + _isFilterSet = true; + } + + /// Whether this field represents a fiscal time value. (read-only) + + bool get isFiscal { + if (!_isFiscalSet && _apiMapResponse.containsKey('is_fiscal')) { + _isFiscal = _apiMapResponse['is_fiscal']; + _isFiscalSet = true; + } + return _isFiscal; + } + + set isFiscal(bool v) { + _isFiscal = v; + _isFiscalSet = true; + } + + /// Whether this field is of a type that represents a numeric value. (read-only) + + bool get isNumeric { + if (!_isNumericSet && _apiMapResponse.containsKey('is_numeric')) { + _isNumeric = _apiMapResponse['is_numeric']; + _isNumericSet = true; + } + return _isNumeric; + } + + set isNumeric(bool v) { + _isNumeric = v; + _isNumericSet = true; + } + + /// Whether this field is of a type that represents a time value. (read-only) + + bool get isTimeframe { + if (!_isTimeframeSet && _apiMapResponse.containsKey('is_timeframe')) { + _isTimeframe = _apiMapResponse['is_timeframe']; + _isTimeframeSet = true; + } + return _isTimeframe; + } + + set isTimeframe(bool v) { + _isTimeframe = v; + _isTimeframeSet = true; + } + + /// Whether this field can be time filtered. (read-only) + + bool get canTimeFilter { + if (!_canTimeFilterSet && _apiMapResponse.containsKey('can_time_filter')) { + _canTimeFilter = _apiMapResponse['can_time_filter']; + _canTimeFilterSet = true; + } + return _canTimeFilter; + } + + set canTimeFilter(bool v) { + _canTimeFilter = v; + _canTimeFilterSet = true; + } + + LookmlModelExploreFieldTimeInterval get timeInterval { + if (!_timeIntervalSet && _apiMapResponse.containsKey('time_interval')) { + _timeInterval = _apiMapResponse['time_interval'] == null + ? null + : LookmlModelExploreFieldTimeInterval.fromResponse( + _apiMapResponse['time_interval'], apiResponseContentType); + _timeIntervalSet = true; + } + return _timeInterval; + } + + set timeInterval(LookmlModelExploreFieldTimeInterval v) { + _timeInterval = v; + _timeIntervalSet = true; + } + + /// Fully-qualified human-readable label of the field. (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// The name of the parameter that will provide a parameterized label for this field, if available in the current context. (read-only) + + String get labelFromParameter { + if (!_labelFromParameterSet && + _apiMapResponse.containsKey('label_from_parameter')) { + _labelFromParameter = _apiMapResponse['label_from_parameter'] == null + ? null + : _apiMapResponse['label_from_parameter'].toString(); + _labelFromParameterSet = true; + } + return _labelFromParameter; + } + + set labelFromParameter(String v) { + _labelFromParameter = v; + _labelFromParameterSet = true; + } + + /// The human-readable label of the field, without the view label. (read-only) + + String get labelShort { + if (!_labelShortSet && _apiMapResponse.containsKey('label_short')) { + _labelShort = _apiMapResponse['label_short'] == null + ? null + : _apiMapResponse['label_short'].toString(); + _labelShortSet = true; + } + return _labelShort; + } + + set labelShort(String v) { + _labelShort = v; + _labelShortSet = true; + } + + /// A URL linking to the definition of this field in the LookML IDE. (read-only) + + String get lookmlLink { + if (!_lookmlLinkSet && _apiMapResponse.containsKey('lookml_link')) { + _lookmlLink = _apiMapResponse['lookml_link'] == null + ? null + : _apiMapResponse['lookml_link'].toString(); + _lookmlLinkSet = true; + } + return _lookmlLink; + } + + set lookmlLink(String v) { + _lookmlLink = v; + _lookmlLinkSet = true; + } + + LookmlModelExploreFieldMapLayer get mapLayer { + if (!_mapLayerSet && _apiMapResponse.containsKey('map_layer')) { + _mapLayer = _apiMapResponse['map_layer'] == null + ? null + : LookmlModelExploreFieldMapLayer.fromResponse( + _apiMapResponse['map_layer'], apiResponseContentType); + _mapLayerSet = true; + } + return _mapLayer; + } + + set mapLayer(LookmlModelExploreFieldMapLayer v) { + _mapLayer = v; + _mapLayerSet = true; + } + + /// Whether this field is a measure. (read-only) + + bool get measure { + if (!_measureSet && _apiMapResponse.containsKey('measure')) { + _measure = _apiMapResponse['measure']; + _measureSet = true; + } + return _measure; + } + + set measure(bool v) { + _measure = v; + _measureSet = true; + } + + /// Fully-qualified name of the field. (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// If yes, the field will not be localized with the user attribute number_format. Defaults to no (read-only) + + bool get strictValueFormat { + if (!_strictValueFormatSet && + _apiMapResponse.containsKey('strict_value_format')) { + _strictValueFormat = _apiMapResponse['strict_value_format']; + _strictValueFormatSet = true; + } + return _strictValueFormat; + } + + set strictValueFormat(bool v) { + _strictValueFormat = v; + _strictValueFormatSet = true; + } + + /// Whether this field is a parameter. (read-only) + + bool get parameter { + if (!_parameterSet && _apiMapResponse.containsKey('parameter')) { + _parameter = _apiMapResponse['parameter']; + _parameterSet = true; + } + return _parameter; + } + + set parameter(bool v) { + _parameter = v; + _parameterSet = true; + } + + /// Whether this field can be removed from a query. (read-only) + + bool get permanent { + if (!_permanentSet && _apiMapResponse.containsKey('permanent')) { + _permanent = _apiMapResponse['permanent']; + _permanentSet = true; + } + return _permanent; + } + + set permanent(bool v) { + _permanent = v; + _permanentSet = true; + } + + /// Whether or not the field represents a primary key. (read-only) + + bool get primaryKey { + if (!_primaryKeySet && _apiMapResponse.containsKey('primary_key')) { + _primaryKey = _apiMapResponse['primary_key']; + _primaryKeySet = true; + } + return _primaryKey; + } + + set primaryKey(bool v) { + _primaryKey = v; + _primaryKeySet = true; + } + + /// The name of the project this field is defined in. (read-only) + + String get projectName { + if (!_projectNameSet && _apiMapResponse.containsKey('project_name')) { + _projectName = _apiMapResponse['project_name'] == null + ? null + : _apiMapResponse['project_name'].toString(); + _projectNameSet = true; + } + return _projectName; + } + + set projectName(String v) { + _projectName = v; + _projectNameSet = true; + } + + /// When true, it's not possible to re-sort this field's values without re-running the SQL query, due to database logic that affects the sort. (read-only) + + bool get requiresRefreshOnSort { + if (!_requiresRefreshOnSortSet && + _apiMapResponse.containsKey('requires_refresh_on_sort')) { + _requiresRefreshOnSort = _apiMapResponse['requires_refresh_on_sort']; + _requiresRefreshOnSortSet = true; + } + return _requiresRefreshOnSort; + } + + set requiresRefreshOnSort(bool v) { + _requiresRefreshOnSort = v; + _requiresRefreshOnSortSet = true; + } + + /// The LookML scope this field belongs to. The scope is typically the field's view. (read-only) + + String get scope { + if (!_scopeSet && _apiMapResponse.containsKey('scope')) { + _scope = _apiMapResponse['scope'] == null + ? null + : _apiMapResponse['scope'].toString(); + _scopeSet = true; + } + return _scope; + } + + set scope(String v) { + _scope = v; + _scopeSet = true; + } + + /// Whether this field can be sorted. (read-only) + + bool get sortable { + if (!_sortableSet && _apiMapResponse.containsKey('sortable')) { + _sortable = _apiMapResponse['sortable']; + _sortableSet = true; + } + return _sortable; + } + + set sortable(bool v) { + _sortable = v; + _sortableSet = true; + } + + /// The path portion of source_file_path. (read-only) + + String get sourceFile { + if (!_sourceFileSet && _apiMapResponse.containsKey('source_file')) { + _sourceFile = _apiMapResponse['source_file'] == null + ? null + : _apiMapResponse['source_file'].toString(); + _sourceFileSet = true; + } + return _sourceFile; + } + + set sourceFile(String v) { + _sourceFile = v; + _sourceFileSet = true; + } + + /// The fully-qualified path of the project file this field is defined in. (read-only) + + String get sourceFilePath { + if (!_sourceFilePathSet && + _apiMapResponse.containsKey('source_file_path')) { + _sourceFilePath = _apiMapResponse['source_file_path'] == null + ? null + : _apiMapResponse['source_file_path'].toString(); + _sourceFilePathSet = true; + } + return _sourceFilePath; + } + + set sourceFilePath(String v) { + _sourceFilePath = v; + _sourceFilePathSet = true; + } + + /// SQL expression as defined in the LookML model. The SQL syntax shown here is a representation intended for auditability, and is not neccessarily an exact match for what will ultimately be run in the database. It may contain special LookML syntax or annotations that are not valid SQL. This will be null if the current user does not have the see_lookml permission for the field's model. (read-only) + + String get sql { + if (!_sqlSet && _apiMapResponse.containsKey('sql')) { + _sql = _apiMapResponse['sql'] == null + ? null + : _apiMapResponse['sql'].toString(); + _sqlSet = true; + } + return _sql; + } + + set sql(String v) { + _sql = v; + _sqlSet = true; + } + + /// An array of conditions and values that make up a SQL Case expression, as defined in the LookML model. The SQL syntax shown here is a representation intended for auditability, and is not neccessarily an exact match for what will ultimately be run in the database. It may contain special LookML syntax or annotations that are not valid SQL. This will be null if the current user does not have the see_lookml permission for the field's model. (read-only) + + List get sqlCase { + if (!_sqlCaseSet && _apiMapResponse.containsKey('sql_case')) { + _sqlCase = _apiMapResponse['sql_case'] == null + ? null + : (_apiMapResponse['sql_case'] as List) + .map((i) => LookmlModelExploreFieldSqlCase.fromResponse( + i, apiResponseContentType)) + .toList(); + _sqlCaseSet = true; + } + return _sqlCase; + } + + set sqlCase(List v) { + _sqlCase = v; + _sqlCaseSet = true; + } + + /// Array of filter conditions defined for the measure in LookML. (read-only) + + List get filters { + if (!_filtersSet && _apiMapResponse.containsKey('filters')) { + _filters = _apiMapResponse['filters'] == null + ? null + : (_apiMapResponse['filters'] as List) + .map((i) => LookmlModelExploreFieldMeasureFilters.fromResponse( + i, apiResponseContentType)) + .toList(); + _filtersSet = true; + } + return _filters; + } + + set filters(List v) { + _filters = v; + _filtersSet = true; + } + + /// The name of the dimension to base suggest queries from. (read-only) + + String get suggestDimension { + if (!_suggestDimensionSet && + _apiMapResponse.containsKey('suggest_dimension')) { + _suggestDimension = _apiMapResponse['suggest_dimension'] == null + ? null + : _apiMapResponse['suggest_dimension'].toString(); + _suggestDimensionSet = true; + } + return _suggestDimension; + } + + set suggestDimension(String v) { + _suggestDimension = v; + _suggestDimensionSet = true; + } + + /// The name of the explore to base suggest queries from. (read-only) + + String get suggestExplore { + if (!_suggestExploreSet && _apiMapResponse.containsKey('suggest_explore')) { + _suggestExplore = _apiMapResponse['suggest_explore'] == null + ? null + : _apiMapResponse['suggest_explore'].toString(); + _suggestExploreSet = true; + } + return _suggestExplore; + } + + set suggestExplore(String v) { + _suggestExplore = v; + _suggestExploreSet = true; + } + + /// Whether or not suggestions are possible for this field. (read-only) + + bool get suggestable { + if (!_suggestableSet && _apiMapResponse.containsKey('suggestable')) { + _suggestable = _apiMapResponse['suggestable']; + _suggestableSet = true; + } + return _suggestable; + } + + set suggestable(bool v) { + _suggestable = v; + _suggestableSet = true; + } + + /// If available, a list of suggestions for this field. For most fields, a suggest query is a more appropriate way to get an up-to-date list of suggestions. Or use enumerations to list all the possible values. (read-only) + + List get suggestions { + if (!_suggestionsSet && _apiMapResponse.containsKey('suggestions')) { + _suggestions = _apiMapResponse['suggestions'] == null + ? null + : _apiMapResponse['suggestions'] + .map((i) => i as String) + .toList(); + _suggestionsSet = true; + } + return _suggestions; + } + + set suggestions(List v) { + _suggestions = v; + _suggestionsSet = true; + } + + /// An array of arbitrary string tags provided in the model for this field. (read-only) + + List get tags { + if (!_tagsSet && _apiMapResponse.containsKey('tags')) { + _tags = _apiMapResponse['tags'] == null + ? null + : _apiMapResponse['tags'].map((i) => i as String).toList(); + _tagsSet = true; + } + return _tags; + } + + set tags(List v) { + _tags = v; + _tagsSet = true; + } + + /// The LookML type of the field. (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// An array of user attribute types that are allowed to be used in filters on this field. Valid values are: "advanced_filter_string", "advanced_filter_number", "advanced_filter_datetime", "string", "number", "datetime", "relative_url", "yesno", "zipcode". (read-only) + + List get userAttributeFilterTypes { + if (!_userAttributeFilterTypesSet && + _apiMapResponse.containsKey('user_attribute_filter_types')) { + _userAttributeFilterTypes = + _apiMapResponse['user_attribute_filter_types'] == null + ? null + : _apiMapResponse['user_attribute_filter_types'] + .map( + (i) => i as UserAttributeFilterTypes) + .toList(); + _userAttributeFilterTypesSet = true; + } + return _userAttributeFilterTypes; + } + + set userAttributeFilterTypes(List v) { + _userAttributeFilterTypes = v; + _userAttributeFilterTypesSet = true; + } + + /// If specified, the LookML value format string for formatting values of this field. (read-only) + + String get valueFormat { + if (!_valueFormatSet && _apiMapResponse.containsKey('value_format')) { + _valueFormat = _apiMapResponse['value_format'] == null + ? null + : _apiMapResponse['value_format'].toString(); + _valueFormatSet = true; + } + return _valueFormat; + } + + set valueFormat(String v) { + _valueFormat = v; + _valueFormatSet = true; + } + + /// The name of the view this field belongs to. (read-only) + + String get view { + if (!_viewSet && _apiMapResponse.containsKey('view')) { + _view = _apiMapResponse['view'] == null + ? null + : _apiMapResponse['view'].toString(); + _viewSet = true; + } + return _view; + } + + set view(String v) { + _view = v; + _viewSet = true; + } + + /// The human-readable label of the view the field belongs to. (read-only) + + String get viewLabel { + if (!_viewLabelSet && _apiMapResponse.containsKey('view_label')) { + _viewLabel = _apiMapResponse['view_label'] == null + ? null + : _apiMapResponse['view_label'].toString(); + _viewLabelSet = true; + } + return _viewLabel; + } + + set viewLabel(String v) { + _viewLabel = v; + _viewLabelSet = true; + } + + /// Whether this field was specified in "dynamic_fields" and is not part of the model. (read-only) + + bool get dynamic { + if (!_dynamicSet && _apiMapResponse.containsKey('dynamic')) { + _dynamic = _apiMapResponse['dynamic']; + _dynamicSet = true; + } + return _dynamic; + } + + set dynamic(bool v) { + _dynamic = v; + _dynamicSet = true; + } + + /// The name of the starting day of the week. Valid values are: "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday". (read-only) + + WeekStartDay get weekStartDay { + if (!_weekStartDaySet && _apiMapResponse.containsKey('week_start_day')) { + _weekStartDay = + WeekStartDayMapper.fromStringValue(_apiMapResponse['week_start_day']); + _weekStartDaySet = true; + } + return _weekStartDay; + } + + set weekStartDay(WeekStartDay v) { + _weekStartDay = v; + _weekStartDaySet = true; + } + + /// The number of times this field has been used in queries (read-only) + + int get timesUsed { + if (!_timesUsedSet && _apiMapResponse.containsKey('times_used')) { + _timesUsed = _apiMapResponse['times_used']; + _timesUsedSet = true; + } + return _timesUsed; + } + + set timesUsed(int v) { + _timesUsed = v; + _timesUsedSet = true; + } + + /// The name of the view this field is defined in. This will be different than "view" when the view has been joined via a different name using the "from" parameter. (read-only) + + String get originalView { + if (!_originalViewSet && _apiMapResponse.containsKey('original_view')) { + _originalView = _apiMapResponse['original_view'] == null + ? null + : _apiMapResponse['original_view'].toString(); + _originalViewSet = true; + } + return _originalView; + } + + set originalView(String v) { + _originalView = v; + _originalViewSet = true; + } + + LookmlModelExploreField() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreField.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_alignSet || _apiMapResponse.containsKey('align')) { + json['align'] = AlignMapper.toStringValue(align); + } + if (_canFilterSet || _apiMapResponse.containsKey('can_filter')) { + json['can_filter'] = canFilter; + } + if (_categorySet || _apiMapResponse.containsKey('category')) { + json['category'] = CategoryMapper.toStringValue(category); + } + if (_defaultFilterValueSet || + _apiMapResponse.containsKey('default_filter_value')) { + json['default_filter_value'] = defaultFilterValue; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_dimensionGroupSet || _apiMapResponse.containsKey('dimension_group')) { + json['dimension_group'] = dimensionGroup; + } + if (_enumerationsSet || _apiMapResponse.containsKey('enumerations')) { + json['enumerations'] = enumerations == null + ? null + : enumerations.map((i) => i.toJson()).toList(); + } + if (_errorSet || _apiMapResponse.containsKey('error')) { + json['error'] = error; + } + if (_fieldGroupLabelSet || + _apiMapResponse.containsKey('field_group_label')) { + json['field_group_label'] = fieldGroupLabel; + } + if (_fieldGroupVariantSet || + _apiMapResponse.containsKey('field_group_variant')) { + json['field_group_variant'] = fieldGroupVariant; + } + if (_fillStyleSet || _apiMapResponse.containsKey('fill_style')) { + json['fill_style'] = FillStyleMapper.toStringValue(fillStyle); + } + if (_fiscalMonthOffsetSet || + _apiMapResponse.containsKey('fiscal_month_offset')) { + json['fiscal_month_offset'] = fiscalMonthOffset; + } + if (_hasAllowedValuesSet || + _apiMapResponse.containsKey('has_allowed_values')) { + json['has_allowed_values'] = hasAllowedValues; + } + if (_hiddenSet || _apiMapResponse.containsKey('hidden')) { + json['hidden'] = hidden; + } + if (_isFilterSet || _apiMapResponse.containsKey('is_filter')) { + json['is_filter'] = isFilter; + } + if (_isFiscalSet || _apiMapResponse.containsKey('is_fiscal')) { + json['is_fiscal'] = isFiscal; + } + if (_isNumericSet || _apiMapResponse.containsKey('is_numeric')) { + json['is_numeric'] = isNumeric; + } + if (_isTimeframeSet || _apiMapResponse.containsKey('is_timeframe')) { + json['is_timeframe'] = isTimeframe; + } + if (_canTimeFilterSet || _apiMapResponse.containsKey('can_time_filter')) { + json['can_time_filter'] = canTimeFilter; + } + if (_timeIntervalSet || _apiMapResponse.containsKey('time_interval')) { + json['time_interval'] = + timeInterval == null ? null : timeInterval.toJson(); + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_labelFromParameterSet || + _apiMapResponse.containsKey('label_from_parameter')) { + json['label_from_parameter'] = labelFromParameter; + } + if (_labelShortSet || _apiMapResponse.containsKey('label_short')) { + json['label_short'] = labelShort; + } + if (_lookmlLinkSet || _apiMapResponse.containsKey('lookml_link')) { + json['lookml_link'] = lookmlLink; + } + if (_mapLayerSet || _apiMapResponse.containsKey('map_layer')) { + json['map_layer'] = mapLayer == null ? null : mapLayer.toJson(); + } + if (_measureSet || _apiMapResponse.containsKey('measure')) { + json['measure'] = measure; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_strictValueFormatSet || + _apiMapResponse.containsKey('strict_value_format')) { + json['strict_value_format'] = strictValueFormat; + } + if (_parameterSet || _apiMapResponse.containsKey('parameter')) { + json['parameter'] = parameter; + } + if (_permanentSet || _apiMapResponse.containsKey('permanent')) { + json['permanent'] = permanent; + } + if (_primaryKeySet || _apiMapResponse.containsKey('primary_key')) { + json['primary_key'] = primaryKey; + } + if (_projectNameSet || _apiMapResponse.containsKey('project_name')) { + json['project_name'] = projectName; + } + if (_requiresRefreshOnSortSet || + _apiMapResponse.containsKey('requires_refresh_on_sort')) { + json['requires_refresh_on_sort'] = requiresRefreshOnSort; + } + if (_scopeSet || _apiMapResponse.containsKey('scope')) { + json['scope'] = scope; + } + if (_sortableSet || _apiMapResponse.containsKey('sortable')) { + json['sortable'] = sortable; + } + if (_sourceFileSet || _apiMapResponse.containsKey('source_file')) { + json['source_file'] = sourceFile; + } + if (_sourceFilePathSet || _apiMapResponse.containsKey('source_file_path')) { + json['source_file_path'] = sourceFilePath; + } + if (_sqlSet || _apiMapResponse.containsKey('sql')) { + json['sql'] = sql; + } + if (_sqlCaseSet || _apiMapResponse.containsKey('sql_case')) { + json['sql_case'] = + sqlCase == null ? null : sqlCase.map((i) => i.toJson()).toList(); + } + if (_filtersSet || _apiMapResponse.containsKey('filters')) { + json['filters'] = + filters == null ? null : filters.map((i) => i.toJson()).toList(); + } + if (_suggestDimensionSet || + _apiMapResponse.containsKey('suggest_dimension')) { + json['suggest_dimension'] = suggestDimension; + } + if (_suggestExploreSet || _apiMapResponse.containsKey('suggest_explore')) { + json['suggest_explore'] = suggestExplore; + } + if (_suggestableSet || _apiMapResponse.containsKey('suggestable')) { + json['suggestable'] = suggestable; + } + if (_suggestionsSet || _apiMapResponse.containsKey('suggestions')) { + json['suggestions'] = suggestions; + } + if (_tagsSet || _apiMapResponse.containsKey('tags')) { + json['tags'] = tags; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_userAttributeFilterTypesSet || + _apiMapResponse.containsKey('user_attribute_filter_types')) { + json['user_attribute_filter_types'] = userAttributeFilterTypes; + } + if (_valueFormatSet || _apiMapResponse.containsKey('value_format')) { + json['value_format'] = valueFormat; + } + if (_viewSet || _apiMapResponse.containsKey('view')) { + json['view'] = view; + } + if (_viewLabelSet || _apiMapResponse.containsKey('view_label')) { + json['view_label'] = viewLabel; + } + if (_dynamicSet || _apiMapResponse.containsKey('dynamic')) { + json['dynamic'] = dynamic; + } + if (_weekStartDaySet || _apiMapResponse.containsKey('week_start_day')) { + json['week_start_day'] = WeekStartDayMapper.toStringValue(weekStartDay); + } + if (_timesUsedSet || _apiMapResponse.containsKey('times_used')) { + json['times_used'] = timesUsed; + } + if (_originalViewSet || _apiMapResponse.containsKey('original_view')) { + json['original_view'] = originalView; + } + return json; + } +} + +class LookmlModelExploreFieldEnumeration { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _label; + bool _labelSet = false; + + dynamic _value; + bool _valueSet = false; + + /// Label (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Value (read-only) + + dynamic get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value']; + _valueSet = true; + } + return _value; + } + + set value(dynamic v) { + _value = v; + _valueSet = true; + } + + LookmlModelExploreFieldEnumeration() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreFieldEnumeration.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + return json; + } +} + +class LookmlModelExploreFieldMapLayer { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _url; + bool _urlSet = false; + + String _name; + bool _nameSet = false; + + String _featureKey; + bool _featureKeySet = false; + + String _propertyKey; + bool _propertyKeySet = false; + + String _propertyLabelKey; + bool _propertyLabelKeySet = false; + + String _projection; + bool _projectionSet = false; + + Format _format; + bool _formatSet = false; + + String _extentsJsonUrl; + bool _extentsJsonUrlSet = false; + + int _maxZoomLevel; + bool _maxZoomLevelSet = false; + + int _minZoomLevel; + bool _minZoomLevelSet = false; + + /// URL to the map layer resource. (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Name of the map layer, as defined in LookML. (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Specifies the name of the TopoJSON object that the map layer references. If not specified, use the first object.. (read-only) + + String get featureKey { + if (!_featureKeySet && _apiMapResponse.containsKey('feature_key')) { + _featureKey = _apiMapResponse['feature_key'] == null + ? null + : _apiMapResponse['feature_key'].toString(); + _featureKeySet = true; + } + return _featureKey; + } + + set featureKey(String v) { + _featureKey = v; + _featureKeySet = true; + } + + /// Selects which property from the TopoJSON data to plot against. TopoJSON supports arbitrary metadata for each region. When null, the first matching property should be used. (read-only) + + String get propertyKey { + if (!_propertyKeySet && _apiMapResponse.containsKey('property_key')) { + _propertyKey = _apiMapResponse['property_key'] == null + ? null + : _apiMapResponse['property_key'].toString(); + _propertyKeySet = true; + } + return _propertyKey; + } + + set propertyKey(String v) { + _propertyKey = v; + _propertyKeySet = true; + } + + /// Which property from the TopoJSON data to use to label the region. When null, property_key should be used. (read-only) + + String get propertyLabelKey { + if (!_propertyLabelKeySet && + _apiMapResponse.containsKey('property_label_key')) { + _propertyLabelKey = _apiMapResponse['property_label_key'] == null + ? null + : _apiMapResponse['property_label_key'].toString(); + _propertyLabelKeySet = true; + } + return _propertyLabelKey; + } + + set propertyLabelKey(String v) { + _propertyLabelKey = v; + _propertyLabelKeySet = true; + } + + /// The preferred geographic projection of the map layer when displayed in a visualization that supports multiple geographic projections. (read-only) + + String get projection { + if (!_projectionSet && _apiMapResponse.containsKey('projection')) { + _projection = _apiMapResponse['projection'] == null + ? null + : _apiMapResponse['projection'].toString(); + _projectionSet = true; + } + return _projection; + } + + set projection(String v) { + _projection = v; + _projectionSet = true; + } + + /// Specifies the data format of the region information. Valid values are: "topojson", "vector_tile_region". (read-only) + + Format get format { + if (!_formatSet && _apiMapResponse.containsKey('format')) { + _format = FormatMapper.fromStringValue(_apiMapResponse['format']); + _formatSet = true; + } + return _format; + } + + set format(Format v) { + _format = v; + _formatSet = true; + } + + /// Specifies the URL to a JSON file that defines the geographic extents of each region available in the map layer. This data is used to automatically center the map on the available data for visualization purposes. The JSON file must be a JSON object where the keys are the mapping value of the feature (as specified by property_key) and the values are arrays of four numbers representing the west longitude, south latitude, east longitude, and north latitude extents of the region. The object must include a key for every possible value of property_key. (read-only) + + String get extentsJsonUrl { + if (!_extentsJsonUrlSet && + _apiMapResponse.containsKey('extents_json_url')) { + _extentsJsonUrl = _apiMapResponse['extents_json_url'] == null + ? null + : _apiMapResponse['extents_json_url'].toString(); + _extentsJsonUrlSet = true; + } + return _extentsJsonUrl; + } + + set extentsJsonUrl(String v) { + _extentsJsonUrl = v; + _extentsJsonUrlSet = true; + } + + /// The minimum zoom level that the map layer may be displayed at, for visualizations that support zooming. (read-only) + + int get maxZoomLevel { + if (!_maxZoomLevelSet && _apiMapResponse.containsKey('max_zoom_level')) { + _maxZoomLevel = _apiMapResponse['max_zoom_level']; + _maxZoomLevelSet = true; + } + return _maxZoomLevel; + } + + set maxZoomLevel(int v) { + _maxZoomLevel = v; + _maxZoomLevelSet = true; + } + + /// The maximum zoom level that the map layer may be displayed at, for visualizations that support zooming. (read-only) + + int get minZoomLevel { + if (!_minZoomLevelSet && _apiMapResponse.containsKey('min_zoom_level')) { + _minZoomLevel = _apiMapResponse['min_zoom_level']; + _minZoomLevelSet = true; + } + return _minZoomLevel; + } + + set minZoomLevel(int v) { + _minZoomLevel = v; + _minZoomLevelSet = true; + } + + LookmlModelExploreFieldMapLayer() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreFieldMapLayer.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_featureKeySet || _apiMapResponse.containsKey('feature_key')) { + json['feature_key'] = featureKey; + } + if (_propertyKeySet || _apiMapResponse.containsKey('property_key')) { + json['property_key'] = propertyKey; + } + if (_propertyLabelKeySet || + _apiMapResponse.containsKey('property_label_key')) { + json['property_label_key'] = propertyLabelKey; + } + if (_projectionSet || _apiMapResponse.containsKey('projection')) { + json['projection'] = projection; + } + if (_formatSet || _apiMapResponse.containsKey('format')) { + json['format'] = FormatMapper.toStringValue(format); + } + if (_extentsJsonUrlSet || _apiMapResponse.containsKey('extents_json_url')) { + json['extents_json_url'] = extentsJsonUrl; + } + if (_maxZoomLevelSet || _apiMapResponse.containsKey('max_zoom_level')) { + json['max_zoom_level'] = maxZoomLevel; + } + if (_minZoomLevelSet || _apiMapResponse.containsKey('min_zoom_level')) { + json['min_zoom_level'] = minZoomLevel; + } + return json; + } +} + +class LookmlModelExploreFieldMeasureFilters { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _field; + bool _fieldSet = false; + + String _condition; + bool _conditionSet = false; + + /// Filter field name (read-only) + + String get field { + if (!_fieldSet && _apiMapResponse.containsKey('field')) { + _field = _apiMapResponse['field'] == null + ? null + : _apiMapResponse['field'].toString(); + _fieldSet = true; + } + return _field; + } + + set field(String v) { + _field = v; + _fieldSet = true; + } + + /// Filter condition value (read-only) + + String get condition { + if (!_conditionSet && _apiMapResponse.containsKey('condition')) { + _condition = _apiMapResponse['condition'] == null + ? null + : _apiMapResponse['condition'].toString(); + _conditionSet = true; + } + return _condition; + } + + set condition(String v) { + _condition = v; + _conditionSet = true; + } + + LookmlModelExploreFieldMeasureFilters() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreFieldMeasureFilters.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_fieldSet || _apiMapResponse.containsKey('field')) { + json['field'] = field; + } + if (_conditionSet || _apiMapResponse.containsKey('condition')) { + json['condition'] = condition; + } + return json; + } +} + +class LookmlModelExploreFieldset { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _dimensions; + bool _dimensionsSet = false; + + List _measures; + bool _measuresSet = false; + + List _filters; + bool _filtersSet = false; + + List _parameters; + bool _parametersSet = false; + + /// Array of dimensions (read-only) + + List get dimensions { + if (!_dimensionsSet && _apiMapResponse.containsKey('dimensions')) { + _dimensions = _apiMapResponse['dimensions'] == null + ? null + : (_apiMapResponse['dimensions'] as List) + .map((i) => LookmlModelExploreField.fromResponse( + i, apiResponseContentType)) + .toList(); + _dimensionsSet = true; + } + return _dimensions; + } + + set dimensions(List v) { + _dimensions = v; + _dimensionsSet = true; + } + + /// Array of measures (read-only) + + List get measures { + if (!_measuresSet && _apiMapResponse.containsKey('measures')) { + _measures = _apiMapResponse['measures'] == null + ? null + : (_apiMapResponse['measures'] as List) + .map((i) => LookmlModelExploreField.fromResponse( + i, apiResponseContentType)) + .toList(); + _measuresSet = true; + } + return _measures; + } + + set measures(List v) { + _measures = v; + _measuresSet = true; + } + + /// Array of filters (read-only) + + List get filters { + if (!_filtersSet && _apiMapResponse.containsKey('filters')) { + _filters = _apiMapResponse['filters'] == null + ? null + : (_apiMapResponse['filters'] as List) + .map((i) => LookmlModelExploreField.fromResponse( + i, apiResponseContentType)) + .toList(); + _filtersSet = true; + } + return _filters; + } + + set filters(List v) { + _filters = v; + _filtersSet = true; + } + + /// Array of parameters (read-only) + + List get parameters { + if (!_parametersSet && _apiMapResponse.containsKey('parameters')) { + _parameters = _apiMapResponse['parameters'] == null + ? null + : (_apiMapResponse['parameters'] as List) + .map((i) => LookmlModelExploreField.fromResponse( + i, apiResponseContentType)) + .toList(); + _parametersSet = true; + } + return _parameters; + } + + set parameters(List v) { + _parameters = v; + _parametersSet = true; + } + + LookmlModelExploreFieldset() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreFieldset.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dimensionsSet || _apiMapResponse.containsKey('dimensions')) { + json['dimensions'] = dimensions == null + ? null + : dimensions.map((i) => i.toJson()).toList(); + } + if (_measuresSet || _apiMapResponse.containsKey('measures')) { + json['measures'] = + measures == null ? null : measures.map((i) => i.toJson()).toList(); + } + if (_filtersSet || _apiMapResponse.containsKey('filters')) { + json['filters'] = + filters == null ? null : filters.map((i) => i.toJson()).toList(); + } + if (_parametersSet || _apiMapResponse.containsKey('parameters')) { + json['parameters'] = parameters == null + ? null + : parameters.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class LookmlModelExploreFieldSqlCase { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _value; + bool _valueSet = false; + + String _condition; + bool _conditionSet = false; + + /// SQL Case label value (read-only) + + String get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value'] == null + ? null + : _apiMapResponse['value'].toString(); + _valueSet = true; + } + return _value; + } + + set value(String v) { + _value = v; + _valueSet = true; + } + + /// SQL Case condition expression (read-only) + + String get condition { + if (!_conditionSet && _apiMapResponse.containsKey('condition')) { + _condition = _apiMapResponse['condition'] == null + ? null + : _apiMapResponse['condition'].toString(); + _conditionSet = true; + } + return _condition; + } + + set condition(String v) { + _condition = v; + _conditionSet = true; + } + + LookmlModelExploreFieldSqlCase() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreFieldSqlCase.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + if (_conditionSet || _apiMapResponse.containsKey('condition')) { + json['condition'] = condition; + } + return json; + } +} + +class LookmlModelExploreFieldTimeInterval { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Name _name; + bool _nameSet = false; + + int _count; + bool _countSet = false; + + /// The type of time interval this field represents a grouping of. Valid values are: "day", "hour", "minute", "second", "millisecond", "microsecond", "week", "month", "quarter", "year". (read-only) + + Name get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = NameMapper.fromStringValue(_apiMapResponse['name']); + _nameSet = true; + } + return _name; + } + + set name(Name v) { + _name = v; + _nameSet = true; + } + + /// The number of intervals this field represents a grouping of. (read-only) + + int get count { + if (!_countSet && _apiMapResponse.containsKey('count')) { + _count = _apiMapResponse['count']; + _countSet = true; + } + return _count; + } + + set count(int v) { + _count = v; + _countSet = true; + } + + LookmlModelExploreFieldTimeInterval() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreFieldTimeInterval.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = NameMapper.toStringValue(name); + } + if (_countSet || _apiMapResponse.containsKey('count')) { + json['count'] = count; + } + return json; + } +} + +class LookmlModelExploreJoins { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + List _dependentFields; + bool _dependentFieldsSet = false; + + List _fields; + bool _fieldsSet = false; + + String _foreignKey; + bool _foreignKeySet = false; + + String _from; + bool _fromSet = false; + + bool _outerOnly; + bool _outerOnlySet = false; + + String _relationship; + bool _relationshipSet = false; + + List _requiredJoins; + bool _requiredJoinsSet = false; + + String _sqlForeignKey; + bool _sqlForeignKeySet = false; + + String _sqlOn; + bool _sqlOnSet = false; + + String _sqlTableName; + bool _sqlTableNameSet = false; + + String _type; + bool _typeSet = false; + + String _viewLabel; + bool _viewLabelSet = false; + + /// Name of this join (and name of the view to join) (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Fields referenced by the join (read-only) + + List get dependentFields { + if (!_dependentFieldsSet && + _apiMapResponse.containsKey('dependent_fields')) { + _dependentFields = _apiMapResponse['dependent_fields'] == null + ? null + : _apiMapResponse['dependent_fields'] + .map((i) => i as String) + .toList(); + _dependentFieldsSet = true; + } + return _dependentFields; + } + + set dependentFields(List v) { + _dependentFields = v; + _dependentFieldsSet = true; + } + + /// Fields of the joined view to pull into this explore (read-only) + + List get fields { + if (!_fieldsSet && _apiMapResponse.containsKey('fields')) { + _fields = _apiMapResponse['fields'] == null + ? null + : _apiMapResponse['fields'].map((i) => i as String).toList(); + _fieldsSet = true; + } + return _fields; + } + + set fields(List v) { + _fields = v; + _fieldsSet = true; + } + + /// Name of the dimension in this explore whose value is in the primary key of the joined view (read-only) + + String get foreignKey { + if (!_foreignKeySet && _apiMapResponse.containsKey('foreign_key')) { + _foreignKey = _apiMapResponse['foreign_key'] == null + ? null + : _apiMapResponse['foreign_key'].toString(); + _foreignKeySet = true; + } + return _foreignKey; + } + + set foreignKey(String v) { + _foreignKey = v; + _foreignKeySet = true; + } + + /// Name of view to join (read-only) + + String get from { + if (!_fromSet && _apiMapResponse.containsKey('from')) { + _from = _apiMapResponse['from'] == null + ? null + : _apiMapResponse['from'].toString(); + _fromSet = true; + } + return _from; + } + + set from(String v) { + _from = v; + _fromSet = true; + } + + /// Specifies whether all queries must use an outer join (read-only) + + bool get outerOnly { + if (!_outerOnlySet && _apiMapResponse.containsKey('outer_only')) { + _outerOnly = _apiMapResponse['outer_only']; + _outerOnlySet = true; + } + return _outerOnly; + } + + set outerOnly(bool v) { + _outerOnly = v; + _outerOnlySet = true; + } + + /// many_to_one, one_to_one, one_to_many, many_to_many (read-only) + + String get relationship { + if (!_relationshipSet && _apiMapResponse.containsKey('relationship')) { + _relationship = _apiMapResponse['relationship'] == null + ? null + : _apiMapResponse['relationship'].toString(); + _relationshipSet = true; + } + return _relationship; + } + + set relationship(String v) { + _relationship = v; + _relationshipSet = true; + } + + /// Names of joins that must always be included in SQL queries (read-only) + + List get requiredJoins { + if (!_requiredJoinsSet && _apiMapResponse.containsKey('required_joins')) { + _requiredJoins = _apiMapResponse['required_joins'] == null + ? null + : _apiMapResponse['required_joins'] + .map((i) => i as String) + .toList(); + _requiredJoinsSet = true; + } + return _requiredJoins; + } + + set requiredJoins(List v) { + _requiredJoins = v; + _requiredJoinsSet = true; + } + + /// SQL expression that produces a foreign key (read-only) + + String get sqlForeignKey { + if (!_sqlForeignKeySet && _apiMapResponse.containsKey('sql_foreign_key')) { + _sqlForeignKey = _apiMapResponse['sql_foreign_key'] == null + ? null + : _apiMapResponse['sql_foreign_key'].toString(); + _sqlForeignKeySet = true; + } + return _sqlForeignKey; + } + + set sqlForeignKey(String v) { + _sqlForeignKey = v; + _sqlForeignKeySet = true; + } + + /// SQL ON expression describing the join condition (read-only) + + String get sqlOn { + if (!_sqlOnSet && _apiMapResponse.containsKey('sql_on')) { + _sqlOn = _apiMapResponse['sql_on'] == null + ? null + : _apiMapResponse['sql_on'].toString(); + _sqlOnSet = true; + } + return _sqlOn; + } + + set sqlOn(String v) { + _sqlOn = v; + _sqlOnSet = true; + } + + /// SQL table name to join (read-only) + + String get sqlTableName { + if (!_sqlTableNameSet && _apiMapResponse.containsKey('sql_table_name')) { + _sqlTableName = _apiMapResponse['sql_table_name'] == null + ? null + : _apiMapResponse['sql_table_name'].toString(); + _sqlTableNameSet = true; + } + return _sqlTableName; + } + + set sqlTableName(String v) { + _sqlTableName = v; + _sqlTableNameSet = true; + } + + /// The join type: left_outer, full_outer, inner, or cross (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Label to display in UI selectors (read-only) + + String get viewLabel { + if (!_viewLabelSet && _apiMapResponse.containsKey('view_label')) { + _viewLabel = _apiMapResponse['view_label'] == null + ? null + : _apiMapResponse['view_label'].toString(); + _viewLabelSet = true; + } + return _viewLabel; + } + + set viewLabel(String v) { + _viewLabel = v; + _viewLabelSet = true; + } + + LookmlModelExploreJoins() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreJoins.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_dependentFieldsSet || + _apiMapResponse.containsKey('dependent_fields')) { + json['dependent_fields'] = dependentFields; + } + if (_fieldsSet || _apiMapResponse.containsKey('fields')) { + json['fields'] = fields; + } + if (_foreignKeySet || _apiMapResponse.containsKey('foreign_key')) { + json['foreign_key'] = foreignKey; + } + if (_fromSet || _apiMapResponse.containsKey('from')) { + json['from'] = from; + } + if (_outerOnlySet || _apiMapResponse.containsKey('outer_only')) { + json['outer_only'] = outerOnly; + } + if (_relationshipSet || _apiMapResponse.containsKey('relationship')) { + json['relationship'] = relationship; + } + if (_requiredJoinsSet || _apiMapResponse.containsKey('required_joins')) { + json['required_joins'] = requiredJoins; + } + if (_sqlForeignKeySet || _apiMapResponse.containsKey('sql_foreign_key')) { + json['sql_foreign_key'] = sqlForeignKey; + } + if (_sqlOnSet || _apiMapResponse.containsKey('sql_on')) { + json['sql_on'] = sqlOn; + } + if (_sqlTableNameSet || _apiMapResponse.containsKey('sql_table_name')) { + json['sql_table_name'] = sqlTableName; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_viewLabelSet || _apiMapResponse.containsKey('view_label')) { + json['view_label'] = viewLabel; + } + return json; + } +} + +class LookmlModelExploreSet { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + List _value; + bool _valueSet = false; + + /// Name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Value set (read-only) + + List get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value'] == null + ? null + : _apiMapResponse['value'].map((i) => i as String).toList(); + _valueSet = true; + } + return _value; + } + + set value(List v) { + _value = v; + _valueSet = true; + } + + LookmlModelExploreSet() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreSet.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + return json; + } +} + +class LookmlModelExploreSupportedMeasureType { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _dimensionType; + bool _dimensionTypeSet = false; + + List _measureTypes; + bool _measureTypesSet = false; + + /// (read-only) + + String get dimensionType { + if (!_dimensionTypeSet && _apiMapResponse.containsKey('dimension_type')) { + _dimensionType = _apiMapResponse['dimension_type'] == null + ? null + : _apiMapResponse['dimension_type'].toString(); + _dimensionTypeSet = true; + } + return _dimensionType; + } + + set dimensionType(String v) { + _dimensionType = v; + _dimensionTypeSet = true; + } + + /// (read-only) + + List get measureTypes { + if (!_measureTypesSet && _apiMapResponse.containsKey('measure_types')) { + _measureTypes = _apiMapResponse['measure_types'] == null + ? null + : _apiMapResponse['measure_types'] + .map((i) => i as String) + .toList(); + _measureTypesSet = true; + } + return _measureTypes; + } + + set measureTypes(List v) { + _measureTypes = v; + _measureTypesSet = true; + } + + LookmlModelExploreSupportedMeasureType() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelExploreSupportedMeasureType.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dimensionTypeSet || _apiMapResponse.containsKey('dimension_type')) { + json['dimension_type'] = dimensionType; + } + if (_measureTypesSet || _apiMapResponse.containsKey('measure_types')) { + json['measure_types'] = measureTypes; + } + return json; + } +} + +class LookmlModelNavExplore { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _description; + bool _descriptionSet = false; + + String _label; + bool _labelSet = false; + + bool _hidden; + bool _hiddenSet = false; + + String _groupLabel; + bool _groupLabelSet = false; + + /// Name of the explore (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Description for the explore (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Label for the explore (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Is this explore marked as hidden (read-only) + + bool get hidden { + if (!_hiddenSet && _apiMapResponse.containsKey('hidden')) { + _hidden = _apiMapResponse['hidden']; + _hiddenSet = true; + } + return _hidden; + } + + set hidden(bool v) { + _hidden = v; + _hiddenSet = true; + } + + /// Label used to group explores in the navigation menus (read-only) + + String get groupLabel { + if (!_groupLabelSet && _apiMapResponse.containsKey('group_label')) { + _groupLabel = _apiMapResponse['group_label'] == null + ? null + : _apiMapResponse['group_label'].toString(); + _groupLabelSet = true; + } + return _groupLabel; + } + + set groupLabel(String v) { + _groupLabel = v; + _groupLabelSet = true; + } + + LookmlModelNavExplore() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlModelNavExplore.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_hiddenSet || _apiMapResponse.containsKey('hidden')) { + json['hidden'] = hidden; + } + if (_groupLabelSet || _apiMapResponse.containsKey('group_label')) { + json['group_label'] = groupLabel; + } + return json; + } +} + +class LookmlTest { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _modelName; + bool _modelNameSet = false; + + String _name; + bool _nameSet = false; + + String _exploreName; + bool _exploreNameSet = false; + + String _queryUrlParams; + bool _queryUrlParamsSet = false; + + String _file; + bool _fileSet = false; + + int _line; + bool _lineSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Name of model containing this test. (read-only) + + String get modelName { + if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { + _modelName = _apiMapResponse['model_name'] == null + ? null + : _apiMapResponse['model_name'].toString(); + _modelNameSet = true; + } + return _modelName; + } + + set modelName(String v) { + _modelName = v; + _modelNameSet = true; + } + + /// Name of this test. (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Name of the explore this test runs a query against (read-only) + + String get exploreName { + if (!_exploreNameSet && _apiMapResponse.containsKey('explore_name')) { + _exploreName = _apiMapResponse['explore_name'] == null + ? null + : _apiMapResponse['explore_name'].toString(); + _exploreNameSet = true; + } + return _exploreName; + } + + set exploreName(String v) { + _exploreName = v; + _exploreNameSet = true; + } + + /// The url parameters that can be used to reproduce this test's query on an explore. (read-only) + + String get queryUrlParams { + if (!_queryUrlParamsSet && + _apiMapResponse.containsKey('query_url_params')) { + _queryUrlParams = _apiMapResponse['query_url_params'] == null + ? null + : _apiMapResponse['query_url_params'].toString(); + _queryUrlParamsSet = true; + } + return _queryUrlParams; + } + + set queryUrlParams(String v) { + _queryUrlParams = v; + _queryUrlParamsSet = true; + } + + /// Name of the LookML file containing this test. (read-only) + + String get file { + if (!_fileSet && _apiMapResponse.containsKey('file')) { + _file = _apiMapResponse['file'] == null + ? null + : _apiMapResponse['file'].toString(); + _fileSet = true; + } + return _file; + } + + set file(String v) { + _file = v; + _fileSet = true; + } + + /// Line number of this test in LookML. (read-only) + + int get line { + if (!_lineSet && _apiMapResponse.containsKey('line')) { + _line = _apiMapResponse['line']; + _lineSet = true; + } + return _line; + } + + set line(int v) { + _line = v; + _lineSet = true; + } + + LookmlTest() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlTest.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_modelNameSet || _apiMapResponse.containsKey('model_name')) { + json['model_name'] = modelName; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_exploreNameSet || _apiMapResponse.containsKey('explore_name')) { + json['explore_name'] = exploreName; + } + if (_queryUrlParamsSet || _apiMapResponse.containsKey('query_url_params')) { + json['query_url_params'] = queryUrlParams; + } + if (_fileSet || _apiMapResponse.containsKey('file')) { + json['file'] = file; + } + if (_lineSet || _apiMapResponse.containsKey('line')) { + json['line'] = line; + } + return json; + } +} + +class LookmlTestResult { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _modelName; + bool _modelNameSet = false; + + String _testName; + bool _testNameSet = false; + + int _assertionsCount; + bool _assertionsCountSet = false; + + int _assertionsFailed; + bool _assertionsFailedSet = false; + + List _errors; + bool _errorsSet = false; + + List _warnings; + bool _warningsSet = false; + + bool _success; + bool _successSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Name of model containing this test. (read-only) + + String get modelName { + if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { + _modelName = _apiMapResponse['model_name'] == null + ? null + : _apiMapResponse['model_name'].toString(); + _modelNameSet = true; + } + return _modelName; + } + + set modelName(String v) { + _modelName = v; + _modelNameSet = true; + } + + /// Name of this test. (read-only) + + String get testName { + if (!_testNameSet && _apiMapResponse.containsKey('test_name')) { + _testName = _apiMapResponse['test_name'] == null + ? null + : _apiMapResponse['test_name'].toString(); + _testNameSet = true; + } + return _testName; + } + + set testName(String v) { + _testName = v; + _testNameSet = true; + } + + /// Number of assertions in this test (read-only) + + int get assertionsCount { + if (!_assertionsCountSet && + _apiMapResponse.containsKey('assertions_count')) { + _assertionsCount = _apiMapResponse['assertions_count']; + _assertionsCountSet = true; + } + return _assertionsCount; + } + + set assertionsCount(int v) { + _assertionsCount = v; + _assertionsCountSet = true; + } + + /// Number of assertions passed in this test (read-only) + + int get assertionsFailed { + if (!_assertionsFailedSet && + _apiMapResponse.containsKey('assertions_failed')) { + _assertionsFailed = _apiMapResponse['assertions_failed']; + _assertionsFailedSet = true; + } + return _assertionsFailed; + } + + set assertionsFailed(int v) { + _assertionsFailed = v; + _assertionsFailedSet = true; + } + + /// A list of any errors encountered by the test. (read-only) + + List get errors { + if (!_errorsSet && _apiMapResponse.containsKey('errors')) { + _errors = _apiMapResponse['errors'] == null + ? null + : (_apiMapResponse['errors'] as List) + .map((i) => ProjectError.fromResponse(i, apiResponseContentType)) + .toList(); + _errorsSet = true; + } + return _errors; + } + + set errors(List v) { + _errors = v; + _errorsSet = true; + } + + /// A list of any warnings encountered by the test. (read-only) + + List get warnings { + if (!_warningsSet && _apiMapResponse.containsKey('warnings')) { + _warnings = _apiMapResponse['warnings'] == null + ? null + : (_apiMapResponse['warnings'] as List) + .map((i) => ProjectError.fromResponse(i, apiResponseContentType)) + .toList(); + _warningsSet = true; + } + return _warnings; + } + + set warnings(List v) { + _warnings = v; + _warningsSet = true; + } + + /// True if this test passsed without errors. (read-only) + + bool get success { + if (!_successSet && _apiMapResponse.containsKey('success')) { + _success = _apiMapResponse['success']; + _successSet = true; + } + return _success; + } + + set success(bool v) { + _success = v; + _successSet = true; + } + + LookmlTestResult() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookmlTestResult.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_modelNameSet || _apiMapResponse.containsKey('model_name')) { + json['model_name'] = modelName; + } + if (_testNameSet || _apiMapResponse.containsKey('test_name')) { + json['test_name'] = testName; + } + if (_assertionsCountSet || + _apiMapResponse.containsKey('assertions_count')) { + json['assertions_count'] = assertionsCount; + } + if (_assertionsFailedSet || + _apiMapResponse.containsKey('assertions_failed')) { + json['assertions_failed'] = assertionsFailed; + } + if (_errorsSet || _apiMapResponse.containsKey('errors')) { + json['errors'] = + errors == null ? null : errors.map((i) => i.toJson()).toList(); + } + if (_warningsSet || _apiMapResponse.containsKey('warnings')) { + json['warnings'] = + warnings == null ? null : warnings.map((i) => i.toJson()).toList(); + } + if (_successSet || _apiMapResponse.containsKey('success')) { + json['success'] = success; + } + return json; + } +} + +class LookModel { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _id; + bool _idSet = false; + + String _label; + bool _labelSet = false; + + /// Model Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Model Label (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + LookModel() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookModel.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + return json; + } +} + +class LookWithDashboards { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + String _id; + bool _idSet = false; + + String _title; + bool _titleSet = false; + + int _userId; + bool _userIdSet = false; + + int _contentFavoriteId; + bool _contentFavoriteIdSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + bool _deleted; + bool _deletedSet = false; + + DateTime _deletedAt; + bool _deletedAtSet = false; + + int _deleterId; + bool _deleterIdSet = false; + + String _description; + bool _descriptionSet = false; + + String _embedUrl; + bool _embedUrlSet = false; + + String _excelFileUrl; + bool _excelFileUrlSet = false; + + int _favoriteCount; + bool _favoriteCountSet = false; + + String _googleSpreadsheetFormula; + bool _googleSpreadsheetFormulaSet = false; + + String _imageEmbedUrl; + bool _imageEmbedUrlSet = false; + + bool _isRunOnLoad; + bool _isRunOnLoadSet = false; + + DateTime _lastAccessedAt; + bool _lastAccessedAtSet = false; + + int _lastUpdaterId; + bool _lastUpdaterIdSet = false; + + DateTime _lastViewedAt; + bool _lastViewedAtSet = false; + + LookModel _model; + bool _modelSet = false; + + bool _public; + bool _publicSet = false; + + String _publicSlug; + bool _publicSlugSet = false; + + String _publicUrl; + bool _publicUrlSet = false; + + int _queryId; + bool _queryIdSet = false; + + String _shortUrl; + bool _shortUrlSet = false; + + FolderBase _folder; + bool _folderSet = false; + + String _folderId; + bool _folderIdSet = false; + + DateTime _updatedAt; + bool _updatedAtSet = false; + + int _viewCount; + bool _viewCountSet = false; + + List _dashboards; + bool _dashboardsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Id of content metadata (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Look Title + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// User Id + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Content Favorite Id (read-only) + + int get contentFavoriteId { + if (!_contentFavoriteIdSet && + _apiMapResponse.containsKey('content_favorite_id')) { + _contentFavoriteId = _apiMapResponse['content_favorite_id']; + _contentFavoriteIdSet = true; + } + return _contentFavoriteId; + } + + set contentFavoriteId(int v) { + _contentFavoriteId = v; + _contentFavoriteIdSet = true; + } + + /// Time that the Look was created. (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Whether or not a look is 'soft' deleted. + + bool get deleted { + if (!_deletedSet && _apiMapResponse.containsKey('deleted')) { + _deleted = _apiMapResponse['deleted']; + _deletedSet = true; + } + return _deleted; + } + + set deleted(bool v) { + _deleted = v; + _deletedSet = true; + } + + /// Time that the Look was deleted. (read-only) + + DateTime get deletedAt { + if (!_deletedAtSet && _apiMapResponse.containsKey('deleted_at')) { + _deletedAt = _apiMapResponse['deleted_at'] == null + ? null + : DateTime.parse(_apiMapResponse['deleted_at']); + _deletedAtSet = true; + } + return _deletedAt; + } + + set deletedAt(DateTime v) { + _deletedAt = v; + _deletedAtSet = true; + } + + /// Id of User that deleted the look. (read-only) + + int get deleterId { + if (!_deleterIdSet && _apiMapResponse.containsKey('deleter_id')) { + _deleterId = _apiMapResponse['deleter_id']; + _deleterIdSet = true; + } + return _deleterId; + } + + set deleterId(int v) { + _deleterId = v; + _deleterIdSet = true; + } + + /// Description + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Embed Url (read-only) + + String get embedUrl { + if (!_embedUrlSet && _apiMapResponse.containsKey('embed_url')) { + _embedUrl = _apiMapResponse['embed_url'] == null + ? null + : _apiMapResponse['embed_url'].toString(); + _embedUrlSet = true; + } + return _embedUrl; + } + + set embedUrl(String v) { + _embedUrl = v; + _embedUrlSet = true; + } + + /// Excel File Url (read-only) + + String get excelFileUrl { + if (!_excelFileUrlSet && _apiMapResponse.containsKey('excel_file_url')) { + _excelFileUrl = _apiMapResponse['excel_file_url'] == null + ? null + : _apiMapResponse['excel_file_url'].toString(); + _excelFileUrlSet = true; + } + return _excelFileUrl; + } + + set excelFileUrl(String v) { + _excelFileUrl = v; + _excelFileUrlSet = true; + } + + /// Number of times favorited (read-only) + + int get favoriteCount { + if (!_favoriteCountSet && _apiMapResponse.containsKey('favorite_count')) { + _favoriteCount = _apiMapResponse['favorite_count']; + _favoriteCountSet = true; + } + return _favoriteCount; + } + + set favoriteCount(int v) { + _favoriteCount = v; + _favoriteCountSet = true; + } + + /// Google Spreadsheet Formula (read-only) + + String get googleSpreadsheetFormula { + if (!_googleSpreadsheetFormulaSet && + _apiMapResponse.containsKey('google_spreadsheet_formula')) { + _googleSpreadsheetFormula = + _apiMapResponse['google_spreadsheet_formula'] == null + ? null + : _apiMapResponse['google_spreadsheet_formula'].toString(); + _googleSpreadsheetFormulaSet = true; + } + return _googleSpreadsheetFormula; + } + + set googleSpreadsheetFormula(String v) { + _googleSpreadsheetFormula = v; + _googleSpreadsheetFormulaSet = true; + } + + /// Image Embed Url (read-only) + + String get imageEmbedUrl { + if (!_imageEmbedUrlSet && _apiMapResponse.containsKey('image_embed_url')) { + _imageEmbedUrl = _apiMapResponse['image_embed_url'] == null + ? null + : _apiMapResponse['image_embed_url'].toString(); + _imageEmbedUrlSet = true; + } + return _imageEmbedUrl; + } + + set imageEmbedUrl(String v) { + _imageEmbedUrl = v; + _imageEmbedUrlSet = true; + } + + /// auto-run query when Look viewed + + bool get isRunOnLoad { + if (!_isRunOnLoadSet && _apiMapResponse.containsKey('is_run_on_load')) { + _isRunOnLoad = _apiMapResponse['is_run_on_load']; + _isRunOnLoadSet = true; + } + return _isRunOnLoad; + } + + set isRunOnLoad(bool v) { + _isRunOnLoad = v; + _isRunOnLoadSet = true; + } + + /// Time that the Look was last accessed by any user (read-only) + + DateTime get lastAccessedAt { + if (!_lastAccessedAtSet && + _apiMapResponse.containsKey('last_accessed_at')) { + _lastAccessedAt = _apiMapResponse['last_accessed_at'] == null + ? null + : DateTime.parse(_apiMapResponse['last_accessed_at']); + _lastAccessedAtSet = true; + } + return _lastAccessedAt; + } + + set lastAccessedAt(DateTime v) { + _lastAccessedAt = v; + _lastAccessedAtSet = true; + } + + /// Id of User that last updated the look. (read-only) + + int get lastUpdaterId { + if (!_lastUpdaterIdSet && _apiMapResponse.containsKey('last_updater_id')) { + _lastUpdaterId = _apiMapResponse['last_updater_id']; + _lastUpdaterIdSet = true; + } + return _lastUpdaterId; + } + + set lastUpdaterId(int v) { + _lastUpdaterId = v; + _lastUpdaterIdSet = true; + } + + /// Time last viewed in the Looker web UI (read-only) + + DateTime get lastViewedAt { + if (!_lastViewedAtSet && _apiMapResponse.containsKey('last_viewed_at')) { + _lastViewedAt = _apiMapResponse['last_viewed_at'] == null + ? null + : DateTime.parse(_apiMapResponse['last_viewed_at']); + _lastViewedAtSet = true; + } + return _lastViewedAt; + } + + set lastViewedAt(DateTime v) { + _lastViewedAt = v; + _lastViewedAtSet = true; + } + + LookModel get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : LookModel.fromResponse( + _apiMapResponse['model'], apiResponseContentType); + _modelSet = true; + } + return _model; + } + + set model(LookModel v) { + _model = v; + _modelSet = true; + } + + /// Is Public + + bool get public { + if (!_publicSet && _apiMapResponse.containsKey('public')) { + _public = _apiMapResponse['public']; + _publicSet = true; + } + return _public; + } + + set public(bool v) { + _public = v; + _publicSet = true; + } + + /// Public Slug (read-only) + + String get publicSlug { + if (!_publicSlugSet && _apiMapResponse.containsKey('public_slug')) { + _publicSlug = _apiMapResponse['public_slug'] == null + ? null + : _apiMapResponse['public_slug'].toString(); + _publicSlugSet = true; + } + return _publicSlug; + } + + set publicSlug(String v) { + _publicSlug = v; + _publicSlugSet = true; + } + + /// Public Url (read-only) + + String get publicUrl { + if (!_publicUrlSet && _apiMapResponse.containsKey('public_url')) { + _publicUrl = _apiMapResponse['public_url'] == null + ? null + : _apiMapResponse['public_url'].toString(); + _publicUrlSet = true; + } + return _publicUrl; + } + + set publicUrl(String v) { + _publicUrl = v; + _publicUrlSet = true; + } + + /// Query Id + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// Short Url (read-only) + + String get shortUrl { + if (!_shortUrlSet && _apiMapResponse.containsKey('short_url')) { + _shortUrl = _apiMapResponse['short_url'] == null + ? null + : _apiMapResponse['short_url'].toString(); + _shortUrlSet = true; + } + return _shortUrl; + } + + set shortUrl(String v) { + _shortUrl = v; + _shortUrlSet = true; + } + + FolderBase get folder { + if (!_folderSet && _apiMapResponse.containsKey('folder')) { + _folder = _apiMapResponse['folder'] == null + ? null + : FolderBase.fromResponse( + _apiMapResponse['folder'], apiResponseContentType); + _folderSet = true; + } + return _folder; + } + + set folder(FolderBase v) { + _folder = v; + _folderSet = true; + } + + /// Folder Id + + String get folderId { + if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { + _folderId = _apiMapResponse['folder_id'] == null + ? null + : _apiMapResponse['folder_id'].toString(); + _folderIdSet = true; + } + return _folderId; + } + + set folderId(String v) { + _folderId = v; + _folderIdSet = true; + } + + /// Time that the Look was updated. (read-only) + + DateTime get updatedAt { + if (!_updatedAtSet && _apiMapResponse.containsKey('updated_at')) { + _updatedAt = _apiMapResponse['updated_at'] == null + ? null + : DateTime.parse(_apiMapResponse['updated_at']); + _updatedAtSet = true; + } + return _updatedAt; + } + + set updatedAt(DateTime v) { + _updatedAt = v; + _updatedAtSet = true; + } + + /// Number of times viewed in the Looker web UI (read-only) + + int get viewCount { + if (!_viewCountSet && _apiMapResponse.containsKey('view_count')) { + _viewCount = _apiMapResponse['view_count']; + _viewCountSet = true; + } + return _viewCount; + } + + set viewCount(int v) { + _viewCount = v; + _viewCountSet = true; + } + + /// Dashboards (read-only) + + List get dashboards { + if (!_dashboardsSet && _apiMapResponse.containsKey('dashboards')) { + _dashboards = _apiMapResponse['dashboards'] == null + ? null + : (_apiMapResponse['dashboards'] as List) + .map((i) => DashboardBase.fromResponse(i, apiResponseContentType)) + .toList(); + _dashboardsSet = true; + } + return _dashboards; + } + + set dashboards(List v) { + _dashboards = v; + _dashboardsSet = true; + } + + LookWithDashboards() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookWithDashboards.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_contentFavoriteIdSet || + _apiMapResponse.containsKey('content_favorite_id')) { + json['content_favorite_id'] = contentFavoriteId; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + if (_deletedSet || _apiMapResponse.containsKey('deleted')) { + json['deleted'] = deleted; + } + if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { + json['deleted_at'] = + deletedAt == null ? null : deletedAt.toIso8601String(); + } + if (_deleterIdSet || _apiMapResponse.containsKey('deleter_id')) { + json['deleter_id'] = deleterId; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_embedUrlSet || _apiMapResponse.containsKey('embed_url')) { + json['embed_url'] = embedUrl; + } + if (_excelFileUrlSet || _apiMapResponse.containsKey('excel_file_url')) { + json['excel_file_url'] = excelFileUrl; + } + if (_favoriteCountSet || _apiMapResponse.containsKey('favorite_count')) { + json['favorite_count'] = favoriteCount; + } + if (_googleSpreadsheetFormulaSet || + _apiMapResponse.containsKey('google_spreadsheet_formula')) { + json['google_spreadsheet_formula'] = googleSpreadsheetFormula; + } + if (_imageEmbedUrlSet || _apiMapResponse.containsKey('image_embed_url')) { + json['image_embed_url'] = imageEmbedUrl; + } + if (_isRunOnLoadSet || _apiMapResponse.containsKey('is_run_on_load')) { + json['is_run_on_load'] = isRunOnLoad; + } + if (_lastAccessedAtSet || _apiMapResponse.containsKey('last_accessed_at')) { + json['last_accessed_at'] = + lastAccessedAt == null ? null : lastAccessedAt.toIso8601String(); + } + if (_lastUpdaterIdSet || _apiMapResponse.containsKey('last_updater_id')) { + json['last_updater_id'] = lastUpdaterId; + } + if (_lastViewedAtSet || _apiMapResponse.containsKey('last_viewed_at')) { + json['last_viewed_at'] = + lastViewedAt == null ? null : lastViewedAt.toIso8601String(); + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model == null ? null : model.toJson(); + } + if (_publicSet || _apiMapResponse.containsKey('public')) { + json['public'] = public; + } + if (_publicSlugSet || _apiMapResponse.containsKey('public_slug')) { + json['public_slug'] = publicSlug; + } + if (_publicUrlSet || _apiMapResponse.containsKey('public_url')) { + json['public_url'] = publicUrl; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_shortUrlSet || _apiMapResponse.containsKey('short_url')) { + json['short_url'] = shortUrl; + } + if (_folderSet || _apiMapResponse.containsKey('folder')) { + json['folder'] = folder == null ? null : folder.toJson(); + } + if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { + json['folder_id'] = folderId; + } + if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { + json['updated_at'] = + updatedAt == null ? null : updatedAt.toIso8601String(); + } + if (_viewCountSet || _apiMapResponse.containsKey('view_count')) { + json['view_count'] = viewCount; + } + if (_dashboardsSet || _apiMapResponse.containsKey('dashboards')) { + json['dashboards'] = dashboards == null + ? null + : dashboards.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class LookWithQuery { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + String _id; + bool _idSet = false; + + String _title; + bool _titleSet = false; + + int _userId; + bool _userIdSet = false; + + int _contentFavoriteId; + bool _contentFavoriteIdSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + bool _deleted; + bool _deletedSet = false; + + DateTime _deletedAt; + bool _deletedAtSet = false; + + int _deleterId; + bool _deleterIdSet = false; + + String _description; + bool _descriptionSet = false; + + String _embedUrl; + bool _embedUrlSet = false; + + String _excelFileUrl; + bool _excelFileUrlSet = false; + + int _favoriteCount; + bool _favoriteCountSet = false; + + String _googleSpreadsheetFormula; + bool _googleSpreadsheetFormulaSet = false; + + String _imageEmbedUrl; + bool _imageEmbedUrlSet = false; + + bool _isRunOnLoad; + bool _isRunOnLoadSet = false; + + DateTime _lastAccessedAt; + bool _lastAccessedAtSet = false; + + int _lastUpdaterId; + bool _lastUpdaterIdSet = false; + + DateTime _lastViewedAt; + bool _lastViewedAtSet = false; + + LookModel _model; + bool _modelSet = false; + + bool _public; + bool _publicSet = false; + + String _publicSlug; + bool _publicSlugSet = false; + + String _publicUrl; + bool _publicUrlSet = false; + + int _queryId; + bool _queryIdSet = false; + + String _shortUrl; + bool _shortUrlSet = false; + + FolderBase _folder; + bool _folderSet = false; + + String _folderId; + bool _folderIdSet = false; + + DateTime _updatedAt; + bool _updatedAtSet = false; + + int _viewCount; + bool _viewCountSet = false; + + Query _query; + bool _querySet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Id of content metadata (read-only) + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Look Title + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// User Id + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Content Favorite Id (read-only) + + int get contentFavoriteId { + if (!_contentFavoriteIdSet && + _apiMapResponse.containsKey('content_favorite_id')) { + _contentFavoriteId = _apiMapResponse['content_favorite_id']; + _contentFavoriteIdSet = true; + } + return _contentFavoriteId; + } + + set contentFavoriteId(int v) { + _contentFavoriteId = v; + _contentFavoriteIdSet = true; + } + + /// Time that the Look was created. (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Whether or not a look is 'soft' deleted. + + bool get deleted { + if (!_deletedSet && _apiMapResponse.containsKey('deleted')) { + _deleted = _apiMapResponse['deleted']; + _deletedSet = true; + } + return _deleted; + } + + set deleted(bool v) { + _deleted = v; + _deletedSet = true; + } + + /// Time that the Look was deleted. (read-only) + + DateTime get deletedAt { + if (!_deletedAtSet && _apiMapResponse.containsKey('deleted_at')) { + _deletedAt = _apiMapResponse['deleted_at'] == null + ? null + : DateTime.parse(_apiMapResponse['deleted_at']); + _deletedAtSet = true; + } + return _deletedAt; + } + + set deletedAt(DateTime v) { + _deletedAt = v; + _deletedAtSet = true; + } + + /// Id of User that deleted the look. (read-only) + + int get deleterId { + if (!_deleterIdSet && _apiMapResponse.containsKey('deleter_id')) { + _deleterId = _apiMapResponse['deleter_id']; + _deleterIdSet = true; + } + return _deleterId; + } + + set deleterId(int v) { + _deleterId = v; + _deleterIdSet = true; + } + + /// Description + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Embed Url (read-only) + + String get embedUrl { + if (!_embedUrlSet && _apiMapResponse.containsKey('embed_url')) { + _embedUrl = _apiMapResponse['embed_url'] == null + ? null + : _apiMapResponse['embed_url'].toString(); + _embedUrlSet = true; + } + return _embedUrl; + } + + set embedUrl(String v) { + _embedUrl = v; + _embedUrlSet = true; + } + + /// Excel File Url (read-only) + + String get excelFileUrl { + if (!_excelFileUrlSet && _apiMapResponse.containsKey('excel_file_url')) { + _excelFileUrl = _apiMapResponse['excel_file_url'] == null + ? null + : _apiMapResponse['excel_file_url'].toString(); + _excelFileUrlSet = true; + } + return _excelFileUrl; + } + + set excelFileUrl(String v) { + _excelFileUrl = v; + _excelFileUrlSet = true; + } + + /// Number of times favorited (read-only) + + int get favoriteCount { + if (!_favoriteCountSet && _apiMapResponse.containsKey('favorite_count')) { + _favoriteCount = _apiMapResponse['favorite_count']; + _favoriteCountSet = true; + } + return _favoriteCount; + } + + set favoriteCount(int v) { + _favoriteCount = v; + _favoriteCountSet = true; + } + + /// Google Spreadsheet Formula (read-only) + + String get googleSpreadsheetFormula { + if (!_googleSpreadsheetFormulaSet && + _apiMapResponse.containsKey('google_spreadsheet_formula')) { + _googleSpreadsheetFormula = + _apiMapResponse['google_spreadsheet_formula'] == null + ? null + : _apiMapResponse['google_spreadsheet_formula'].toString(); + _googleSpreadsheetFormulaSet = true; + } + return _googleSpreadsheetFormula; + } + + set googleSpreadsheetFormula(String v) { + _googleSpreadsheetFormula = v; + _googleSpreadsheetFormulaSet = true; + } + + /// Image Embed Url (read-only) + + String get imageEmbedUrl { + if (!_imageEmbedUrlSet && _apiMapResponse.containsKey('image_embed_url')) { + _imageEmbedUrl = _apiMapResponse['image_embed_url'] == null + ? null + : _apiMapResponse['image_embed_url'].toString(); + _imageEmbedUrlSet = true; + } + return _imageEmbedUrl; + } + + set imageEmbedUrl(String v) { + _imageEmbedUrl = v; + _imageEmbedUrlSet = true; + } + + /// auto-run query when Look viewed + + bool get isRunOnLoad { + if (!_isRunOnLoadSet && _apiMapResponse.containsKey('is_run_on_load')) { + _isRunOnLoad = _apiMapResponse['is_run_on_load']; + _isRunOnLoadSet = true; + } + return _isRunOnLoad; + } + + set isRunOnLoad(bool v) { + _isRunOnLoad = v; + _isRunOnLoadSet = true; + } + + /// Time that the Look was last accessed by any user (read-only) + + DateTime get lastAccessedAt { + if (!_lastAccessedAtSet && + _apiMapResponse.containsKey('last_accessed_at')) { + _lastAccessedAt = _apiMapResponse['last_accessed_at'] == null + ? null + : DateTime.parse(_apiMapResponse['last_accessed_at']); + _lastAccessedAtSet = true; + } + return _lastAccessedAt; + } + + set lastAccessedAt(DateTime v) { + _lastAccessedAt = v; + _lastAccessedAtSet = true; + } + + /// Id of User that last updated the look. (read-only) + + int get lastUpdaterId { + if (!_lastUpdaterIdSet && _apiMapResponse.containsKey('last_updater_id')) { + _lastUpdaterId = _apiMapResponse['last_updater_id']; + _lastUpdaterIdSet = true; + } + return _lastUpdaterId; + } + + set lastUpdaterId(int v) { + _lastUpdaterId = v; + _lastUpdaterIdSet = true; + } + + /// Time last viewed in the Looker web UI (read-only) + + DateTime get lastViewedAt { + if (!_lastViewedAtSet && _apiMapResponse.containsKey('last_viewed_at')) { + _lastViewedAt = _apiMapResponse['last_viewed_at'] == null + ? null + : DateTime.parse(_apiMapResponse['last_viewed_at']); + _lastViewedAtSet = true; + } + return _lastViewedAt; + } + + set lastViewedAt(DateTime v) { + _lastViewedAt = v; + _lastViewedAtSet = true; + } + + LookModel get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : LookModel.fromResponse( + _apiMapResponse['model'], apiResponseContentType); + _modelSet = true; + } + return _model; + } + + set model(LookModel v) { + _model = v; + _modelSet = true; + } + + /// Is Public + + bool get public { + if (!_publicSet && _apiMapResponse.containsKey('public')) { + _public = _apiMapResponse['public']; + _publicSet = true; + } + return _public; + } + + set public(bool v) { + _public = v; + _publicSet = true; + } + + /// Public Slug (read-only) + + String get publicSlug { + if (!_publicSlugSet && _apiMapResponse.containsKey('public_slug')) { + _publicSlug = _apiMapResponse['public_slug'] == null + ? null + : _apiMapResponse['public_slug'].toString(); + _publicSlugSet = true; + } + return _publicSlug; + } + + set publicSlug(String v) { + _publicSlug = v; + _publicSlugSet = true; + } + + /// Public Url (read-only) + + String get publicUrl { + if (!_publicUrlSet && _apiMapResponse.containsKey('public_url')) { + _publicUrl = _apiMapResponse['public_url'] == null + ? null + : _apiMapResponse['public_url'].toString(); + _publicUrlSet = true; + } + return _publicUrl; + } + + set publicUrl(String v) { + _publicUrl = v; + _publicUrlSet = true; + } + + /// Query Id + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// Short Url (read-only) + + String get shortUrl { + if (!_shortUrlSet && _apiMapResponse.containsKey('short_url')) { + _shortUrl = _apiMapResponse['short_url'] == null + ? null + : _apiMapResponse['short_url'].toString(); + _shortUrlSet = true; + } + return _shortUrl; + } + + set shortUrl(String v) { + _shortUrl = v; + _shortUrlSet = true; + } + + FolderBase get folder { + if (!_folderSet && _apiMapResponse.containsKey('folder')) { + _folder = _apiMapResponse['folder'] == null + ? null + : FolderBase.fromResponse( + _apiMapResponse['folder'], apiResponseContentType); + _folderSet = true; + } + return _folder; + } + + set folder(FolderBase v) { + _folder = v; + _folderSet = true; + } + + /// Folder Id + + String get folderId { + if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { + _folderId = _apiMapResponse['folder_id'] == null + ? null + : _apiMapResponse['folder_id'].toString(); + _folderIdSet = true; + } + return _folderId; + } + + set folderId(String v) { + _folderId = v; + _folderIdSet = true; + } + + /// Time that the Look was updated. (read-only) + + DateTime get updatedAt { + if (!_updatedAtSet && _apiMapResponse.containsKey('updated_at')) { + _updatedAt = _apiMapResponse['updated_at'] == null + ? null + : DateTime.parse(_apiMapResponse['updated_at']); + _updatedAtSet = true; + } + return _updatedAt; + } + + set updatedAt(DateTime v) { + _updatedAt = v; + _updatedAtSet = true; + } + + /// Number of times viewed in the Looker web UI (read-only) + + int get viewCount { + if (!_viewCountSet && _apiMapResponse.containsKey('view_count')) { + _viewCount = _apiMapResponse['view_count']; + _viewCountSet = true; + } + return _viewCount; + } + + set viewCount(int v) { + _viewCount = v; + _viewCountSet = true; + } + + Query get query { + if (!_querySet && _apiMapResponse.containsKey('query')) { + _query = _apiMapResponse['query'] == null + ? null + : Query.fromResponse( + _apiMapResponse['query'], apiResponseContentType); + _querySet = true; + } + return _query; + } + + set query(Query v) { + _query = v; + _querySet = true; + } + + /// Url (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + LookWithQuery() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + LookWithQuery.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_contentFavoriteIdSet || + _apiMapResponse.containsKey('content_favorite_id')) { + json['content_favorite_id'] = contentFavoriteId; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + if (_deletedSet || _apiMapResponse.containsKey('deleted')) { + json['deleted'] = deleted; + } + if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { + json['deleted_at'] = + deletedAt == null ? null : deletedAt.toIso8601String(); + } + if (_deleterIdSet || _apiMapResponse.containsKey('deleter_id')) { + json['deleter_id'] = deleterId; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_embedUrlSet || _apiMapResponse.containsKey('embed_url')) { + json['embed_url'] = embedUrl; + } + if (_excelFileUrlSet || _apiMapResponse.containsKey('excel_file_url')) { + json['excel_file_url'] = excelFileUrl; + } + if (_favoriteCountSet || _apiMapResponse.containsKey('favorite_count')) { + json['favorite_count'] = favoriteCount; + } + if (_googleSpreadsheetFormulaSet || + _apiMapResponse.containsKey('google_spreadsheet_formula')) { + json['google_spreadsheet_formula'] = googleSpreadsheetFormula; + } + if (_imageEmbedUrlSet || _apiMapResponse.containsKey('image_embed_url')) { + json['image_embed_url'] = imageEmbedUrl; + } + if (_isRunOnLoadSet || _apiMapResponse.containsKey('is_run_on_load')) { + json['is_run_on_load'] = isRunOnLoad; + } + if (_lastAccessedAtSet || _apiMapResponse.containsKey('last_accessed_at')) { + json['last_accessed_at'] = + lastAccessedAt == null ? null : lastAccessedAt.toIso8601String(); + } + if (_lastUpdaterIdSet || _apiMapResponse.containsKey('last_updater_id')) { + json['last_updater_id'] = lastUpdaterId; + } + if (_lastViewedAtSet || _apiMapResponse.containsKey('last_viewed_at')) { + json['last_viewed_at'] = + lastViewedAt == null ? null : lastViewedAt.toIso8601String(); + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model == null ? null : model.toJson(); + } + if (_publicSet || _apiMapResponse.containsKey('public')) { + json['public'] = public; + } + if (_publicSlugSet || _apiMapResponse.containsKey('public_slug')) { + json['public_slug'] = publicSlug; + } + if (_publicUrlSet || _apiMapResponse.containsKey('public_url')) { + json['public_url'] = publicUrl; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_shortUrlSet || _apiMapResponse.containsKey('short_url')) { + json['short_url'] = shortUrl; + } + if (_folderSet || _apiMapResponse.containsKey('folder')) { + json['folder'] = folder == null ? null : folder.toJson(); + } + if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { + json['folder_id'] = folderId; + } + if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { + json['updated_at'] = + updatedAt == null ? null : updatedAt.toIso8601String(); + } + if (_viewCountSet || _apiMapResponse.containsKey('view_count')) { + json['view_count'] = viewCount; + } + if (_querySet || _apiMapResponse.containsKey('query')) { + json['query'] = query == null ? null : query.toJson(); + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class Manifest { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _name; + bool _nameSet = false; + + List _imports; + bool _importsSet = false; + + LocalizationSettings _localizationSettings; + bool _localizationSettingsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Manifest project name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Imports for a project (read-only) + + List get imports { + if (!_importsSet && _apiMapResponse.containsKey('imports')) { + _imports = _apiMapResponse['imports'] == null + ? null + : (_apiMapResponse['imports'] as List) + .map((i) => + ImportedProject.fromResponse(i, apiResponseContentType)) + .toList(); + _importsSet = true; + } + return _imports; + } + + set imports(List v) { + _imports = v; + _importsSet = true; + } + + LocalizationSettings get localizationSettings { + if (!_localizationSettingsSet && + _apiMapResponse.containsKey('localization_settings')) { + _localizationSettings = _apiMapResponse['localization_settings'] == null + ? null + : LocalizationSettings.fromResponse( + _apiMapResponse['localization_settings'], apiResponseContentType); + _localizationSettingsSet = true; + } + return _localizationSettings; + } + + set localizationSettings(LocalizationSettings v) { + _localizationSettings = v; + _localizationSettingsSet = true; + } + + Manifest() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Manifest.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_importsSet || _apiMapResponse.containsKey('imports')) { + json['imports'] = + imports == null ? null : imports.map((i) => i.toJson()).toList(); + } + if (_localizationSettingsSet || + _apiMapResponse.containsKey('localization_settings')) { + json['localization_settings'] = + localizationSettings == null ? null : localizationSettings.toJson(); + } + return json; + } +} + +class MergeFields { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _fieldName; + bool _fieldNameSet = false; + + String _sourceFieldName; + bool _sourceFieldNameSet = false; + + /// Field name to map onto in the merged results + + String get fieldName { + if (!_fieldNameSet && _apiMapResponse.containsKey('field_name')) { + _fieldName = _apiMapResponse['field_name'] == null + ? null + : _apiMapResponse['field_name'].toString(); + _fieldNameSet = true; + } + return _fieldName; + } + + set fieldName(String v) { + _fieldName = v; + _fieldNameSet = true; + } + + /// Field name from the source query + + String get sourceFieldName { + if (!_sourceFieldNameSet && + _apiMapResponse.containsKey('source_field_name')) { + _sourceFieldName = _apiMapResponse['source_field_name'] == null + ? null + : _apiMapResponse['source_field_name'].toString(); + _sourceFieldNameSet = true; + } + return _sourceFieldName; + } + + set sourceFieldName(String v) { + _sourceFieldName = v; + _sourceFieldNameSet = true; + } + + MergeFields() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + MergeFields.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_fieldNameSet || _apiMapResponse.containsKey('field_name')) { + json['field_name'] = fieldName; + } + if (_sourceFieldNameSet || + _apiMapResponse.containsKey('source_field_name')) { + json['source_field_name'] = sourceFieldName; + } + return json; + } +} + +class MergeQuery { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _columnLimit; + bool _columnLimitSet = false; + + String _dynamicFields; + bool _dynamicFieldsSet = false; + + String _id; + bool _idSet = false; + + List _pivots; + bool _pivotsSet = false; + + int _resultMakerId; + bool _resultMakerIdSet = false; + + List _sorts; + bool _sortsSet = false; + + List _sourceQueries; + bool _sourceQueriesSet = false; + + bool _total; + bool _totalSet = false; + + Map _visConfig; + bool _visConfigSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Column Limit + + String get columnLimit { + if (!_columnLimitSet && _apiMapResponse.containsKey('column_limit')) { + _columnLimit = _apiMapResponse['column_limit'] == null + ? null + : _apiMapResponse['column_limit'].toString(); + _columnLimitSet = true; + } + return _columnLimit; + } + + set columnLimit(String v) { + _columnLimit = v; + _columnLimitSet = true; + } + + /// Dynamic Fields + + String get dynamicFields { + if (!_dynamicFieldsSet && _apiMapResponse.containsKey('dynamic_fields')) { + _dynamicFields = _apiMapResponse['dynamic_fields'] == null + ? null + : _apiMapResponse['dynamic_fields'].toString(); + _dynamicFieldsSet = true; + } + return _dynamicFields; + } + + set dynamicFields(String v) { + _dynamicFields = v; + _dynamicFieldsSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Pivots + + List get pivots { + if (!_pivotsSet && _apiMapResponse.containsKey('pivots')) { + _pivots = _apiMapResponse['pivots'] == null + ? null + : _apiMapResponse['pivots'].map((i) => i as String).toList(); + _pivotsSet = true; + } + return _pivots; + } + + set pivots(List v) { + _pivots = v; + _pivotsSet = true; + } + + /// Unique to get results (read-only) + + int get resultMakerId { + if (!_resultMakerIdSet && _apiMapResponse.containsKey('result_maker_id')) { + _resultMakerId = _apiMapResponse['result_maker_id']; + _resultMakerIdSet = true; + } + return _resultMakerId; + } + + set resultMakerId(int v) { + _resultMakerId = v; + _resultMakerIdSet = true; + } + + /// Sorts + + List get sorts { + if (!_sortsSet && _apiMapResponse.containsKey('sorts')) { + _sorts = _apiMapResponse['sorts'] == null + ? null + : _apiMapResponse['sorts'].map((i) => i as String).toList(); + _sortsSet = true; + } + return _sorts; + } + + set sorts(List v) { + _sorts = v; + _sortsSet = true; + } + + /// Source Queries defining the results to be merged. + + List get sourceQueries { + if (!_sourceQueriesSet && _apiMapResponse.containsKey('source_queries')) { + _sourceQueries = _apiMapResponse['source_queries'] == null + ? null + : (_apiMapResponse['source_queries'] as List) + .map((i) => + MergeQuerySourceQuery.fromResponse(i, apiResponseContentType)) + .toList(); + _sourceQueriesSet = true; + } + return _sourceQueries; + } + + set sourceQueries(List v) { + _sourceQueries = v; + _sourceQueriesSet = true; + } + + /// Total + + bool get total { + if (!_totalSet && _apiMapResponse.containsKey('total')) { + _total = _apiMapResponse['total']; + _totalSet = true; + } + return _total; + } + + set total(bool v) { + _total = v; + _totalSet = true; + } + + /// Visualization Config + + Map get visConfig { + if (!_visConfigSet && _apiMapResponse.containsKey('vis_config')) { + _visConfig = _apiMapResponse['vis_config']; + _visConfigSet = true; + } + return _visConfig; + } + + set visConfig(Map v) { + _visConfig = v; + _visConfigSet = true; + } + + MergeQuery() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + MergeQuery.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_columnLimitSet || _apiMapResponse.containsKey('column_limit')) { + json['column_limit'] = columnLimit; + } + if (_dynamicFieldsSet || _apiMapResponse.containsKey('dynamic_fields')) { + json['dynamic_fields'] = dynamicFields; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_pivotsSet || _apiMapResponse.containsKey('pivots')) { + json['pivots'] = pivots; + } + if (_resultMakerIdSet || _apiMapResponse.containsKey('result_maker_id')) { + json['result_maker_id'] = resultMakerId; + } + if (_sortsSet || _apiMapResponse.containsKey('sorts')) { + json['sorts'] = sorts; + } + if (_sourceQueriesSet || _apiMapResponse.containsKey('source_queries')) { + json['source_queries'] = sourceQueries == null + ? null + : sourceQueries.map((i) => i.toJson()).toList(); + } + if (_totalSet || _apiMapResponse.containsKey('total')) { + json['total'] = total; + } + if (_visConfigSet || _apiMapResponse.containsKey('vis_config')) { + json['vis_config'] = visConfig; + } + return json; + } +} + +class MergeQuerySourceQuery { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _mergeFields; + bool _mergeFieldsSet = false; + + String _name; + bool _nameSet = false; + + int _queryId; + bool _queryIdSet = false; + + /// An array defining which fields of the source query are mapped onto fields of the merge query + + List get mergeFields { + if (!_mergeFieldsSet && _apiMapResponse.containsKey('merge_fields')) { + _mergeFields = _apiMapResponse['merge_fields'] == null + ? null + : (_apiMapResponse['merge_fields'] as List) + .map((i) => MergeFields.fromResponse(i, apiResponseContentType)) + .toList(); + _mergeFieldsSet = true; + } + return _mergeFields; + } + + set mergeFields(List v) { + _mergeFields = v; + _mergeFieldsSet = true; + } + + /// Display name + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Id of the query to merge + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + MergeQuerySourceQuery() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + MergeQuerySourceQuery.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_mergeFieldsSet || _apiMapResponse.containsKey('merge_fields')) { + json['merge_fields'] = mergeFields == null + ? null + : mergeFields.map((i) => i.toJson()).toList(); + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + return json; + } +} + +class MobileSettings { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _mobileForceAuthentication; + bool _mobileForceAuthenticationSet = false; + + bool _mobileAppIntegration; + bool _mobileAppIntegrationSet = false; + + /// Specifies whether the force authentication option is enabled for mobile (read-only) + + bool get mobileForceAuthentication { + if (!_mobileForceAuthenticationSet && + _apiMapResponse.containsKey('mobile_force_authentication')) { + _mobileForceAuthentication = + _apiMapResponse['mobile_force_authentication']; + _mobileForceAuthenticationSet = true; + } + return _mobileForceAuthentication; + } + + set mobileForceAuthentication(bool v) { + _mobileForceAuthentication = v; + _mobileForceAuthenticationSet = true; + } + + /// Specifies whether mobile access for this instance is enabled. (read-only) + + bool get mobileAppIntegration { + if (!_mobileAppIntegrationSet && + _apiMapResponse.containsKey('mobile_app_integration')) { + _mobileAppIntegration = _apiMapResponse['mobile_app_integration']; + _mobileAppIntegrationSet = true; + } + return _mobileAppIntegration; + } + + set mobileAppIntegration(bool v) { + _mobileAppIntegration = v; + _mobileAppIntegrationSet = true; + } + + MobileSettings() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + MobileSettings.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_mobileForceAuthenticationSet || + _apiMapResponse.containsKey('mobile_force_authentication')) { + json['mobile_force_authentication'] = mobileForceAuthentication; + } + if (_mobileAppIntegrationSet || + _apiMapResponse.containsKey('mobile_app_integration')) { + json['mobile_app_integration'] = mobileAppIntegration; + } + return json; + } +} + +class Model { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _connection; + bool _connectionSet = false; + + String _name; + bool _nameSet = false; + + List _valueFormats; + bool _valueFormatsSet = false; + + /// (read-only) + + String get connection { + if (!_connectionSet && _apiMapResponse.containsKey('connection')) { + _connection = _apiMapResponse['connection'] == null + ? null + : _apiMapResponse['connection'].toString(); + _connectionSet = true; + } + return _connection; + } + + set connection(String v) { + _connection = v; + _connectionSet = true; + } + + /// (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Array of named value formats (read-only) + + List get valueFormats { + if (!_valueFormatsSet && _apiMapResponse.containsKey('value_formats')) { + _valueFormats = _apiMapResponse['value_formats'] == null + ? null + : (_apiMapResponse['value_formats'] as List) + .map((i) => ModelNamedValueFormats.fromResponse( + i, apiResponseContentType)) + .toList(); + _valueFormatsSet = true; + } + return _valueFormats; + } + + set valueFormats(List v) { + _valueFormats = v; + _valueFormatsSet = true; + } + + Model() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Model.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_connectionSet || _apiMapResponse.containsKey('connection')) { + json['connection'] = connection; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_valueFormatsSet || _apiMapResponse.containsKey('value_formats')) { + json['value_formats'] = valueFormats == null + ? null + : valueFormats.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class ModelFieldSuggestions { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _suggestions; + bool _suggestionsSet = false; + + String _error; + bool _errorSet = false; + + bool _fromCache; + bool _fromCacheSet = false; + + bool _hitLimit; + bool _hitLimitSet = false; + + bool _usedCalciteMaterialization; + bool _usedCalciteMaterializationSet = false; + + /// List of suggestions (read-only) + + List get suggestions { + if (!_suggestionsSet && _apiMapResponse.containsKey('suggestions')) { + _suggestions = _apiMapResponse['suggestions'] == null + ? null + : _apiMapResponse['suggestions'] + .map((i) => i as String) + .toList(); + _suggestionsSet = true; + } + return _suggestions; + } + + set suggestions(List v) { + _suggestions = v; + _suggestionsSet = true; + } + + /// Error message (read-only) + + String get error { + if (!_errorSet && _apiMapResponse.containsKey('error')) { + _error = _apiMapResponse['error'] == null + ? null + : _apiMapResponse['error'].toString(); + _errorSet = true; + } + return _error; + } + + set error(String v) { + _error = v; + _errorSet = true; + } + + /// True if result came from the cache (read-only) + + bool get fromCache { + if (!_fromCacheSet && _apiMapResponse.containsKey('from_cache')) { + _fromCache = _apiMapResponse['from_cache']; + _fromCacheSet = true; + } + return _fromCache; + } + + set fromCache(bool v) { + _fromCache = v; + _fromCacheSet = true; + } + + /// True if this was a hit limit (read-only) + + bool get hitLimit { + if (!_hitLimitSet && _apiMapResponse.containsKey('hit_limit')) { + _hitLimit = _apiMapResponse['hit_limit']; + _hitLimitSet = true; + } + return _hitLimit; + } + + set hitLimit(bool v) { + _hitLimit = v; + _hitLimitSet = true; + } + + /// True if calcite was used (read-only) + + bool get usedCalciteMaterialization { + if (!_usedCalciteMaterializationSet && + _apiMapResponse.containsKey('used_calcite_materialization')) { + _usedCalciteMaterialization = + _apiMapResponse['used_calcite_materialization']; + _usedCalciteMaterializationSet = true; + } + return _usedCalciteMaterialization; + } + + set usedCalciteMaterialization(bool v) { + _usedCalciteMaterialization = v; + _usedCalciteMaterializationSet = true; + } + + ModelFieldSuggestions() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ModelFieldSuggestions.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_suggestionsSet || _apiMapResponse.containsKey('suggestions')) { + json['suggestions'] = suggestions; + } + if (_errorSet || _apiMapResponse.containsKey('error')) { + json['error'] = error; + } + if (_fromCacheSet || _apiMapResponse.containsKey('from_cache')) { + json['from_cache'] = fromCache; + } + if (_hitLimitSet || _apiMapResponse.containsKey('hit_limit')) { + json['hit_limit'] = hitLimit; + } + if (_usedCalciteMaterializationSet || + _apiMapResponse.containsKey('used_calcite_materialization')) { + json['used_calcite_materialization'] = usedCalciteMaterialization; + } + return json; + } +} + +class ModelNamedValueFormats { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _formatString; + bool _formatStringSet = false; + + String _label; + bool _labelSet = false; + + String _name; + bool _nameSet = false; + + bool _strictValueFormat; + bool _strictValueFormatSet = false; + + /// (read-only) + + String get formatString { + if (!_formatStringSet && _apiMapResponse.containsKey('format_string')) { + _formatString = _apiMapResponse['format_string'] == null + ? null + : _apiMapResponse['format_string'].toString(); + _formatStringSet = true; + } + return _formatString; + } + + set formatString(String v) { + _formatString = v; + _formatStringSet = true; + } + + /// (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// (read-only) + + bool get strictValueFormat { + if (!_strictValueFormatSet && + _apiMapResponse.containsKey('strict_value_format')) { + _strictValueFormat = _apiMapResponse['strict_value_format']; + _strictValueFormatSet = true; + } + return _strictValueFormat; + } + + set strictValueFormat(bool v) { + _strictValueFormat = v; + _strictValueFormatSet = true; + } + + ModelNamedValueFormats() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ModelNamedValueFormats.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_formatStringSet || _apiMapResponse.containsKey('format_string')) { + json['format_string'] = formatString; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_strictValueFormatSet || + _apiMapResponse.containsKey('strict_value_format')) { + json['strict_value_format'] = strictValueFormat; + } + return json; + } +} + +class ModelSet { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + bool _allAccess; + bool _allAccessSet = false; + + bool _builtIn; + bool _builtInSet = false; + + int _id; + bool _idSet = false; + + List _models; + bool _modelsSet = false; + + String _name; + bool _nameSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// (read-only) + + bool get allAccess { + if (!_allAccessSet && _apiMapResponse.containsKey('all_access')) { + _allAccess = _apiMapResponse['all_access']; + _allAccessSet = true; + } + return _allAccess; + } + + set allAccess(bool v) { + _allAccess = v; + _allAccessSet = true; + } + + /// (read-only) + + bool get builtIn { + if (!_builtInSet && _apiMapResponse.containsKey('built_in')) { + _builtIn = _apiMapResponse['built_in']; + _builtInSet = true; + } + return _builtIn; + } + + set builtIn(bool v) { + _builtIn = v; + _builtInSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + List get models { + if (!_modelsSet && _apiMapResponse.containsKey('models')) { + _models = _apiMapResponse['models'] == null + ? null + : _apiMapResponse['models'].map((i) => i as String).toList(); + _modelsSet = true; + } + return _models; + } + + set models(List v) { + _models = v; + _modelsSet = true; + } + + /// Name of ModelSet + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + ModelSet() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ModelSet.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_allAccessSet || _apiMapResponse.containsKey('all_access')) { + json['all_access'] = allAccess; + } + if (_builtInSet || _apiMapResponse.containsKey('built_in')) { + json['built_in'] = builtIn; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_modelsSet || _apiMapResponse.containsKey('models')) { + json['models'] = models; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class ModelsNotValidated { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _projectFileId; + bool _projectFileIdSet = false; + + /// Model name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Project file (read-only) + + String get projectFileId { + if (!_projectFileIdSet && _apiMapResponse.containsKey('project_file_id')) { + _projectFileId = _apiMapResponse['project_file_id'] == null + ? null + : _apiMapResponse['project_file_id'].toString(); + _projectFileIdSet = true; + } + return _projectFileId; + } + + set projectFileId(String v) { + _projectFileId = v; + _projectFileIdSet = true; + } + + ModelsNotValidated() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ModelsNotValidated.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_projectFileIdSet || _apiMapResponse.containsKey('project_file_id')) { + json['project_file_id'] = projectFileId; + } + return json; + } +} + +/// The type of time interval this field represents a grouping of. Valid values are: "day", "hour", "minute", "second", "millisecond", "microsecond", "week", "month", "quarter", "year". (Enum defined in LookmlModelExploreFieldTimeInterval) +enum Name { + day, + hour, + minute, + second, + millisecond, + microsecond, + week, + month, + quarter, + year +} + +class NameMapper { + static String toStringValue(Name e) { + switch (e) { + case Name.day: + return 'day'; + case Name.hour: + return 'hour'; + case Name.minute: + return 'minute'; + case Name.second: + return 'second'; + case Name.millisecond: + return 'millisecond'; + case Name.microsecond: + return 'microsecond'; + case Name.week: + return 'week'; + case Name.month: + return 'month'; + case Name.quarter: + return 'quarter'; + case Name.year: + return 'year'; + + default: + return null; + } + } + + static Name fromStringValue(String s) { + if (s == 'day') { + return Name.day; + } + if (s == 'hour') { + return Name.hour; + } + if (s == 'minute') { + return Name.minute; + } + if (s == 'second') { + return Name.second; + } + if (s == 'millisecond') { + return Name.millisecond; + } + if (s == 'microsecond') { + return Name.microsecond; + } + if (s == 'week') { + return Name.week; + } + if (s == 'month') { + return Name.month; + } + if (s == 'quarter') { + return Name.quarter; + } + if (s == 'year') { + return Name.year; + } + return null; + } +} + +class OauthClientApp { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _clientGuid; + bool _clientGuidSet = false; + + String _redirectUri; + bool _redirectUriSet = false; + + String _displayName; + bool _displayNameSet = false; + + String _description; + bool _descriptionSet = false; + + bool _enabled; + bool _enabledSet = false; + + int _groupId; + bool _groupIdSet = false; + + DateTime _tokensInvalidBefore; + bool _tokensInvalidBeforeSet = false; + + List _activatedUsers; + bool _activatedUsersSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// The globally unique id of this application (read-only) + + String get clientGuid { + if (!_clientGuidSet && _apiMapResponse.containsKey('client_guid')) { + _clientGuid = _apiMapResponse['client_guid'] == null + ? null + : _apiMapResponse['client_guid'].toString(); + _clientGuidSet = true; + } + return _clientGuid; + } + + set clientGuid(String v) { + _clientGuid = v; + _clientGuidSet = true; + } + + /// The uri with which this application will receive an auth code by browser redirect. + + String get redirectUri { + if (!_redirectUriSet && _apiMapResponse.containsKey('redirect_uri')) { + _redirectUri = _apiMapResponse['redirect_uri'] == null + ? null + : _apiMapResponse['redirect_uri'].toString(); + _redirectUriSet = true; + } + return _redirectUri; + } + + set redirectUri(String v) { + _redirectUri = v; + _redirectUriSet = true; + } + + /// The application's display name + + String get displayName { + if (!_displayNameSet && _apiMapResponse.containsKey('display_name')) { + _displayName = _apiMapResponse['display_name'] == null + ? null + : _apiMapResponse['display_name'].toString(); + _displayNameSet = true; + } + return _displayName; + } + + set displayName(String v) { + _displayName = v; + _displayNameSet = true; + } + + /// A description of the application that will be displayed to users + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// When enabled is true, OAuth2 and API requests will be accepted from this app. When false, all requests from this app will be refused. + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// If set, only Looker users who are members of this group can use this web app with Looker. If group_id is not set, any Looker user may use this app to access this Looker instance + + int get groupId { + if (!_groupIdSet && _apiMapResponse.containsKey('group_id')) { + _groupId = _apiMapResponse['group_id']; + _groupIdSet = true; + } + return _groupId; + } + + set groupId(int v) { + _groupId = v; + _groupIdSet = true; + } + + /// All auth codes, access tokens, and refresh tokens issued for this application prior to this date-time for ALL USERS will be invalid. (read-only) + + DateTime get tokensInvalidBefore { + if (!_tokensInvalidBeforeSet && + _apiMapResponse.containsKey('tokens_invalid_before')) { + _tokensInvalidBefore = _apiMapResponse['tokens_invalid_before'] == null + ? null + : DateTime.parse(_apiMapResponse['tokens_invalid_before']); + _tokensInvalidBeforeSet = true; + } + return _tokensInvalidBefore; + } + + set tokensInvalidBefore(DateTime v) { + _tokensInvalidBefore = v; + _tokensInvalidBeforeSet = true; + } + + /// All users who have been activated to use this app (read-only) + + List get activatedUsers { + if (!_activatedUsersSet && _apiMapResponse.containsKey('activated_users')) { + _activatedUsers = _apiMapResponse['activated_users'] == null + ? null + : (_apiMapResponse['activated_users'] as List) + .map((i) => UserPublic.fromResponse(i, apiResponseContentType)) + .toList(); + _activatedUsersSet = true; + } + return _activatedUsers; + } + + set activatedUsers(List v) { + _activatedUsers = v; + _activatedUsersSet = true; + } + + OauthClientApp() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + OauthClientApp.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_clientGuidSet || _apiMapResponse.containsKey('client_guid')) { + json['client_guid'] = clientGuid; + } + if (_redirectUriSet || _apiMapResponse.containsKey('redirect_uri')) { + json['redirect_uri'] = redirectUri; + } + if (_displayNameSet || _apiMapResponse.containsKey('display_name')) { + json['display_name'] = displayName; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_groupIdSet || _apiMapResponse.containsKey('group_id')) { + json['group_id'] = groupId; + } + if (_tokensInvalidBeforeSet || + _apiMapResponse.containsKey('tokens_invalid_before')) { + json['tokens_invalid_before'] = tokensInvalidBefore == null + ? null + : tokensInvalidBefore.toIso8601String(); + } + if (_activatedUsersSet || _apiMapResponse.containsKey('activated_users')) { + json['activated_users'] = activatedUsers == null + ? null + : activatedUsers.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class OIDCConfig { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + bool _alternateEmailLoginAllowed; + bool _alternateEmailLoginAllowedSet = false; + + String _audience; + bool _audienceSet = false; + + bool _authRequiresRole; + bool _authRequiresRoleSet = false; + + String _authorizationEndpoint; + bool _authorizationEndpointSet = false; + + List _defaultNewUserGroupIds; + bool _defaultNewUserGroupIdsSet = false; + + List _defaultNewUserGroups; + bool _defaultNewUserGroupsSet = false; + + List _defaultNewUserRoleIds; + bool _defaultNewUserRoleIdsSet = false; + + List _defaultNewUserRoles; + bool _defaultNewUserRolesSet = false; + + bool _enabled; + bool _enabledSet = false; + + List _groups; + bool _groupsSet = false; + + String _groupsAttribute; + bool _groupsAttributeSet = false; + + List _groupsWithRoleIds; + bool _groupsWithRoleIdsSet = false; + + String _identifier; + bool _identifierSet = false; + + String _issuer; + bool _issuerSet = false; + + DateTime _modifiedAt; + bool _modifiedAtSet = false; + + int _modifiedBy; + bool _modifiedBySet = false; + + String _newUserMigrationTypes; + bool _newUserMigrationTypesSet = false; + + List _scopes; + bool _scopesSet = false; + + String _secret; + bool _secretSet = false; + + bool _setRolesFromGroups; + bool _setRolesFromGroupsSet = false; + + String _testSlug; + bool _testSlugSet = false; + + String _tokenEndpoint; + bool _tokenEndpointSet = false; + + String _userAttributeMapEmail; + bool _userAttributeMapEmailSet = false; + + String _userAttributeMapFirstName; + bool _userAttributeMapFirstNameSet = false; + + String _userAttributeMapLastName; + bool _userAttributeMapLastNameSet = false; + + List _userAttributes; + bool _userAttributesSet = false; + + List _userAttributesWithIds; + bool _userAttributesWithIdsSet = false; + + String _userinfoEndpoint; + bool _userinfoEndpointSet = false; + + bool _allowNormalGroupMembership; + bool _allowNormalGroupMembershipSet = false; + + bool _allowRolesFromNormalGroups; + bool _allowRolesFromNormalGroupsSet = false; + + bool _allowDirectRoles; + bool _allowDirectRolesSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Allow alternate email-based login via '/login/email' for admins and for specified users with the 'login_special_email' permission. This option is useful as a fallback during ldap setup, if ldap config problems occur later, or if you need to support some users who are not in your ldap directory. Looker email/password logins are always disabled for regular users when ldap is enabled. + + bool get alternateEmailLoginAllowed { + if (!_alternateEmailLoginAllowedSet && + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + _alternateEmailLoginAllowed = + _apiMapResponse['alternate_email_login_allowed']; + _alternateEmailLoginAllowedSet = true; + } + return _alternateEmailLoginAllowed; + } + + set alternateEmailLoginAllowed(bool v) { + _alternateEmailLoginAllowed = v; + _alternateEmailLoginAllowedSet = true; + } + + /// OpenID Provider Audience + + String get audience { + if (!_audienceSet && _apiMapResponse.containsKey('audience')) { + _audience = _apiMapResponse['audience'] == null + ? null + : _apiMapResponse['audience'].toString(); + _audienceSet = true; + } + return _audience; + } + + set audience(String v) { + _audience = v; + _audienceSet = true; + } + + /// Users will not be allowed to login at all unless a role for them is found in OIDC if set to true + + bool get authRequiresRole { + if (!_authRequiresRoleSet && + _apiMapResponse.containsKey('auth_requires_role')) { + _authRequiresRole = _apiMapResponse['auth_requires_role']; + _authRequiresRoleSet = true; + } + return _authRequiresRole; + } + + set authRequiresRole(bool v) { + _authRequiresRole = v; + _authRequiresRoleSet = true; + } + + /// OpenID Provider Authorization Url + + String get authorizationEndpoint { + if (!_authorizationEndpointSet && + _apiMapResponse.containsKey('authorization_endpoint')) { + _authorizationEndpoint = _apiMapResponse['authorization_endpoint'] == null + ? null + : _apiMapResponse['authorization_endpoint'].toString(); + _authorizationEndpointSet = true; + } + return _authorizationEndpoint; + } + + set authorizationEndpoint(String v) { + _authorizationEndpoint = v; + _authorizationEndpointSet = true; + } + + /// (Write-Only) Array of ids of groups that will be applied to new users the first time they login via OIDC + + List get defaultNewUserGroupIds { + if (!_defaultNewUserGroupIdsSet && + _apiMapResponse.containsKey('default_new_user_group_ids')) { + _defaultNewUserGroupIds = + _apiMapResponse['default_new_user_group_ids'] == null + ? null + : _apiMapResponse['default_new_user_group_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserGroupIdsSet = true; + } + return _defaultNewUserGroupIds; + } + + set defaultNewUserGroupIds(List v) { + _defaultNewUserGroupIds = v; + _defaultNewUserGroupIdsSet = true; + } + + /// (Read-only) Groups that will be applied to new users the first time they login via OIDC (read-only) + + List get defaultNewUserGroups { + if (!_defaultNewUserGroupsSet && + _apiMapResponse.containsKey('default_new_user_groups')) { + _defaultNewUserGroups = _apiMapResponse['default_new_user_groups'] == null + ? null + : (_apiMapResponse['default_new_user_groups'] as List) + .map((i) => Group.fromResponse(i, apiResponseContentType)) + .toList(); + _defaultNewUserGroupsSet = true; + } + return _defaultNewUserGroups; + } + + set defaultNewUserGroups(List v) { + _defaultNewUserGroups = v; + _defaultNewUserGroupsSet = true; + } + + /// (Write-Only) Array of ids of roles that will be applied to new users the first time they login via OIDC + + List get defaultNewUserRoleIds { + if (!_defaultNewUserRoleIdsSet && + _apiMapResponse.containsKey('default_new_user_role_ids')) { + _defaultNewUserRoleIds = + _apiMapResponse['default_new_user_role_ids'] == null + ? null + : _apiMapResponse['default_new_user_role_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserRoleIdsSet = true; + } + return _defaultNewUserRoleIds; + } + + set defaultNewUserRoleIds(List v) { + _defaultNewUserRoleIds = v; + _defaultNewUserRoleIdsSet = true; + } + + /// (Read-only) Roles that will be applied to new users the first time they login via OIDC (read-only) + + List get defaultNewUserRoles { + if (!_defaultNewUserRolesSet && + _apiMapResponse.containsKey('default_new_user_roles')) { + _defaultNewUserRoles = _apiMapResponse['default_new_user_roles'] == null + ? null + : (_apiMapResponse['default_new_user_roles'] as List) + .map((i) => Role.fromResponse(i, apiResponseContentType)) + .toList(); + _defaultNewUserRolesSet = true; + } + return _defaultNewUserRoles; + } + + set defaultNewUserRoles(List v) { + _defaultNewUserRoles = v; + _defaultNewUserRolesSet = true; + } + + /// Enable/Disable OIDC authentication for the server + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// (Read-only) Array of mappings between OIDC Groups and Looker Roles (read-only) + + List get groups { + if (!_groupsSet && _apiMapResponse.containsKey('groups')) { + _groups = _apiMapResponse['groups'] == null + ? null + : (_apiMapResponse['groups'] as List) + .map((i) => OIDCGroupRead.fromResponse(i, apiResponseContentType)) + .toList(); + _groupsSet = true; + } + return _groups; + } + + set groups(List v) { + _groups = v; + _groupsSet = true; + } + + /// Name of user record attributes used to indicate groups. Used when 'groups_finder_type' is set to 'grouped_attribute_values' + + String get groupsAttribute { + if (!_groupsAttributeSet && + _apiMapResponse.containsKey('groups_attribute')) { + _groupsAttribute = _apiMapResponse['groups_attribute'] == null + ? null + : _apiMapResponse['groups_attribute'].toString(); + _groupsAttributeSet = true; + } + return _groupsAttribute; + } + + set groupsAttribute(String v) { + _groupsAttribute = v; + _groupsAttributeSet = true; + } + + /// (Read/Write) Array of mappings between OIDC Groups and arrays of Looker Role ids + + List get groupsWithRoleIds { + if (!_groupsWithRoleIdsSet && + _apiMapResponse.containsKey('groups_with_role_ids')) { + _groupsWithRoleIds = _apiMapResponse['groups_with_role_ids'] == null + ? null + : (_apiMapResponse['groups_with_role_ids'] as List) + .map( + (i) => OIDCGroupWrite.fromResponse(i, apiResponseContentType)) + .toList(); + _groupsWithRoleIdsSet = true; + } + return _groupsWithRoleIds; + } + + set groupsWithRoleIds(List v) { + _groupsWithRoleIds = v; + _groupsWithRoleIdsSet = true; + } + + /// Relying Party Identifier (provided by OpenID Provider) + + String get identifier { + if (!_identifierSet && _apiMapResponse.containsKey('identifier')) { + _identifier = _apiMapResponse['identifier'] == null + ? null + : _apiMapResponse['identifier'].toString(); + _identifierSet = true; + } + return _identifier; + } + + set identifier(String v) { + _identifier = v; + _identifierSet = true; + } + + /// OpenID Provider Issuer + + String get issuer { + if (!_issuerSet && _apiMapResponse.containsKey('issuer')) { + _issuer = _apiMapResponse['issuer'] == null + ? null + : _apiMapResponse['issuer'].toString(); + _issuerSet = true; + } + return _issuer; + } + + set issuer(String v) { + _issuer = v; + _issuerSet = true; + } + + /// When this config was last modified (read-only) + + DateTime get modifiedAt { + if (!_modifiedAtSet && _apiMapResponse.containsKey('modified_at')) { + _modifiedAt = _apiMapResponse['modified_at'] == null + ? null + : DateTime.parse(_apiMapResponse['modified_at']); + _modifiedAtSet = true; + } + return _modifiedAt; + } + + set modifiedAt(DateTime v) { + _modifiedAt = v; + _modifiedAtSet = true; + } + + /// User id of user who last modified this config (read-only) + + int get modifiedBy { + if (!_modifiedBySet && _apiMapResponse.containsKey('modified_by')) { + _modifiedBy = _apiMapResponse['modified_by']; + _modifiedBySet = true; + } + return _modifiedBy; + } + + set modifiedBy(int v) { + _modifiedBy = v; + _modifiedBySet = true; + } + + /// Merge first-time oidc login to existing user account by email addresses. When a user logs in for the first time via oidc this option will connect this user into their existing account by finding the account with a matching email address by testing the given types of credentials for existing users. Otherwise a new user account will be created for the user. This list (if provided) must be a comma separated list of string like 'email,ldap,google' + + String get newUserMigrationTypes { + if (!_newUserMigrationTypesSet && + _apiMapResponse.containsKey('new_user_migration_types')) { + _newUserMigrationTypes = + _apiMapResponse['new_user_migration_types'] == null + ? null + : _apiMapResponse['new_user_migration_types'].toString(); + _newUserMigrationTypesSet = true; + } + return _newUserMigrationTypes; + } + + set newUserMigrationTypes(String v) { + _newUserMigrationTypes = v; + _newUserMigrationTypesSet = true; + } + + /// Array of scopes to request. + + List get scopes { + if (!_scopesSet && _apiMapResponse.containsKey('scopes')) { + _scopes = _apiMapResponse['scopes'] == null + ? null + : _apiMapResponse['scopes'].map((i) => i as String).toList(); + _scopesSet = true; + } + return _scopes; + } + + set scopes(List v) { + _scopes = v; + _scopesSet = true; + } + + /// (Write-Only) Relying Party Secret (provided by OpenID Provider) + + String get secret { + if (!_secretSet && _apiMapResponse.containsKey('secret')) { + _secret = _apiMapResponse['secret'] == null + ? null + : _apiMapResponse['secret'].toString(); + _secretSet = true; + } + return _secret; + } + + set secret(String v) { + _secret = v; + _secretSet = true; + } + + /// Set user roles in Looker based on groups from OIDC + + bool get setRolesFromGroups { + if (!_setRolesFromGroupsSet && + _apiMapResponse.containsKey('set_roles_from_groups')) { + _setRolesFromGroups = _apiMapResponse['set_roles_from_groups']; + _setRolesFromGroupsSet = true; + } + return _setRolesFromGroups; + } + + set setRolesFromGroups(bool v) { + _setRolesFromGroups = v; + _setRolesFromGroupsSet = true; + } + + /// Slug to identify configurations that are created in order to run a OIDC config test (read-only) + + String get testSlug { + if (!_testSlugSet && _apiMapResponse.containsKey('test_slug')) { + _testSlug = _apiMapResponse['test_slug'] == null + ? null + : _apiMapResponse['test_slug'].toString(); + _testSlugSet = true; + } + return _testSlug; + } + + set testSlug(String v) { + _testSlug = v; + _testSlugSet = true; + } + + /// OpenID Provider Token Url + + String get tokenEndpoint { + if (!_tokenEndpointSet && _apiMapResponse.containsKey('token_endpoint')) { + _tokenEndpoint = _apiMapResponse['token_endpoint'] == null + ? null + : _apiMapResponse['token_endpoint'].toString(); + _tokenEndpointSet = true; + } + return _tokenEndpoint; + } + + set tokenEndpoint(String v) { + _tokenEndpoint = v; + _tokenEndpointSet = true; + } + + /// Name of user record attributes used to indicate email address field + + String get userAttributeMapEmail { + if (!_userAttributeMapEmailSet && + _apiMapResponse.containsKey('user_attribute_map_email')) { + _userAttributeMapEmail = + _apiMapResponse['user_attribute_map_email'] == null + ? null + : _apiMapResponse['user_attribute_map_email'].toString(); + _userAttributeMapEmailSet = true; + } + return _userAttributeMapEmail; + } + + set userAttributeMapEmail(String v) { + _userAttributeMapEmail = v; + _userAttributeMapEmailSet = true; + } + + /// Name of user record attributes used to indicate first name + + String get userAttributeMapFirstName { + if (!_userAttributeMapFirstNameSet && + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + _userAttributeMapFirstName = + _apiMapResponse['user_attribute_map_first_name'] == null + ? null + : _apiMapResponse['user_attribute_map_first_name'].toString(); + _userAttributeMapFirstNameSet = true; + } + return _userAttributeMapFirstName; + } + + set userAttributeMapFirstName(String v) { + _userAttributeMapFirstName = v; + _userAttributeMapFirstNameSet = true; + } + + /// Name of user record attributes used to indicate last name + + String get userAttributeMapLastName { + if (!_userAttributeMapLastNameSet && + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + _userAttributeMapLastName = + _apiMapResponse['user_attribute_map_last_name'] == null + ? null + : _apiMapResponse['user_attribute_map_last_name'].toString(); + _userAttributeMapLastNameSet = true; + } + return _userAttributeMapLastName; + } + + set userAttributeMapLastName(String v) { + _userAttributeMapLastName = v; + _userAttributeMapLastNameSet = true; + } + + /// (Read-only) Array of mappings between OIDC User Attributes and Looker User Attributes (read-only) + + List get userAttributes { + if (!_userAttributesSet && _apiMapResponse.containsKey('user_attributes')) { + _userAttributes = _apiMapResponse['user_attributes'] == null + ? null + : (_apiMapResponse['user_attributes'] as List) + .map((i) => + OIDCUserAttributeRead.fromResponse(i, apiResponseContentType)) + .toList(); + _userAttributesSet = true; + } + return _userAttributes; + } + + set userAttributes(List v) { + _userAttributes = v; + _userAttributesSet = true; + } + + /// (Read/Write) Array of mappings between OIDC User Attributes and arrays of Looker User Attribute ids + + List get userAttributesWithIds { + if (!_userAttributesWithIdsSet && + _apiMapResponse.containsKey('user_attributes_with_ids')) { + _userAttributesWithIds = + _apiMapResponse['user_attributes_with_ids'] == null + ? null + : (_apiMapResponse['user_attributes_with_ids'] as List) + .map((i) => OIDCUserAttributeWrite.fromResponse( + i, apiResponseContentType)) + .toList(); + _userAttributesWithIdsSet = true; + } + return _userAttributesWithIds; + } + + set userAttributesWithIds(List v) { + _userAttributesWithIds = v; + _userAttributesWithIdsSet = true; + } + + /// OpenID Provider User Information Url + + String get userinfoEndpoint { + if (!_userinfoEndpointSet && + _apiMapResponse.containsKey('userinfo_endpoint')) { + _userinfoEndpoint = _apiMapResponse['userinfo_endpoint'] == null + ? null + : _apiMapResponse['userinfo_endpoint'].toString(); + _userinfoEndpointSet = true; + } + return _userinfoEndpoint; + } + + set userinfoEndpoint(String v) { + _userinfoEndpoint = v; + _userinfoEndpointSet = true; + } + + /// Allow OIDC auth'd users to be members of non-reflected Looker groups. If 'false', user will be removed from non-reflected groups on login. + + bool get allowNormalGroupMembership { + if (!_allowNormalGroupMembershipSet && + _apiMapResponse.containsKey('allow_normal_group_membership')) { + _allowNormalGroupMembership = + _apiMapResponse['allow_normal_group_membership']; + _allowNormalGroupMembershipSet = true; + } + return _allowNormalGroupMembership; + } + + set allowNormalGroupMembership(bool v) { + _allowNormalGroupMembership = v; + _allowNormalGroupMembershipSet = true; + } + + /// OIDC auth'd users will inherit roles from non-reflected Looker groups. + + bool get allowRolesFromNormalGroups { + if (!_allowRolesFromNormalGroupsSet && + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + _allowRolesFromNormalGroups = + _apiMapResponse['allow_roles_from_normal_groups']; + _allowRolesFromNormalGroupsSet = true; + } + return _allowRolesFromNormalGroups; + } + + set allowRolesFromNormalGroups(bool v) { + _allowRolesFromNormalGroups = v; + _allowRolesFromNormalGroupsSet = true; + } + + /// Allows roles to be directly assigned to OIDC auth'd users. + + bool get allowDirectRoles { + if (!_allowDirectRolesSet && + _apiMapResponse.containsKey('allow_direct_roles')) { + _allowDirectRoles = _apiMapResponse['allow_direct_roles']; + _allowDirectRolesSet = true; + } + return _allowDirectRoles; + } + + set allowDirectRoles(bool v) { + _allowDirectRoles = v; + _allowDirectRolesSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + OIDCConfig() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + OIDCConfig.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_alternateEmailLoginAllowedSet || + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + json['alternate_email_login_allowed'] = alternateEmailLoginAllowed; + } + if (_audienceSet || _apiMapResponse.containsKey('audience')) { + json['audience'] = audience; + } + if (_authRequiresRoleSet || + _apiMapResponse.containsKey('auth_requires_role')) { + json['auth_requires_role'] = authRequiresRole; + } + if (_authorizationEndpointSet || + _apiMapResponse.containsKey('authorization_endpoint')) { + json['authorization_endpoint'] = authorizationEndpoint; + } + if (_defaultNewUserGroupIdsSet || + _apiMapResponse.containsKey('default_new_user_group_ids')) { + json['default_new_user_group_ids'] = defaultNewUserGroupIds; + } + if (_defaultNewUserGroupsSet || + _apiMapResponse.containsKey('default_new_user_groups')) { + json['default_new_user_groups'] = defaultNewUserGroups == null + ? null + : defaultNewUserGroups.map((i) => i.toJson()).toList(); + } + if (_defaultNewUserRoleIdsSet || + _apiMapResponse.containsKey('default_new_user_role_ids')) { + json['default_new_user_role_ids'] = defaultNewUserRoleIds; + } + if (_defaultNewUserRolesSet || + _apiMapResponse.containsKey('default_new_user_roles')) { + json['default_new_user_roles'] = defaultNewUserRoles == null + ? null + : defaultNewUserRoles.map((i) => i.toJson()).toList(); + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_groupsSet || _apiMapResponse.containsKey('groups')) { + json['groups'] = + groups == null ? null : groups.map((i) => i.toJson()).toList(); + } + if (_groupsAttributeSet || + _apiMapResponse.containsKey('groups_attribute')) { + json['groups_attribute'] = groupsAttribute; + } + if (_groupsWithRoleIdsSet || + _apiMapResponse.containsKey('groups_with_role_ids')) { + json['groups_with_role_ids'] = groupsWithRoleIds == null + ? null + : groupsWithRoleIds.map((i) => i.toJson()).toList(); + } + if (_identifierSet || _apiMapResponse.containsKey('identifier')) { + json['identifier'] = identifier; + } + if (_issuerSet || _apiMapResponse.containsKey('issuer')) { + json['issuer'] = issuer; + } + if (_modifiedAtSet || _apiMapResponse.containsKey('modified_at')) { + json['modified_at'] = + modifiedAt == null ? null : modifiedAt.toIso8601String(); + } + if (_modifiedBySet || _apiMapResponse.containsKey('modified_by')) { + json['modified_by'] = modifiedBy; + } + if (_newUserMigrationTypesSet || + _apiMapResponse.containsKey('new_user_migration_types')) { + json['new_user_migration_types'] = newUserMigrationTypes; + } + if (_scopesSet || _apiMapResponse.containsKey('scopes')) { + json['scopes'] = scopes; + } + if (_secretSet || _apiMapResponse.containsKey('secret')) { + json['secret'] = secret; + } + if (_setRolesFromGroupsSet || + _apiMapResponse.containsKey('set_roles_from_groups')) { + json['set_roles_from_groups'] = setRolesFromGroups; + } + if (_testSlugSet || _apiMapResponse.containsKey('test_slug')) { + json['test_slug'] = testSlug; + } + if (_tokenEndpointSet || _apiMapResponse.containsKey('token_endpoint')) { + json['token_endpoint'] = tokenEndpoint; + } + if (_userAttributeMapEmailSet || + _apiMapResponse.containsKey('user_attribute_map_email')) { + json['user_attribute_map_email'] = userAttributeMapEmail; + } + if (_userAttributeMapFirstNameSet || + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + json['user_attribute_map_first_name'] = userAttributeMapFirstName; + } + if (_userAttributeMapLastNameSet || + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + json['user_attribute_map_last_name'] = userAttributeMapLastName; + } + if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { + json['user_attributes'] = userAttributes == null + ? null + : userAttributes.map((i) => i.toJson()).toList(); + } + if (_userAttributesWithIdsSet || + _apiMapResponse.containsKey('user_attributes_with_ids')) { + json['user_attributes_with_ids'] = userAttributesWithIds == null + ? null + : userAttributesWithIds.map((i) => i.toJson()).toList(); + } + if (_userinfoEndpointSet || + _apiMapResponse.containsKey('userinfo_endpoint')) { + json['userinfo_endpoint'] = userinfoEndpoint; + } + if (_allowNormalGroupMembershipSet || + _apiMapResponse.containsKey('allow_normal_group_membership')) { + json['allow_normal_group_membership'] = allowNormalGroupMembership; + } + if (_allowRolesFromNormalGroupsSet || + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + json['allow_roles_from_normal_groups'] = allowRolesFromNormalGroups; + } + if (_allowDirectRolesSet || + _apiMapResponse.containsKey('allow_direct_roles')) { + json['allow_direct_roles'] = allowDirectRoles; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class OIDCGroupRead { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + int _lookerGroupId; + bool _lookerGroupIdSet = false; + + String _lookerGroupName; + bool _lookerGroupNameSet = false; + + String _name; + bool _nameSet = false; + + List _roles; + bool _rolesSet = false; + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Unique Id of group in Looker (read-only) + + int get lookerGroupId { + if (!_lookerGroupIdSet && _apiMapResponse.containsKey('looker_group_id')) { + _lookerGroupId = _apiMapResponse['looker_group_id']; + _lookerGroupIdSet = true; + } + return _lookerGroupId; + } + + set lookerGroupId(int v) { + _lookerGroupId = v; + _lookerGroupIdSet = true; + } + + /// Name of group in Looker (read-only) + + String get lookerGroupName { + if (!_lookerGroupNameSet && + _apiMapResponse.containsKey('looker_group_name')) { + _lookerGroupName = _apiMapResponse['looker_group_name'] == null + ? null + : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupNameSet = true; + } + return _lookerGroupName; + } + + set lookerGroupName(String v) { + _lookerGroupName = v; + _lookerGroupNameSet = true; + } + + /// Name of group in OIDC (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Looker Roles (read-only) + + List get roles { + if (!_rolesSet && _apiMapResponse.containsKey('roles')) { + _roles = _apiMapResponse['roles'] == null + ? null + : (_apiMapResponse['roles'] as List) + .map((i) => Role.fromResponse(i, apiResponseContentType)) + .toList(); + _rolesSet = true; + } + return _roles; + } + + set roles(List v) { + _roles = v; + _rolesSet = true; + } + + OIDCGroupRead() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + OIDCGroupRead.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookerGroupIdSet || _apiMapResponse.containsKey('looker_group_id')) { + json['looker_group_id'] = lookerGroupId; + } + if (_lookerGroupNameSet || + _apiMapResponse.containsKey('looker_group_name')) { + json['looker_group_name'] = lookerGroupName; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_rolesSet || _apiMapResponse.containsKey('roles')) { + json['roles'] = + roles == null ? null : roles.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class OIDCGroupWrite { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + int _lookerGroupId; + bool _lookerGroupIdSet = false; + + String _lookerGroupName; + bool _lookerGroupNameSet = false; + + String _name; + bool _nameSet = false; + + List _roleIds; + bool _roleIdsSet = false; + + /// Unique Id + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Unique Id of group in Looker (read-only) + + int get lookerGroupId { + if (!_lookerGroupIdSet && _apiMapResponse.containsKey('looker_group_id')) { + _lookerGroupId = _apiMapResponse['looker_group_id']; + _lookerGroupIdSet = true; + } + return _lookerGroupId; + } + + set lookerGroupId(int v) { + _lookerGroupId = v; + _lookerGroupIdSet = true; + } + + /// Name of group in Looker + + String get lookerGroupName { + if (!_lookerGroupNameSet && + _apiMapResponse.containsKey('looker_group_name')) { + _lookerGroupName = _apiMapResponse['looker_group_name'] == null + ? null + : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupNameSet = true; + } + return _lookerGroupName; + } + + set lookerGroupName(String v) { + _lookerGroupName = v; + _lookerGroupNameSet = true; + } + + /// Name of group in OIDC + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Looker Role Ids + + List get roleIds { + if (!_roleIdsSet && _apiMapResponse.containsKey('role_ids')) { + _roleIds = _apiMapResponse['role_ids'] == null + ? null + : _apiMapResponse['role_ids'].map((i) => i as int).toList(); + _roleIdsSet = true; + } + return _roleIds; + } + + set roleIds(List v) { + _roleIds = v; + _roleIdsSet = true; + } + + OIDCGroupWrite() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + OIDCGroupWrite.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookerGroupIdSet || _apiMapResponse.containsKey('looker_group_id')) { + json['looker_group_id'] = lookerGroupId; + } + if (_lookerGroupNameSet || + _apiMapResponse.containsKey('looker_group_name')) { + json['looker_group_name'] = lookerGroupName; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_roleIdsSet || _apiMapResponse.containsKey('role_ids')) { + json['role_ids'] = roleIds; + } + return json; + } +} + +class OIDCUserAttributeRead { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + bool _required; + bool _requiredSet = false; + + List _userAttributes; + bool _userAttributesSet = false; + + /// Name of User Attribute in OIDC (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Required to be in OIDC assertion for login to be allowed to succeed (read-only) + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// Looker User Attributes (read-only) + + List get userAttributes { + if (!_userAttributesSet && _apiMapResponse.containsKey('user_attributes')) { + _userAttributes = _apiMapResponse['user_attributes'] == null + ? null + : (_apiMapResponse['user_attributes'] as List) + .map((i) => UserAttribute.fromResponse(i, apiResponseContentType)) + .toList(); + _userAttributesSet = true; + } + return _userAttributes; + } + + set userAttributes(List v) { + _userAttributes = v; + _userAttributesSet = true; + } + + OIDCUserAttributeRead() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + OIDCUserAttributeRead.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { + json['user_attributes'] = userAttributes == null + ? null + : userAttributes.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class OIDCUserAttributeWrite { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + bool _required; + bool _requiredSet = false; + + List _userAttributeIds; + bool _userAttributeIdsSet = false; + + /// Name of User Attribute in OIDC + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Required to be in OIDC assertion for login to be allowed to succeed + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// Looker User Attribute Ids + + List get userAttributeIds { + if (!_userAttributeIdsSet && + _apiMapResponse.containsKey('user_attribute_ids')) { + _userAttributeIds = _apiMapResponse['user_attribute_ids'] == null + ? null + : _apiMapResponse['user_attribute_ids'] + .map((i) => i as int) + .toList(); + _userAttributeIdsSet = true; + } + return _userAttributeIds; + } + + set userAttributeIds(List v) { + _userAttributeIds = v; + _userAttributeIdsSet = true; + } + + OIDCUserAttributeWrite() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + OIDCUserAttributeWrite.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_userAttributeIdsSet || + _apiMapResponse.containsKey('user_attribute_ids')) { + json['user_attribute_ids'] = userAttributeIds; + } + return json; + } +} + +class PasswordConfig { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _minLength; + bool _minLengthSet = false; + + bool _requireNumeric; + bool _requireNumericSet = false; + + bool _requireUpperlower; + bool _requireUpperlowerSet = false; + + bool _requireSpecial; + bool _requireSpecialSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Minimum number of characters required for a new password. Must be between 7 and 100 + + int get minLength { + if (!_minLengthSet && _apiMapResponse.containsKey('min_length')) { + _minLength = _apiMapResponse['min_length']; + _minLengthSet = true; + } + return _minLength; + } + + set minLength(int v) { + _minLength = v; + _minLengthSet = true; + } + + /// Require at least one numeric character + + bool get requireNumeric { + if (!_requireNumericSet && _apiMapResponse.containsKey('require_numeric')) { + _requireNumeric = _apiMapResponse['require_numeric']; + _requireNumericSet = true; + } + return _requireNumeric; + } + + set requireNumeric(bool v) { + _requireNumeric = v; + _requireNumericSet = true; + } + + /// Require at least one uppercase and one lowercase letter + + bool get requireUpperlower { + if (!_requireUpperlowerSet && + _apiMapResponse.containsKey('require_upperlower')) { + _requireUpperlower = _apiMapResponse['require_upperlower']; + _requireUpperlowerSet = true; + } + return _requireUpperlower; + } + + set requireUpperlower(bool v) { + _requireUpperlower = v; + _requireUpperlowerSet = true; + } + + /// Require at least one special character + + bool get requireSpecial { + if (!_requireSpecialSet && _apiMapResponse.containsKey('require_special')) { + _requireSpecial = _apiMapResponse['require_special']; + _requireSpecialSet = true; + } + return _requireSpecial; + } + + set requireSpecial(bool v) { + _requireSpecial = v; + _requireSpecialSet = true; + } + + PasswordConfig() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + PasswordConfig.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_minLengthSet || _apiMapResponse.containsKey('min_length')) { + json['min_length'] = minLength; + } + if (_requireNumericSet || _apiMapResponse.containsKey('require_numeric')) { + json['require_numeric'] = requireNumeric; + } + if (_requireUpperlowerSet || + _apiMapResponse.containsKey('require_upperlower')) { + json['require_upperlower'] = requireUpperlower; + } + if (_requireSpecialSet || _apiMapResponse.containsKey('require_special')) { + json['require_special'] = requireSpecial; + } + return json; + } +} + +class Permission { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _permission; + bool _permissionSet = false; + + String _parent; + bool _parentSet = false; + + String _description; + bool _descriptionSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Permission symbol (read-only) + + String get permission { + if (!_permissionSet && _apiMapResponse.containsKey('permission')) { + _permission = _apiMapResponse['permission'] == null + ? null + : _apiMapResponse['permission'].toString(); + _permissionSet = true; + } + return _permission; + } + + set permission(String v) { + _permission = v; + _permissionSet = true; + } + + /// Dependency parent symbol (read-only) + + String get parent { + if (!_parentSet && _apiMapResponse.containsKey('parent')) { + _parent = _apiMapResponse['parent'] == null + ? null + : _apiMapResponse['parent'].toString(); + _parentSet = true; + } + return _parent; + } + + set parent(String v) { + _parent = v; + _parentSet = true; + } + + /// Description (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + Permission() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Permission.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_permissionSet || _apiMapResponse.containsKey('permission')) { + json['permission'] = permission; + } + if (_parentSet || _apiMapResponse.containsKey('parent')) { + json['parent'] = parent; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + return json; + } +} + +class PermissionSet { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + bool _allAccess; + bool _allAccessSet = false; + + bool _builtIn; + bool _builtInSet = false; + + int _id; + bool _idSet = false; + + String _name; + bool _nameSet = false; + + List _permissions; + bool _permissionsSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// (read-only) + + bool get allAccess { + if (!_allAccessSet && _apiMapResponse.containsKey('all_access')) { + _allAccess = _apiMapResponse['all_access']; + _allAccessSet = true; + } + return _allAccess; + } + + set allAccess(bool v) { + _allAccess = v; + _allAccessSet = true; + } + + /// (read-only) + + bool get builtIn { + if (!_builtInSet && _apiMapResponse.containsKey('built_in')) { + _builtIn = _apiMapResponse['built_in']; + _builtInSet = true; + } + return _builtIn; + } + + set builtIn(bool v) { + _builtIn = v; + _builtInSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Name of PermissionSet + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + List get permissions { + if (!_permissionsSet && _apiMapResponse.containsKey('permissions')) { + _permissions = _apiMapResponse['permissions'] == null + ? null + : _apiMapResponse['permissions'] + .map((i) => i as String) + .toList(); + _permissionsSet = true; + } + return _permissions; + } + + set permissions(List v) { + _permissions = v; + _permissionsSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + PermissionSet() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + PermissionSet.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_allAccessSet || _apiMapResponse.containsKey('all_access')) { + json['all_access'] = allAccess; + } + if (_builtInSet || _apiMapResponse.containsKey('built_in')) { + json['built_in'] = builtIn; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_permissionsSet || _apiMapResponse.containsKey('permissions')) { + json['permissions'] = permissions; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +/// Type of permission: "view" or "edit" Valid values are: "view", "edit". (Enum defined in ContentMetaGroupUser) +enum PermissionType { view, edit } + +class PermissionTypeMapper { + static String toStringValue(PermissionType e) { + switch (e) { + case PermissionType.view: + return 'view'; + case PermissionType.edit: + return 'edit'; + + default: + return null; + } + } + + static PermissionType fromStringValue(String s) { + if (s == 'view') { + return PermissionType.view; + } + if (s == 'edit') { + return PermissionType.edit; + } + return null; + } +} + +class Project { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + String _name; + bool _nameSet = false; + + bool _usesGit; + bool _usesGitSet = false; + + String _gitRemoteUrl; + bool _gitRemoteUrlSet = false; + + String _gitUsername; + bool _gitUsernameSet = false; + + String _gitPassword; + bool _gitPasswordSet = false; + + String _gitProductionBranchName; + bool _gitProductionBranchNameSet = false; + + bool _useGitCookieAuth; + bool _useGitCookieAuthSet = false; + + String _gitUsernameUserAttribute; + bool _gitUsernameUserAttributeSet = false; + + String _gitPasswordUserAttribute; + bool _gitPasswordUserAttributeSet = false; + + String _gitServiceName; + bool _gitServiceNameSet = false; + + int _gitApplicationServerHttpPort; + bool _gitApplicationServerHttpPortSet = false; + + String _gitApplicationServerHttpScheme; + bool _gitApplicationServerHttpSchemeSet = false; + + String _deploySecret; + bool _deploySecretSet = false; + + bool _unsetDeploySecret; + bool _unsetDeploySecretSet = false; + + PullRequestMode _pullRequestMode; + bool _pullRequestModeSet = false; + + bool _validationRequired; + bool _validationRequiredSet = false; + + bool _gitReleaseMgmtEnabled; + bool _gitReleaseMgmtEnabledSet = false; + + bool _allowWarnings; + bool _allowWarningsSet = false; + + bool _isExample; + bool _isExampleSet = false; + + String _dependencyStatus; + bool _dependencyStatusSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Project Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Project display name + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// If true the project is configured with a git repository (read-only) + + bool get usesGit { + if (!_usesGitSet && _apiMapResponse.containsKey('uses_git')) { + _usesGit = _apiMapResponse['uses_git']; + _usesGitSet = true; + } + return _usesGit; + } + + set usesGit(bool v) { + _usesGit = v; + _usesGitSet = true; + } + + /// Git remote repository url + + String get gitRemoteUrl { + if (!_gitRemoteUrlSet && _apiMapResponse.containsKey('git_remote_url')) { + _gitRemoteUrl = _apiMapResponse['git_remote_url'] == null + ? null + : _apiMapResponse['git_remote_url'].toString(); + _gitRemoteUrlSet = true; + } + return _gitRemoteUrl; + } + + set gitRemoteUrl(String v) { + _gitRemoteUrl = v; + _gitRemoteUrlSet = true; + } + + /// Git username for HTTPS authentication. (For production only, if using user attributes.) + + String get gitUsername { + if (!_gitUsernameSet && _apiMapResponse.containsKey('git_username')) { + _gitUsername = _apiMapResponse['git_username'] == null + ? null + : _apiMapResponse['git_username'].toString(); + _gitUsernameSet = true; + } + return _gitUsername; + } + + set gitUsername(String v) { + _gitUsername = v; + _gitUsernameSet = true; + } + + /// (Write-Only) Git password for HTTPS authentication. (For production only, if using user attributes.) + + String get gitPassword { + if (!_gitPasswordSet && _apiMapResponse.containsKey('git_password')) { + _gitPassword = _apiMapResponse['git_password'] == null + ? null + : _apiMapResponse['git_password'].toString(); + _gitPasswordSet = true; + } + return _gitPassword; + } + + set gitPassword(String v) { + _gitPassword = v; + _gitPasswordSet = true; + } + + /// Git production branch name. Defaults to master. Supported only in Looker 21.0 and higher. + + String get gitProductionBranchName { + if (!_gitProductionBranchNameSet && + _apiMapResponse.containsKey('git_production_branch_name')) { + _gitProductionBranchName = + _apiMapResponse['git_production_branch_name'] == null + ? null + : _apiMapResponse['git_production_branch_name'].toString(); + _gitProductionBranchNameSet = true; + } + return _gitProductionBranchName; + } + + set gitProductionBranchName(String v) { + _gitProductionBranchName = v; + _gitProductionBranchNameSet = true; + } + + /// If true, the project uses a git cookie for authentication. + + bool get useGitCookieAuth { + if (!_useGitCookieAuthSet && + _apiMapResponse.containsKey('use_git_cookie_auth')) { + _useGitCookieAuth = _apiMapResponse['use_git_cookie_auth']; + _useGitCookieAuthSet = true; + } + return _useGitCookieAuth; + } + + set useGitCookieAuth(bool v) { + _useGitCookieAuth = v; + _useGitCookieAuthSet = true; + } + + /// User attribute name for username in per-user HTTPS authentication. + + String get gitUsernameUserAttribute { + if (!_gitUsernameUserAttributeSet && + _apiMapResponse.containsKey('git_username_user_attribute')) { + _gitUsernameUserAttribute = + _apiMapResponse['git_username_user_attribute'] == null + ? null + : _apiMapResponse['git_username_user_attribute'].toString(); + _gitUsernameUserAttributeSet = true; + } + return _gitUsernameUserAttribute; + } + + set gitUsernameUserAttribute(String v) { + _gitUsernameUserAttribute = v; + _gitUsernameUserAttributeSet = true; + } + + /// User attribute name for password in per-user HTTPS authentication. + + String get gitPasswordUserAttribute { + if (!_gitPasswordUserAttributeSet && + _apiMapResponse.containsKey('git_password_user_attribute')) { + _gitPasswordUserAttribute = + _apiMapResponse['git_password_user_attribute'] == null + ? null + : _apiMapResponse['git_password_user_attribute'].toString(); + _gitPasswordUserAttributeSet = true; + } + return _gitPasswordUserAttribute; + } + + set gitPasswordUserAttribute(String v) { + _gitPasswordUserAttribute = v; + _gitPasswordUserAttributeSet = true; + } + + /// Name of the git service provider + + String get gitServiceName { + if (!_gitServiceNameSet && + _apiMapResponse.containsKey('git_service_name')) { + _gitServiceName = _apiMapResponse['git_service_name'] == null + ? null + : _apiMapResponse['git_service_name'].toString(); + _gitServiceNameSet = true; + } + return _gitServiceName; + } + + set gitServiceName(String v) { + _gitServiceName = v; + _gitServiceNameSet = true; + } + + /// Port that HTTP(S) application server is running on (for PRs, file browsing, etc.) + + int get gitApplicationServerHttpPort { + if (!_gitApplicationServerHttpPortSet && + _apiMapResponse.containsKey('git_application_server_http_port')) { + _gitApplicationServerHttpPort = + _apiMapResponse['git_application_server_http_port']; + _gitApplicationServerHttpPortSet = true; + } + return _gitApplicationServerHttpPort; + } + + set gitApplicationServerHttpPort(int v) { + _gitApplicationServerHttpPort = v; + _gitApplicationServerHttpPortSet = true; + } + + /// Scheme that is running on application server (for PRs, file browsing, etc.) + + String get gitApplicationServerHttpScheme { + if (!_gitApplicationServerHttpSchemeSet && + _apiMapResponse.containsKey('git_application_server_http_scheme')) { + _gitApplicationServerHttpScheme = + _apiMapResponse['git_application_server_http_scheme'] == null + ? null + : _apiMapResponse['git_application_server_http_scheme'] + .toString(); + _gitApplicationServerHttpSchemeSet = true; + } + return _gitApplicationServerHttpScheme; + } + + set gitApplicationServerHttpScheme(String v) { + _gitApplicationServerHttpScheme = v; + _gitApplicationServerHttpSchemeSet = true; + } + + /// (Write-Only) Optional secret token with which to authenticate requests to the webhook deploy endpoint. If not set, endpoint is unauthenticated. + + String get deploySecret { + if (!_deploySecretSet && _apiMapResponse.containsKey('deploy_secret')) { + _deploySecret = _apiMapResponse['deploy_secret'] == null + ? null + : _apiMapResponse['deploy_secret'].toString(); + _deploySecretSet = true; + } + return _deploySecret; + } + + set deploySecret(String v) { + _deploySecret = v; + _deploySecretSet = true; + } + + /// (Write-Only) When true, unsets the deploy secret to allow unauthenticated access to the webhook deploy endpoint. + + bool get unsetDeploySecret { + if (!_unsetDeploySecretSet && + _apiMapResponse.containsKey('unset_deploy_secret')) { + _unsetDeploySecret = _apiMapResponse['unset_deploy_secret']; + _unsetDeploySecretSet = true; + } + return _unsetDeploySecret; + } + + set unsetDeploySecret(bool v) { + _unsetDeploySecret = v; + _unsetDeploySecretSet = true; + } + + /// The git pull request policy for this project. Valid values are: "off", "links", "recommended", "required". + + PullRequestMode get pullRequestMode { + if (!_pullRequestModeSet && + _apiMapResponse.containsKey('pull_request_mode')) { + _pullRequestMode = PullRequestModeMapper.fromStringValue( + _apiMapResponse['pull_request_mode']); + _pullRequestModeSet = true; + } + return _pullRequestMode; + } + + set pullRequestMode(PullRequestMode v) { + _pullRequestMode = v; + _pullRequestModeSet = true; + } + + /// Validation policy: If true, the project must pass validation checks before project changes can be committed to the git repository + + bool get validationRequired { + if (!_validationRequiredSet && + _apiMapResponse.containsKey('validation_required')) { + _validationRequired = _apiMapResponse['validation_required']; + _validationRequiredSet = true; + } + return _validationRequired; + } + + set validationRequired(bool v) { + _validationRequired = v; + _validationRequiredSet = true; + } + + /// If true, advanced git release management is enabled for this project + + bool get gitReleaseMgmtEnabled { + if (!_gitReleaseMgmtEnabledSet && + _apiMapResponse.containsKey('git_release_mgmt_enabled')) { + _gitReleaseMgmtEnabled = _apiMapResponse['git_release_mgmt_enabled']; + _gitReleaseMgmtEnabledSet = true; + } + return _gitReleaseMgmtEnabled; + } + + set gitReleaseMgmtEnabled(bool v) { + _gitReleaseMgmtEnabled = v; + _gitReleaseMgmtEnabledSet = true; + } + + /// Validation policy: If true, the project can be committed with warnings when `validation_required` is true. (`allow_warnings` does nothing if `validation_required` is false). + + bool get allowWarnings { + if (!_allowWarningsSet && _apiMapResponse.containsKey('allow_warnings')) { + _allowWarnings = _apiMapResponse['allow_warnings']; + _allowWarningsSet = true; + } + return _allowWarnings; + } + + set allowWarnings(bool v) { + _allowWarnings = v; + _allowWarningsSet = true; + } + + /// If true the project is an example project and cannot be modified (read-only) + + bool get isExample { + if (!_isExampleSet && _apiMapResponse.containsKey('is_example')) { + _isExample = _apiMapResponse['is_example']; + _isExampleSet = true; + } + return _isExample; + } + + set isExample(bool v) { + _isExample = v; + _isExampleSet = true; + } + + /// Status of dependencies in your manifest & lockfile + + String get dependencyStatus { + if (!_dependencyStatusSet && + _apiMapResponse.containsKey('dependency_status')) { + _dependencyStatus = _apiMapResponse['dependency_status'] == null + ? null + : _apiMapResponse['dependency_status'].toString(); + _dependencyStatusSet = true; + } + return _dependencyStatus; + } + + set dependencyStatus(String v) { + _dependencyStatus = v; + _dependencyStatusSet = true; + } + + Project() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Project.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_usesGitSet || _apiMapResponse.containsKey('uses_git')) { + json['uses_git'] = usesGit; + } + if (_gitRemoteUrlSet || _apiMapResponse.containsKey('git_remote_url')) { + json['git_remote_url'] = gitRemoteUrl; + } + if (_gitUsernameSet || _apiMapResponse.containsKey('git_username')) { + json['git_username'] = gitUsername; + } + if (_gitPasswordSet || _apiMapResponse.containsKey('git_password')) { + json['git_password'] = gitPassword; + } + if (_gitProductionBranchNameSet || + _apiMapResponse.containsKey('git_production_branch_name')) { + json['git_production_branch_name'] = gitProductionBranchName; + } + if (_useGitCookieAuthSet || + _apiMapResponse.containsKey('use_git_cookie_auth')) { + json['use_git_cookie_auth'] = useGitCookieAuth; + } + if (_gitUsernameUserAttributeSet || + _apiMapResponse.containsKey('git_username_user_attribute')) { + json['git_username_user_attribute'] = gitUsernameUserAttribute; + } + if (_gitPasswordUserAttributeSet || + _apiMapResponse.containsKey('git_password_user_attribute')) { + json['git_password_user_attribute'] = gitPasswordUserAttribute; + } + if (_gitServiceNameSet || _apiMapResponse.containsKey('git_service_name')) { + json['git_service_name'] = gitServiceName; + } + if (_gitApplicationServerHttpPortSet || + _apiMapResponse.containsKey('git_application_server_http_port')) { + json['git_application_server_http_port'] = gitApplicationServerHttpPort; + } + if (_gitApplicationServerHttpSchemeSet || + _apiMapResponse.containsKey('git_application_server_http_scheme')) { + json['git_application_server_http_scheme'] = + gitApplicationServerHttpScheme; + } + if (_deploySecretSet || _apiMapResponse.containsKey('deploy_secret')) { + json['deploy_secret'] = deploySecret; + } + if (_unsetDeploySecretSet || + _apiMapResponse.containsKey('unset_deploy_secret')) { + json['unset_deploy_secret'] = unsetDeploySecret; + } + if (_pullRequestModeSet || + _apiMapResponse.containsKey('pull_request_mode')) { + json['pull_request_mode'] = + PullRequestModeMapper.toStringValue(pullRequestMode); + } + if (_validationRequiredSet || + _apiMapResponse.containsKey('validation_required')) { + json['validation_required'] = validationRequired; + } + if (_gitReleaseMgmtEnabledSet || + _apiMapResponse.containsKey('git_release_mgmt_enabled')) { + json['git_release_mgmt_enabled'] = gitReleaseMgmtEnabled; + } + if (_allowWarningsSet || _apiMapResponse.containsKey('allow_warnings')) { + json['allow_warnings'] = allowWarnings; + } + if (_isExampleSet || _apiMapResponse.containsKey('is_example')) { + json['is_example'] = isExample; + } + if (_dependencyStatusSet || + _apiMapResponse.containsKey('dependency_status')) { + json['dependency_status'] = dependencyStatus; + } + return json; + } +} + +class ProjectError { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _code; + bool _codeSet = false; + + String _severity; + bool _severitySet = false; + + String _kind; + bool _kindSet = false; + + String _message; + bool _messageSet = false; + + String _fieldName; + bool _fieldNameSet = false; + + String _filePath; + bool _filePathSet = false; + + int _lineNumber; + bool _lineNumberSet = false; + + String _modelId; + bool _modelIdSet = false; + + String _explore; + bool _exploreSet = false; + + String _helpUrl; + bool _helpUrlSet = false; + + Map _params; + bool _paramsSet = false; + + String _sanitizedMessage; + bool _sanitizedMessageSet = false; + + /// A stable token that uniquely identifies this class of error, ignoring parameter values. Error message text may vary due to parameters or localization, but error codes do not. For example, a "File not found" error will have the same error code regardless of the filename in question or the user's display language (read-only) + + String get code { + if (!_codeSet && _apiMapResponse.containsKey('code')) { + _code = _apiMapResponse['code'] == null + ? null + : _apiMapResponse['code'].toString(); + _codeSet = true; + } + return _code; + } + + set code(String v) { + _code = v; + _codeSet = true; + } + + /// Severity: fatal, error, warning, info, success (read-only) + + String get severity { + if (!_severitySet && _apiMapResponse.containsKey('severity')) { + _severity = _apiMapResponse['severity'] == null + ? null + : _apiMapResponse['severity'].toString(); + _severitySet = true; + } + return _severity; + } + + set severity(String v) { + _severity = v; + _severitySet = true; + } + + /// Error classification: syntax, deprecation, model_configuration, etc (read-only) + + String get kind { + if (!_kindSet && _apiMapResponse.containsKey('kind')) { + _kind = _apiMapResponse['kind'] == null + ? null + : _apiMapResponse['kind'].toString(); + _kindSet = true; + } + return _kind; + } + + set kind(String v) { + _kind = v; + _kindSet = true; + } + + /// Error message which may contain information such as dashboard or model names that may be considered sensitive in some use cases. Avoid storing or sending this message outside of Looker (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// The field associated with this error (read-only) + + String get fieldName { + if (!_fieldNameSet && _apiMapResponse.containsKey('field_name')) { + _fieldName = _apiMapResponse['field_name'] == null + ? null + : _apiMapResponse['field_name'].toString(); + _fieldNameSet = true; + } + return _fieldName; + } + + set fieldName(String v) { + _fieldName = v; + _fieldNameSet = true; + } + + /// Name of the file containing this error (read-only) + + String get filePath { + if (!_filePathSet && _apiMapResponse.containsKey('file_path')) { + _filePath = _apiMapResponse['file_path'] == null + ? null + : _apiMapResponse['file_path'].toString(); + _filePathSet = true; + } + return _filePath; + } + + set filePath(String v) { + _filePath = v; + _filePathSet = true; + } + + /// Line number in the file of this error (read-only) + + int get lineNumber { + if (!_lineNumberSet && _apiMapResponse.containsKey('line_number')) { + _lineNumber = _apiMapResponse['line_number']; + _lineNumberSet = true; + } + return _lineNumber; + } + + set lineNumber(int v) { + _lineNumber = v; + _lineNumberSet = true; + } + + /// The model associated with this error (read-only) + + String get modelId { + if (!_modelIdSet && _apiMapResponse.containsKey('model_id')) { + _modelId = _apiMapResponse['model_id'] == null + ? null + : _apiMapResponse['model_id'].toString(); + _modelIdSet = true; + } + return _modelId; + } + + set modelId(String v) { + _modelId = v; + _modelIdSet = true; + } + + /// The explore associated with this error (read-only) + + String get explore { + if (!_exploreSet && _apiMapResponse.containsKey('explore')) { + _explore = _apiMapResponse['explore'] == null + ? null + : _apiMapResponse['explore'].toString(); + _exploreSet = true; + } + return _explore; + } + + set explore(String v) { + _explore = v; + _exploreSet = true; + } + + /// A link to Looker documentation about this error (read-only) + + String get helpUrl { + if (!_helpUrlSet && _apiMapResponse.containsKey('help_url')) { + _helpUrl = _apiMapResponse['help_url'] == null + ? null + : _apiMapResponse['help_url'].toString(); + _helpUrlSet = true; + } + return _helpUrl; + } + + set helpUrl(String v) { + _helpUrl = v; + _helpUrlSet = true; + } + + /// Error parameters (read-only) + + Map get params { + if (!_paramsSet && _apiMapResponse.containsKey('params')) { + _params = _apiMapResponse['params']; + _paramsSet = true; + } + return _params; + } + + set params(Map v) { + _params = v; + _paramsSet = true; + } + + /// A version of the error message that does not contain potentially sensitive information. Suitable for situations in which messages are stored or sent to consumers outside of Looker, such as external logs. Sanitized messages will display "(?)" where sensitive information would appear in the corresponding non-sanitized message (read-only) + + String get sanitizedMessage { + if (!_sanitizedMessageSet && + _apiMapResponse.containsKey('sanitized_message')) { + _sanitizedMessage = _apiMapResponse['sanitized_message'] == null + ? null + : _apiMapResponse['sanitized_message'].toString(); + _sanitizedMessageSet = true; + } + return _sanitizedMessage; + } + + set sanitizedMessage(String v) { + _sanitizedMessage = v; + _sanitizedMessageSet = true; + } + + ProjectError() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ProjectError.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_codeSet || _apiMapResponse.containsKey('code')) { + json['code'] = code; + } + if (_severitySet || _apiMapResponse.containsKey('severity')) { + json['severity'] = severity; + } + if (_kindSet || _apiMapResponse.containsKey('kind')) { + json['kind'] = kind; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_fieldNameSet || _apiMapResponse.containsKey('field_name')) { + json['field_name'] = fieldName; + } + if (_filePathSet || _apiMapResponse.containsKey('file_path')) { + json['file_path'] = filePath; + } + if (_lineNumberSet || _apiMapResponse.containsKey('line_number')) { + json['line_number'] = lineNumber; + } + if (_modelIdSet || _apiMapResponse.containsKey('model_id')) { + json['model_id'] = modelId; + } + if (_exploreSet || _apiMapResponse.containsKey('explore')) { + json['explore'] = explore; + } + if (_helpUrlSet || _apiMapResponse.containsKey('help_url')) { + json['help_url'] = helpUrl; + } + if (_paramsSet || _apiMapResponse.containsKey('params')) { + json['params'] = params; + } + if (_sanitizedMessageSet || + _apiMapResponse.containsKey('sanitized_message')) { + json['sanitized_message'] = sanitizedMessage; + } + return json; + } +} + +class ProjectFile { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + String _path; + bool _pathSet = false; + + String _title; + bool _titleSet = false; + + String _type; + bool _typeSet = false; + + String _extension; + bool _extensionSet = false; + + String _mimeType; + bool _mimeTypeSet = false; + + bool _editable; + bool _editableSet = false; + + GitStatus _gitStatus; + bool _gitStatusSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// An opaque token uniquely identifying a file within a project. Avoid parsing or decomposing the text of this token. This token is stable within a Looker release but may change between Looker releases (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Path, file name, and extension of the file relative to the project root directory (read-only) + + String get path { + if (!_pathSet && _apiMapResponse.containsKey('path')) { + _path = _apiMapResponse['path'] == null + ? null + : _apiMapResponse['path'].toString(); + _pathSet = true; + } + return _path; + } + + set path(String v) { + _path = v; + _pathSet = true; + } + + /// Display name (read-only) + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// File type: model, view, etc (read-only) + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// The extension of the file: .view.lkml, .model.lkml, etc (read-only) + + String get extension { + if (!_extensionSet && _apiMapResponse.containsKey('extension')) { + _extension = _apiMapResponse['extension'] == null + ? null + : _apiMapResponse['extension'].toString(); + _extensionSet = true; + } + return _extension; + } + + set extension(String v) { + _extension = v; + _extensionSet = true; + } + + /// File mime type (read-only) + + String get mimeType { + if (!_mimeTypeSet && _apiMapResponse.containsKey('mime_type')) { + _mimeType = _apiMapResponse['mime_type'] == null + ? null + : _apiMapResponse['mime_type'].toString(); + _mimeTypeSet = true; + } + return _mimeType; + } + + set mimeType(String v) { + _mimeType = v; + _mimeTypeSet = true; + } + + /// State of editability for the file. (read-only) + + bool get editable { + if (!_editableSet && _apiMapResponse.containsKey('editable')) { + _editable = _apiMapResponse['editable']; + _editableSet = true; + } + return _editable; + } + + set editable(bool v) { + _editable = v; + _editableSet = true; + } + + GitStatus get gitStatus { + if (!_gitStatusSet && _apiMapResponse.containsKey('git_status')) { + _gitStatus = _apiMapResponse['git_status'] == null + ? null + : GitStatus.fromResponse( + _apiMapResponse['git_status'], apiResponseContentType); + _gitStatusSet = true; + } + return _gitStatus; + } + + set gitStatus(GitStatus v) { + _gitStatus = v; + _gitStatusSet = true; + } + + ProjectFile() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ProjectFile.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_pathSet || _apiMapResponse.containsKey('path')) { + json['path'] = path; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_extensionSet || _apiMapResponse.containsKey('extension')) { + json['extension'] = extension; + } + if (_mimeTypeSet || _apiMapResponse.containsKey('mime_type')) { + json['mime_type'] = mimeType; + } + if (_editableSet || _apiMapResponse.containsKey('editable')) { + json['editable'] = editable; + } + if (_gitStatusSet || _apiMapResponse.containsKey('git_status')) { + json['git_status'] = gitStatus == null ? null : gitStatus.toJson(); + } + return json; + } +} + +class ProjectValidation { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _errors; + bool _errorsSet = false; + + String _projectDigest; + bool _projectDigestSet = false; + + List _modelsNotValidated; + bool _modelsNotValidatedSet = false; + + double _computationTime; + bool _computationTimeSet = false; + + /// A list of project errors (read-only) + + List get errors { + if (!_errorsSet && _apiMapResponse.containsKey('errors')) { + _errors = _apiMapResponse['errors'] == null + ? null + : (_apiMapResponse['errors'] as List) + .map((i) => ProjectError.fromResponse(i, apiResponseContentType)) + .toList(); + _errorsSet = true; + } + return _errors; + } + + set errors(List v) { + _errors = v; + _errorsSet = true; + } + + /// A hash value computed from the project's current state (read-only) + + String get projectDigest { + if (!_projectDigestSet && _apiMapResponse.containsKey('project_digest')) { + _projectDigest = _apiMapResponse['project_digest'] == null + ? null + : _apiMapResponse['project_digest'].toString(); + _projectDigestSet = true; + } + return _projectDigest; + } + + set projectDigest(String v) { + _projectDigest = v; + _projectDigestSet = true; + } + + /// A list of models which were not fully validated (read-only) + + List get modelsNotValidated { + if (!_modelsNotValidatedSet && + _apiMapResponse.containsKey('models_not_validated')) { + _modelsNotValidated = _apiMapResponse['models_not_validated'] == null + ? null + : (_apiMapResponse['models_not_validated'] as List) + .map((i) => + ModelsNotValidated.fromResponse(i, apiResponseContentType)) + .toList(); + _modelsNotValidatedSet = true; + } + return _modelsNotValidated; + } + + set modelsNotValidated(List v) { + _modelsNotValidated = v; + _modelsNotValidatedSet = true; + } + + /// Duration of project validation in seconds (read-only) + + double get computationTime { + if (!_computationTimeSet && + _apiMapResponse.containsKey('computation_time')) { + _computationTime = _apiMapResponse['computation_time']; + _computationTimeSet = true; + } + return _computationTime; + } + + set computationTime(double v) { + _computationTime = v; + _computationTimeSet = true; + } + + ProjectValidation() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ProjectValidation.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_errorsSet || _apiMapResponse.containsKey('errors')) { + json['errors'] = + errors == null ? null : errors.map((i) => i.toJson()).toList(); + } + if (_projectDigestSet || _apiMapResponse.containsKey('project_digest')) { + json['project_digest'] = projectDigest; + } + if (_modelsNotValidatedSet || + _apiMapResponse.containsKey('models_not_validated')) { + json['models_not_validated'] = modelsNotValidated == null + ? null + : modelsNotValidated.map((i) => i.toJson()).toList(); + } + if (_computationTimeSet || + _apiMapResponse.containsKey('computation_time')) { + json['computation_time'] = computationTime; + } + return json; + } +} + +class ProjectValidationCache { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _errors; + bool _errorsSet = false; + + String _projectDigest; + bool _projectDigestSet = false; + + List _modelsNotValidated; + bool _modelsNotValidatedSet = false; + + double _computationTime; + bool _computationTimeSet = false; + + bool _stale; + bool _staleSet = false; + + /// A list of project errors (read-only) + + List get errors { + if (!_errorsSet && _apiMapResponse.containsKey('errors')) { + _errors = _apiMapResponse['errors'] == null + ? null + : (_apiMapResponse['errors'] as List) + .map((i) => ProjectError.fromResponse(i, apiResponseContentType)) + .toList(); + _errorsSet = true; + } + return _errors; + } + + set errors(List v) { + _errors = v; + _errorsSet = true; + } + + /// A hash value computed from the project's current state (read-only) + + String get projectDigest { + if (!_projectDigestSet && _apiMapResponse.containsKey('project_digest')) { + _projectDigest = _apiMapResponse['project_digest'] == null + ? null + : _apiMapResponse['project_digest'].toString(); + _projectDigestSet = true; + } + return _projectDigest; + } + + set projectDigest(String v) { + _projectDigest = v; + _projectDigestSet = true; + } + + /// A list of models which were not fully validated (read-only) + + List get modelsNotValidated { + if (!_modelsNotValidatedSet && + _apiMapResponse.containsKey('models_not_validated')) { + _modelsNotValidated = _apiMapResponse['models_not_validated'] == null + ? null + : (_apiMapResponse['models_not_validated'] as List) + .map((i) => + ModelsNotValidated.fromResponse(i, apiResponseContentType)) + .toList(); + _modelsNotValidatedSet = true; + } + return _modelsNotValidated; + } + + set modelsNotValidated(List v) { + _modelsNotValidated = v; + _modelsNotValidatedSet = true; + } + + /// Duration of project validation in seconds (read-only) + + double get computationTime { + if (!_computationTimeSet && + _apiMapResponse.containsKey('computation_time')) { + _computationTime = _apiMapResponse['computation_time']; + _computationTimeSet = true; + } + return _computationTime; + } + + set computationTime(double v) { + _computationTime = v; + _computationTimeSet = true; + } + + /// If true, the cached project validation results are no longer accurate because the project has changed since the cached results were calculated (read-only) + + bool get stale { + if (!_staleSet && _apiMapResponse.containsKey('stale')) { + _stale = _apiMapResponse['stale']; + _staleSet = true; + } + return _stale; + } + + set stale(bool v) { + _stale = v; + _staleSet = true; + } + + ProjectValidationCache() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ProjectValidationCache.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_errorsSet || _apiMapResponse.containsKey('errors')) { + json['errors'] = + errors == null ? null : errors.map((i) => i.toJson()).toList(); + } + if (_projectDigestSet || _apiMapResponse.containsKey('project_digest')) { + json['project_digest'] = projectDigest; + } + if (_modelsNotValidatedSet || + _apiMapResponse.containsKey('models_not_validated')) { + json['models_not_validated'] = modelsNotValidated == null + ? null + : modelsNotValidated.map((i) => i.toJson()).toList(); + } + if (_computationTimeSet || + _apiMapResponse.containsKey('computation_time')) { + json['computation_time'] = computationTime; + } + if (_staleSet || _apiMapResponse.containsKey('stale')) { + json['stale'] = stale; + } + return json; + } +} + +class ProjectWorkspace { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _projectId; + bool _projectIdSet = false; + + String _workspaceId; + bool _workspaceIdSet = false; + + String _gitStatus; + bool _gitStatusSet = false; + + String _gitHead; + bool _gitHeadSet = false; + + DependencyStatus _dependencyStatus; + bool _dependencyStatusSet = false; + + GitBranch _gitBranch; + bool _gitBranchSet = false; + + String _lookmlType; + bool _lookmlTypeSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// The id of the project (read-only) + + String get projectId { + if (!_projectIdSet && _apiMapResponse.containsKey('project_id')) { + _projectId = _apiMapResponse['project_id'] == null + ? null + : _apiMapResponse['project_id'].toString(); + _projectIdSet = true; + } + return _projectId; + } + + set projectId(String v) { + _projectId = v; + _projectIdSet = true; + } + + /// The id of the local workspace containing the project files (read-only) + + String get workspaceId { + if (!_workspaceIdSet && _apiMapResponse.containsKey('workspace_id')) { + _workspaceId = _apiMapResponse['workspace_id'] == null + ? null + : _apiMapResponse['workspace_id'].toString(); + _workspaceIdSet = true; + } + return _workspaceId; + } + + set workspaceId(String v) { + _workspaceId = v; + _workspaceIdSet = true; + } + + /// The status of the local git directory (read-only) + + String get gitStatus { + if (!_gitStatusSet && _apiMapResponse.containsKey('git_status')) { + _gitStatus = _apiMapResponse['git_status'] == null + ? null + : _apiMapResponse['git_status'].toString(); + _gitStatusSet = true; + } + return _gitStatus; + } + + set gitStatus(String v) { + _gitStatus = v; + _gitStatusSet = true; + } + + /// Git head revision name (read-only) + + String get gitHead { + if (!_gitHeadSet && _apiMapResponse.containsKey('git_head')) { + _gitHead = _apiMapResponse['git_head'] == null + ? null + : _apiMapResponse['git_head'].toString(); + _gitHeadSet = true; + } + return _gitHead; + } + + set gitHead(String v) { + _gitHead = v; + _gitHeadSet = true; + } + + /// Status of the dependencies in your project. Valid values are: "lock_optional", "lock_required", "lock_error", "install_none". (read-only) + + DependencyStatus get dependencyStatus { + if (!_dependencyStatusSet && + _apiMapResponse.containsKey('dependency_status')) { + _dependencyStatus = DependencyStatusMapper.fromStringValue( + _apiMapResponse['dependency_status']); + _dependencyStatusSet = true; + } + return _dependencyStatus; + } + + set dependencyStatus(DependencyStatus v) { + _dependencyStatus = v; + _dependencyStatusSet = true; + } + + GitBranch get gitBranch { + if (!_gitBranchSet && _apiMapResponse.containsKey('git_branch')) { + _gitBranch = _apiMapResponse['git_branch'] == null + ? null + : GitBranch.fromResponse( + _apiMapResponse['git_branch'], apiResponseContentType); + _gitBranchSet = true; + } + return _gitBranch; + } + + set gitBranch(GitBranch v) { + _gitBranch = v; + _gitBranchSet = true; + } + + /// The lookml syntax used by all files in this project (read-only) + + String get lookmlType { + if (!_lookmlTypeSet && _apiMapResponse.containsKey('lookml_type')) { + _lookmlType = _apiMapResponse['lookml_type'] == null + ? null + : _apiMapResponse['lookml_type'].toString(); + _lookmlTypeSet = true; + } + return _lookmlType; + } + + set lookmlType(String v) { + _lookmlType = v; + _lookmlTypeSet = true; + } + + ProjectWorkspace() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ProjectWorkspace.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_projectIdSet || _apiMapResponse.containsKey('project_id')) { + json['project_id'] = projectId; + } + if (_workspaceIdSet || _apiMapResponse.containsKey('workspace_id')) { + json['workspace_id'] = workspaceId; + } + if (_gitStatusSet || _apiMapResponse.containsKey('git_status')) { + json['git_status'] = gitStatus; + } + if (_gitHeadSet || _apiMapResponse.containsKey('git_head')) { + json['git_head'] = gitHead; + } + if (_dependencyStatusSet || + _apiMapResponse.containsKey('dependency_status')) { + json['dependency_status'] = + DependencyStatusMapper.toStringValue(dependencyStatus); + } + if (_gitBranchSet || _apiMapResponse.containsKey('git_branch')) { + json['git_branch'] = gitBranch == null ? null : gitBranch.toJson(); + } + if (_lookmlTypeSet || _apiMapResponse.containsKey('lookml_type')) { + json['lookml_type'] = lookmlType; + } + return json; + } +} + +/// The git pull request policy for this project. Valid values are: "off", "links", "recommended", "required". (Enum defined in Project) +enum PullRequestMode { off, links, recommended, required } + +class PullRequestModeMapper { + static String toStringValue(PullRequestMode e) { + switch (e) { + case PullRequestMode.off: + return 'off'; + case PullRequestMode.links: + return 'links'; + case PullRequestMode.recommended: + return 'recommended'; + case PullRequestMode.required: + return 'required'; + + default: + return null; + } + } + + static PullRequestMode fromStringValue(String s) { + if (s == 'off') { + return PullRequestMode.off; + } + if (s == 'links') { + return PullRequestMode.links; + } + if (s == 'recommended') { + return PullRequestMode.recommended; + } + if (s == 'required') { + return PullRequestMode.required; + } + return null; + } +} + +class Query { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _model; + bool _modelSet = false; + + String _view; + bool _viewSet = false; + + List _fields; + bool _fieldsSet = false; + + List _pivots; + bool _pivotsSet = false; + + List _fillFields; + bool _fillFieldsSet = false; + + Map _filters; + bool _filtersSet = false; + + String _filterExpression; + bool _filterExpressionSet = false; + + List _sorts; + bool _sortsSet = false; + + String _limit; + bool _limitSet = false; + + String _columnLimit; + bool _columnLimitSet = false; + + bool _total; + bool _totalSet = false; + + String _rowTotal; + bool _rowTotalSet = false; + + List _subtotals; + bool _subtotalsSet = false; + + Map _visConfig; + bool _visConfigSet = false; + + Map _filterConfig; + bool _filterConfigSet = false; + + String _visibleUiSections; + bool _visibleUiSectionsSet = false; + + String _slug; + bool _slugSet = false; + + String _dynamicFields; + bool _dynamicFieldsSet = false; + + String _clientId; + bool _clientIdSet = false; + + String _shareUrl; + bool _shareUrlSet = false; + + String _expandedShareUrl; + bool _expandedShareUrlSet = false; + + String _url; + bool _urlSet = false; + + String _queryTimezone; + bool _queryTimezoneSet = false; + + bool _hasTableCalculations; + bool _hasTableCalculationsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Model + + String get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : _apiMapResponse['model'].toString(); + _modelSet = true; + } + return _model; + } + + set model(String v) { + _model = v; + _modelSet = true; + } + + /// Explore Name + + String get view { + if (!_viewSet && _apiMapResponse.containsKey('view')) { + _view = _apiMapResponse['view'] == null + ? null + : _apiMapResponse['view'].toString(); + _viewSet = true; + } + return _view; + } + + set view(String v) { + _view = v; + _viewSet = true; + } + + /// Fields + + List get fields { + if (!_fieldsSet && _apiMapResponse.containsKey('fields')) { + _fields = _apiMapResponse['fields'] == null + ? null + : _apiMapResponse['fields'].map((i) => i as String).toList(); + _fieldsSet = true; + } + return _fields; + } + + set fields(List v) { + _fields = v; + _fieldsSet = true; + } + + /// Pivots + + List get pivots { + if (!_pivotsSet && _apiMapResponse.containsKey('pivots')) { + _pivots = _apiMapResponse['pivots'] == null + ? null + : _apiMapResponse['pivots'].map((i) => i as String).toList(); + _pivotsSet = true; + } + return _pivots; + } + + set pivots(List v) { + _pivots = v; + _pivotsSet = true; + } + + /// Fill Fields + + List get fillFields { + if (!_fillFieldsSet && _apiMapResponse.containsKey('fill_fields')) { + _fillFields = _apiMapResponse['fill_fields'] == null + ? null + : _apiMapResponse['fill_fields'] + .map((i) => i as String) + .toList(); + _fillFieldsSet = true; + } + return _fillFields; + } + + set fillFields(List v) { + _fillFields = v; + _fillFieldsSet = true; + } + + /// Filters + + Map get filters { + if (!_filtersSet && _apiMapResponse.containsKey('filters')) { + _filters = _apiMapResponse['filters']; + _filtersSet = true; + } + return _filters; + } + + set filters(Map v) { + _filters = v; + _filtersSet = true; + } + + /// Filter Expression + + String get filterExpression { + if (!_filterExpressionSet && + _apiMapResponse.containsKey('filter_expression')) { + _filterExpression = _apiMapResponse['filter_expression'] == null + ? null + : _apiMapResponse['filter_expression'].toString(); + _filterExpressionSet = true; + } + return _filterExpression; + } + + set filterExpression(String v) { + _filterExpression = v; + _filterExpressionSet = true; + } + + /// Sorting for the query results. Use the format `["view.field", ...]` to sort on fields in ascending order. Use the format `["view.field desc", ...]` to sort on fields in descending order. Use `["__UNSORTED__"]` (2 underscores before and after) to disable sorting entirely. Empty sorts `[]` will trigger a default sort. + + List get sorts { + if (!_sortsSet && _apiMapResponse.containsKey('sorts')) { + _sorts = _apiMapResponse['sorts'] == null + ? null + : _apiMapResponse['sorts'].map((i) => i as String).toList(); + _sortsSet = true; + } + return _sorts; + } + + set sorts(List v) { + _sorts = v; + _sortsSet = true; + } + + /// Limit + + String get limit { + if (!_limitSet && _apiMapResponse.containsKey('limit')) { + _limit = _apiMapResponse['limit'] == null + ? null + : _apiMapResponse['limit'].toString(); + _limitSet = true; + } + return _limit; + } + + set limit(String v) { + _limit = v; + _limitSet = true; + } + + /// Column Limit + + String get columnLimit { + if (!_columnLimitSet && _apiMapResponse.containsKey('column_limit')) { + _columnLimit = _apiMapResponse['column_limit'] == null + ? null + : _apiMapResponse['column_limit'].toString(); + _columnLimitSet = true; + } + return _columnLimit; + } + + set columnLimit(String v) { + _columnLimit = v; + _columnLimitSet = true; + } + + /// Total + + bool get total { + if (!_totalSet && _apiMapResponse.containsKey('total')) { + _total = _apiMapResponse['total']; + _totalSet = true; + } + return _total; + } + + set total(bool v) { + _total = v; + _totalSet = true; + } + + /// Raw Total + + String get rowTotal { + if (!_rowTotalSet && _apiMapResponse.containsKey('row_total')) { + _rowTotal = _apiMapResponse['row_total'] == null + ? null + : _apiMapResponse['row_total'].toString(); + _rowTotalSet = true; + } + return _rowTotal; + } + + set rowTotal(String v) { + _rowTotal = v; + _rowTotalSet = true; + } + + /// Fields on which to run subtotals + + List get subtotals { + if (!_subtotalsSet && _apiMapResponse.containsKey('subtotals')) { + _subtotals = _apiMapResponse['subtotals'] == null + ? null + : _apiMapResponse['subtotals'] + .map((i) => i as String) + .toList(); + _subtotalsSet = true; + } + return _subtotals; + } + + set subtotals(List v) { + _subtotals = v; + _subtotalsSet = true; + } + + /// Visualization configuration properties. These properties are typically opaque and differ based on the type of visualization used. There is no specified set of allowed keys. The values can be any type supported by JSON. A "type" key with a string value is often present, and is used by Looker to determine which visualization to present. Visualizations ignore unknown vis_config properties. + + Map get visConfig { + if (!_visConfigSet && _apiMapResponse.containsKey('vis_config')) { + _visConfig = _apiMapResponse['vis_config']; + _visConfigSet = true; + } + return _visConfig; + } + + set visConfig(Map v) { + _visConfig = v; + _visConfigSet = true; + } + + /// The filter_config represents the state of the filter UI on the explore page for a given query. When running a query via the Looker UI, this parameter takes precedence over "filters". When creating a query or modifying an existing query, "filter_config" should be set to null. Setting it to any other value could cause unexpected filtering behavior. The format should be considered opaque. + + Map get filterConfig { + if (!_filterConfigSet && _apiMapResponse.containsKey('filter_config')) { + _filterConfig = _apiMapResponse['filter_config']; + _filterConfigSet = true; + } + return _filterConfig; + } + + set filterConfig(Map v) { + _filterConfig = v; + _filterConfigSet = true; + } + + /// Visible UI Sections + + String get visibleUiSections { + if (!_visibleUiSectionsSet && + _apiMapResponse.containsKey('visible_ui_sections')) { + _visibleUiSections = _apiMapResponse['visible_ui_sections'] == null + ? null + : _apiMapResponse['visible_ui_sections'].toString(); + _visibleUiSectionsSet = true; + } + return _visibleUiSections; + } + + set visibleUiSections(String v) { + _visibleUiSections = v; + _visibleUiSectionsSet = true; + } + + /// Slug (read-only) + + String get slug { + if (!_slugSet && _apiMapResponse.containsKey('slug')) { + _slug = _apiMapResponse['slug'] == null + ? null + : _apiMapResponse['slug'].toString(); + _slugSet = true; + } + return _slug; + } + + set slug(String v) { + _slug = v; + _slugSet = true; + } + + /// Dynamic Fields + + String get dynamicFields { + if (!_dynamicFieldsSet && _apiMapResponse.containsKey('dynamic_fields')) { + _dynamicFields = _apiMapResponse['dynamic_fields'] == null + ? null + : _apiMapResponse['dynamic_fields'].toString(); + _dynamicFieldsSet = true; + } + return _dynamicFields; + } + + set dynamicFields(String v) { + _dynamicFields = v; + _dynamicFieldsSet = true; + } + + /// Client Id: used to generate shortened explore URLs. If set by client, must be a unique 22 character alphanumeric string. Otherwise one will be generated. + + String get clientId { + if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { + _clientId = _apiMapResponse['client_id'] == null + ? null + : _apiMapResponse['client_id'].toString(); + _clientIdSet = true; + } + return _clientId; + } + + set clientId(String v) { + _clientId = v; + _clientIdSet = true; + } + + /// Share Url (read-only) + + String get shareUrl { + if (!_shareUrlSet && _apiMapResponse.containsKey('share_url')) { + _shareUrl = _apiMapResponse['share_url'] == null + ? null + : _apiMapResponse['share_url'].toString(); + _shareUrlSet = true; + } + return _shareUrl; + } + + set shareUrl(String v) { + _shareUrl = v; + _shareUrlSet = true; + } + + /// Expanded Share Url (read-only) + + String get expandedShareUrl { + if (!_expandedShareUrlSet && + _apiMapResponse.containsKey('expanded_share_url')) { + _expandedShareUrl = _apiMapResponse['expanded_share_url'] == null + ? null + : _apiMapResponse['expanded_share_url'].toString(); + _expandedShareUrlSet = true; + } + return _expandedShareUrl; + } + + set expandedShareUrl(String v) { + _expandedShareUrl = v; + _expandedShareUrlSet = true; + } + + /// Expanded Url (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Query Timezone + + String get queryTimezone { + if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { + _queryTimezone = _apiMapResponse['query_timezone'] == null + ? null + : _apiMapResponse['query_timezone'].toString(); + _queryTimezoneSet = true; + } + return _queryTimezone; + } + + set queryTimezone(String v) { + _queryTimezone = v; + _queryTimezoneSet = true; + } + + /// Has Table Calculations (read-only) + + bool get hasTableCalculations { + if (!_hasTableCalculationsSet && + _apiMapResponse.containsKey('has_table_calculations')) { + _hasTableCalculations = _apiMapResponse['has_table_calculations']; + _hasTableCalculationsSet = true; + } + return _hasTableCalculations; + } + + set hasTableCalculations(bool v) { + _hasTableCalculations = v; + _hasTableCalculationsSet = true; + } + + Query() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Query.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model; + } + if (_viewSet || _apiMapResponse.containsKey('view')) { + json['view'] = view; + } + if (_fieldsSet || _apiMapResponse.containsKey('fields')) { + json['fields'] = fields; + } + if (_pivotsSet || _apiMapResponse.containsKey('pivots')) { + json['pivots'] = pivots; + } + if (_fillFieldsSet || _apiMapResponse.containsKey('fill_fields')) { + json['fill_fields'] = fillFields; + } + if (_filtersSet || _apiMapResponse.containsKey('filters')) { + json['filters'] = filters; + } + if (_filterExpressionSet || + _apiMapResponse.containsKey('filter_expression')) { + json['filter_expression'] = filterExpression; + } + if (_sortsSet || _apiMapResponse.containsKey('sorts')) { + json['sorts'] = sorts; + } + if (_limitSet || _apiMapResponse.containsKey('limit')) { + json['limit'] = limit; + } + if (_columnLimitSet || _apiMapResponse.containsKey('column_limit')) { + json['column_limit'] = columnLimit; + } + if (_totalSet || _apiMapResponse.containsKey('total')) { + json['total'] = total; + } + if (_rowTotalSet || _apiMapResponse.containsKey('row_total')) { + json['row_total'] = rowTotal; + } + if (_subtotalsSet || _apiMapResponse.containsKey('subtotals')) { + json['subtotals'] = subtotals; + } + if (_visConfigSet || _apiMapResponse.containsKey('vis_config')) { + json['vis_config'] = visConfig; + } + if (_filterConfigSet || _apiMapResponse.containsKey('filter_config')) { + json['filter_config'] = filterConfig; + } + if (_visibleUiSectionsSet || + _apiMapResponse.containsKey('visible_ui_sections')) { + json['visible_ui_sections'] = visibleUiSections; + } + if (_slugSet || _apiMapResponse.containsKey('slug')) { + json['slug'] = slug; + } + if (_dynamicFieldsSet || _apiMapResponse.containsKey('dynamic_fields')) { + json['dynamic_fields'] = dynamicFields; + } + if (_clientIdSet || _apiMapResponse.containsKey('client_id')) { + json['client_id'] = clientId; + } + if (_shareUrlSet || _apiMapResponse.containsKey('share_url')) { + json['share_url'] = shareUrl; + } + if (_expandedShareUrlSet || + _apiMapResponse.containsKey('expanded_share_url')) { + json['expanded_share_url'] = expandedShareUrl; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_queryTimezoneSet || _apiMapResponse.containsKey('query_timezone')) { + json['query_timezone'] = queryTimezone; + } + if (_hasTableCalculationsSet || + _apiMapResponse.containsKey('has_table_calculations')) { + json['has_table_calculations'] = hasTableCalculations; + } + return json; + } +} + +class QueryTask { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + int _queryId; + bool _queryIdSet = false; + + Query _query; + bool _querySet = false; + + bool _generateLinks; + bool _generateLinksSet = false; + + bool _forceProduction; + bool _forceProductionSet = false; + + String _pathPrefix; + bool _pathPrefixSet = false; + + bool _cache; + bool _cacheSet = false; + + bool _serverTableCalcs; + bool _serverTableCalcsSet = false; + + bool _cacheOnly; + bool _cacheOnlySet = false; + + String _cacheKey; + bool _cacheKeySet = false; + + String _status; + bool _statusSet = false; + + String _source; + bool _sourceSet = false; + + double _runtime; + bool _runtimeSet = false; + + bool _rebuildPdts; + bool _rebuildPdtsSet = false; + + String _resultSource; + bool _resultSourceSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _resultFormat; + bool _resultFormatSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id of query + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + Query get query { + if (!_querySet && _apiMapResponse.containsKey('query')) { + _query = _apiMapResponse['query'] == null + ? null + : Query.fromResponse( + _apiMapResponse['query'], apiResponseContentType); + _querySet = true; + } + return _query; + } + + set query(Query v) { + _query = v; + _querySet = true; + } + + /// whether or not to generate links in the query response. + + bool get generateLinks { + if (!_generateLinksSet && _apiMapResponse.containsKey('generate_links')) { + _generateLinks = _apiMapResponse['generate_links']; + _generateLinksSet = true; + } + return _generateLinks; + } + + set generateLinks(bool v) { + _generateLinks = v; + _generateLinksSet = true; + } + + /// Use production models to run query (even is user is in dev mode). + + bool get forceProduction { + if (!_forceProductionSet && + _apiMapResponse.containsKey('force_production')) { + _forceProduction = _apiMapResponse['force_production']; + _forceProductionSet = true; + } + return _forceProduction; + } + + set forceProduction(bool v) { + _forceProduction = v; + _forceProductionSet = true; + } + + /// Prefix to use for drill links. + + String get pathPrefix { + if (!_pathPrefixSet && _apiMapResponse.containsKey('path_prefix')) { + _pathPrefix = _apiMapResponse['path_prefix'] == null + ? null + : _apiMapResponse['path_prefix'].toString(); + _pathPrefixSet = true; + } + return _pathPrefix; + } + + set pathPrefix(String v) { + _pathPrefix = v; + _pathPrefixSet = true; + } + + /// Whether or not to use the cache + + bool get cache { + if (!_cacheSet && _apiMapResponse.containsKey('cache')) { + _cache = _apiMapResponse['cache']; + _cacheSet = true; + } + return _cache; + } + + set cache(bool v) { + _cache = v; + _cacheSet = true; + } + + /// Whether or not to run table calculations on the server + + bool get serverTableCalcs { + if (!_serverTableCalcsSet && + _apiMapResponse.containsKey('server_table_calcs')) { + _serverTableCalcs = _apiMapResponse['server_table_calcs']; + _serverTableCalcsSet = true; + } + return _serverTableCalcs; + } + + set serverTableCalcs(bool v) { + _serverTableCalcs = v; + _serverTableCalcsSet = true; + } + + /// Retrieve any results from cache even if the results have expired. + + bool get cacheOnly { + if (!_cacheOnlySet && _apiMapResponse.containsKey('cache_only')) { + _cacheOnly = _apiMapResponse['cache_only']; + _cacheOnlySet = true; + } + return _cacheOnly; + } + + set cacheOnly(bool v) { + _cacheOnly = v; + _cacheOnlySet = true; + } + + /// cache key used to cache query. (read-only) + + String get cacheKey { + if (!_cacheKeySet && _apiMapResponse.containsKey('cache_key')) { + _cacheKey = _apiMapResponse['cache_key'] == null + ? null + : _apiMapResponse['cache_key'].toString(); + _cacheKeySet = true; + } + return _cacheKey; + } + + set cacheKey(String v) { + _cacheKey = v; + _cacheKeySet = true; + } + + /// Status of query task. + + String get status { + if (!_statusSet && _apiMapResponse.containsKey('status')) { + _status = _apiMapResponse['status'] == null + ? null + : _apiMapResponse['status'].toString(); + _statusSet = true; + } + return _status; + } + + set status(String v) { + _status = v; + _statusSet = true; + } + + /// Source of query task. + + String get source { + if (!_sourceSet && _apiMapResponse.containsKey('source')) { + _source = _apiMapResponse['source'] == null + ? null + : _apiMapResponse['source'].toString(); + _sourceSet = true; + } + return _source; + } + + set source(String v) { + _source = v; + _sourceSet = true; + } + + /// Runtime of prior queries. (read-only) + + double get runtime { + if (!_runtimeSet && _apiMapResponse.containsKey('runtime')) { + _runtime = _apiMapResponse['runtime']; + _runtimeSet = true; + } + return _runtime; + } + + set runtime(double v) { + _runtime = v; + _runtimeSet = true; + } + + /// Rebuild PDTS used in query. + + bool get rebuildPdts { + if (!_rebuildPdtsSet && _apiMapResponse.containsKey('rebuild_pdts')) { + _rebuildPdts = _apiMapResponse['rebuild_pdts']; + _rebuildPdtsSet = true; + } + return _rebuildPdts; + } + + set rebuildPdts(bool v) { + _rebuildPdts = v; + _rebuildPdtsSet = true; + } + + /// Source of the results of the query. (read-only) + + String get resultSource { + if (!_resultSourceSet && _apiMapResponse.containsKey('result_source')) { + _resultSource = _apiMapResponse['result_source'] == null + ? null + : _apiMapResponse['result_source'].toString(); + _resultSourceSet = true; + } + return _resultSource; + } + + set resultSource(String v) { + _resultSource = v; + _resultSourceSet = true; + } + + /// Id of look associated with query. + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Id of dashboard associated with query. + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// The data format of the query results. (read-only) + + String get resultFormat { + if (!_resultFormatSet && _apiMapResponse.containsKey('result_format')) { + _resultFormat = _apiMapResponse['result_format'] == null + ? null + : _apiMapResponse['result_format'].toString(); + _resultFormatSet = true; + } + return _resultFormat; + } + + set resultFormat(String v) { + _resultFormat = v; + _resultFormatSet = true; + } + + QueryTask() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + QueryTask.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_querySet || _apiMapResponse.containsKey('query')) { + json['query'] = query == null ? null : query.toJson(); + } + if (_generateLinksSet || _apiMapResponse.containsKey('generate_links')) { + json['generate_links'] = generateLinks; + } + if (_forceProductionSet || + _apiMapResponse.containsKey('force_production')) { + json['force_production'] = forceProduction; + } + if (_pathPrefixSet || _apiMapResponse.containsKey('path_prefix')) { + json['path_prefix'] = pathPrefix; + } + if (_cacheSet || _apiMapResponse.containsKey('cache')) { + json['cache'] = cache; + } + if (_serverTableCalcsSet || + _apiMapResponse.containsKey('server_table_calcs')) { + json['server_table_calcs'] = serverTableCalcs; + } + if (_cacheOnlySet || _apiMapResponse.containsKey('cache_only')) { + json['cache_only'] = cacheOnly; + } + if (_cacheKeySet || _apiMapResponse.containsKey('cache_key')) { + json['cache_key'] = cacheKey; + } + if (_statusSet || _apiMapResponse.containsKey('status')) { + json['status'] = status; + } + if (_sourceSet || _apiMapResponse.containsKey('source')) { + json['source'] = source; + } + if (_runtimeSet || _apiMapResponse.containsKey('runtime')) { + json['runtime'] = runtime; + } + if (_rebuildPdtsSet || _apiMapResponse.containsKey('rebuild_pdts')) { + json['rebuild_pdts'] = rebuildPdts; + } + if (_resultSourceSet || _apiMapResponse.containsKey('result_source')) { + json['result_source'] = resultSource; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_resultFormatSet || _apiMapResponse.containsKey('result_format')) { + json['result_format'] = resultFormat; + } + return json; + } +} + +class RenderTask { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _dashboardFilters; + bool _dashboardFiltersSet = false; + + int _dashboardId; + bool _dashboardIdSet = false; + + String _dashboardStyle; + bool _dashboardStyleSet = false; + + String _finalizedAt; + bool _finalizedAtSet = false; + + int _height; + bool _heightSet = false; + + String _id; + bool _idSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _lookmlDashboardId; + bool _lookmlDashboardIdSet = false; + + int _queryId; + bool _queryIdSet = false; + + String _dashboardElementId; + bool _dashboardElementIdSet = false; + + double _queryRuntime; + bool _queryRuntimeSet = false; + + double _renderRuntime; + bool _renderRuntimeSet = false; + + String _resultFormat; + bool _resultFormatSet = false; + + double _runtime; + bool _runtimeSet = false; + + String _status; + bool _statusSet = false; + + String _statusDetail; + bool _statusDetailSet = false; + + int _userId; + bool _userIdSet = false; + + int _width; + bool _widthSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Date/Time render task was created (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Filter values to apply to the dashboard queries, in URL query format (read-only) + + String get dashboardFilters { + if (!_dashboardFiltersSet && + _apiMapResponse.containsKey('dashboard_filters')) { + _dashboardFilters = _apiMapResponse['dashboard_filters'] == null + ? null + : _apiMapResponse['dashboard_filters'].toString(); + _dashboardFiltersSet = true; + } + return _dashboardFilters; + } + + set dashboardFilters(String v) { + _dashboardFilters = v; + _dashboardFiltersSet = true; + } + + /// Id of dashboard to render (read-only) + + int get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id']; + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(int v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Dashboard layout style: single_column or tiled (read-only) + + String get dashboardStyle { + if (!_dashboardStyleSet && _apiMapResponse.containsKey('dashboard_style')) { + _dashboardStyle = _apiMapResponse['dashboard_style'] == null + ? null + : _apiMapResponse['dashboard_style'].toString(); + _dashboardStyleSet = true; + } + return _dashboardStyle; + } + + set dashboardStyle(String v) { + _dashboardStyle = v; + _dashboardStyleSet = true; + } + + /// Date/Time render task was completed (read-only) + + String get finalizedAt { + if (!_finalizedAtSet && _apiMapResponse.containsKey('finalized_at')) { + _finalizedAt = _apiMapResponse['finalized_at'] == null + ? null + : _apiMapResponse['finalized_at'].toString(); + _finalizedAtSet = true; + } + return _finalizedAt; + } + + set finalizedAt(String v) { + _finalizedAt = v; + _finalizedAtSet = true; + } + + /// Output height in pixels. Flowed layouts may ignore this value. (read-only) + + int get height { + if (!_heightSet && _apiMapResponse.containsKey('height')) { + _height = _apiMapResponse['height']; + _heightSet = true; + } + return _height; + } + + set height(int v) { + _height = v; + _heightSet = true; + } + + /// Id of this render task (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Id of look to render (read-only) + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Id of lookml dashboard to render (read-only) + + String get lookmlDashboardId { + if (!_lookmlDashboardIdSet && + _apiMapResponse.containsKey('lookml_dashboard_id')) { + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null + ? null + : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardIdSet = true; + } + return _lookmlDashboardId; + } + + set lookmlDashboardId(String v) { + _lookmlDashboardId = v; + _lookmlDashboardIdSet = true; + } + + /// Id of query to render (read-only) + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// Id of dashboard element to render: UDD dashboard element would be numeric and LookML dashboard element would be model_name::dashboard_title::lookml_link_id (read-only) + + String get dashboardElementId { + if (!_dashboardElementIdSet && + _apiMapResponse.containsKey('dashboard_element_id')) { + _dashboardElementId = _apiMapResponse['dashboard_element_id'] == null + ? null + : _apiMapResponse['dashboard_element_id'].toString(); + _dashboardElementIdSet = true; + } + return _dashboardElementId; + } + + set dashboardElementId(String v) { + _dashboardElementId = v; + _dashboardElementIdSet = true; + } + + /// Number of seconds elapsed running queries (read-only) + + double get queryRuntime { + if (!_queryRuntimeSet && _apiMapResponse.containsKey('query_runtime')) { + _queryRuntime = _apiMapResponse['query_runtime']; + _queryRuntimeSet = true; + } + return _queryRuntime; + } + + set queryRuntime(double v) { + _queryRuntime = v; + _queryRuntimeSet = true; + } + + /// Number of seconds elapsed rendering data (read-only) + + double get renderRuntime { + if (!_renderRuntimeSet && _apiMapResponse.containsKey('render_runtime')) { + _renderRuntime = _apiMapResponse['render_runtime']; + _renderRuntimeSet = true; + } + return _renderRuntime; + } + + set renderRuntime(double v) { + _renderRuntime = v; + _renderRuntimeSet = true; + } + + /// Output format: pdf, png, or jpg (read-only) + + String get resultFormat { + if (!_resultFormatSet && _apiMapResponse.containsKey('result_format')) { + _resultFormat = _apiMapResponse['result_format'] == null + ? null + : _apiMapResponse['result_format'].toString(); + _resultFormatSet = true; + } + return _resultFormat; + } + + set resultFormat(String v) { + _resultFormat = v; + _resultFormatSet = true; + } + + /// Total seconds elapsed for render task (read-only) + + double get runtime { + if (!_runtimeSet && _apiMapResponse.containsKey('runtime')) { + _runtime = _apiMapResponse['runtime']; + _runtimeSet = true; + } + return _runtime; + } + + set runtime(double v) { + _runtime = v; + _runtimeSet = true; + } + + /// Render task status: enqueued_for_query, querying, enqueued_for_render, rendering, success, failure (read-only) + + String get status { + if (!_statusSet && _apiMapResponse.containsKey('status')) { + _status = _apiMapResponse['status'] == null + ? null + : _apiMapResponse['status'].toString(); + _statusSet = true; + } + return _status; + } + + set status(String v) { + _status = v; + _statusSet = true; + } + + /// Additional information about the current status (read-only) + + String get statusDetail { + if (!_statusDetailSet && _apiMapResponse.containsKey('status_detail')) { + _statusDetail = _apiMapResponse['status_detail'] == null + ? null + : _apiMapResponse['status_detail'].toString(); + _statusDetailSet = true; + } + return _statusDetail; + } + + set statusDetail(String v) { + _statusDetail = v; + _statusDetailSet = true; + } + + /// The user account permissions in which the render task will execute (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Output width in pixels (read-only) + + int get width { + if (!_widthSet && _apiMapResponse.containsKey('width')) { + _width = _apiMapResponse['width']; + _widthSet = true; + } + return _width; + } + + set width(int v) { + _width = v; + _widthSet = true; + } + + RenderTask() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + RenderTask.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_dashboardFiltersSet || + _apiMapResponse.containsKey('dashboard_filters')) { + json['dashboard_filters'] = dashboardFilters; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_dashboardStyleSet || _apiMapResponse.containsKey('dashboard_style')) { + json['dashboard_style'] = dashboardStyle; + } + if (_finalizedAtSet || _apiMapResponse.containsKey('finalized_at')) { + json['finalized_at'] = finalizedAt; + } + if (_heightSet || _apiMapResponse.containsKey('height')) { + json['height'] = height; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_lookmlDashboardIdSet || + _apiMapResponse.containsKey('lookml_dashboard_id')) { + json['lookml_dashboard_id'] = lookmlDashboardId; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_dashboardElementIdSet || + _apiMapResponse.containsKey('dashboard_element_id')) { + json['dashboard_element_id'] = dashboardElementId; + } + if (_queryRuntimeSet || _apiMapResponse.containsKey('query_runtime')) { + json['query_runtime'] = queryRuntime; + } + if (_renderRuntimeSet || _apiMapResponse.containsKey('render_runtime')) { + json['render_runtime'] = renderRuntime; + } + if (_resultFormatSet || _apiMapResponse.containsKey('result_format')) { + json['result_format'] = resultFormat; + } + if (_runtimeSet || _apiMapResponse.containsKey('runtime')) { + json['runtime'] = runtime; + } + if (_statusSet || _apiMapResponse.containsKey('status')) { + json['status'] = status; + } + if (_statusDetailSet || _apiMapResponse.containsKey('status_detail')) { + json['status_detail'] = statusDetail; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_widthSet || _apiMapResponse.containsKey('width')) { + json['width'] = width; + } + return json; + } +} + +class RepositoryCredential { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + String _rootProjectId; + bool _rootProjectIdSet = false; + + String _remoteUrl; + bool _remoteUrlSet = false; + + String _gitUsername; + bool _gitUsernameSet = false; + + String _gitPassword; + bool _gitPasswordSet = false; + + String _sshPublicKey; + bool _sshPublicKeySet = false; + + bool _isConfigured; + bool _isConfiguredSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Root project Id (read-only) + + String get rootProjectId { + if (!_rootProjectIdSet && _apiMapResponse.containsKey('root_project_id')) { + _rootProjectId = _apiMapResponse['root_project_id'] == null + ? null + : _apiMapResponse['root_project_id'].toString(); + _rootProjectIdSet = true; + } + return _rootProjectId; + } + + set rootProjectId(String v) { + _rootProjectId = v; + _rootProjectIdSet = true; + } + + /// Git remote repository url (read-only) + + String get remoteUrl { + if (!_remoteUrlSet && _apiMapResponse.containsKey('remote_url')) { + _remoteUrl = _apiMapResponse['remote_url'] == null + ? null + : _apiMapResponse['remote_url'].toString(); + _remoteUrlSet = true; + } + return _remoteUrl; + } + + set remoteUrl(String v) { + _remoteUrl = v; + _remoteUrlSet = true; + } + + /// Git username for HTTPS authentication. + + String get gitUsername { + if (!_gitUsernameSet && _apiMapResponse.containsKey('git_username')) { + _gitUsername = _apiMapResponse['git_username'] == null + ? null + : _apiMapResponse['git_username'].toString(); + _gitUsernameSet = true; + } + return _gitUsername; + } + + set gitUsername(String v) { + _gitUsername = v; + _gitUsernameSet = true; + } + + /// (Write-Only) Git password for HTTPS authentication. + + String get gitPassword { + if (!_gitPasswordSet && _apiMapResponse.containsKey('git_password')) { + _gitPassword = _apiMapResponse['git_password'] == null + ? null + : _apiMapResponse['git_password'].toString(); + _gitPasswordSet = true; + } + return _gitPassword; + } + + set gitPassword(String v) { + _gitPassword = v; + _gitPasswordSet = true; + } + + /// Public deploy key for SSH authentication. + + String get sshPublicKey { + if (!_sshPublicKeySet && _apiMapResponse.containsKey('ssh_public_key')) { + _sshPublicKey = _apiMapResponse['ssh_public_key'] == null + ? null + : _apiMapResponse['ssh_public_key'].toString(); + _sshPublicKeySet = true; + } + return _sshPublicKey; + } + + set sshPublicKey(String v) { + _sshPublicKey = v; + _sshPublicKeySet = true; + } + + /// Whether the credentials have been configured for the Git Repository. (read-only) + + bool get isConfigured { + if (!_isConfiguredSet && _apiMapResponse.containsKey('is_configured')) { + _isConfigured = _apiMapResponse['is_configured']; + _isConfiguredSet = true; + } + return _isConfigured; + } + + set isConfigured(bool v) { + _isConfigured = v; + _isConfiguredSet = true; + } + + RepositoryCredential() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + RepositoryCredential.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_rootProjectIdSet || _apiMapResponse.containsKey('root_project_id')) { + json['root_project_id'] = rootProjectId; + } + if (_remoteUrlSet || _apiMapResponse.containsKey('remote_url')) { + json['remote_url'] = remoteUrl; + } + if (_gitUsernameSet || _apiMapResponse.containsKey('git_username')) { + json['git_username'] = gitUsername; + } + if (_gitPasswordSet || _apiMapResponse.containsKey('git_password')) { + json['git_password'] = gitPassword; + } + if (_sshPublicKeySet || _apiMapResponse.containsKey('ssh_public_key')) { + json['ssh_public_key'] = sshPublicKey; + } + if (_isConfiguredSet || _apiMapResponse.containsKey('is_configured')) { + json['is_configured'] = isConfigured; + } + return json; + } +} + +/// Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "csv", "html", "md", "txt", "xlsx", "gsxml". (Enum defined in CreateQueryTask) +enum ResultFormat { + inlineJson, + json, + jsonDetail, + jsonFe, + csv, + html, + md, + txt, + xlsx, + gsxml +} + +class ResultFormatMapper { + static String toStringValue(ResultFormat e) { + switch (e) { + case ResultFormat.inlineJson: + return 'inline_json'; + case ResultFormat.json: + return 'json'; + case ResultFormat.jsonDetail: + return 'json_detail'; + case ResultFormat.jsonFe: + return 'json_fe'; + case ResultFormat.csv: + return 'csv'; + case ResultFormat.html: + return 'html'; + case ResultFormat.md: + return 'md'; + case ResultFormat.txt: + return 'txt'; + case ResultFormat.xlsx: + return 'xlsx'; + case ResultFormat.gsxml: + return 'gsxml'; + + default: + return null; + } + } + + static ResultFormat fromStringValue(String s) { + if (s == 'inline_json') { + return ResultFormat.inlineJson; + } + if (s == 'json') { + return ResultFormat.json; + } + if (s == 'json_detail') { + return ResultFormat.jsonDetail; + } + if (s == 'json_fe') { + return ResultFormat.jsonFe; + } + if (s == 'csv') { + return ResultFormat.csv; + } + if (s == 'html') { + return ResultFormat.html; + } + if (s == 'md') { + return ResultFormat.md; + } + if (s == 'txt') { + return ResultFormat.txt; + } + if (s == 'xlsx') { + return ResultFormat.xlsx; + } + if (s == 'gsxml') { + return ResultFormat.gsxml; + } + return null; + } +} + +class ResultMakerFilterables { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _model; + bool _modelSet = false; + + String _view; + bool _viewSet = false; + + String _name; + bool _nameSet = false; + + List _listen; + bool _listenSet = false; + + /// The model this filterable comes from (used for field suggestions). (read-only) + + String get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : _apiMapResponse['model'].toString(); + _modelSet = true; + } + return _model; + } + + set model(String v) { + _model = v; + _modelSet = true; + } + + /// The view this filterable comes from (used for field suggestions). (read-only) + + String get view { + if (!_viewSet && _apiMapResponse.containsKey('view')) { + _view = _apiMapResponse['view'] == null + ? null + : _apiMapResponse['view'].toString(); + _viewSet = true; + } + return _view; + } + + set view(String v) { + _view = v; + _viewSet = true; + } + + /// The name of the filterable thing (Query or Merged Results). (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// array of dashboard_filter_name: and field: objects. (read-only) + + List get listen { + if (!_listenSet && _apiMapResponse.containsKey('listen')) { + _listen = _apiMapResponse['listen'] == null + ? null + : (_apiMapResponse['listen'] as List) + .map((i) => ResultMakerFilterablesListen.fromResponse( + i, apiResponseContentType)) + .toList(); + _listenSet = true; + } + return _listen; + } + + set listen(List v) { + _listen = v; + _listenSet = true; + } + + ResultMakerFilterables() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ResultMakerFilterables.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model; + } + if (_viewSet || _apiMapResponse.containsKey('view')) { + json['view'] = view; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_listenSet || _apiMapResponse.containsKey('listen')) { + json['listen'] = + listen == null ? null : listen.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class ResultMakerFilterablesListen { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _dashboardFilterName; + bool _dashboardFilterNameSet = false; + + String _field; + bool _fieldSet = false; + + /// The name of a dashboard filter to listen to. + + String get dashboardFilterName { + if (!_dashboardFilterNameSet && + _apiMapResponse.containsKey('dashboard_filter_name')) { + _dashboardFilterName = _apiMapResponse['dashboard_filter_name'] == null + ? null + : _apiMapResponse['dashboard_filter_name'].toString(); + _dashboardFilterNameSet = true; + } + return _dashboardFilterName; + } + + set dashboardFilterName(String v) { + _dashboardFilterName = v; + _dashboardFilterNameSet = true; + } + + /// The name of the field in the filterable to filter with the value of the dashboard filter. + + String get field { + if (!_fieldSet && _apiMapResponse.containsKey('field')) { + _field = _apiMapResponse['field'] == null + ? null + : _apiMapResponse['field'].toString(); + _fieldSet = true; + } + return _field; + } + + set field(String v) { + _field = v; + _fieldSet = true; + } + + ResultMakerFilterablesListen() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ResultMakerFilterablesListen.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dashboardFilterNameSet || + _apiMapResponse.containsKey('dashboard_filter_name')) { + json['dashboard_filter_name'] = dashboardFilterName; + } + if (_fieldSet || _apiMapResponse.containsKey('field')) { + json['field'] = field; + } + return json; + } +} + +class ResultMakerWithIdVisConfigAndDynamicFields { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + String _dynamicFields; + bool _dynamicFieldsSet = false; + + List _filterables; + bool _filterablesSet = false; + + List _sorts; + bool _sortsSet = false; + + String _mergeResultId; + bool _mergeResultIdSet = false; + + bool _total; + bool _totalSet = false; + + int _queryId; + bool _queryIdSet = false; + + String _sqlQueryId; + bool _sqlQueryIdSet = false; + + Query _query; + bool _querySet = false; + + Map _visConfig; + bool _visConfigSet = false; + + /// Unique Id. (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// JSON string of dynamic field information. (read-only) + + String get dynamicFields { + if (!_dynamicFieldsSet && _apiMapResponse.containsKey('dynamic_fields')) { + _dynamicFields = _apiMapResponse['dynamic_fields'] == null + ? null + : _apiMapResponse['dynamic_fields'].toString(); + _dynamicFieldsSet = true; + } + return _dynamicFields; + } + + set dynamicFields(String v) { + _dynamicFields = v; + _dynamicFieldsSet = true; + } + + /// array of items that can be filtered and information about them. (read-only) + + List get filterables { + if (!_filterablesSet && _apiMapResponse.containsKey('filterables')) { + _filterables = _apiMapResponse['filterables'] == null + ? null + : (_apiMapResponse['filterables'] as List) + .map((i) => ResultMakerFilterables.fromResponse( + i, apiResponseContentType)) + .toList(); + _filterablesSet = true; + } + return _filterables; + } + + set filterables(List v) { + _filterables = v; + _filterablesSet = true; + } + + /// Sorts of the constituent Look, Query, or Merge Query (read-only) + + List get sorts { + if (!_sortsSet && _apiMapResponse.containsKey('sorts')) { + _sorts = _apiMapResponse['sorts'] == null + ? null + : _apiMapResponse['sorts'].map((i) => i as String).toList(); + _sortsSet = true; + } + return _sorts; + } + + set sorts(List v) { + _sorts = v; + _sortsSet = true; + } + + /// ID of merge result if this is a merge_result. (read-only) + + String get mergeResultId { + if (!_mergeResultIdSet && _apiMapResponse.containsKey('merge_result_id')) { + _mergeResultId = _apiMapResponse['merge_result_id'] == null + ? null + : _apiMapResponse['merge_result_id'].toString(); + _mergeResultIdSet = true; + } + return _mergeResultId; + } + + set mergeResultId(String v) { + _mergeResultId = v; + _mergeResultIdSet = true; + } + + /// Total of the constituent Look, Query, or Merge Query (read-only) + + bool get total { + if (!_totalSet && _apiMapResponse.containsKey('total')) { + _total = _apiMapResponse['total']; + _totalSet = true; + } + return _total; + } + + set total(bool v) { + _total = v; + _totalSet = true; + } + + /// ID of query if this is a query. (read-only) + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// ID of SQL Query if this is a SQL Runner Query (read-only) + + String get sqlQueryId { + if (!_sqlQueryIdSet && _apiMapResponse.containsKey('sql_query_id')) { + _sqlQueryId = _apiMapResponse['sql_query_id'] == null + ? null + : _apiMapResponse['sql_query_id'].toString(); + _sqlQueryIdSet = true; + } + return _sqlQueryId; + } + + set sqlQueryId(String v) { + _sqlQueryId = v; + _sqlQueryIdSet = true; + } + + Query get query { + if (!_querySet && _apiMapResponse.containsKey('query')) { + _query = _apiMapResponse['query'] == null + ? null + : Query.fromResponse( + _apiMapResponse['query'], apiResponseContentType); + _querySet = true; + } + return _query; + } + + set query(Query v) { + _query = v; + _querySet = true; + } + + /// Vis config of the constituent Query, or Merge Query. (read-only) + + Map get visConfig { + if (!_visConfigSet && _apiMapResponse.containsKey('vis_config')) { + _visConfig = _apiMapResponse['vis_config']; + _visConfigSet = true; + } + return _visConfig; + } + + set visConfig(Map v) { + _visConfig = v; + _visConfigSet = true; + } + + ResultMakerWithIdVisConfigAndDynamicFields() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ResultMakerWithIdVisConfigAndDynamicFields.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_dynamicFieldsSet || _apiMapResponse.containsKey('dynamic_fields')) { + json['dynamic_fields'] = dynamicFields; + } + if (_filterablesSet || _apiMapResponse.containsKey('filterables')) { + json['filterables'] = filterables == null + ? null + : filterables.map((i) => i.toJson()).toList(); + } + if (_sortsSet || _apiMapResponse.containsKey('sorts')) { + json['sorts'] = sorts; + } + if (_mergeResultIdSet || _apiMapResponse.containsKey('merge_result_id')) { + json['merge_result_id'] = mergeResultId; + } + if (_totalSet || _apiMapResponse.containsKey('total')) { + json['total'] = total; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_sqlQueryIdSet || _apiMapResponse.containsKey('sql_query_id')) { + json['sql_query_id'] = sqlQueryId; + } + if (_querySet || _apiMapResponse.containsKey('query')) { + json['query'] = query == null ? null : query.toJson(); + } + if (_visConfigSet || _apiMapResponse.containsKey('vis_config')) { + json['vis_config'] = visConfig; + } + return json; + } +} + +class Role { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _name; + bool _nameSet = false; + + PermissionSet _permissionSet; + bool _permissionSetSet = false; + + int _permissionSetId; + bool _permissionSetIdSet = false; + + ModelSet _modelSet; + bool _modelSetSet = false; + + int _modelSetId; + bool _modelSetIdSet = false; + + String _url; + bool _urlSet = false; + + String _usersUrl; + bool _usersUrlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Name of Role + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + PermissionSet get permissionSet { + if (!_permissionSetSet && _apiMapResponse.containsKey('permission_set')) { + _permissionSet = _apiMapResponse['permission_set'] == null + ? null + : PermissionSet.fromResponse( + _apiMapResponse['permission_set'], apiResponseContentType); + _permissionSetSet = true; + } + return _permissionSet; + } + + set permissionSet(PermissionSet v) { + _permissionSet = v; + _permissionSetSet = true; + } + + /// (Write-Only) Id of permission set + + int get permissionSetId { + if (!_permissionSetIdSet && + _apiMapResponse.containsKey('permission_set_id')) { + _permissionSetId = _apiMapResponse['permission_set_id']; + _permissionSetIdSet = true; + } + return _permissionSetId; + } + + set permissionSetId(int v) { + _permissionSetId = v; + _permissionSetIdSet = true; + } + + ModelSet get modelSet { + if (!_modelSetSet && _apiMapResponse.containsKey('model_set')) { + _modelSet = _apiMapResponse['model_set'] == null + ? null + : ModelSet.fromResponse( + _apiMapResponse['model_set'], apiResponseContentType); + _modelSetSet = true; + } + return _modelSet; + } + + set modelSet(ModelSet v) { + _modelSet = v; + _modelSetSet = true; + } + + /// (Write-Only) Id of model set + + int get modelSetId { + if (!_modelSetIdSet && _apiMapResponse.containsKey('model_set_id')) { + _modelSetId = _apiMapResponse['model_set_id']; + _modelSetIdSet = true; + } + return _modelSetId; + } + + set modelSetId(int v) { + _modelSetId = v; + _modelSetIdSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Link to get list of users with this role (read-only) + + String get usersUrl { + if (!_usersUrlSet && _apiMapResponse.containsKey('users_url')) { + _usersUrl = _apiMapResponse['users_url'] == null + ? null + : _apiMapResponse['users_url'].toString(); + _usersUrlSet = true; + } + return _usersUrl; + } + + set usersUrl(String v) { + _usersUrl = v; + _usersUrlSet = true; + } + + Role() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Role.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_permissionSetSet || _apiMapResponse.containsKey('permission_set')) { + json['permission_set'] = + permissionSet == null ? null : permissionSet.toJson(); + } + if (_permissionSetIdSet || + _apiMapResponse.containsKey('permission_set_id')) { + json['permission_set_id'] = permissionSetId; + } + if (_modelSetSet || _apiMapResponse.containsKey('model_set')) { + json['model_set'] = modelSet == null ? null : modelSet.toJson(); + } + if (_modelSetIdSet || _apiMapResponse.containsKey('model_set_id')) { + json['model_set_id'] = modelSetId; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_usersUrlSet || _apiMapResponse.containsKey('users_url')) { + json['users_url'] = usersUrl; + } + return json; + } +} + +class RoleSearch { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _name; + bool _nameSet = false; + + PermissionSet _permissionSet; + bool _permissionSetSet = false; + + int _permissionSetId; + bool _permissionSetIdSet = false; + + ModelSet _modelSet; + bool _modelSetSet = false; + + int _modelSetId; + bool _modelSetIdSet = false; + + int _userCount; + bool _userCountSet = false; + + String _url; + bool _urlSet = false; + + String _usersUrl; + bool _usersUrlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Name of Role + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + PermissionSet get permissionSet { + if (!_permissionSetSet && _apiMapResponse.containsKey('permission_set')) { + _permissionSet = _apiMapResponse['permission_set'] == null + ? null + : PermissionSet.fromResponse( + _apiMapResponse['permission_set'], apiResponseContentType); + _permissionSetSet = true; + } + return _permissionSet; + } + + set permissionSet(PermissionSet v) { + _permissionSet = v; + _permissionSetSet = true; + } + + /// (Write-Only) Id of permission set + + int get permissionSetId { + if (!_permissionSetIdSet && + _apiMapResponse.containsKey('permission_set_id')) { + _permissionSetId = _apiMapResponse['permission_set_id']; + _permissionSetIdSet = true; + } + return _permissionSetId; + } + + set permissionSetId(int v) { + _permissionSetId = v; + _permissionSetIdSet = true; + } + + ModelSet get modelSet { + if (!_modelSetSet && _apiMapResponse.containsKey('model_set')) { + _modelSet = _apiMapResponse['model_set'] == null + ? null + : ModelSet.fromResponse( + _apiMapResponse['model_set'], apiResponseContentType); + _modelSetSet = true; + } + return _modelSet; + } + + set modelSet(ModelSet v) { + _modelSet = v; + _modelSetSet = true; + } + + /// (Write-Only) Id of model set + + int get modelSetId { + if (!_modelSetIdSet && _apiMapResponse.containsKey('model_set_id')) { + _modelSetId = _apiMapResponse['model_set_id']; + _modelSetIdSet = true; + } + return _modelSetId; + } + + set modelSetId(int v) { + _modelSetId = v; + _modelSetIdSet = true; + } + + /// Count of users with this role (read-only) + + int get userCount { + if (!_userCountSet && _apiMapResponse.containsKey('user_count')) { + _userCount = _apiMapResponse['user_count']; + _userCountSet = true; + } + return _userCount; + } + + set userCount(int v) { + _userCount = v; + _userCountSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// Link to get list of users with this role (read-only) + + String get usersUrl { + if (!_usersUrlSet && _apiMapResponse.containsKey('users_url')) { + _usersUrl = _apiMapResponse['users_url'] == null + ? null + : _apiMapResponse['users_url'].toString(); + _usersUrlSet = true; + } + return _usersUrl; + } + + set usersUrl(String v) { + _usersUrl = v; + _usersUrlSet = true; + } + + RoleSearch() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + RoleSearch.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_permissionSetSet || _apiMapResponse.containsKey('permission_set')) { + json['permission_set'] = + permissionSet == null ? null : permissionSet.toJson(); + } + if (_permissionSetIdSet || + _apiMapResponse.containsKey('permission_set_id')) { + json['permission_set_id'] = permissionSetId; + } + if (_modelSetSet || _apiMapResponse.containsKey('model_set')) { + json['model_set'] = modelSet == null ? null : modelSet.toJson(); + } + if (_modelSetIdSet || _apiMapResponse.containsKey('model_set_id')) { + json['model_set_id'] = modelSetId; + } + if (_userCountSet || _apiMapResponse.containsKey('user_count')) { + json['user_count'] = userCount; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_usersUrlSet || _apiMapResponse.containsKey('users_url')) { + json['users_url'] = usersUrl; + } + return json; + } +} + +class RunningQueries { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + UserPublic _user; + bool _userSet = false; + + Query _query; + bool _querySet = false; + + SqlQuery _sqlQuery; + bool _sqlQuerySet = false; + + LookBasic _look; + bool _lookSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _completedAt; + bool _completedAtSet = false; + + String _queryId; + bool _queryIdSet = false; + + String _source; + bool _sourceSet = false; + + String _nodeId; + bool _nodeIdSet = false; + + String _slug; + bool _slugSet = false; + + String _queryTaskId; + bool _queryTaskIdSet = false; + + String _cacheKey; + bool _cacheKeySet = false; + + String _connectionName; + bool _connectionNameSet = false; + + String _dialect; + bool _dialectSet = false; + + String _connectionId; + bool _connectionIdSet = false; + + String _message; + bool _messageSet = false; + + String _status; + bool _statusSet = false; + + double _runtime; + bool _runtimeSet = false; + + String _sql; + bool _sqlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + UserPublic get user { + if (!_userSet && _apiMapResponse.containsKey('user')) { + _user = _apiMapResponse['user'] == null + ? null + : UserPublic.fromResponse( + _apiMapResponse['user'], apiResponseContentType); + _userSet = true; + } + return _user; + } + + set user(UserPublic v) { + _user = v; + _userSet = true; + } + + Query get query { + if (!_querySet && _apiMapResponse.containsKey('query')) { + _query = _apiMapResponse['query'] == null + ? null + : Query.fromResponse( + _apiMapResponse['query'], apiResponseContentType); + _querySet = true; + } + return _query; + } + + set query(Query v) { + _query = v; + _querySet = true; + } + + SqlQuery get sqlQuery { + if (!_sqlQuerySet && _apiMapResponse.containsKey('sql_query')) { + _sqlQuery = _apiMapResponse['sql_query'] == null + ? null + : SqlQuery.fromResponse( + _apiMapResponse['sql_query'], apiResponseContentType); + _sqlQuerySet = true; + } + return _sqlQuery; + } + + set sqlQuery(SqlQuery v) { + _sqlQuery = v; + _sqlQuerySet = true; + } + + LookBasic get look { + if (!_lookSet && _apiMapResponse.containsKey('look')) { + _look = _apiMapResponse['look'] == null + ? null + : LookBasic.fromResponse( + _apiMapResponse['look'], apiResponseContentType); + _lookSet = true; + } + return _look; + } + + set look(LookBasic v) { + _look = v; + _lookSet = true; + } + + /// Date/Time Query was initiated (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Date/Time Query was completed (read-only) + + String get completedAt { + if (!_completedAtSet && _apiMapResponse.containsKey('completed_at')) { + _completedAt = _apiMapResponse['completed_at'] == null + ? null + : _apiMapResponse['completed_at'].toString(); + _completedAtSet = true; + } + return _completedAt; + } + + set completedAt(String v) { + _completedAt = v; + _completedAtSet = true; + } + + /// Query Id (read-only) + + String get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id'] == null + ? null + : _apiMapResponse['query_id'].toString(); + _queryIdSet = true; + } + return _queryId; + } + + set queryId(String v) { + _queryId = v; + _queryIdSet = true; + } + + /// Source (look, dashboard, queryrunner, explore, etc.) (read-only) + + String get source { + if (!_sourceSet && _apiMapResponse.containsKey('source')) { + _source = _apiMapResponse['source'] == null + ? null + : _apiMapResponse['source'].toString(); + _sourceSet = true; + } + return _source; + } + + set source(String v) { + _source = v; + _sourceSet = true; + } + + /// Node Id (read-only) + + String get nodeId { + if (!_nodeIdSet && _apiMapResponse.containsKey('node_id')) { + _nodeId = _apiMapResponse['node_id'] == null + ? null + : _apiMapResponse['node_id'].toString(); + _nodeIdSet = true; + } + return _nodeId; + } + + set nodeId(String v) { + _nodeId = v; + _nodeIdSet = true; + } + + /// Slug (read-only) + + String get slug { + if (!_slugSet && _apiMapResponse.containsKey('slug')) { + _slug = _apiMapResponse['slug'] == null + ? null + : _apiMapResponse['slug'].toString(); + _slugSet = true; + } + return _slug; + } + + set slug(String v) { + _slug = v; + _slugSet = true; + } + + /// ID of a Query Task (read-only) + + String get queryTaskId { + if (!_queryTaskIdSet && _apiMapResponse.containsKey('query_task_id')) { + _queryTaskId = _apiMapResponse['query_task_id'] == null + ? null + : _apiMapResponse['query_task_id'].toString(); + _queryTaskIdSet = true; + } + return _queryTaskId; + } + + set queryTaskId(String v) { + _queryTaskId = v; + _queryTaskIdSet = true; + } + + /// Cache Key (read-only) + + String get cacheKey { + if (!_cacheKeySet && _apiMapResponse.containsKey('cache_key')) { + _cacheKey = _apiMapResponse['cache_key'] == null + ? null + : _apiMapResponse['cache_key'].toString(); + _cacheKeySet = true; + } + return _cacheKey; + } + + set cacheKey(String v) { + _cacheKey = v; + _cacheKeySet = true; + } + + /// Connection (read-only) + + String get connectionName { + if (!_connectionNameSet && _apiMapResponse.containsKey('connection_name')) { + _connectionName = _apiMapResponse['connection_name'] == null + ? null + : _apiMapResponse['connection_name'].toString(); + _connectionNameSet = true; + } + return _connectionName; + } + + set connectionName(String v) { + _connectionName = v; + _connectionNameSet = true; + } + + /// Dialect (read-only) + + String get dialect { + if (!_dialectSet && _apiMapResponse.containsKey('dialect')) { + _dialect = _apiMapResponse['dialect'] == null + ? null + : _apiMapResponse['dialect'].toString(); + _dialectSet = true; + } + return _dialect; + } + + set dialect(String v) { + _dialect = v; + _dialectSet = true; + } + + /// Connection ID (read-only) + + String get connectionId { + if (!_connectionIdSet && _apiMapResponse.containsKey('connection_id')) { + _connectionId = _apiMapResponse['connection_id'] == null + ? null + : _apiMapResponse['connection_id'].toString(); + _connectionIdSet = true; + } + return _connectionId; + } + + set connectionId(String v) { + _connectionId = v; + _connectionIdSet = true; + } + + /// Additional Information(Error message or verbose status) (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Status description (read-only) + + String get status { + if (!_statusSet && _apiMapResponse.containsKey('status')) { + _status = _apiMapResponse['status'] == null + ? null + : _apiMapResponse['status'].toString(); + _statusSet = true; + } + return _status; + } + + set status(String v) { + _status = v; + _statusSet = true; + } + + /// Number of seconds elapsed running the Query (read-only) + + double get runtime { + if (!_runtimeSet && _apiMapResponse.containsKey('runtime')) { + _runtime = _apiMapResponse['runtime']; + _runtimeSet = true; + } + return _runtime; + } + + set runtime(double v) { + _runtime = v; + _runtimeSet = true; + } + + /// SQL text of the query as run (read-only) + + String get sql { + if (!_sqlSet && _apiMapResponse.containsKey('sql')) { + _sql = _apiMapResponse['sql'] == null + ? null + : _apiMapResponse['sql'].toString(); + _sqlSet = true; + } + return _sql; + } + + set sql(String v) { + _sql = v; + _sqlSet = true; + } + + RunningQueries() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + RunningQueries.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_userSet || _apiMapResponse.containsKey('user')) { + json['user'] = user == null ? null : user.toJson(); + } + if (_querySet || _apiMapResponse.containsKey('query')) { + json['query'] = query == null ? null : query.toJson(); + } + if (_sqlQuerySet || _apiMapResponse.containsKey('sql_query')) { + json['sql_query'] = sqlQuery == null ? null : sqlQuery.toJson(); + } + if (_lookSet || _apiMapResponse.containsKey('look')) { + json['look'] = look == null ? null : look.toJson(); + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_completedAtSet || _apiMapResponse.containsKey('completed_at')) { + json['completed_at'] = completedAt; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_sourceSet || _apiMapResponse.containsKey('source')) { + json['source'] = source; + } + if (_nodeIdSet || _apiMapResponse.containsKey('node_id')) { + json['node_id'] = nodeId; + } + if (_slugSet || _apiMapResponse.containsKey('slug')) { + json['slug'] = slug; + } + if (_queryTaskIdSet || _apiMapResponse.containsKey('query_task_id')) { + json['query_task_id'] = queryTaskId; + } + if (_cacheKeySet || _apiMapResponse.containsKey('cache_key')) { + json['cache_key'] = cacheKey; + } + if (_connectionNameSet || _apiMapResponse.containsKey('connection_name')) { + json['connection_name'] = connectionName; + } + if (_dialectSet || _apiMapResponse.containsKey('dialect')) { + json['dialect'] = dialect; + } + if (_connectionIdSet || _apiMapResponse.containsKey('connection_id')) { + json['connection_id'] = connectionId; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_statusSet || _apiMapResponse.containsKey('status')) { + json['status'] = status; + } + if (_runtimeSet || _apiMapResponse.containsKey('runtime')) { + json['runtime'] = runtime; + } + if (_sqlSet || _apiMapResponse.containsKey('sql')) { + json['sql'] = sql; + } + return json; + } +} + +class SamlConfig { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + bool _enabled; + bool _enabledSet = false; + + String _idpCert; + bool _idpCertSet = false; + + String _idpUrl; + bool _idpUrlSet = false; + + String _idpIssuer; + bool _idpIssuerSet = false; + + String _idpAudience; + bool _idpAudienceSet = false; + + int _allowedClockDrift; + bool _allowedClockDriftSet = false; + + String _userAttributeMapEmail; + bool _userAttributeMapEmailSet = false; + + String _userAttributeMapFirstName; + bool _userAttributeMapFirstNameSet = false; + + String _userAttributeMapLastName; + bool _userAttributeMapLastNameSet = false; + + String _newUserMigrationTypes; + bool _newUserMigrationTypesSet = false; + + bool _alternateEmailLoginAllowed; + bool _alternateEmailLoginAllowedSet = false; + + String _testSlug; + bool _testSlugSet = false; + + String _modifiedAt; + bool _modifiedAtSet = false; + + String _modifiedBy; + bool _modifiedBySet = false; + + List _defaultNewUserRoles; + bool _defaultNewUserRolesSet = false; + + List _defaultNewUserGroups; + bool _defaultNewUserGroupsSet = false; + + List _defaultNewUserRoleIds; + bool _defaultNewUserRoleIdsSet = false; + + List _defaultNewUserGroupIds; + bool _defaultNewUserGroupIdsSet = false; + + bool _setRolesFromGroups; + bool _setRolesFromGroupsSet = false; + + String _groupsAttribute; + bool _groupsAttributeSet = false; + + List _groups; + bool _groupsSet = false; + + List _groupsWithRoleIds; + bool _groupsWithRoleIdsSet = false; + + bool _authRequiresRole; + bool _authRequiresRoleSet = false; + + List _userAttributes; + bool _userAttributesSet = false; + + List _userAttributesWithIds; + bool _userAttributesWithIdsSet = false; + + String _groupsFinderType; + bool _groupsFinderTypeSet = false; + + String _groupsMemberValue; + bool _groupsMemberValueSet = false; + + bool _bypassLoginPage; + bool _bypassLoginPageSet = false; + + bool _allowNormalGroupMembership; + bool _allowNormalGroupMembershipSet = false; + + bool _allowRolesFromNormalGroups; + bool _allowRolesFromNormalGroupsSet = false; + + bool _allowDirectRoles; + bool _allowDirectRolesSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Enable/Disable Saml authentication for the server + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Identity Provider Certificate (provided by IdP) + + String get idpCert { + if (!_idpCertSet && _apiMapResponse.containsKey('idp_cert')) { + _idpCert = _apiMapResponse['idp_cert'] == null + ? null + : _apiMapResponse['idp_cert'].toString(); + _idpCertSet = true; + } + return _idpCert; + } + + set idpCert(String v) { + _idpCert = v; + _idpCertSet = true; + } + + /// Identity Provider Url (provided by IdP) + + String get idpUrl { + if (!_idpUrlSet && _apiMapResponse.containsKey('idp_url')) { + _idpUrl = _apiMapResponse['idp_url'] == null + ? null + : _apiMapResponse['idp_url'].toString(); + _idpUrlSet = true; + } + return _idpUrl; + } + + set idpUrl(String v) { + _idpUrl = v; + _idpUrlSet = true; + } + + /// Identity Provider Issuer (provided by IdP) + + String get idpIssuer { + if (!_idpIssuerSet && _apiMapResponse.containsKey('idp_issuer')) { + _idpIssuer = _apiMapResponse['idp_issuer'] == null + ? null + : _apiMapResponse['idp_issuer'].toString(); + _idpIssuerSet = true; + } + return _idpIssuer; + } + + set idpIssuer(String v) { + _idpIssuer = v; + _idpIssuerSet = true; + } + + /// Identity Provider Audience (set in IdP config). Optional in Looker. Set this only if you want Looker to validate the audience value returned by the IdP. + + String get idpAudience { + if (!_idpAudienceSet && _apiMapResponse.containsKey('idp_audience')) { + _idpAudience = _apiMapResponse['idp_audience'] == null + ? null + : _apiMapResponse['idp_audience'].toString(); + _idpAudienceSet = true; + } + return _idpAudience; + } + + set idpAudience(String v) { + _idpAudience = v; + _idpAudienceSet = true; + } + + /// Count of seconds of clock drift to allow when validating timestamps of assertions. + + int get allowedClockDrift { + if (!_allowedClockDriftSet && + _apiMapResponse.containsKey('allowed_clock_drift')) { + _allowedClockDrift = _apiMapResponse['allowed_clock_drift']; + _allowedClockDriftSet = true; + } + return _allowedClockDrift; + } + + set allowedClockDrift(int v) { + _allowedClockDrift = v; + _allowedClockDriftSet = true; + } + + /// Name of user record attributes used to indicate email address field + + String get userAttributeMapEmail { + if (!_userAttributeMapEmailSet && + _apiMapResponse.containsKey('user_attribute_map_email')) { + _userAttributeMapEmail = + _apiMapResponse['user_attribute_map_email'] == null + ? null + : _apiMapResponse['user_attribute_map_email'].toString(); + _userAttributeMapEmailSet = true; + } + return _userAttributeMapEmail; + } + + set userAttributeMapEmail(String v) { + _userAttributeMapEmail = v; + _userAttributeMapEmailSet = true; + } + + /// Name of user record attributes used to indicate first name + + String get userAttributeMapFirstName { + if (!_userAttributeMapFirstNameSet && + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + _userAttributeMapFirstName = + _apiMapResponse['user_attribute_map_first_name'] == null + ? null + : _apiMapResponse['user_attribute_map_first_name'].toString(); + _userAttributeMapFirstNameSet = true; + } + return _userAttributeMapFirstName; + } + + set userAttributeMapFirstName(String v) { + _userAttributeMapFirstName = v; + _userAttributeMapFirstNameSet = true; + } + + /// Name of user record attributes used to indicate last name + + String get userAttributeMapLastName { + if (!_userAttributeMapLastNameSet && + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + _userAttributeMapLastName = + _apiMapResponse['user_attribute_map_last_name'] == null + ? null + : _apiMapResponse['user_attribute_map_last_name'].toString(); + _userAttributeMapLastNameSet = true; + } + return _userAttributeMapLastName; + } + + set userAttributeMapLastName(String v) { + _userAttributeMapLastName = v; + _userAttributeMapLastNameSet = true; + } + + /// Merge first-time saml login to existing user account by email addresses. When a user logs in for the first time via saml this option will connect this user into their existing account by finding the account with a matching email address by testing the given types of credentials for existing users. Otherwise a new user account will be created for the user. This list (if provided) must be a comma separated list of string like 'email,ldap,google' + + String get newUserMigrationTypes { + if (!_newUserMigrationTypesSet && + _apiMapResponse.containsKey('new_user_migration_types')) { + _newUserMigrationTypes = + _apiMapResponse['new_user_migration_types'] == null + ? null + : _apiMapResponse['new_user_migration_types'].toString(); + _newUserMigrationTypesSet = true; + } + return _newUserMigrationTypes; + } + + set newUserMigrationTypes(String v) { + _newUserMigrationTypes = v; + _newUserMigrationTypesSet = true; + } + + /// Allow alternate email-based login via '/login/email' for admins and for specified users with the 'login_special_email' permission. This option is useful as a fallback during ldap setup, if ldap config problems occur later, or if you need to support some users who are not in your ldap directory. Looker email/password logins are always disabled for regular users when ldap is enabled. + + bool get alternateEmailLoginAllowed { + if (!_alternateEmailLoginAllowedSet && + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + _alternateEmailLoginAllowed = + _apiMapResponse['alternate_email_login_allowed']; + _alternateEmailLoginAllowedSet = true; + } + return _alternateEmailLoginAllowed; + } + + set alternateEmailLoginAllowed(bool v) { + _alternateEmailLoginAllowed = v; + _alternateEmailLoginAllowedSet = true; + } + + /// Slug to identify configurations that are created in order to run a Saml config test (read-only) + + String get testSlug { + if (!_testSlugSet && _apiMapResponse.containsKey('test_slug')) { + _testSlug = _apiMapResponse['test_slug'] == null + ? null + : _apiMapResponse['test_slug'].toString(); + _testSlugSet = true; + } + return _testSlug; + } + + set testSlug(String v) { + _testSlug = v; + _testSlugSet = true; + } + + /// When this config was last modified (read-only) + + String get modifiedAt { + if (!_modifiedAtSet && _apiMapResponse.containsKey('modified_at')) { + _modifiedAt = _apiMapResponse['modified_at'] == null + ? null + : _apiMapResponse['modified_at'].toString(); + _modifiedAtSet = true; + } + return _modifiedAt; + } + + set modifiedAt(String v) { + _modifiedAt = v; + _modifiedAtSet = true; + } + + /// User id of user who last modified this config (read-only) + + String get modifiedBy { + if (!_modifiedBySet && _apiMapResponse.containsKey('modified_by')) { + _modifiedBy = _apiMapResponse['modified_by'] == null + ? null + : _apiMapResponse['modified_by'].toString(); + _modifiedBySet = true; + } + return _modifiedBy; + } + + set modifiedBy(String v) { + _modifiedBy = v; + _modifiedBySet = true; + } + + /// (Read-only) Roles that will be applied to new users the first time they login via Saml (read-only) + + List get defaultNewUserRoles { + if (!_defaultNewUserRolesSet && + _apiMapResponse.containsKey('default_new_user_roles')) { + _defaultNewUserRoles = _apiMapResponse['default_new_user_roles'] == null + ? null + : (_apiMapResponse['default_new_user_roles'] as List) + .map((i) => Role.fromResponse(i, apiResponseContentType)) + .toList(); + _defaultNewUserRolesSet = true; + } + return _defaultNewUserRoles; + } + + set defaultNewUserRoles(List v) { + _defaultNewUserRoles = v; + _defaultNewUserRolesSet = true; + } + + /// (Read-only) Groups that will be applied to new users the first time they login via Saml (read-only) + + List get defaultNewUserGroups { + if (!_defaultNewUserGroupsSet && + _apiMapResponse.containsKey('default_new_user_groups')) { + _defaultNewUserGroups = _apiMapResponse['default_new_user_groups'] == null + ? null + : (_apiMapResponse['default_new_user_groups'] as List) + .map((i) => Group.fromResponse(i, apiResponseContentType)) + .toList(); + _defaultNewUserGroupsSet = true; + } + return _defaultNewUserGroups; + } + + set defaultNewUserGroups(List v) { + _defaultNewUserGroups = v; + _defaultNewUserGroupsSet = true; + } + + /// (Write-Only) Array of ids of roles that will be applied to new users the first time they login via Saml + + List get defaultNewUserRoleIds { + if (!_defaultNewUserRoleIdsSet && + _apiMapResponse.containsKey('default_new_user_role_ids')) { + _defaultNewUserRoleIds = + _apiMapResponse['default_new_user_role_ids'] == null + ? null + : _apiMapResponse['default_new_user_role_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserRoleIdsSet = true; + } + return _defaultNewUserRoleIds; + } + + set defaultNewUserRoleIds(List v) { + _defaultNewUserRoleIds = v; + _defaultNewUserRoleIdsSet = true; + } + + /// (Write-Only) Array of ids of groups that will be applied to new users the first time they login via Saml + + List get defaultNewUserGroupIds { + if (!_defaultNewUserGroupIdsSet && + _apiMapResponse.containsKey('default_new_user_group_ids')) { + _defaultNewUserGroupIds = + _apiMapResponse['default_new_user_group_ids'] == null + ? null + : _apiMapResponse['default_new_user_group_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserGroupIdsSet = true; + } + return _defaultNewUserGroupIds; + } + + set defaultNewUserGroupIds(List v) { + _defaultNewUserGroupIds = v; + _defaultNewUserGroupIdsSet = true; + } + + /// Set user roles in Looker based on groups from Saml + + bool get setRolesFromGroups { + if (!_setRolesFromGroupsSet && + _apiMapResponse.containsKey('set_roles_from_groups')) { + _setRolesFromGroups = _apiMapResponse['set_roles_from_groups']; + _setRolesFromGroupsSet = true; + } + return _setRolesFromGroups; + } + + set setRolesFromGroups(bool v) { + _setRolesFromGroups = v; + _setRolesFromGroupsSet = true; + } + + /// Name of user record attributes used to indicate groups. Used when 'groups_finder_type' is set to 'grouped_attribute_values' + + String get groupsAttribute { + if (!_groupsAttributeSet && + _apiMapResponse.containsKey('groups_attribute')) { + _groupsAttribute = _apiMapResponse['groups_attribute'] == null + ? null + : _apiMapResponse['groups_attribute'].toString(); + _groupsAttributeSet = true; + } + return _groupsAttribute; + } + + set groupsAttribute(String v) { + _groupsAttribute = v; + _groupsAttributeSet = true; + } + + /// (Read-only) Array of mappings between Saml Groups and Looker Roles (read-only) + + List get groups { + if (!_groupsSet && _apiMapResponse.containsKey('groups')) { + _groups = _apiMapResponse['groups'] == null + ? null + : (_apiMapResponse['groups'] as List) + .map((i) => SamlGroupRead.fromResponse(i, apiResponseContentType)) + .toList(); + _groupsSet = true; + } + return _groups; + } + + set groups(List v) { + _groups = v; + _groupsSet = true; + } + + /// (Read/Write) Array of mappings between Saml Groups and arrays of Looker Role ids + + List get groupsWithRoleIds { + if (!_groupsWithRoleIdsSet && + _apiMapResponse.containsKey('groups_with_role_ids')) { + _groupsWithRoleIds = _apiMapResponse['groups_with_role_ids'] == null + ? null + : (_apiMapResponse['groups_with_role_ids'] as List) + .map( + (i) => SamlGroupWrite.fromResponse(i, apiResponseContentType)) + .toList(); + _groupsWithRoleIdsSet = true; + } + return _groupsWithRoleIds; + } + + set groupsWithRoleIds(List v) { + _groupsWithRoleIds = v; + _groupsWithRoleIdsSet = true; + } + + /// Users will not be allowed to login at all unless a role for them is found in Saml if set to true + + bool get authRequiresRole { + if (!_authRequiresRoleSet && + _apiMapResponse.containsKey('auth_requires_role')) { + _authRequiresRole = _apiMapResponse['auth_requires_role']; + _authRequiresRoleSet = true; + } + return _authRequiresRole; + } + + set authRequiresRole(bool v) { + _authRequiresRole = v; + _authRequiresRoleSet = true; + } + + /// (Read-only) Array of mappings between Saml User Attributes and Looker User Attributes (read-only) + + List get userAttributes { + if (!_userAttributesSet && _apiMapResponse.containsKey('user_attributes')) { + _userAttributes = _apiMapResponse['user_attributes'] == null + ? null + : (_apiMapResponse['user_attributes'] as List) + .map((i) => + SamlUserAttributeRead.fromResponse(i, apiResponseContentType)) + .toList(); + _userAttributesSet = true; + } + return _userAttributes; + } + + set userAttributes(List v) { + _userAttributes = v; + _userAttributesSet = true; + } + + /// (Read/Write) Array of mappings between Saml User Attributes and arrays of Looker User Attribute ids + + List get userAttributesWithIds { + if (!_userAttributesWithIdsSet && + _apiMapResponse.containsKey('user_attributes_with_ids')) { + _userAttributesWithIds = + _apiMapResponse['user_attributes_with_ids'] == null + ? null + : (_apiMapResponse['user_attributes_with_ids'] as List) + .map((i) => SamlUserAttributeWrite.fromResponse( + i, apiResponseContentType)) + .toList(); + _userAttributesWithIdsSet = true; + } + return _userAttributesWithIds; + } + + set userAttributesWithIds(List v) { + _userAttributesWithIds = v; + _userAttributesWithIdsSet = true; + } + + /// Identifier for a strategy for how Looker will find groups in the SAML response. One of ['grouped_attribute_values', 'individual_attributes'] + + String get groupsFinderType { + if (!_groupsFinderTypeSet && + _apiMapResponse.containsKey('groups_finder_type')) { + _groupsFinderType = _apiMapResponse['groups_finder_type'] == null + ? null + : _apiMapResponse['groups_finder_type'].toString(); + _groupsFinderTypeSet = true; + } + return _groupsFinderType; + } + + set groupsFinderType(String v) { + _groupsFinderType = v; + _groupsFinderTypeSet = true; + } + + /// Value for group attribute used to indicate membership. Used when 'groups_finder_type' is set to 'individual_attributes' + + String get groupsMemberValue { + if (!_groupsMemberValueSet && + _apiMapResponse.containsKey('groups_member_value')) { + _groupsMemberValue = _apiMapResponse['groups_member_value'] == null + ? null + : _apiMapResponse['groups_member_value'].toString(); + _groupsMemberValueSet = true; + } + return _groupsMemberValue; + } + + set groupsMemberValue(String v) { + _groupsMemberValue = v; + _groupsMemberValueSet = true; + } + + /// Bypass the login page when user authentication is required. Redirect to IdP immediately instead. + + bool get bypassLoginPage { + if (!_bypassLoginPageSet && + _apiMapResponse.containsKey('bypass_login_page')) { + _bypassLoginPage = _apiMapResponse['bypass_login_page']; + _bypassLoginPageSet = true; + } + return _bypassLoginPage; + } + + set bypassLoginPage(bool v) { + _bypassLoginPage = v; + _bypassLoginPageSet = true; + } + + /// Allow SAML auth'd users to be members of non-reflected Looker groups. If 'false', user will be removed from non-reflected groups on login. + + bool get allowNormalGroupMembership { + if (!_allowNormalGroupMembershipSet && + _apiMapResponse.containsKey('allow_normal_group_membership')) { + _allowNormalGroupMembership = + _apiMapResponse['allow_normal_group_membership']; + _allowNormalGroupMembershipSet = true; + } + return _allowNormalGroupMembership; + } + + set allowNormalGroupMembership(bool v) { + _allowNormalGroupMembership = v; + _allowNormalGroupMembershipSet = true; + } + + /// SAML auth'd users will inherit roles from non-reflected Looker groups. + + bool get allowRolesFromNormalGroups { + if (!_allowRolesFromNormalGroupsSet && + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + _allowRolesFromNormalGroups = + _apiMapResponse['allow_roles_from_normal_groups']; + _allowRolesFromNormalGroupsSet = true; + } + return _allowRolesFromNormalGroups; + } + + set allowRolesFromNormalGroups(bool v) { + _allowRolesFromNormalGroups = v; + _allowRolesFromNormalGroupsSet = true; + } + + /// Allows roles to be directly assigned to SAML auth'd users. + + bool get allowDirectRoles { + if (!_allowDirectRolesSet && + _apiMapResponse.containsKey('allow_direct_roles')) { + _allowDirectRoles = _apiMapResponse['allow_direct_roles']; + _allowDirectRolesSet = true; + } + return _allowDirectRoles; + } + + set allowDirectRoles(bool v) { + _allowDirectRoles = v; + _allowDirectRolesSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + SamlConfig() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SamlConfig.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_idpCertSet || _apiMapResponse.containsKey('idp_cert')) { + json['idp_cert'] = idpCert; + } + if (_idpUrlSet || _apiMapResponse.containsKey('idp_url')) { + json['idp_url'] = idpUrl; + } + if (_idpIssuerSet || _apiMapResponse.containsKey('idp_issuer')) { + json['idp_issuer'] = idpIssuer; + } + if (_idpAudienceSet || _apiMapResponse.containsKey('idp_audience')) { + json['idp_audience'] = idpAudience; + } + if (_allowedClockDriftSet || + _apiMapResponse.containsKey('allowed_clock_drift')) { + json['allowed_clock_drift'] = allowedClockDrift; + } + if (_userAttributeMapEmailSet || + _apiMapResponse.containsKey('user_attribute_map_email')) { + json['user_attribute_map_email'] = userAttributeMapEmail; + } + if (_userAttributeMapFirstNameSet || + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + json['user_attribute_map_first_name'] = userAttributeMapFirstName; + } + if (_userAttributeMapLastNameSet || + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + json['user_attribute_map_last_name'] = userAttributeMapLastName; + } + if (_newUserMigrationTypesSet || + _apiMapResponse.containsKey('new_user_migration_types')) { + json['new_user_migration_types'] = newUserMigrationTypes; + } + if (_alternateEmailLoginAllowedSet || + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + json['alternate_email_login_allowed'] = alternateEmailLoginAllowed; + } + if (_testSlugSet || _apiMapResponse.containsKey('test_slug')) { + json['test_slug'] = testSlug; + } + if (_modifiedAtSet || _apiMapResponse.containsKey('modified_at')) { + json['modified_at'] = modifiedAt; + } + if (_modifiedBySet || _apiMapResponse.containsKey('modified_by')) { + json['modified_by'] = modifiedBy; + } + if (_defaultNewUserRolesSet || + _apiMapResponse.containsKey('default_new_user_roles')) { + json['default_new_user_roles'] = defaultNewUserRoles == null + ? null + : defaultNewUserRoles.map((i) => i.toJson()).toList(); + } + if (_defaultNewUserGroupsSet || + _apiMapResponse.containsKey('default_new_user_groups')) { + json['default_new_user_groups'] = defaultNewUserGroups == null + ? null + : defaultNewUserGroups.map((i) => i.toJson()).toList(); + } + if (_defaultNewUserRoleIdsSet || + _apiMapResponse.containsKey('default_new_user_role_ids')) { + json['default_new_user_role_ids'] = defaultNewUserRoleIds; + } + if (_defaultNewUserGroupIdsSet || + _apiMapResponse.containsKey('default_new_user_group_ids')) { + json['default_new_user_group_ids'] = defaultNewUserGroupIds; + } + if (_setRolesFromGroupsSet || + _apiMapResponse.containsKey('set_roles_from_groups')) { + json['set_roles_from_groups'] = setRolesFromGroups; + } + if (_groupsAttributeSet || + _apiMapResponse.containsKey('groups_attribute')) { + json['groups_attribute'] = groupsAttribute; + } + if (_groupsSet || _apiMapResponse.containsKey('groups')) { + json['groups'] = + groups == null ? null : groups.map((i) => i.toJson()).toList(); + } + if (_groupsWithRoleIdsSet || + _apiMapResponse.containsKey('groups_with_role_ids')) { + json['groups_with_role_ids'] = groupsWithRoleIds == null + ? null + : groupsWithRoleIds.map((i) => i.toJson()).toList(); + } + if (_authRequiresRoleSet || + _apiMapResponse.containsKey('auth_requires_role')) { + json['auth_requires_role'] = authRequiresRole; + } + if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { + json['user_attributes'] = userAttributes == null + ? null + : userAttributes.map((i) => i.toJson()).toList(); + } + if (_userAttributesWithIdsSet || + _apiMapResponse.containsKey('user_attributes_with_ids')) { + json['user_attributes_with_ids'] = userAttributesWithIds == null + ? null + : userAttributesWithIds.map((i) => i.toJson()).toList(); + } + if (_groupsFinderTypeSet || + _apiMapResponse.containsKey('groups_finder_type')) { + json['groups_finder_type'] = groupsFinderType; + } + if (_groupsMemberValueSet || + _apiMapResponse.containsKey('groups_member_value')) { + json['groups_member_value'] = groupsMemberValue; + } + if (_bypassLoginPageSet || + _apiMapResponse.containsKey('bypass_login_page')) { + json['bypass_login_page'] = bypassLoginPage; + } + if (_allowNormalGroupMembershipSet || + _apiMapResponse.containsKey('allow_normal_group_membership')) { + json['allow_normal_group_membership'] = allowNormalGroupMembership; + } + if (_allowRolesFromNormalGroupsSet || + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + json['allow_roles_from_normal_groups'] = allowRolesFromNormalGroups; + } + if (_allowDirectRolesSet || + _apiMapResponse.containsKey('allow_direct_roles')) { + json['allow_direct_roles'] = allowDirectRoles; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class SamlGroupRead { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + int _lookerGroupId; + bool _lookerGroupIdSet = false; + + String _lookerGroupName; + bool _lookerGroupNameSet = false; + + String _name; + bool _nameSet = false; + + List _roles; + bool _rolesSet = false; + + String _url; + bool _urlSet = false; + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Unique Id of group in Looker (read-only) + + int get lookerGroupId { + if (!_lookerGroupIdSet && _apiMapResponse.containsKey('looker_group_id')) { + _lookerGroupId = _apiMapResponse['looker_group_id']; + _lookerGroupIdSet = true; + } + return _lookerGroupId; + } + + set lookerGroupId(int v) { + _lookerGroupId = v; + _lookerGroupIdSet = true; + } + + /// Name of group in Looker (read-only) + + String get lookerGroupName { + if (!_lookerGroupNameSet && + _apiMapResponse.containsKey('looker_group_name')) { + _lookerGroupName = _apiMapResponse['looker_group_name'] == null + ? null + : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupNameSet = true; + } + return _lookerGroupName; + } + + set lookerGroupName(String v) { + _lookerGroupName = v; + _lookerGroupNameSet = true; + } + + /// Name of group in Saml (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Looker Roles (read-only) + + List get roles { + if (!_rolesSet && _apiMapResponse.containsKey('roles')) { + _roles = _apiMapResponse['roles'] == null + ? null + : (_apiMapResponse['roles'] as List) + .map((i) => Role.fromResponse(i, apiResponseContentType)) + .toList(); + _rolesSet = true; + } + return _roles; + } + + set roles(List v) { + _roles = v; + _rolesSet = true; + } + + /// Link to saml config (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + SamlGroupRead() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SamlGroupRead.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookerGroupIdSet || _apiMapResponse.containsKey('looker_group_id')) { + json['looker_group_id'] = lookerGroupId; + } + if (_lookerGroupNameSet || + _apiMapResponse.containsKey('looker_group_name')) { + json['looker_group_name'] = lookerGroupName; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_rolesSet || _apiMapResponse.containsKey('roles')) { + json['roles'] = + roles == null ? null : roles.map((i) => i.toJson()).toList(); + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class SamlGroupWrite { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + int _lookerGroupId; + bool _lookerGroupIdSet = false; + + String _lookerGroupName; + bool _lookerGroupNameSet = false; + + String _name; + bool _nameSet = false; + + List _roleIds; + bool _roleIdsSet = false; + + String _url; + bool _urlSet = false; + + /// Unique Id + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Unique Id of group in Looker (read-only) + + int get lookerGroupId { + if (!_lookerGroupIdSet && _apiMapResponse.containsKey('looker_group_id')) { + _lookerGroupId = _apiMapResponse['looker_group_id']; + _lookerGroupIdSet = true; + } + return _lookerGroupId; + } + + set lookerGroupId(int v) { + _lookerGroupId = v; + _lookerGroupIdSet = true; + } + + /// Name of group in Looker + + String get lookerGroupName { + if (!_lookerGroupNameSet && + _apiMapResponse.containsKey('looker_group_name')) { + _lookerGroupName = _apiMapResponse['looker_group_name'] == null + ? null + : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupNameSet = true; + } + return _lookerGroupName; + } + + set lookerGroupName(String v) { + _lookerGroupName = v; + _lookerGroupNameSet = true; + } + + /// Name of group in Saml + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Looker Role Ids + + List get roleIds { + if (!_roleIdsSet && _apiMapResponse.containsKey('role_ids')) { + _roleIds = _apiMapResponse['role_ids'] == null + ? null + : _apiMapResponse['role_ids'].map((i) => i as int).toList(); + _roleIdsSet = true; + } + return _roleIds; + } + + set roleIds(List v) { + _roleIds = v; + _roleIdsSet = true; + } + + /// Link to saml config (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + SamlGroupWrite() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SamlGroupWrite.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_lookerGroupIdSet || _apiMapResponse.containsKey('looker_group_id')) { + json['looker_group_id'] = lookerGroupId; + } + if (_lookerGroupNameSet || + _apiMapResponse.containsKey('looker_group_name')) { + json['looker_group_name'] = lookerGroupName; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_roleIdsSet || _apiMapResponse.containsKey('role_ids')) { + json['role_ids'] = roleIds; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class SamlMetadataParseResult { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _idpIssuer; + bool _idpIssuerSet = false; + + String _idpUrl; + bool _idpUrlSet = false; + + String _idpCert; + bool _idpCertSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Identify Provider Issuer (read-only) + + String get idpIssuer { + if (!_idpIssuerSet && _apiMapResponse.containsKey('idp_issuer')) { + _idpIssuer = _apiMapResponse['idp_issuer'] == null + ? null + : _apiMapResponse['idp_issuer'].toString(); + _idpIssuerSet = true; + } + return _idpIssuer; + } + + set idpIssuer(String v) { + _idpIssuer = v; + _idpIssuerSet = true; + } + + /// Identify Provider Url (read-only) + + String get idpUrl { + if (!_idpUrlSet && _apiMapResponse.containsKey('idp_url')) { + _idpUrl = _apiMapResponse['idp_url'] == null + ? null + : _apiMapResponse['idp_url'].toString(); + _idpUrlSet = true; + } + return _idpUrl; + } + + set idpUrl(String v) { + _idpUrl = v; + _idpUrlSet = true; + } + + /// Identify Provider Certificate (read-only) + + String get idpCert { + if (!_idpCertSet && _apiMapResponse.containsKey('idp_cert')) { + _idpCert = _apiMapResponse['idp_cert'] == null + ? null + : _apiMapResponse['idp_cert'].toString(); + _idpCertSet = true; + } + return _idpCert; + } + + set idpCert(String v) { + _idpCert = v; + _idpCertSet = true; + } + + SamlMetadataParseResult() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SamlMetadataParseResult.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idpIssuerSet || _apiMapResponse.containsKey('idp_issuer')) { + json['idp_issuer'] = idpIssuer; + } + if (_idpUrlSet || _apiMapResponse.containsKey('idp_url')) { + json['idp_url'] = idpUrl; + } + if (_idpCertSet || _apiMapResponse.containsKey('idp_cert')) { + json['idp_cert'] = idpCert; + } + return json; + } +} + +class SamlUserAttributeRead { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + bool _required; + bool _requiredSet = false; + + List _userAttributes; + bool _userAttributesSet = false; + + String _url; + bool _urlSet = false; + + /// Name of User Attribute in Saml (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Required to be in Saml assertion for login to be allowed to succeed (read-only) + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// Looker User Attributes (read-only) + + List get userAttributes { + if (!_userAttributesSet && _apiMapResponse.containsKey('user_attributes')) { + _userAttributes = _apiMapResponse['user_attributes'] == null + ? null + : (_apiMapResponse['user_attributes'] as List) + .map((i) => UserAttribute.fromResponse(i, apiResponseContentType)) + .toList(); + _userAttributesSet = true; + } + return _userAttributes; + } + + set userAttributes(List v) { + _userAttributes = v; + _userAttributesSet = true; + } + + /// Link to saml config (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + SamlUserAttributeRead() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SamlUserAttributeRead.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { + json['user_attributes'] = userAttributes == null + ? null + : userAttributes.map((i) => i.toJson()).toList(); + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class SamlUserAttributeWrite { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + bool _required; + bool _requiredSet = false; + + List _userAttributeIds; + bool _userAttributeIdsSet = false; + + String _url; + bool _urlSet = false; + + /// Name of User Attribute in Saml + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Required to be in Saml assertion for login to be allowed to succeed + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// Looker User Attribute Ids + + List get userAttributeIds { + if (!_userAttributeIdsSet && + _apiMapResponse.containsKey('user_attribute_ids')) { + _userAttributeIds = _apiMapResponse['user_attribute_ids'] == null + ? null + : _apiMapResponse['user_attribute_ids'] + .map((i) => i as int) + .toList(); + _userAttributeIdsSet = true; + } + return _userAttributeIds; + } + + set userAttributeIds(List v) { + _userAttributeIds = v; + _userAttributeIdsSet = true; + } + + /// Link to saml config (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + SamlUserAttributeWrite() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SamlUserAttributeWrite.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_userAttributeIdsSet || + _apiMapResponse.containsKey('user_attribute_ids')) { + json['user_attribute_ids'] = userAttributeIds; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class ScheduledPlan { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + int _userId; + bool _userIdSet = false; + + bool _runAsRecipient; + bool _runAsRecipientSet = false; + + bool _enabled; + bool _enabledSet = false; + + String _lookId; + bool _lookIdSet = false; + + int _dashboardId; + bool _dashboardIdSet = false; + + String _lookmlDashboardId; + bool _lookmlDashboardIdSet = false; + + String _filtersString; + bool _filtersStringSet = false; + + String _dashboardFilters; + bool _dashboardFiltersSet = false; + + bool _requireResults; + bool _requireResultsSet = false; + + bool _requireNoResults; + bool _requireNoResultsSet = false; + + bool _requireChange; + bool _requireChangeSet = false; + + bool _sendAllResults; + bool _sendAllResultsSet = false; + + String _crontab; + bool _crontabSet = false; + + String _datagroup; + bool _datagroupSet = false; + + String _timezone; + bool _timezoneSet = false; + + String _queryId; + bool _queryIdSet = false; + + List _scheduledPlanDestination; + bool _scheduledPlanDestinationSet = false; + + bool _runOnce; + bool _runOnceSet = false; + + bool _includeLinks; + bool _includeLinksSet = false; + + String _pdfPaperSize; + bool _pdfPaperSizeSet = false; + + bool _pdfLandscape; + bool _pdfLandscapeSet = false; + + bool _embed; + bool _embedSet = false; + + String _colorTheme; + bool _colorThemeSet = false; + + bool _longTables; + bool _longTablesSet = false; + + int _inlineTableWidth; + bool _inlineTableWidthSet = false; + + int _id; + bool _idSet = false; + + DateTime _createdAt; + bool _createdAtSet = false; + + DateTime _updatedAt; + bool _updatedAtSet = false; + + String _title; + bool _titleSet = false; + + UserPublic _user; + bool _userSet = false; + + DateTime _nextRunAt; + bool _nextRunAtSet = false; + + DateTime _lastRunAt; + bool _lastRunAtSet = false; + + Map _can; + bool _canSet = false; + + /// Name of this scheduled plan + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// User Id which owns this scheduled plan + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Whether schedule is run as recipient (only applicable for email recipients) + + bool get runAsRecipient { + if (!_runAsRecipientSet && + _apiMapResponse.containsKey('run_as_recipient')) { + _runAsRecipient = _apiMapResponse['run_as_recipient']; + _runAsRecipientSet = true; + } + return _runAsRecipient; + } + + set runAsRecipient(bool v) { + _runAsRecipient = v; + _runAsRecipientSet = true; + } + + /// Whether the ScheduledPlan is enabled + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Id of a look + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Id of a dashboard + + int get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id']; + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(int v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Id of a LookML dashboard + + String get lookmlDashboardId { + if (!_lookmlDashboardIdSet && + _apiMapResponse.containsKey('lookml_dashboard_id')) { + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null + ? null + : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardIdSet = true; + } + return _lookmlDashboardId; + } + + set lookmlDashboardId(String v) { + _lookmlDashboardId = v; + _lookmlDashboardIdSet = true; + } + + /// Query string to run look or dashboard with + + String get filtersString { + if (!_filtersStringSet && _apiMapResponse.containsKey('filters_string')) { + _filtersString = _apiMapResponse['filters_string'] == null + ? null + : _apiMapResponse['filters_string'].toString(); + _filtersStringSet = true; + } + return _filtersString; + } + + set filtersString(String v) { + _filtersString = v; + _filtersStringSet = true; + } + + /// (DEPRECATED) Alias for filters_string field + + String get dashboardFilters { + if (!_dashboardFiltersSet && + _apiMapResponse.containsKey('dashboard_filters')) { + _dashboardFilters = _apiMapResponse['dashboard_filters'] == null + ? null + : _apiMapResponse['dashboard_filters'].toString(); + _dashboardFiltersSet = true; + } + return _dashboardFilters; + } + + set dashboardFilters(String v) { + _dashboardFilters = v; + _dashboardFiltersSet = true; + } + + /// Delivery should occur if running the dashboard or look returns results + + bool get requireResults { + if (!_requireResultsSet && _apiMapResponse.containsKey('require_results')) { + _requireResults = _apiMapResponse['require_results']; + _requireResultsSet = true; + } + return _requireResults; + } + + set requireResults(bool v) { + _requireResults = v; + _requireResultsSet = true; + } + + /// Delivery should occur if the dashboard look does not return results + + bool get requireNoResults { + if (!_requireNoResultsSet && + _apiMapResponse.containsKey('require_no_results')) { + _requireNoResults = _apiMapResponse['require_no_results']; + _requireNoResultsSet = true; + } + return _requireNoResults; + } + + set requireNoResults(bool v) { + _requireNoResults = v; + _requireNoResultsSet = true; + } + + /// Delivery should occur if data have changed since the last run + + bool get requireChange { + if (!_requireChangeSet && _apiMapResponse.containsKey('require_change')) { + _requireChange = _apiMapResponse['require_change']; + _requireChangeSet = true; + } + return _requireChange; + } + + set requireChange(bool v) { + _requireChange = v; + _requireChangeSet = true; + } + + /// Will run an unlimited query and send all results. + + bool get sendAllResults { + if (!_sendAllResultsSet && + _apiMapResponse.containsKey('send_all_results')) { + _sendAllResults = _apiMapResponse['send_all_results']; + _sendAllResultsSet = true; + } + return _sendAllResults; + } + + set sendAllResults(bool v) { + _sendAllResults = v; + _sendAllResultsSet = true; + } + + /// Vixie-Style crontab specification when to run + + String get crontab { + if (!_crontabSet && _apiMapResponse.containsKey('crontab')) { + _crontab = _apiMapResponse['crontab'] == null + ? null + : _apiMapResponse['crontab'].toString(); + _crontabSet = true; + } + return _crontab; + } + + set crontab(String v) { + _crontab = v; + _crontabSet = true; + } + + /// Name of a datagroup; if specified will run when datagroup triggered (can't be used with cron string) + + String get datagroup { + if (!_datagroupSet && _apiMapResponse.containsKey('datagroup')) { + _datagroup = _apiMapResponse['datagroup'] == null + ? null + : _apiMapResponse['datagroup'].toString(); + _datagroupSet = true; + } + return _datagroup; + } + + set datagroup(String v) { + _datagroup = v; + _datagroupSet = true; + } + + /// Timezone for interpreting the specified crontab (default is Looker instance timezone) + + String get timezone { + if (!_timezoneSet && _apiMapResponse.containsKey('timezone')) { + _timezone = _apiMapResponse['timezone'] == null + ? null + : _apiMapResponse['timezone'].toString(); + _timezoneSet = true; + } + return _timezone; + } + + set timezone(String v) { + _timezone = v; + _timezoneSet = true; + } + + /// Query id + + String get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id'] == null + ? null + : _apiMapResponse['query_id'].toString(); + _queryIdSet = true; + } + return _queryId; + } + + set queryId(String v) { + _queryId = v; + _queryIdSet = true; + } + + /// Scheduled plan destinations + + List get scheduledPlanDestination { + if (!_scheduledPlanDestinationSet && + _apiMapResponse.containsKey('scheduled_plan_destination')) { + _scheduledPlanDestination = + _apiMapResponse['scheduled_plan_destination'] == null + ? null + : (_apiMapResponse['scheduled_plan_destination'] as List) + .map((i) => ScheduledPlanDestination.fromResponse( + i, apiResponseContentType)) + .toList(); + _scheduledPlanDestinationSet = true; + } + return _scheduledPlanDestination; + } + + set scheduledPlanDestination(List v) { + _scheduledPlanDestination = v; + _scheduledPlanDestinationSet = true; + } + + /// Whether the plan in question should only be run once (usually for testing) + + bool get runOnce { + if (!_runOnceSet && _apiMapResponse.containsKey('run_once')) { + _runOnce = _apiMapResponse['run_once']; + _runOnceSet = true; + } + return _runOnce; + } + + set runOnce(bool v) { + _runOnce = v; + _runOnceSet = true; + } + + /// Whether links back to Looker should be included in this ScheduledPlan + + bool get includeLinks { + if (!_includeLinksSet && _apiMapResponse.containsKey('include_links')) { + _includeLinks = _apiMapResponse['include_links']; + _includeLinksSet = true; + } + return _includeLinks; + } + + set includeLinks(bool v) { + _includeLinks = v; + _includeLinksSet = true; + } + + /// The size of paper the PDF should be formatted to fit. Valid values are: "letter", "legal", "tabloid", "a0", "a1", "a2", "a3", "a4", "a5". + + String get pdfPaperSize { + if (!_pdfPaperSizeSet && _apiMapResponse.containsKey('pdf_paper_size')) { + _pdfPaperSize = _apiMapResponse['pdf_paper_size'] == null + ? null + : _apiMapResponse['pdf_paper_size'].toString(); + _pdfPaperSizeSet = true; + } + return _pdfPaperSize; + } + + set pdfPaperSize(String v) { + _pdfPaperSize = v; + _pdfPaperSizeSet = true; + } + + /// Whether the PDF should be formatted for landscape orientation + + bool get pdfLandscape { + if (!_pdfLandscapeSet && _apiMapResponse.containsKey('pdf_landscape')) { + _pdfLandscape = _apiMapResponse['pdf_landscape']; + _pdfLandscapeSet = true; + } + return _pdfLandscape; + } + + set pdfLandscape(bool v) { + _pdfLandscape = v; + _pdfLandscapeSet = true; + } + + /// Whether this schedule is in an embed context or not + + bool get embed { + if (!_embedSet && _apiMapResponse.containsKey('embed')) { + _embed = _apiMapResponse['embed']; + _embedSet = true; + } + return _embed; + } + + set embed(bool v) { + _embed = v; + _embedSet = true; + } + + /// Color scheme of the dashboard if applicable + + String get colorTheme { + if (!_colorThemeSet && _apiMapResponse.containsKey('color_theme')) { + _colorTheme = _apiMapResponse['color_theme'] == null + ? null + : _apiMapResponse['color_theme'].toString(); + _colorThemeSet = true; + } + return _colorTheme; + } + + set colorTheme(String v) { + _colorTheme = v; + _colorThemeSet = true; + } + + /// Whether or not to expand table vis to full length + + bool get longTables { + if (!_longTablesSet && _apiMapResponse.containsKey('long_tables')) { + _longTables = _apiMapResponse['long_tables']; + _longTablesSet = true; + } + return _longTables; + } + + set longTables(bool v) { + _longTables = v; + _longTablesSet = true; + } + + /// The pixel width at which we render the inline table visualizations + + int get inlineTableWidth { + if (!_inlineTableWidthSet && + _apiMapResponse.containsKey('inline_table_width')) { + _inlineTableWidth = _apiMapResponse['inline_table_width']; + _inlineTableWidthSet = true; + } + return _inlineTableWidth; + } + + set inlineTableWidth(int v) { + _inlineTableWidth = v; + _inlineTableWidthSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Date and time when ScheduledPlan was created (read-only) + + DateTime get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : DateTime.parse(_apiMapResponse['created_at']); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(DateTime v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Date and time when ScheduledPlan was last updated (read-only) + + DateTime get updatedAt { + if (!_updatedAtSet && _apiMapResponse.containsKey('updated_at')) { + _updatedAt = _apiMapResponse['updated_at'] == null + ? null + : DateTime.parse(_apiMapResponse['updated_at']); + _updatedAtSet = true; + } + return _updatedAt; + } + + set updatedAt(DateTime v) { + _updatedAt = v; + _updatedAtSet = true; + } + + /// Title (read-only) + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + UserPublic get user { + if (!_userSet && _apiMapResponse.containsKey('user')) { + _user = _apiMapResponse['user'] == null + ? null + : UserPublic.fromResponse( + _apiMapResponse['user'], apiResponseContentType); + _userSet = true; + } + return _user; + } + + set user(UserPublic v) { + _user = v; + _userSet = true; + } + + /// When the ScheduledPlan will next run (null if running once) (read-only) + + DateTime get nextRunAt { + if (!_nextRunAtSet && _apiMapResponse.containsKey('next_run_at')) { + _nextRunAt = _apiMapResponse['next_run_at'] == null + ? null + : DateTime.parse(_apiMapResponse['next_run_at']); + _nextRunAtSet = true; + } + return _nextRunAt; + } + + set nextRunAt(DateTime v) { + _nextRunAt = v; + _nextRunAtSet = true; + } + + /// When the ScheduledPlan was last run (read-only) + + DateTime get lastRunAt { + if (!_lastRunAtSet && _apiMapResponse.containsKey('last_run_at')) { + _lastRunAt = _apiMapResponse['last_run_at'] == null + ? null + : DateTime.parse(_apiMapResponse['last_run_at']); + _lastRunAtSet = true; + } + return _lastRunAt; + } + + set lastRunAt(DateTime v) { + _lastRunAt = v; + _lastRunAtSet = true; + } + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + ScheduledPlan() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ScheduledPlan.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_runAsRecipientSet || _apiMapResponse.containsKey('run_as_recipient')) { + json['run_as_recipient'] = runAsRecipient; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_lookmlDashboardIdSet || + _apiMapResponse.containsKey('lookml_dashboard_id')) { + json['lookml_dashboard_id'] = lookmlDashboardId; + } + if (_filtersStringSet || _apiMapResponse.containsKey('filters_string')) { + json['filters_string'] = filtersString; + } + if (_dashboardFiltersSet || + _apiMapResponse.containsKey('dashboard_filters')) { + json['dashboard_filters'] = dashboardFilters; + } + if (_requireResultsSet || _apiMapResponse.containsKey('require_results')) { + json['require_results'] = requireResults; + } + if (_requireNoResultsSet || + _apiMapResponse.containsKey('require_no_results')) { + json['require_no_results'] = requireNoResults; + } + if (_requireChangeSet || _apiMapResponse.containsKey('require_change')) { + json['require_change'] = requireChange; + } + if (_sendAllResultsSet || _apiMapResponse.containsKey('send_all_results')) { + json['send_all_results'] = sendAllResults; + } + if (_crontabSet || _apiMapResponse.containsKey('crontab')) { + json['crontab'] = crontab; + } + if (_datagroupSet || _apiMapResponse.containsKey('datagroup')) { + json['datagroup'] = datagroup; + } + if (_timezoneSet || _apiMapResponse.containsKey('timezone')) { + json['timezone'] = timezone; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_scheduledPlanDestinationSet || + _apiMapResponse.containsKey('scheduled_plan_destination')) { + json['scheduled_plan_destination'] = scheduledPlanDestination == null + ? null + : scheduledPlanDestination.map((i) => i.toJson()).toList(); + } + if (_runOnceSet || _apiMapResponse.containsKey('run_once')) { + json['run_once'] = runOnce; + } + if (_includeLinksSet || _apiMapResponse.containsKey('include_links')) { + json['include_links'] = includeLinks; + } + if (_pdfPaperSizeSet || _apiMapResponse.containsKey('pdf_paper_size')) { + json['pdf_paper_size'] = pdfPaperSize; + } + if (_pdfLandscapeSet || _apiMapResponse.containsKey('pdf_landscape')) { + json['pdf_landscape'] = pdfLandscape; + } + if (_embedSet || _apiMapResponse.containsKey('embed')) { + json['embed'] = embed; + } + if (_colorThemeSet || _apiMapResponse.containsKey('color_theme')) { + json['color_theme'] = colorTheme; + } + if (_longTablesSet || _apiMapResponse.containsKey('long_tables')) { + json['long_tables'] = longTables; + } + if (_inlineTableWidthSet || + _apiMapResponse.containsKey('inline_table_width')) { + json['inline_table_width'] = inlineTableWidth; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = + createdAt == null ? null : createdAt.toIso8601String(); + } + if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { + json['updated_at'] = + updatedAt == null ? null : updatedAt.toIso8601String(); + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_userSet || _apiMapResponse.containsKey('user')) { + json['user'] = user == null ? null : user.toJson(); + } + if (_nextRunAtSet || _apiMapResponse.containsKey('next_run_at')) { + json['next_run_at'] = + nextRunAt == null ? null : nextRunAt.toIso8601String(); + } + if (_lastRunAtSet || _apiMapResponse.containsKey('last_run_at')) { + json['last_run_at'] = + lastRunAt == null ? null : lastRunAt.toIso8601String(); + } + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + return json; + } +} + +class ScheduledPlanDestination { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + int _scheduledPlanId; + bool _scheduledPlanIdSet = false; + + String _format; + bool _formatSet = false; + + bool _applyFormatting; + bool _applyFormattingSet = false; + + bool _applyVis; + bool _applyVisSet = false; + + String _address; + bool _addressSet = false; + + bool _lookerRecipient; + bool _lookerRecipientSet = false; + + String _type; + bool _typeSet = false; + + String _parameters; + bool _parametersSet = false; + + String _secretParameters; + bool _secretParametersSet = false; + + String _message; + bool _messageSet = false; + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Id of a scheduled plan you own + + int get scheduledPlanId { + if (!_scheduledPlanIdSet && + _apiMapResponse.containsKey('scheduled_plan_id')) { + _scheduledPlanId = _apiMapResponse['scheduled_plan_id']; + _scheduledPlanIdSet = true; + } + return _scheduledPlanId; + } + + set scheduledPlanId(int v) { + _scheduledPlanId = v; + _scheduledPlanIdSet = true; + } + + /// The data format to send to the given destination. Supported formats vary by destination, but include: "txt", "csv", "inline_json", "json", "json_detail", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png" + + String get format { + if (!_formatSet && _apiMapResponse.containsKey('format')) { + _format = _apiMapResponse['format'] == null + ? null + : _apiMapResponse['format'].toString(); + _formatSet = true; + } + return _format; + } + + set format(String v) { + _format = v; + _formatSet = true; + } + + /// Are values formatted? (containing currency symbols, digit separators, etc. + + bool get applyFormatting { + if (!_applyFormattingSet && + _apiMapResponse.containsKey('apply_formatting')) { + _applyFormatting = _apiMapResponse['apply_formatting']; + _applyFormattingSet = true; + } + return _applyFormatting; + } + + set applyFormatting(bool v) { + _applyFormatting = v; + _applyFormattingSet = true; + } + + /// Whether visualization options are applied to the results. + + bool get applyVis { + if (!_applyVisSet && _apiMapResponse.containsKey('apply_vis')) { + _applyVis = _apiMapResponse['apply_vis']; + _applyVisSet = true; + } + return _applyVis; + } + + set applyVis(bool v) { + _applyVis = v; + _applyVisSet = true; + } + + /// Address for recipient. For email e.g. 'user@example.com'. For webhooks e.g. 'https://domain/path'. For Amazon S3 e.g. 's3://bucket-name/path/'. For SFTP e.g. 'sftp://host-name/path/'. + + String get address { + if (!_addressSet && _apiMapResponse.containsKey('address')) { + _address = _apiMapResponse['address'] == null + ? null + : _apiMapResponse['address'].toString(); + _addressSet = true; + } + return _address; + } + + set address(String v) { + _address = v; + _addressSet = true; + } + + /// Whether the recipient is a Looker user on the current instance (only applicable for email recipients) (read-only) + + bool get lookerRecipient { + if (!_lookerRecipientSet && + _apiMapResponse.containsKey('looker_recipient')) { + _lookerRecipient = _apiMapResponse['looker_recipient']; + _lookerRecipientSet = true; + } + return _lookerRecipient; + } + + set lookerRecipient(bool v) { + _lookerRecipient = v; + _lookerRecipientSet = true; + } + + /// Type of the address ('email', 'webhook', 's3', or 'sftp') + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// JSON object containing parameters for external scheduling. For Amazon S3, this requires keys and values for access_key_id and region. For SFTP, this requires a key and value for username. + + String get parameters { + if (!_parametersSet && _apiMapResponse.containsKey('parameters')) { + _parameters = _apiMapResponse['parameters'] == null + ? null + : _apiMapResponse['parameters'].toString(); + _parametersSet = true; + } + return _parameters; + } + + set parameters(String v) { + _parameters = v; + _parametersSet = true; + } + + /// (Write-Only) JSON object containing secret parameters for external scheduling. For Amazon S3, this requires a key and value for secret_access_key. For SFTP, this requires a key and value for password. + + String get secretParameters { + if (!_secretParametersSet && + _apiMapResponse.containsKey('secret_parameters')) { + _secretParameters = _apiMapResponse['secret_parameters'] == null + ? null + : _apiMapResponse['secret_parameters'].toString(); + _secretParametersSet = true; + } + return _secretParameters; + } + + set secretParameters(String v) { + _secretParameters = v; + _secretParametersSet = true; + } + + /// Optional message to be included in scheduled emails + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + ScheduledPlanDestination() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ScheduledPlanDestination.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_scheduledPlanIdSet || + _apiMapResponse.containsKey('scheduled_plan_id')) { + json['scheduled_plan_id'] = scheduledPlanId; + } + if (_formatSet || _apiMapResponse.containsKey('format')) { + json['format'] = format; + } + if (_applyFormattingSet || + _apiMapResponse.containsKey('apply_formatting')) { + json['apply_formatting'] = applyFormatting; + } + if (_applyVisSet || _apiMapResponse.containsKey('apply_vis')) { + json['apply_vis'] = applyVis; + } + if (_addressSet || _apiMapResponse.containsKey('address')) { + json['address'] = address; + } + if (_lookerRecipientSet || + _apiMapResponse.containsKey('looker_recipient')) { + json['looker_recipient'] = lookerRecipient; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_parametersSet || _apiMapResponse.containsKey('parameters')) { + json['parameters'] = parameters; + } + if (_secretParametersSet || + _apiMapResponse.containsKey('secret_parameters')) { + json['secret_parameters'] = secretParameters; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + return json; + } +} + +class Schema { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + bool _isDefault; + bool _isDefaultSet = false; + + /// Schema name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// True if this is the default schema (read-only) + + bool get isDefault { + if (!_isDefaultSet && _apiMapResponse.containsKey('is_default')) { + _isDefault = _apiMapResponse['is_default']; + _isDefaultSet = true; + } + return _isDefault; + } + + set isDefault(bool v) { + _isDefault = v; + _isDefaultSet = true; + } + + Schema() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Schema.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_isDefaultSet || _apiMapResponse.containsKey('is_default')) { + json['is_default'] = isDefault; + } + return json; + } +} + +class SchemaColumn { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _sqlEscapedName; + bool _sqlEscapedNameSet = false; + + String _schemaName; + bool _schemaNameSet = false; + + String _dataTypeDatabase; + bool _dataTypeDatabaseSet = false; + + String _dataType; + bool _dataTypeSet = false; + + String _dataTypeLooker; + bool _dataTypeLookerSet = false; + + String _description; + bool _descriptionSet = false; + + int _columnSize; + bool _columnSizeSet = false; + + List _snippets; + bool _snippetsSet = false; + + /// Schema item name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Full name of item (read-only) + + String get sqlEscapedName { + if (!_sqlEscapedNameSet && + _apiMapResponse.containsKey('sql_escaped_name')) { + _sqlEscapedName = _apiMapResponse['sql_escaped_name'] == null + ? null + : _apiMapResponse['sql_escaped_name'].toString(); + _sqlEscapedNameSet = true; + } + return _sqlEscapedName; + } + + set sqlEscapedName(String v) { + _sqlEscapedName = v; + _sqlEscapedNameSet = true; + } + + /// Name of schema (read-only) + + String get schemaName { + if (!_schemaNameSet && _apiMapResponse.containsKey('schema_name')) { + _schemaName = _apiMapResponse['schema_name'] == null + ? null + : _apiMapResponse['schema_name'].toString(); + _schemaNameSet = true; + } + return _schemaName; + } + + set schemaName(String v) { + _schemaName = v; + _schemaNameSet = true; + } + + /// SQL dialect data type (read-only) + + String get dataTypeDatabase { + if (!_dataTypeDatabaseSet && + _apiMapResponse.containsKey('data_type_database')) { + _dataTypeDatabase = _apiMapResponse['data_type_database'] == null + ? null + : _apiMapResponse['data_type_database'].toString(); + _dataTypeDatabaseSet = true; + } + return _dataTypeDatabase; + } + + set dataTypeDatabase(String v) { + _dataTypeDatabase = v; + _dataTypeDatabaseSet = true; + } + + /// Data type (read-only) + + String get dataType { + if (!_dataTypeSet && _apiMapResponse.containsKey('data_type')) { + _dataType = _apiMapResponse['data_type'] == null + ? null + : _apiMapResponse['data_type'].toString(); + _dataTypeSet = true; + } + return _dataType; + } + + set dataType(String v) { + _dataType = v; + _dataTypeSet = true; + } + + /// Looker data type (read-only) + + String get dataTypeLooker { + if (!_dataTypeLookerSet && + _apiMapResponse.containsKey('data_type_looker')) { + _dataTypeLooker = _apiMapResponse['data_type_looker'] == null + ? null + : _apiMapResponse['data_type_looker'].toString(); + _dataTypeLookerSet = true; + } + return _dataTypeLooker; + } + + set dataTypeLooker(String v) { + _dataTypeLooker = v; + _dataTypeLookerSet = true; + } + + /// SQL data type (read-only) + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Column data size (read-only) + + int get columnSize { + if (!_columnSizeSet && _apiMapResponse.containsKey('column_size')) { + _columnSize = _apiMapResponse['column_size']; + _columnSizeSet = true; + } + return _columnSize; + } + + set columnSize(int v) { + _columnSize = v; + _columnSizeSet = true; + } + + /// SQL Runner snippets for this connection (read-only) + + List get snippets { + if (!_snippetsSet && _apiMapResponse.containsKey('snippets')) { + _snippets = _apiMapResponse['snippets'] == null + ? null + : (_apiMapResponse['snippets'] as List) + .map((i) => Snippet.fromResponse(i, apiResponseContentType)) + .toList(); + _snippetsSet = true; + } + return _snippets; + } + + set snippets(List v) { + _snippets = v; + _snippetsSet = true; + } + + SchemaColumn() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SchemaColumn.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_sqlEscapedNameSet || _apiMapResponse.containsKey('sql_escaped_name')) { + json['sql_escaped_name'] = sqlEscapedName; + } + if (_schemaNameSet || _apiMapResponse.containsKey('schema_name')) { + json['schema_name'] = schemaName; + } + if (_dataTypeDatabaseSet || + _apiMapResponse.containsKey('data_type_database')) { + json['data_type_database'] = dataTypeDatabase; + } + if (_dataTypeSet || _apiMapResponse.containsKey('data_type')) { + json['data_type'] = dataType; + } + if (_dataTypeLookerSet || _apiMapResponse.containsKey('data_type_looker')) { + json['data_type_looker'] = dataTypeLooker; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_columnSizeSet || _apiMapResponse.containsKey('column_size')) { + json['column_size'] = columnSize; + } + if (_snippetsSet || _apiMapResponse.containsKey('snippets')) { + json['snippets'] = + snippets == null ? null : snippets.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class SchemaColumns { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _sqlEscapedName; + bool _sqlEscapedNameSet = false; + + String _schemaName; + bool _schemaNameSet = false; + + List _columns; + bool _columnsSet = false; + + /// Schema item name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Full name of item (read-only) + + String get sqlEscapedName { + if (!_sqlEscapedNameSet && + _apiMapResponse.containsKey('sql_escaped_name')) { + _sqlEscapedName = _apiMapResponse['sql_escaped_name'] == null + ? null + : _apiMapResponse['sql_escaped_name'].toString(); + _sqlEscapedNameSet = true; + } + return _sqlEscapedName; + } + + set sqlEscapedName(String v) { + _sqlEscapedName = v; + _sqlEscapedNameSet = true; + } + + /// Name of schema (read-only) + + String get schemaName { + if (!_schemaNameSet && _apiMapResponse.containsKey('schema_name')) { + _schemaName = _apiMapResponse['schema_name'] == null + ? null + : _apiMapResponse['schema_name'].toString(); + _schemaNameSet = true; + } + return _schemaName; + } + + set schemaName(String v) { + _schemaName = v; + _schemaNameSet = true; + } + + /// Columns for this schema (read-only) + + List get columns { + if (!_columnsSet && _apiMapResponse.containsKey('columns')) { + _columns = _apiMapResponse['columns'] == null + ? null + : (_apiMapResponse['columns'] as List) + .map((i) => SchemaColumn.fromResponse(i, apiResponseContentType)) + .toList(); + _columnsSet = true; + } + return _columns; + } + + set columns(List v) { + _columns = v; + _columnsSet = true; + } + + SchemaColumns() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SchemaColumns.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_sqlEscapedNameSet || _apiMapResponse.containsKey('sql_escaped_name')) { + json['sql_escaped_name'] = sqlEscapedName; + } + if (_schemaNameSet || _apiMapResponse.containsKey('schema_name')) { + json['schema_name'] = schemaName; + } + if (_columnsSet || _apiMapResponse.containsKey('columns')) { + json['columns'] = + columns == null ? null : columns.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class SchemaTable { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _sqlEscapedName; + bool _sqlEscapedNameSet = false; + + String _schemaName; + bool _schemaNameSet = false; + + int _rows; + bool _rowsSet = false; + + String _external; + bool _externalSet = false; + + List _snippets; + bool _snippetsSet = false; + + /// Schema item name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Full name of item (read-only) + + String get sqlEscapedName { + if (!_sqlEscapedNameSet && + _apiMapResponse.containsKey('sql_escaped_name')) { + _sqlEscapedName = _apiMapResponse['sql_escaped_name'] == null + ? null + : _apiMapResponse['sql_escaped_name'].toString(); + _sqlEscapedNameSet = true; + } + return _sqlEscapedName; + } + + set sqlEscapedName(String v) { + _sqlEscapedName = v; + _sqlEscapedNameSet = true; + } + + /// Name of schema (read-only) + + String get schemaName { + if (!_schemaNameSet && _apiMapResponse.containsKey('schema_name')) { + _schemaName = _apiMapResponse['schema_name'] == null + ? null + : _apiMapResponse['schema_name'].toString(); + _schemaNameSet = true; + } + return _schemaName; + } + + set schemaName(String v) { + _schemaName = v; + _schemaNameSet = true; + } + + /// Number of data rows (read-only) + + int get rows { + if (!_rowsSet && _apiMapResponse.containsKey('rows')) { + _rows = _apiMapResponse['rows']; + _rowsSet = true; + } + return _rows; + } + + set rows(int v) { + _rows = v; + _rowsSet = true; + } + + /// External reference??? (read-only) + + String get external { + if (!_externalSet && _apiMapResponse.containsKey('external')) { + _external = _apiMapResponse['external'] == null + ? null + : _apiMapResponse['external'].toString(); + _externalSet = true; + } + return _external; + } + + set external(String v) { + _external = v; + _externalSet = true; + } + + /// SQL Runner snippets for connection (read-only) + + List get snippets { + if (!_snippetsSet && _apiMapResponse.containsKey('snippets')) { + _snippets = _apiMapResponse['snippets'] == null + ? null + : (_apiMapResponse['snippets'] as List) + .map((i) => Snippet.fromResponse(i, apiResponseContentType)) + .toList(); + _snippetsSet = true; + } + return _snippets; + } + + set snippets(List v) { + _snippets = v; + _snippetsSet = true; + } + + SchemaTable() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SchemaTable.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_sqlEscapedNameSet || _apiMapResponse.containsKey('sql_escaped_name')) { + json['sql_escaped_name'] = sqlEscapedName; + } + if (_schemaNameSet || _apiMapResponse.containsKey('schema_name')) { + json['schema_name'] = schemaName; + } + if (_rowsSet || _apiMapResponse.containsKey('rows')) { + json['rows'] = rows; + } + if (_externalSet || _apiMapResponse.containsKey('external')) { + json['external'] = external; + } + if (_snippetsSet || _apiMapResponse.containsKey('snippets')) { + json['snippets'] = + snippets == null ? null : snippets.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class SchemaTables { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + bool _isDefault; + bool _isDefaultSet = false; + + List _tables; + bool _tablesSet = false; + + bool _tableLimitHit; + bool _tableLimitHitSet = false; + + /// Schema name (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// True if this is the default schema (read-only) + + bool get isDefault { + if (!_isDefaultSet && _apiMapResponse.containsKey('is_default')) { + _isDefault = _apiMapResponse['is_default']; + _isDefaultSet = true; + } + return _isDefault; + } + + set isDefault(bool v) { + _isDefault = v; + _isDefaultSet = true; + } + + /// Tables for this schema (read-only) + + List get tables { + if (!_tablesSet && _apiMapResponse.containsKey('tables')) { + _tables = _apiMapResponse['tables'] == null + ? null + : (_apiMapResponse['tables'] as List) + .map((i) => SchemaTable.fromResponse(i, apiResponseContentType)) + .toList(); + _tablesSet = true; + } + return _tables; + } + + set tables(List v) { + _tables = v; + _tablesSet = true; + } + + /// True if the table limit was hit while retrieving tables in this schema (read-only) + + bool get tableLimitHit { + if (!_tableLimitHitSet && _apiMapResponse.containsKey('table_limit_hit')) { + _tableLimitHit = _apiMapResponse['table_limit_hit']; + _tableLimitHitSet = true; + } + return _tableLimitHit; + } + + set tableLimitHit(bool v) { + _tableLimitHit = v; + _tableLimitHitSet = true; + } + + SchemaTables() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SchemaTables.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_isDefaultSet || _apiMapResponse.containsKey('is_default')) { + json['is_default'] = isDefault; + } + if (_tablesSet || _apiMapResponse.containsKey('tables')) { + json['tables'] = + tables == null ? null : tables.map((i) => i.toJson()).toList(); + } + if (_tableLimitHitSet || _apiMapResponse.containsKey('table_limit_hit')) { + json['table_limit_hit'] = tableLimitHit; + } + return json; + } +} + +class Session { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _ipAddress; + bool _ipAddressSet = false; + + String _browser; + bool _browserSet = false; + + String _operatingSystem; + bool _operatingSystemSet = false; + + String _city; + bool _citySet = false; + + String _state; + bool _stateSet = false; + + String _country; + bool _countrySet = false; + + String _credentialsType; + bool _credentialsTypeSet = false; + + String _extendedAt; + bool _extendedAtSet = false; + + int _extendedCount; + bool _extendedCountSet = false; + + int _sudoUserId; + bool _sudoUserIdSet = false; + + String _createdAt; + bool _createdAtSet = false; + + String _expiresAt; + bool _expiresAtSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// IP address of user when this session was initiated (read-only) + + String get ipAddress { + if (!_ipAddressSet && _apiMapResponse.containsKey('ip_address')) { + _ipAddress = _apiMapResponse['ip_address'] == null + ? null + : _apiMapResponse['ip_address'].toString(); + _ipAddressSet = true; + } + return _ipAddress; + } + + set ipAddress(String v) { + _ipAddress = v; + _ipAddressSet = true; + } + + /// User's browser type (read-only) + + String get browser { + if (!_browserSet && _apiMapResponse.containsKey('browser')) { + _browser = _apiMapResponse['browser'] == null + ? null + : _apiMapResponse['browser'].toString(); + _browserSet = true; + } + return _browser; + } + + set browser(String v) { + _browser = v; + _browserSet = true; + } + + /// User's Operating System (read-only) + + String get operatingSystem { + if (!_operatingSystemSet && + _apiMapResponse.containsKey('operating_system')) { + _operatingSystem = _apiMapResponse['operating_system'] == null + ? null + : _apiMapResponse['operating_system'].toString(); + _operatingSystemSet = true; + } + return _operatingSystem; + } + + set operatingSystem(String v) { + _operatingSystem = v; + _operatingSystemSet = true; + } + + /// City component of user location (derived from IP address) (read-only) + + String get city { + if (!_citySet && _apiMapResponse.containsKey('city')) { + _city = _apiMapResponse['city'] == null + ? null + : _apiMapResponse['city'].toString(); + _citySet = true; + } + return _city; + } + + set city(String v) { + _city = v; + _citySet = true; + } + + /// State component of user location (derived from IP address) (read-only) + + String get state { + if (!_stateSet && _apiMapResponse.containsKey('state')) { + _state = _apiMapResponse['state'] == null + ? null + : _apiMapResponse['state'].toString(); + _stateSet = true; + } + return _state; + } + + set state(String v) { + _state = v; + _stateSet = true; + } + + /// Country component of user location (derived from IP address) (read-only) + + String get country { + if (!_countrySet && _apiMapResponse.containsKey('country')) { + _country = _apiMapResponse['country'] == null + ? null + : _apiMapResponse['country'].toString(); + _countrySet = true; + } + return _country; + } + + set country(String v) { + _country = v; + _countrySet = true; + } + + /// Type of credentials used for logging in this session (read-only) + + String get credentialsType { + if (!_credentialsTypeSet && + _apiMapResponse.containsKey('credentials_type')) { + _credentialsType = _apiMapResponse['credentials_type'] == null + ? null + : _apiMapResponse['credentials_type'].toString(); + _credentialsTypeSet = true; + } + return _credentialsType; + } + + set credentialsType(String v) { + _credentialsType = v; + _credentialsTypeSet = true; + } + + /// Time when this session was last extended by the user (read-only) + + String get extendedAt { + if (!_extendedAtSet && _apiMapResponse.containsKey('extended_at')) { + _extendedAt = _apiMapResponse['extended_at'] == null + ? null + : _apiMapResponse['extended_at'].toString(); + _extendedAtSet = true; + } + return _extendedAt; + } + + set extendedAt(String v) { + _extendedAt = v; + _extendedAtSet = true; + } + + /// Number of times this session was extended (read-only) + + int get extendedCount { + if (!_extendedCountSet && _apiMapResponse.containsKey('extended_count')) { + _extendedCount = _apiMapResponse['extended_count']; + _extendedCountSet = true; + } + return _extendedCount; + } + + set extendedCount(int v) { + _extendedCount = v; + _extendedCountSet = true; + } + + /// Actual user in the case when this session represents one user sudo'ing as another (read-only) + + int get sudoUserId { + if (!_sudoUserIdSet && _apiMapResponse.containsKey('sudo_user_id')) { + _sudoUserId = _apiMapResponse['sudo_user_id']; + _sudoUserIdSet = true; + } + return _sudoUserId; + } + + set sudoUserId(int v) { + _sudoUserId = v; + _sudoUserIdSet = true; + } + + /// Time when this session was initiated (read-only) + + String get createdAt { + if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { + _createdAt = _apiMapResponse['created_at'] == null + ? null + : _apiMapResponse['created_at'].toString(); + _createdAtSet = true; + } + return _createdAt; + } + + set createdAt(String v) { + _createdAt = v; + _createdAtSet = true; + } + + /// Time when this session will expire (read-only) + + String get expiresAt { + if (!_expiresAtSet && _apiMapResponse.containsKey('expires_at')) { + _expiresAt = _apiMapResponse['expires_at'] == null + ? null + : _apiMapResponse['expires_at'].toString(); + _expiresAtSet = true; + } + return _expiresAt; + } + + set expiresAt(String v) { + _expiresAt = v; + _expiresAtSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + Session() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Session.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_ipAddressSet || _apiMapResponse.containsKey('ip_address')) { + json['ip_address'] = ipAddress; + } + if (_browserSet || _apiMapResponse.containsKey('browser')) { + json['browser'] = browser; + } + if (_operatingSystemSet || + _apiMapResponse.containsKey('operating_system')) { + json['operating_system'] = operatingSystem; + } + if (_citySet || _apiMapResponse.containsKey('city')) { + json['city'] = city; + } + if (_stateSet || _apiMapResponse.containsKey('state')) { + json['state'] = state; + } + if (_countrySet || _apiMapResponse.containsKey('country')) { + json['country'] = country; + } + if (_credentialsTypeSet || + _apiMapResponse.containsKey('credentials_type')) { + json['credentials_type'] = credentialsType; + } + if (_extendedAtSet || _apiMapResponse.containsKey('extended_at')) { + json['extended_at'] = extendedAt; + } + if (_extendedCountSet || _apiMapResponse.containsKey('extended_count')) { + json['extended_count'] = extendedCount; + } + if (_sudoUserIdSet || _apiMapResponse.containsKey('sudo_user_id')) { + json['sudo_user_id'] = sudoUserId; + } + if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { + json['created_at'] = createdAt; + } + if (_expiresAtSet || _apiMapResponse.containsKey('expires_at')) { + json['expires_at'] = expiresAt; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class SessionConfig { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + bool _allowPersistentSessions; + bool _allowPersistentSessionsSet = false; + + int _sessionMinutes; + bool _sessionMinutesSet = false; + + bool _unlimitedSessionsPerUser; + bool _unlimitedSessionsPerUserSet = false; + + bool _useInactivityBasedLogout; + bool _useInactivityBasedLogoutSet = false; + + bool _trackSessionLocation; + bool _trackSessionLocationSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Allow users to have persistent sessions when they login + + bool get allowPersistentSessions { + if (!_allowPersistentSessionsSet && + _apiMapResponse.containsKey('allow_persistent_sessions')) { + _allowPersistentSessions = _apiMapResponse['allow_persistent_sessions']; + _allowPersistentSessionsSet = true; + } + return _allowPersistentSessions; + } + + set allowPersistentSessions(bool v) { + _allowPersistentSessions = v; + _allowPersistentSessionsSet = true; + } + + /// Number of minutes for user sessions. Must be between 5 and 43200 + + int get sessionMinutes { + if (!_sessionMinutesSet && _apiMapResponse.containsKey('session_minutes')) { + _sessionMinutes = _apiMapResponse['session_minutes']; + _sessionMinutesSet = true; + } + return _sessionMinutes; + } + + set sessionMinutes(int v) { + _sessionMinutes = v; + _sessionMinutesSet = true; + } + + /// Allow users to have an unbounded number of concurrent sessions (otherwise, users will be limited to only one session at a time). + + bool get unlimitedSessionsPerUser { + if (!_unlimitedSessionsPerUserSet && + _apiMapResponse.containsKey('unlimited_sessions_per_user')) { + _unlimitedSessionsPerUser = + _apiMapResponse['unlimited_sessions_per_user']; + _unlimitedSessionsPerUserSet = true; + } + return _unlimitedSessionsPerUser; + } + + set unlimitedSessionsPerUser(bool v) { + _unlimitedSessionsPerUser = v; + _unlimitedSessionsPerUserSet = true; + } + + /// Enforce session logout for sessions that are inactive for 15 minutes. + + bool get useInactivityBasedLogout { + if (!_useInactivityBasedLogoutSet && + _apiMapResponse.containsKey('use_inactivity_based_logout')) { + _useInactivityBasedLogout = + _apiMapResponse['use_inactivity_based_logout']; + _useInactivityBasedLogoutSet = true; + } + return _useInactivityBasedLogout; + } + + set useInactivityBasedLogout(bool v) { + _useInactivityBasedLogout = v; + _useInactivityBasedLogoutSet = true; + } + + /// Track location of session when user logs in. + + bool get trackSessionLocation { + if (!_trackSessionLocationSet && + _apiMapResponse.containsKey('track_session_location')) { + _trackSessionLocation = _apiMapResponse['track_session_location']; + _trackSessionLocationSet = true; + } + return _trackSessionLocation; + } + + set trackSessionLocation(bool v) { + _trackSessionLocation = v; + _trackSessionLocationSet = true; + } + + SessionConfig() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SessionConfig.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_allowPersistentSessionsSet || + _apiMapResponse.containsKey('allow_persistent_sessions')) { + json['allow_persistent_sessions'] = allowPersistentSessions; + } + if (_sessionMinutesSet || _apiMapResponse.containsKey('session_minutes')) { + json['session_minutes'] = sessionMinutes; + } + if (_unlimitedSessionsPerUserSet || + _apiMapResponse.containsKey('unlimited_sessions_per_user')) { + json['unlimited_sessions_per_user'] = unlimitedSessionsPerUser; + } + if (_useInactivityBasedLogoutSet || + _apiMapResponse.containsKey('use_inactivity_based_logout')) { + json['use_inactivity_based_logout'] = useInactivityBasedLogout; + } + if (_trackSessionLocationSet || + _apiMapResponse.containsKey('track_session_location')) { + json['track_session_location'] = trackSessionLocation; + } + return json; + } +} + +class Setting { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _extensionFrameworkEnabled; + bool _extensionFrameworkEnabledSet = false; + + bool _marketplaceAutoInstallEnabled; + bool _marketplaceAutoInstallEnabledSet = false; + + bool _marketplaceEnabled; + bool _marketplaceEnabledSet = false; + + WhitelabelConfiguration _whitelabelConfiguration; + bool _whitelabelConfigurationSet = false; + + CustomWelcomeEmail _customWelcomeEmail; + bool _customWelcomeEmailSet = false; + + /// Toggle extension framework on or off + + bool get extensionFrameworkEnabled { + if (!_extensionFrameworkEnabledSet && + _apiMapResponse.containsKey('extension_framework_enabled')) { + _extensionFrameworkEnabled = + _apiMapResponse['extension_framework_enabled']; + _extensionFrameworkEnabledSet = true; + } + return _extensionFrameworkEnabled; + } + + set extensionFrameworkEnabled(bool v) { + _extensionFrameworkEnabled = v; + _extensionFrameworkEnabledSet = true; + } + + /// Toggle marketplace auto install on or off. Note that auto install only runs if marketplace is enabled. + + bool get marketplaceAutoInstallEnabled { + if (!_marketplaceAutoInstallEnabledSet && + _apiMapResponse.containsKey('marketplace_auto_install_enabled')) { + _marketplaceAutoInstallEnabled = + _apiMapResponse['marketplace_auto_install_enabled']; + _marketplaceAutoInstallEnabledSet = true; + } + return _marketplaceAutoInstallEnabled; + } + + set marketplaceAutoInstallEnabled(bool v) { + _marketplaceAutoInstallEnabled = v; + _marketplaceAutoInstallEnabledSet = true; + } + + /// Toggle marketplace on or off + + bool get marketplaceEnabled { + if (!_marketplaceEnabledSet && + _apiMapResponse.containsKey('marketplace_enabled')) { + _marketplaceEnabled = _apiMapResponse['marketplace_enabled']; + _marketplaceEnabledSet = true; + } + return _marketplaceEnabled; + } + + set marketplaceEnabled(bool v) { + _marketplaceEnabled = v; + _marketplaceEnabledSet = true; + } + + WhitelabelConfiguration get whitelabelConfiguration { + if (!_whitelabelConfigurationSet && + _apiMapResponse.containsKey('whitelabel_configuration')) { + _whitelabelConfiguration = + _apiMapResponse['whitelabel_configuration'] == null + ? null + : WhitelabelConfiguration.fromResponse( + _apiMapResponse['whitelabel_configuration'], + apiResponseContentType); + _whitelabelConfigurationSet = true; + } + return _whitelabelConfiguration; + } + + set whitelabelConfiguration(WhitelabelConfiguration v) { + _whitelabelConfiguration = v; + _whitelabelConfigurationSet = true; + } + + CustomWelcomeEmail get customWelcomeEmail { + if (!_customWelcomeEmailSet && + _apiMapResponse.containsKey('custom_welcome_email')) { + _customWelcomeEmail = _apiMapResponse['custom_welcome_email'] == null + ? null + : CustomWelcomeEmail.fromResponse( + _apiMapResponse['custom_welcome_email'], apiResponseContentType); + _customWelcomeEmailSet = true; + } + return _customWelcomeEmail; + } + + set customWelcomeEmail(CustomWelcomeEmail v) { + _customWelcomeEmail = v; + _customWelcomeEmailSet = true; + } + + Setting() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Setting.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_extensionFrameworkEnabledSet || + _apiMapResponse.containsKey('extension_framework_enabled')) { + json['extension_framework_enabled'] = extensionFrameworkEnabled; + } + if (_marketplaceAutoInstallEnabledSet || + _apiMapResponse.containsKey('marketplace_auto_install_enabled')) { + json['marketplace_auto_install_enabled'] = marketplaceAutoInstallEnabled; + } + if (_marketplaceEnabledSet || + _apiMapResponse.containsKey('marketplace_enabled')) { + json['marketplace_enabled'] = marketplaceEnabled; + } + if (_whitelabelConfigurationSet || + _apiMapResponse.containsKey('whitelabel_configuration')) { + json['whitelabel_configuration'] = whitelabelConfiguration == null + ? null + : whitelabelConfiguration.toJson(); + } + if (_customWelcomeEmailSet || + _apiMapResponse.containsKey('custom_welcome_email')) { + json['custom_welcome_email'] = + customWelcomeEmail == null ? null : customWelcomeEmail.toJson(); + } + return json; + } +} + +class SmtpNodeStatus { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _isValid; + bool _isValidSet = false; + + String _message; + bool _messageSet = false; + + String _hostname; + bool _hostnameSet = false; + + /// SMTP status of node (read-only) + + bool get isValid { + if (!_isValidSet && _apiMapResponse.containsKey('is_valid')) { + _isValid = _apiMapResponse['is_valid']; + _isValidSet = true; + } + return _isValid; + } + + set isValid(bool v) { + _isValid = v; + _isValidSet = true; + } + + /// Error message for node (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Host name of node (read-only) + + String get hostname { + if (!_hostnameSet && _apiMapResponse.containsKey('hostname')) { + _hostname = _apiMapResponse['hostname'] == null + ? null + : _apiMapResponse['hostname'].toString(); + _hostnameSet = true; + } + return _hostname; + } + + set hostname(String v) { + _hostname = v; + _hostnameSet = true; + } + + SmtpNodeStatus() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SmtpNodeStatus.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_isValidSet || _apiMapResponse.containsKey('is_valid')) { + json['is_valid'] = isValid; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_hostnameSet || _apiMapResponse.containsKey('hostname')) { + json['hostname'] = hostname; + } + return json; + } +} + +class SmtpStatus { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _isValid; + bool _isValidSet = false; + + int _nodeCount; + bool _nodeCountSet = false; + + List _nodeStatus; + bool _nodeStatusSet = false; + + /// Overall SMTP status of cluster (read-only) + + bool get isValid { + if (!_isValidSet && _apiMapResponse.containsKey('is_valid')) { + _isValid = _apiMapResponse['is_valid']; + _isValidSet = true; + } + return _isValid; + } + + set isValid(bool v) { + _isValid = v; + _isValidSet = true; + } + + /// Total number of nodes in cluster (read-only) + + int get nodeCount { + if (!_nodeCountSet && _apiMapResponse.containsKey('node_count')) { + _nodeCount = _apiMapResponse['node_count']; + _nodeCountSet = true; + } + return _nodeCount; + } + + set nodeCount(int v) { + _nodeCount = v; + _nodeCountSet = true; + } + + /// array of each node's status containing is_valid, message, hostname (read-only) + + List get nodeStatus { + if (!_nodeStatusSet && _apiMapResponse.containsKey('node_status')) { + _nodeStatus = _apiMapResponse['node_status'] == null + ? null + : (_apiMapResponse['node_status'] as List) + .map( + (i) => SmtpNodeStatus.fromResponse(i, apiResponseContentType)) + .toList(); + _nodeStatusSet = true; + } + return _nodeStatus; + } + + set nodeStatus(List v) { + _nodeStatus = v; + _nodeStatusSet = true; + } + + SmtpStatus() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SmtpStatus.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_isValidSet || _apiMapResponse.containsKey('is_valid')) { + json['is_valid'] = isValid; + } + if (_nodeCountSet || _apiMapResponse.containsKey('node_count')) { + json['node_count'] = nodeCount; + } + if (_nodeStatusSet || _apiMapResponse.containsKey('node_status')) { + json['node_status'] = nodeStatus == null + ? null + : nodeStatus.map((i) => i.toJson()).toList(); + } + return json; + } +} + +class Snippet { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _label; + bool _labelSet = false; + + String _sql; + bool _sqlSet = false; + + /// Name of the snippet (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Label of the snippet (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// SQL text of the snippet (read-only) + + String get sql { + if (!_sqlSet && _apiMapResponse.containsKey('sql')) { + _sql = _apiMapResponse['sql'] == null + ? null + : _apiMapResponse['sql'].toString(); + _sqlSet = true; + } + return _sql; + } + + set sql(String v) { + _sql = v; + _sqlSet = true; + } + + Snippet() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Snippet.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_sqlSet || _apiMapResponse.containsKey('sql')) { + json['sql'] = sql; + } + return json; + } +} + +class SqlQuery { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _slug; + bool _slugSet = false; + + double _lastRuntime; + bool _lastRuntimeSet = false; + + int _runCount; + bool _runCountSet = false; + + int _browserLimit; + bool _browserLimitSet = false; + + String _sql; + bool _sqlSet = false; + + String _lastRunAt; + bool _lastRunAtSet = false; + + DBConnectionBase _connection; + bool _connectionSet = false; + + String _modelName; + bool _modelNameSet = false; + + UserPublic _creator; + bool _creatorSet = false; + + String _exploreUrl; + bool _exploreUrlSet = false; + + bool _plaintext; + bool _plaintextSet = false; + + Map _visConfig; + bool _visConfigSet = false; + + int _resultMakerId; + bool _resultMakerIdSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// The identifier of the SQL query (read-only) + + String get slug { + if (!_slugSet && _apiMapResponse.containsKey('slug')) { + _slug = _apiMapResponse['slug'] == null + ? null + : _apiMapResponse['slug'].toString(); + _slugSet = true; + } + return _slug; + } + + set slug(String v) { + _slug = v; + _slugSet = true; + } + + /// Number of seconds this query took to run the most recent time it was run (read-only) + + double get lastRuntime { + if (!_lastRuntimeSet && _apiMapResponse.containsKey('last_runtime')) { + _lastRuntime = _apiMapResponse['last_runtime']; + _lastRuntimeSet = true; + } + return _lastRuntime; + } + + set lastRuntime(double v) { + _lastRuntime = v; + _lastRuntimeSet = true; + } + + /// Number of times this query has been run (read-only) + + int get runCount { + if (!_runCountSet && _apiMapResponse.containsKey('run_count')) { + _runCount = _apiMapResponse['run_count']; + _runCountSet = true; + } + return _runCount; + } + + set runCount(int v) { + _runCount = v; + _runCountSet = true; + } + + /// Maximum number of rows this query will display on the SQL Runner page (read-only) + + int get browserLimit { + if (!_browserLimitSet && _apiMapResponse.containsKey('browser_limit')) { + _browserLimit = _apiMapResponse['browser_limit']; + _browserLimitSet = true; + } + return _browserLimit; + } + + set browserLimit(int v) { + _browserLimit = v; + _browserLimitSet = true; + } + + /// SQL query text (read-only) + + String get sql { + if (!_sqlSet && _apiMapResponse.containsKey('sql')) { + _sql = _apiMapResponse['sql'] == null + ? null + : _apiMapResponse['sql'].toString(); + _sqlSet = true; + } + return _sql; + } + + set sql(String v) { + _sql = v; + _sqlSet = true; + } + + /// The most recent time this query was run (read-only) + + String get lastRunAt { + if (!_lastRunAtSet && _apiMapResponse.containsKey('last_run_at')) { + _lastRunAt = _apiMapResponse['last_run_at'] == null + ? null + : _apiMapResponse['last_run_at'].toString(); + _lastRunAtSet = true; + } + return _lastRunAt; + } + + set lastRunAt(String v) { + _lastRunAt = v; + _lastRunAtSet = true; + } + + DBConnectionBase get connection { + if (!_connectionSet && _apiMapResponse.containsKey('connection')) { + _connection = _apiMapResponse['connection'] == null + ? null + : DBConnectionBase.fromResponse( + _apiMapResponse['connection'], apiResponseContentType); + _connectionSet = true; + } + return _connection; + } + + set connection(DBConnectionBase v) { + _connection = v; + _connectionSet = true; + } + + /// Model name this query uses (read-only) + + String get modelName { + if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { + _modelName = _apiMapResponse['model_name'] == null + ? null + : _apiMapResponse['model_name'].toString(); + _modelNameSet = true; + } + return _modelName; + } + + set modelName(String v) { + _modelName = v; + _modelNameSet = true; + } + + UserPublic get creator { + if (!_creatorSet && _apiMapResponse.containsKey('creator')) { + _creator = _apiMapResponse['creator'] == null + ? null + : UserPublic.fromResponse( + _apiMapResponse['creator'], apiResponseContentType); + _creatorSet = true; + } + return _creator; + } + + set creator(UserPublic v) { + _creator = v; + _creatorSet = true; + } + + /// Explore page URL for this SQL query (read-only) + + String get exploreUrl { + if (!_exploreUrlSet && _apiMapResponse.containsKey('explore_url')) { + _exploreUrl = _apiMapResponse['explore_url'] == null + ? null + : _apiMapResponse['explore_url'].toString(); + _exploreUrlSet = true; + } + return _exploreUrl; + } + + set exploreUrl(String v) { + _exploreUrl = v; + _exploreUrlSet = true; + } + + /// Should this query be rendered as plain text (read-only) + + bool get plaintext { + if (!_plaintextSet && _apiMapResponse.containsKey('plaintext')) { + _plaintext = _apiMapResponse['plaintext']; + _plaintextSet = true; + } + return _plaintext; + } + + set plaintext(bool v) { + _plaintext = v; + _plaintextSet = true; + } + + /// Visualization configuration properties. These properties are typically opaque and differ based on the type of visualization used. There is no specified set of allowed keys. The values can be any type supported by JSON. A "type" key with a string value is often present, and is used by Looker to determine which visualization to present. Visualizations ignore unknown vis_config properties. + + Map get visConfig { + if (!_visConfigSet && _apiMapResponse.containsKey('vis_config')) { + _visConfig = _apiMapResponse['vis_config']; + _visConfigSet = true; + } + return _visConfig; + } + + set visConfig(Map v) { + _visConfig = v; + _visConfigSet = true; + } + + /// ID of the ResultMakerLookup entry. + + int get resultMakerId { + if (!_resultMakerIdSet && _apiMapResponse.containsKey('result_maker_id')) { + _resultMakerId = _apiMapResponse['result_maker_id']; + _resultMakerIdSet = true; + } + return _resultMakerId; + } + + set resultMakerId(int v) { + _resultMakerId = v; + _resultMakerIdSet = true; + } + + SqlQuery() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SqlQuery.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_slugSet || _apiMapResponse.containsKey('slug')) { + json['slug'] = slug; + } + if (_lastRuntimeSet || _apiMapResponse.containsKey('last_runtime')) { + json['last_runtime'] = lastRuntime; + } + if (_runCountSet || _apiMapResponse.containsKey('run_count')) { + json['run_count'] = runCount; + } + if (_browserLimitSet || _apiMapResponse.containsKey('browser_limit')) { + json['browser_limit'] = browserLimit; + } + if (_sqlSet || _apiMapResponse.containsKey('sql')) { + json['sql'] = sql; + } + if (_lastRunAtSet || _apiMapResponse.containsKey('last_run_at')) { + json['last_run_at'] = lastRunAt; + } + if (_connectionSet || _apiMapResponse.containsKey('connection')) { + json['connection'] = connection == null ? null : connection.toJson(); + } + if (_modelNameSet || _apiMapResponse.containsKey('model_name')) { + json['model_name'] = modelName; + } + if (_creatorSet || _apiMapResponse.containsKey('creator')) { + json['creator'] = creator == null ? null : creator.toJson(); + } + if (_exploreUrlSet || _apiMapResponse.containsKey('explore_url')) { + json['explore_url'] = exploreUrl; + } + if (_plaintextSet || _apiMapResponse.containsKey('plaintext')) { + json['plaintext'] = plaintext; + } + if (_visConfigSet || _apiMapResponse.containsKey('vis_config')) { + json['vis_config'] = visConfig; + } + if (_resultMakerIdSet || _apiMapResponse.containsKey('result_maker_id')) { + json['result_maker_id'] = resultMakerId; + } + return json; + } +} + +class SqlQueryCreate { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _connectionName; + bool _connectionNameSet = false; + + String _connectionId; + bool _connectionIdSet = false; + + String _modelName; + bool _modelNameSet = false; + + String _sql; + bool _sqlSet = false; + + Map _visConfig; + bool _visConfigSet = false; + + /// Name of the db connection on which to run this query + + String get connectionName { + if (!_connectionNameSet && _apiMapResponse.containsKey('connection_name')) { + _connectionName = _apiMapResponse['connection_name'] == null + ? null + : _apiMapResponse['connection_name'].toString(); + _connectionNameSet = true; + } + return _connectionName; + } + + set connectionName(String v) { + _connectionName = v; + _connectionNameSet = true; + } + + /// (DEPRECATED) Use `connection_name` instead + + String get connectionId { + if (!_connectionIdSet && _apiMapResponse.containsKey('connection_id')) { + _connectionId = _apiMapResponse['connection_id'] == null + ? null + : _apiMapResponse['connection_id'].toString(); + _connectionIdSet = true; + } + return _connectionId; + } + + set connectionId(String v) { + _connectionId = v; + _connectionIdSet = true; + } + + /// Name of LookML Model (this or `connection_id` required) + + String get modelName { + if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { + _modelName = _apiMapResponse['model_name'] == null + ? null + : _apiMapResponse['model_name'].toString(); + _modelNameSet = true; + } + return _modelName; + } + + set modelName(String v) { + _modelName = v; + _modelNameSet = true; + } + + /// SQL query + + String get sql { + if (!_sqlSet && _apiMapResponse.containsKey('sql')) { + _sql = _apiMapResponse['sql'] == null + ? null + : _apiMapResponse['sql'].toString(); + _sqlSet = true; + } + return _sql; + } + + set sql(String v) { + _sql = v; + _sqlSet = true; + } + + /// Visualization configuration properties. These properties are typically opaque and differ based on the type of visualization used. There is no specified set of allowed keys. The values can be any type supported by JSON. A "type" key with a string value is often present, and is used by Looker to determine which visualization to present. Visualizations ignore unknown vis_config properties. + + Map get visConfig { + if (!_visConfigSet && _apiMapResponse.containsKey('vis_config')) { + _visConfig = _apiMapResponse['vis_config']; + _visConfigSet = true; + } + return _visConfig; + } + + set visConfig(Map v) { + _visConfig = v; + _visConfigSet = true; + } + + SqlQueryCreate() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SqlQueryCreate.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_connectionNameSet || _apiMapResponse.containsKey('connection_name')) { + json['connection_name'] = connectionName; + } + if (_connectionIdSet || _apiMapResponse.containsKey('connection_id')) { + json['connection_id'] = connectionId; + } + if (_modelNameSet || _apiMapResponse.containsKey('model_name')) { + json['model_name'] = modelName; + } + if (_sqlSet || _apiMapResponse.containsKey('sql')) { + json['sql'] = sql; + } + if (_visConfigSet || _apiMapResponse.containsKey('vis_config')) { + json['vis_config'] = visConfig; + } + return json; + } +} + +class SshPublicKey { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _publicKey; + bool _publicKeySet = false; + + /// The SSH public key created for this instance (read-only) + + String get publicKey { + if (!_publicKeySet && _apiMapResponse.containsKey('public_key')) { + _publicKey = _apiMapResponse['public_key'] == null + ? null + : _apiMapResponse['public_key'].toString(); + _publicKeySet = true; + } + return _publicKey; + } + + set publicKey(String v) { + _publicKey = v; + _publicKeySet = true; + } + + SshPublicKey() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SshPublicKey.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_publicKeySet || _apiMapResponse.containsKey('public_key')) { + json['public_key'] = publicKey; + } + return json; + } +} + +class SshServer { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _sshServerId; + bool _sshServerIdSet = false; + + String _sshServerName; + bool _sshServerNameSet = false; + + String _sshServerHost; + bool _sshServerHostSet = false; + + int _sshServerPort; + bool _sshServerPortSet = false; + + String _sshServerUser; + bool _sshServerUserSet = false; + + String _fingerPrint; + bool _fingerPrintSet = false; + + String _shaFingerPrint; + bool _shaFingerPrintSet = false; + + String _publicKey; + bool _publicKeySet = false; + + String _status; + bool _statusSet = false; + + /// A unique id used to identify this SSH Server (read-only) + + String get sshServerId { + if (!_sshServerIdSet && _apiMapResponse.containsKey('ssh_server_id')) { + _sshServerId = _apiMapResponse['ssh_server_id'] == null + ? null + : _apiMapResponse['ssh_server_id'].toString(); + _sshServerIdSet = true; + } + return _sshServerId; + } + + set sshServerId(String v) { + _sshServerId = v; + _sshServerIdSet = true; + } + + /// The name to identify this SSH Server + + String get sshServerName { + if (!_sshServerNameSet && _apiMapResponse.containsKey('ssh_server_name')) { + _sshServerName = _apiMapResponse['ssh_server_name'] == null + ? null + : _apiMapResponse['ssh_server_name'].toString(); + _sshServerNameSet = true; + } + return _sshServerName; + } + + set sshServerName(String v) { + _sshServerName = v; + _sshServerNameSet = true; + } + + /// The hostname or ip address of the SSH Server + + String get sshServerHost { + if (!_sshServerHostSet && _apiMapResponse.containsKey('ssh_server_host')) { + _sshServerHost = _apiMapResponse['ssh_server_host'] == null + ? null + : _apiMapResponse['ssh_server_host'].toString(); + _sshServerHostSet = true; + } + return _sshServerHost; + } + + set sshServerHost(String v) { + _sshServerHost = v; + _sshServerHostSet = true; + } + + /// The port to connect to on the SSH Server + + int get sshServerPort { + if (!_sshServerPortSet && _apiMapResponse.containsKey('ssh_server_port')) { + _sshServerPort = _apiMapResponse['ssh_server_port']; + _sshServerPortSet = true; + } + return _sshServerPort; + } + + set sshServerPort(int v) { + _sshServerPort = v; + _sshServerPortSet = true; + } + + /// The username used to connect to the SSH Server + + String get sshServerUser { + if (!_sshServerUserSet && _apiMapResponse.containsKey('ssh_server_user')) { + _sshServerUser = _apiMapResponse['ssh_server_user'] == null + ? null + : _apiMapResponse['ssh_server_user'].toString(); + _sshServerUserSet = true; + } + return _sshServerUser; + } + + set sshServerUser(String v) { + _sshServerUser = v; + _sshServerUserSet = true; + } + + /// The md5 fingerprint used to identify the SSH Server (read-only) + + String get fingerPrint { + if (!_fingerPrintSet && _apiMapResponse.containsKey('finger_print')) { + _fingerPrint = _apiMapResponse['finger_print'] == null + ? null + : _apiMapResponse['finger_print'].toString(); + _fingerPrintSet = true; + } + return _fingerPrint; + } + + set fingerPrint(String v) { + _fingerPrint = v; + _fingerPrintSet = true; + } + + /// The SHA fingerprint used to identify the SSH Server (read-only) + + String get shaFingerPrint { + if (!_shaFingerPrintSet && + _apiMapResponse.containsKey('sha_finger_print')) { + _shaFingerPrint = _apiMapResponse['sha_finger_print'] == null + ? null + : _apiMapResponse['sha_finger_print'].toString(); + _shaFingerPrintSet = true; + } + return _shaFingerPrint; + } + + set shaFingerPrint(String v) { + _shaFingerPrint = v; + _shaFingerPrintSet = true; + } + + /// The SSH public key created for this instance (read-only) + + String get publicKey { + if (!_publicKeySet && _apiMapResponse.containsKey('public_key')) { + _publicKey = _apiMapResponse['public_key'] == null + ? null + : _apiMapResponse['public_key'].toString(); + _publicKeySet = true; + } + return _publicKey; + } + + set publicKey(String v) { + _publicKey = v; + _publicKeySet = true; + } + + /// The current connection status to this SSH Server (read-only) + + String get status { + if (!_statusSet && _apiMapResponse.containsKey('status')) { + _status = _apiMapResponse['status'] == null + ? null + : _apiMapResponse['status'].toString(); + _statusSet = true; + } + return _status; + } + + set status(String v) { + _status = v; + _statusSet = true; + } + + SshServer() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SshServer.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_sshServerIdSet || _apiMapResponse.containsKey('ssh_server_id')) { + json['ssh_server_id'] = sshServerId; + } + if (_sshServerNameSet || _apiMapResponse.containsKey('ssh_server_name')) { + json['ssh_server_name'] = sshServerName; + } + if (_sshServerHostSet || _apiMapResponse.containsKey('ssh_server_host')) { + json['ssh_server_host'] = sshServerHost; + } + if (_sshServerPortSet || _apiMapResponse.containsKey('ssh_server_port')) { + json['ssh_server_port'] = sshServerPort; + } + if (_sshServerUserSet || _apiMapResponse.containsKey('ssh_server_user')) { + json['ssh_server_user'] = sshServerUser; + } + if (_fingerPrintSet || _apiMapResponse.containsKey('finger_print')) { + json['finger_print'] = fingerPrint; + } + if (_shaFingerPrintSet || _apiMapResponse.containsKey('sha_finger_print')) { + json['sha_finger_print'] = shaFingerPrint; + } + if (_publicKeySet || _apiMapResponse.containsKey('public_key')) { + json['public_key'] = publicKey; + } + if (_statusSet || _apiMapResponse.containsKey('status')) { + json['status'] = status; + } + return json; + } +} + +class SshTunnel { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _tunnelId; + bool _tunnelIdSet = false; + + String _sshServerId; + bool _sshServerIdSet = false; + + String _sshServerName; + bool _sshServerNameSet = false; + + String _sshServerHost; + bool _sshServerHostSet = false; + + int _sshServerPort; + bool _sshServerPortSet = false; + + String _sshServerUser; + bool _sshServerUserSet = false; + + String _lastAttempt; + bool _lastAttemptSet = false; + + int _localHostPort; + bool _localHostPortSet = false; + + String _databaseHost; + bool _databaseHostSet = false; + + int _databasePort; + bool _databasePortSet = false; + + String _status; + bool _statusSet = false; + + /// Unique ID for the tunnel (read-only) + + String get tunnelId { + if (!_tunnelIdSet && _apiMapResponse.containsKey('tunnel_id')) { + _tunnelId = _apiMapResponse['tunnel_id'] == null + ? null + : _apiMapResponse['tunnel_id'].toString(); + _tunnelIdSet = true; + } + return _tunnelId; + } + + set tunnelId(String v) { + _tunnelId = v; + _tunnelIdSet = true; + } + + /// SSH Server ID + + String get sshServerId { + if (!_sshServerIdSet && _apiMapResponse.containsKey('ssh_server_id')) { + _sshServerId = _apiMapResponse['ssh_server_id'] == null + ? null + : _apiMapResponse['ssh_server_id'].toString(); + _sshServerIdSet = true; + } + return _sshServerId; + } + + set sshServerId(String v) { + _sshServerId = v; + _sshServerIdSet = true; + } + + /// SSH Server name (read-only) + + String get sshServerName { + if (!_sshServerNameSet && _apiMapResponse.containsKey('ssh_server_name')) { + _sshServerName = _apiMapResponse['ssh_server_name'] == null + ? null + : _apiMapResponse['ssh_server_name'].toString(); + _sshServerNameSet = true; + } + return _sshServerName; + } + + set sshServerName(String v) { + _sshServerName = v; + _sshServerNameSet = true; + } + + /// SSH Server Hostname or IP Address (read-only) + + String get sshServerHost { + if (!_sshServerHostSet && _apiMapResponse.containsKey('ssh_server_host')) { + _sshServerHost = _apiMapResponse['ssh_server_host'] == null + ? null + : _apiMapResponse['ssh_server_host'].toString(); + _sshServerHostSet = true; + } + return _sshServerHost; + } + + set sshServerHost(String v) { + _sshServerHost = v; + _sshServerHostSet = true; + } + + /// SSH Server port (read-only) + + int get sshServerPort { + if (!_sshServerPortSet && _apiMapResponse.containsKey('ssh_server_port')) { + _sshServerPort = _apiMapResponse['ssh_server_port']; + _sshServerPortSet = true; + } + return _sshServerPort; + } + + set sshServerPort(int v) { + _sshServerPort = v; + _sshServerPortSet = true; + } + + /// Username used to connect to the SSH Server (read-only) + + String get sshServerUser { + if (!_sshServerUserSet && _apiMapResponse.containsKey('ssh_server_user')) { + _sshServerUser = _apiMapResponse['ssh_server_user'] == null + ? null + : _apiMapResponse['ssh_server_user'].toString(); + _sshServerUserSet = true; + } + return _sshServerUser; + } + + set sshServerUser(String v) { + _sshServerUser = v; + _sshServerUserSet = true; + } + + /// Time of last connect attempt (read-only) + + String get lastAttempt { + if (!_lastAttemptSet && _apiMapResponse.containsKey('last_attempt')) { + _lastAttempt = _apiMapResponse['last_attempt'] == null + ? null + : _apiMapResponse['last_attempt'].toString(); + _lastAttemptSet = true; + } + return _lastAttempt; + } + + set lastAttempt(String v) { + _lastAttempt = v; + _lastAttemptSet = true; + } + + /// Localhost Port used by the Looker instance to connect to the remote DB (read-only) + + int get localHostPort { + if (!_localHostPortSet && _apiMapResponse.containsKey('local_host_port')) { + _localHostPort = _apiMapResponse['local_host_port']; + _localHostPortSet = true; + } + return _localHostPort; + } + + set localHostPort(int v) { + _localHostPort = v; + _localHostPortSet = true; + } + + /// Hostname or IP Address of the Database Server + + String get databaseHost { + if (!_databaseHostSet && _apiMapResponse.containsKey('database_host')) { + _databaseHost = _apiMapResponse['database_host'] == null + ? null + : _apiMapResponse['database_host'].toString(); + _databaseHostSet = true; + } + return _databaseHost; + } + + set databaseHost(String v) { + _databaseHost = v; + _databaseHostSet = true; + } + + /// Port that the Database Server is listening on + + int get databasePort { + if (!_databasePortSet && _apiMapResponse.containsKey('database_port')) { + _databasePort = _apiMapResponse['database_port']; + _databasePortSet = true; + } + return _databasePort; + } + + set databasePort(int v) { + _databasePort = v; + _databasePortSet = true; + } + + /// Current connection status for this Tunnel (read-only) + + String get status { + if (!_statusSet && _apiMapResponse.containsKey('status')) { + _status = _apiMapResponse['status'] == null + ? null + : _apiMapResponse['status'].toString(); + _statusSet = true; + } + return _status; + } + + set status(String v) { + _status = v; + _statusSet = true; + } + + SshTunnel() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SshTunnel.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_tunnelIdSet || _apiMapResponse.containsKey('tunnel_id')) { + json['tunnel_id'] = tunnelId; + } + if (_sshServerIdSet || _apiMapResponse.containsKey('ssh_server_id')) { + json['ssh_server_id'] = sshServerId; + } + if (_sshServerNameSet || _apiMapResponse.containsKey('ssh_server_name')) { + json['ssh_server_name'] = sshServerName; + } + if (_sshServerHostSet || _apiMapResponse.containsKey('ssh_server_host')) { + json['ssh_server_host'] = sshServerHost; + } + if (_sshServerPortSet || _apiMapResponse.containsKey('ssh_server_port')) { + json['ssh_server_port'] = sshServerPort; + } + if (_sshServerUserSet || _apiMapResponse.containsKey('ssh_server_user')) { + json['ssh_server_user'] = sshServerUser; + } + if (_lastAttemptSet || _apiMapResponse.containsKey('last_attempt')) { + json['last_attempt'] = lastAttempt; + } + if (_localHostPortSet || _apiMapResponse.containsKey('local_host_port')) { + json['local_host_port'] = localHostPort; + } + if (_databaseHostSet || _apiMapResponse.containsKey('database_host')) { + json['database_host'] = databaseHost; + } + if (_databasePortSet || _apiMapResponse.containsKey('database_port')) { + json['database_port'] = databasePort; + } + if (_statusSet || _apiMapResponse.containsKey('status')) { + json['status'] = status; + } + return json; + } +} + +class SupportAccessAddEntries { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _emails; + bool _emailsSet = false; + + String _reason; + bool _reasonSet = false; + + /// An array of emails to add to the Allowlist + + List get emails { + if (!_emailsSet && _apiMapResponse.containsKey('emails')) { + _emails = _apiMapResponse['emails'] == null + ? null + : _apiMapResponse['emails'].map((i) => i as String).toList(); + _emailsSet = true; + } + return _emails; + } + + set emails(List v) { + _emails = v; + _emailsSet = true; + } + + /// Reason for adding emails to the Allowlist + + String get reason { + if (!_reasonSet && _apiMapResponse.containsKey('reason')) { + _reason = _apiMapResponse['reason'] == null + ? null + : _apiMapResponse['reason'].toString(); + _reasonSet = true; + } + return _reason; + } + + set reason(String v) { + _reason = v; + _reasonSet = true; + } + + SupportAccessAddEntries() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SupportAccessAddEntries.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_emailsSet || _apiMapResponse.containsKey('emails')) { + json['emails'] = emails; + } + if (_reasonSet || _apiMapResponse.containsKey('reason')) { + json['reason'] = reason; + } + return json; + } +} + +class SupportAccessAllowlistEntry { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _id; + bool _idSet = false; + + String _email; + bool _emailSet = false; + + String _fullName; + bool _fullNameSet = false; + + String _reason; + bool _reasonSet = false; + + DateTime _createdDate; + bool _createdDateSet = false; + + /// Unique ID (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// Email address + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// Full name of allowlisted user (read-only) + + String get fullName { + if (!_fullNameSet && _apiMapResponse.containsKey('full_name')) { + _fullName = _apiMapResponse['full_name'] == null + ? null + : _apiMapResponse['full_name'].toString(); + _fullNameSet = true; + } + return _fullName; + } + + set fullName(String v) { + _fullName = v; + _fullNameSet = true; + } + + /// Reason the Email is included in the Allowlist + + String get reason { + if (!_reasonSet && _apiMapResponse.containsKey('reason')) { + _reason = _apiMapResponse['reason'] == null + ? null + : _apiMapResponse['reason'].toString(); + _reasonSet = true; + } + return _reason; + } + + set reason(String v) { + _reason = v; + _reasonSet = true; + } + + /// Date the Email was added to the Allowlist (read-only) + + DateTime get createdDate { + if (!_createdDateSet && _apiMapResponse.containsKey('created_date')) { + _createdDate = _apiMapResponse['created_date'] == null + ? null + : DateTime.parse(_apiMapResponse['created_date']); + _createdDateSet = true; + } + return _createdDate; + } + + set createdDate(DateTime v) { + _createdDate = v; + _createdDateSet = true; + } + + SupportAccessAllowlistEntry() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SupportAccessAllowlistEntry.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_fullNameSet || _apiMapResponse.containsKey('full_name')) { + json['full_name'] = fullName; + } + if (_reasonSet || _apiMapResponse.containsKey('reason')) { + json['reason'] = reason; + } + if (_createdDateSet || _apiMapResponse.containsKey('created_date')) { + json['created_date'] = + createdDate == null ? null : createdDate.toIso8601String(); + } + return json; + } +} + +class SupportAccessEnable { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _durationInSeconds; + bool _durationInSecondsSet = false; + + /// Duration Support Access will remain enabled + + int get durationInSeconds { + if (!_durationInSecondsSet && + _apiMapResponse.containsKey('duration_in_seconds')) { + _durationInSeconds = _apiMapResponse['duration_in_seconds']; + _durationInSecondsSet = true; + } + return _durationInSeconds; + } + + set durationInSeconds(int v) { + _durationInSeconds = v; + _durationInSecondsSet = true; + } + + SupportAccessEnable() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SupportAccessEnable.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_durationInSecondsSet || + _apiMapResponse.containsKey('duration_in_seconds')) { + json['duration_in_seconds'] = durationInSeconds; + } + return json; + } +} + +class SupportAccessStatus { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _open; + bool _openSet = false; + + DateTime _openUntil; + bool _openUntilSet = false; + + /// Whether or not Support Access is open (read-only) + + bool get open { + if (!_openSet && _apiMapResponse.containsKey('open')) { + _open = _apiMapResponse['open']; + _openSet = true; + } + return _open; + } + + set open(bool v) { + _open = v; + _openSet = true; + } + + /// Time that Support Access will expire (read-only) + + DateTime get openUntil { + if (!_openUntilSet && _apiMapResponse.containsKey('open_until')) { + _openUntil = _apiMapResponse['open_until'] == null + ? null + : DateTime.parse(_apiMapResponse['open_until']); + _openUntilSet = true; + } + return _openUntil; + } + + set openUntil(DateTime v) { + _openUntil = v; + _openUntilSet = true; + } + + SupportAccessStatus() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + SupportAccessStatus.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_openSet || _apiMapResponse.containsKey('open')) { + json['open'] = open; + } + if (_openUntilSet || _apiMapResponse.containsKey('open_until')) { + json['open_until'] = + openUntil == null ? null : openUntil.toIso8601String(); + } + return json; + } +} + +/// A list of action types the integration supports. Valid values are: "cell", "query", "dashboard". (Enum defined in Integration) +enum SupportedActionTypes { cell, query, dashboard } + +class SupportedActionTypesMapper { + static String toStringValue(SupportedActionTypes e) { + switch (e) { + case SupportedActionTypes.cell: + return 'cell'; + case SupportedActionTypes.query: + return 'query'; + case SupportedActionTypes.dashboard: + return 'dashboard'; + + default: + return null; + } + } + + static SupportedActionTypes fromStringValue(String s) { + if (s == 'cell') { + return SupportedActionTypes.cell; + } + if (s == 'query') { + return SupportedActionTypes.query; + } + if (s == 'dashboard') { + return SupportedActionTypes.dashboard; + } + return null; + } +} + +/// A list of all the download mechanisms the integration supports. The order of values is not significant: Looker will select the most appropriate supported download mechanism for a given query. The integration must ensure it can handle any of the mechanisms it claims to support. If unspecified, this defaults to all download setting values. Valid values are: "push", "url". (Enum defined in Integration) +enum SupportedDownloadSettings { push, url } + +class SupportedDownloadSettingsMapper { + static String toStringValue(SupportedDownloadSettings e) { + switch (e) { + case SupportedDownloadSettings.push: + return 'push'; + case SupportedDownloadSettings.url: + return 'url'; + + default: + return null; + } + } + + static SupportedDownloadSettings fromStringValue(String s) { + if (s == 'push') { + return SupportedDownloadSettings.push; + } + if (s == 'url') { + return SupportedDownloadSettings.url; + } + return null; + } +} + +/// A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) +enum SupportedFormats { + txt, + csv, + inlineJson, + json, + jsonLabel, + jsonDetail, + jsonDetailLiteStream, + xlsx, + html, + wysiwygPdf, + assembledPdf, + wysiwygPng, + csvZip +} + +class SupportedFormatsMapper { + static String toStringValue(SupportedFormats e) { + switch (e) { + case SupportedFormats.txt: + return 'txt'; + case SupportedFormats.csv: + return 'csv'; + case SupportedFormats.inlineJson: + return 'inline_json'; + case SupportedFormats.json: + return 'json'; + case SupportedFormats.jsonLabel: + return 'json_label'; + case SupportedFormats.jsonDetail: + return 'json_detail'; + case SupportedFormats.jsonDetailLiteStream: + return 'json_detail_lite_stream'; + case SupportedFormats.xlsx: + return 'xlsx'; + case SupportedFormats.html: + return 'html'; + case SupportedFormats.wysiwygPdf: + return 'wysiwyg_pdf'; + case SupportedFormats.assembledPdf: + return 'assembled_pdf'; + case SupportedFormats.wysiwygPng: + return 'wysiwyg_png'; + case SupportedFormats.csvZip: + return 'csv_zip'; + + default: + return null; + } + } + + static SupportedFormats fromStringValue(String s) { + if (s == 'txt') { + return SupportedFormats.txt; + } + if (s == 'csv') { + return SupportedFormats.csv; + } + if (s == 'inline_json') { + return SupportedFormats.inlineJson; + } + if (s == 'json') { + return SupportedFormats.json; + } + if (s == 'json_label') { + return SupportedFormats.jsonLabel; + } + if (s == 'json_detail') { + return SupportedFormats.jsonDetail; + } + if (s == 'json_detail_lite_stream') { + return SupportedFormats.jsonDetailLiteStream; + } + if (s == 'xlsx') { + return SupportedFormats.xlsx; + } + if (s == 'html') { + return SupportedFormats.html; + } + if (s == 'wysiwyg_pdf') { + return SupportedFormats.wysiwygPdf; + } + if (s == 'assembled_pdf') { + return SupportedFormats.assembledPdf; + } + if (s == 'wysiwyg_png') { + return SupportedFormats.wysiwygPng; + } + if (s == 'csv_zip') { + return SupportedFormats.csvZip; + } + return null; + } +} + +/// A list of formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: "formatted", "unformatted". (Enum defined in Integration) +enum SupportedFormattings { formatted, unformatted } + +class SupportedFormattingsMapper { + static String toStringValue(SupportedFormattings e) { + switch (e) { + case SupportedFormattings.formatted: + return 'formatted'; + case SupportedFormattings.unformatted: + return 'unformatted'; + + default: + return null; + } + } + + static SupportedFormattings fromStringValue(String s) { + if (s == 'formatted') { + return SupportedFormattings.formatted; + } + if (s == 'unformatted') { + return SupportedFormattings.unformatted; + } + return null; + } +} + +/// A list of visualization formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: "apply", "noapply". (Enum defined in Integration) +enum SupportedVisualizationFormattings { apply, noapply } + +class SupportedVisualizationFormattingsMapper { + static String toStringValue(SupportedVisualizationFormattings e) { + switch (e) { + case SupportedVisualizationFormattings.apply: + return 'apply'; + case SupportedVisualizationFormattings.noapply: + return 'noapply'; + + default: + return null; + } + } + + static SupportedVisualizationFormattings fromStringValue(String s) { + if (s == 'apply') { + return SupportedVisualizationFormattings.apply; + } + if (s == 'noapply') { + return SupportedVisualizationFormattings.noapply; + } + return null; + } +} + +class Theme { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + DateTime _beginAt; + bool _beginAtSet = false; + + DateTime _endAt; + bool _endAtSet = false; + + int _id; + bool _idSet = false; + + String _name; + bool _nameSet = false; + + ThemeSettings _settings; + bool _settingsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Timestamp for when this theme becomes active. Null=always + + DateTime get beginAt { + if (!_beginAtSet && _apiMapResponse.containsKey('begin_at')) { + _beginAt = _apiMapResponse['begin_at'] == null + ? null + : DateTime.parse(_apiMapResponse['begin_at']); + _beginAtSet = true; + } + return _beginAt; + } + + set beginAt(DateTime v) { + _beginAt = v; + _beginAtSet = true; + } + + /// Timestamp for when this theme expires. Null=never + + DateTime get endAt { + if (!_endAtSet && _apiMapResponse.containsKey('end_at')) { + _endAt = _apiMapResponse['end_at'] == null + ? null + : DateTime.parse(_apiMapResponse['end_at']); + _endAtSet = true; + } + return _endAt; + } + + set endAt(DateTime v) { + _endAt = v; + _endAtSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Name of theme. Can only be alphanumeric and underscores. + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + ThemeSettings get settings { + if (!_settingsSet && _apiMapResponse.containsKey('settings')) { + _settings = _apiMapResponse['settings'] == null + ? null + : ThemeSettings.fromResponse( + _apiMapResponse['settings'], apiResponseContentType); + _settingsSet = true; + } + return _settings; + } + + set settings(ThemeSettings v) { + _settings = v; + _settingsSet = true; + } + + Theme() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Theme.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_beginAtSet || _apiMapResponse.containsKey('begin_at')) { + json['begin_at'] = beginAt == null ? null : beginAt.toIso8601String(); + } + if (_endAtSet || _apiMapResponse.containsKey('end_at')) { + json['end_at'] = endAt == null ? null : endAt.toIso8601String(); + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_settingsSet || _apiMapResponse.containsKey('settings')) { + json['settings'] = settings == null ? null : settings.toJson(); + } + return json; + } +} + +class ThemeSettings { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _backgroundColor; + bool _backgroundColorSet = false; + + String _baseFontSize; + bool _baseFontSizeSet = false; + + String _colorCollectionId; + bool _colorCollectionIdSet = false; + + String _fontColor; + bool _fontColorSet = false; + + String _fontFamily; + bool _fontFamilySet = false; + + String _fontSource; + bool _fontSourceSet = false; + + String _infoButtonColor; + bool _infoButtonColorSet = false; + + String _primaryButtonColor; + bool _primaryButtonColorSet = false; + + bool _showFiltersBar; + bool _showFiltersBarSet = false; + + bool _showTitle; + bool _showTitleSet = false; + + String _textTileTextColor; + bool _textTileTextColorSet = false; + + String _tileBackgroundColor; + bool _tileBackgroundColorSet = false; + + String _tileTextColor; + bool _tileTextColorSet = false; + + String _titleColor; + bool _titleColorSet = false; + + String _warnButtonColor; + bool _warnButtonColorSet = false; + + String _tileTitleAlignment; + bool _tileTitleAlignmentSet = false; + + bool _tileShadow; + bool _tileShadowSet = false; + + /// Default background color + + String get backgroundColor { + if (!_backgroundColorSet && + _apiMapResponse.containsKey('background_color')) { + _backgroundColor = _apiMapResponse['background_color'] == null + ? null + : _apiMapResponse['background_color'].toString(); + _backgroundColorSet = true; + } + return _backgroundColor; + } + + set backgroundColor(String v) { + _backgroundColor = v; + _backgroundColorSet = true; + } + + /// Base font size for scaling fonts + + String get baseFontSize { + if (!_baseFontSizeSet && _apiMapResponse.containsKey('base_font_size')) { + _baseFontSize = _apiMapResponse['base_font_size'] == null + ? null + : _apiMapResponse['base_font_size'].toString(); + _baseFontSizeSet = true; + } + return _baseFontSize; + } + + set baseFontSize(String v) { + _baseFontSize = v; + _baseFontSizeSet = true; + } + + /// Optional. ID of color collection to use with the theme. Use an empty string for none. + + String get colorCollectionId { + if (!_colorCollectionIdSet && + _apiMapResponse.containsKey('color_collection_id')) { + _colorCollectionId = _apiMapResponse['color_collection_id'] == null + ? null + : _apiMapResponse['color_collection_id'].toString(); + _colorCollectionIdSet = true; + } + return _colorCollectionId; + } + + set colorCollectionId(String v) { + _colorCollectionId = v; + _colorCollectionIdSet = true; + } + + /// Default font color + + String get fontColor { + if (!_fontColorSet && _apiMapResponse.containsKey('font_color')) { + _fontColor = _apiMapResponse['font_color'] == null + ? null + : _apiMapResponse['font_color'].toString(); + _fontColorSet = true; + } + return _fontColor; + } + + set fontColor(String v) { + _fontColor = v; + _fontColorSet = true; + } + + /// Primary font family + + String get fontFamily { + if (!_fontFamilySet && _apiMapResponse.containsKey('font_family')) { + _fontFamily = _apiMapResponse['font_family'] == null + ? null + : _apiMapResponse['font_family'].toString(); + _fontFamilySet = true; + } + return _fontFamily; + } + + set fontFamily(String v) { + _fontFamily = v; + _fontFamilySet = true; + } + + /// Source specification for font + + String get fontSource { + if (!_fontSourceSet && _apiMapResponse.containsKey('font_source')) { + _fontSource = _apiMapResponse['font_source'] == null + ? null + : _apiMapResponse['font_source'].toString(); + _fontSourceSet = true; + } + return _fontSource; + } + + set fontSource(String v) { + _fontSource = v; + _fontSourceSet = true; + } + + /// Info button color + + String get infoButtonColor { + if (!_infoButtonColorSet && + _apiMapResponse.containsKey('info_button_color')) { + _infoButtonColor = _apiMapResponse['info_button_color'] == null + ? null + : _apiMapResponse['info_button_color'].toString(); + _infoButtonColorSet = true; + } + return _infoButtonColor; + } + + set infoButtonColor(String v) { + _infoButtonColor = v; + _infoButtonColorSet = true; + } + + /// Primary button color + + String get primaryButtonColor { + if (!_primaryButtonColorSet && + _apiMapResponse.containsKey('primary_button_color')) { + _primaryButtonColor = _apiMapResponse['primary_button_color'] == null + ? null + : _apiMapResponse['primary_button_color'].toString(); + _primaryButtonColorSet = true; + } + return _primaryButtonColor; + } + + set primaryButtonColor(String v) { + _primaryButtonColor = v; + _primaryButtonColorSet = true; + } + + /// Toggle to show filters. Defaults to true. + + bool get showFiltersBar { + if (!_showFiltersBarSet && + _apiMapResponse.containsKey('show_filters_bar')) { + _showFiltersBar = _apiMapResponse['show_filters_bar']; + _showFiltersBarSet = true; + } + return _showFiltersBar; + } + + set showFiltersBar(bool v) { + _showFiltersBar = v; + _showFiltersBarSet = true; + } + + /// Toggle to show the title. Defaults to true. + + bool get showTitle { + if (!_showTitleSet && _apiMapResponse.containsKey('show_title')) { + _showTitle = _apiMapResponse['show_title']; + _showTitleSet = true; + } + return _showTitle; + } + + set showTitle(bool v) { + _showTitle = v; + _showTitleSet = true; + } + + /// Text color for text tiles + + String get textTileTextColor { + if (!_textTileTextColorSet && + _apiMapResponse.containsKey('text_tile_text_color')) { + _textTileTextColor = _apiMapResponse['text_tile_text_color'] == null + ? null + : _apiMapResponse['text_tile_text_color'].toString(); + _textTileTextColorSet = true; + } + return _textTileTextColor; + } + + set textTileTextColor(String v) { + _textTileTextColor = v; + _textTileTextColorSet = true; + } + + /// Background color for tiles + + String get tileBackgroundColor { + if (!_tileBackgroundColorSet && + _apiMapResponse.containsKey('tile_background_color')) { + _tileBackgroundColor = _apiMapResponse['tile_background_color'] == null + ? null + : _apiMapResponse['tile_background_color'].toString(); + _tileBackgroundColorSet = true; + } + return _tileBackgroundColor; + } + + set tileBackgroundColor(String v) { + _tileBackgroundColor = v; + _tileBackgroundColorSet = true; + } + + /// Text color for tiles + + String get tileTextColor { + if (!_tileTextColorSet && _apiMapResponse.containsKey('tile_text_color')) { + _tileTextColor = _apiMapResponse['tile_text_color'] == null + ? null + : _apiMapResponse['tile_text_color'].toString(); + _tileTextColorSet = true; + } + return _tileTextColor; + } + + set tileTextColor(String v) { + _tileTextColor = v; + _tileTextColorSet = true; + } + + /// Color for titles + + String get titleColor { + if (!_titleColorSet && _apiMapResponse.containsKey('title_color')) { + _titleColor = _apiMapResponse['title_color'] == null + ? null + : _apiMapResponse['title_color'].toString(); + _titleColorSet = true; + } + return _titleColor; + } + + set titleColor(String v) { + _titleColor = v; + _titleColorSet = true; + } + + /// Warning button color + + String get warnButtonColor { + if (!_warnButtonColorSet && + _apiMapResponse.containsKey('warn_button_color')) { + _warnButtonColor = _apiMapResponse['warn_button_color'] == null + ? null + : _apiMapResponse['warn_button_color'].toString(); + _warnButtonColorSet = true; + } + return _warnButtonColor; + } + + set warnButtonColor(String v) { + _warnButtonColor = v; + _warnButtonColorSet = true; + } + + /// The text alignment of tile titles (New Dashboards) + + String get tileTitleAlignment { + if (!_tileTitleAlignmentSet && + _apiMapResponse.containsKey('tile_title_alignment')) { + _tileTitleAlignment = _apiMapResponse['tile_title_alignment'] == null + ? null + : _apiMapResponse['tile_title_alignment'].toString(); + _tileTitleAlignmentSet = true; + } + return _tileTitleAlignment; + } + + set tileTitleAlignment(String v) { + _tileTitleAlignment = v; + _tileTitleAlignmentSet = true; + } + + /// Toggles the tile shadow (New Dashboards) + + bool get tileShadow { + if (!_tileShadowSet && _apiMapResponse.containsKey('tile_shadow')) { + _tileShadow = _apiMapResponse['tile_shadow']; + _tileShadowSet = true; + } + return _tileShadow; + } + + set tileShadow(bool v) { + _tileShadow = v; + _tileShadowSet = true; + } + + ThemeSettings() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ThemeSettings.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_backgroundColorSet || + _apiMapResponse.containsKey('background_color')) { + json['background_color'] = backgroundColor; + } + if (_baseFontSizeSet || _apiMapResponse.containsKey('base_font_size')) { + json['base_font_size'] = baseFontSize; + } + if (_colorCollectionIdSet || + _apiMapResponse.containsKey('color_collection_id')) { + json['color_collection_id'] = colorCollectionId; + } + if (_fontColorSet || _apiMapResponse.containsKey('font_color')) { + json['font_color'] = fontColor; + } + if (_fontFamilySet || _apiMapResponse.containsKey('font_family')) { + json['font_family'] = fontFamily; + } + if (_fontSourceSet || _apiMapResponse.containsKey('font_source')) { + json['font_source'] = fontSource; + } + if (_infoButtonColorSet || + _apiMapResponse.containsKey('info_button_color')) { + json['info_button_color'] = infoButtonColor; + } + if (_primaryButtonColorSet || + _apiMapResponse.containsKey('primary_button_color')) { + json['primary_button_color'] = primaryButtonColor; + } + if (_showFiltersBarSet || _apiMapResponse.containsKey('show_filters_bar')) { + json['show_filters_bar'] = showFiltersBar; + } + if (_showTitleSet || _apiMapResponse.containsKey('show_title')) { + json['show_title'] = showTitle; + } + if (_textTileTextColorSet || + _apiMapResponse.containsKey('text_tile_text_color')) { + json['text_tile_text_color'] = textTileTextColor; + } + if (_tileBackgroundColorSet || + _apiMapResponse.containsKey('tile_background_color')) { + json['tile_background_color'] = tileBackgroundColor; + } + if (_tileTextColorSet || _apiMapResponse.containsKey('tile_text_color')) { + json['tile_text_color'] = tileTextColor; + } + if (_titleColorSet || _apiMapResponse.containsKey('title_color')) { + json['title_color'] = titleColor; + } + if (_warnButtonColorSet || + _apiMapResponse.containsKey('warn_button_color')) { + json['warn_button_color'] = warnButtonColor; + } + if (_tileTitleAlignmentSet || + _apiMapResponse.containsKey('tile_title_alignment')) { + json['tile_title_alignment'] = tileTitleAlignment; + } + if (_tileShadowSet || _apiMapResponse.containsKey('tile_shadow')) { + json['tile_shadow'] = tileShadow; + } + return json; + } +} + +class Timezone { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _value; + bool _valueSet = false; + + String _label; + bool _labelSet = false; + + String _group; + bool _groupSet = false; + + /// Timezone (read-only) + + String get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value'] == null + ? null + : _apiMapResponse['value'].toString(); + _valueSet = true; + } + return _value; + } + + set value(String v) { + _value = v; + _valueSet = true; + } + + /// Description of timezone (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Timezone group (e.g Common, Other, etc.) (read-only) + + String get group { + if (!_groupSet && _apiMapResponse.containsKey('group')) { + _group = _apiMapResponse['group'] == null + ? null + : _apiMapResponse['group'].toString(); + _groupSet = true; + } + return _group; + } + + set group(String v) { + _group = v; + _groupSet = true; + } + + Timezone() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Timezone.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_groupSet || _apiMapResponse.containsKey('group')) { + json['group'] = group; + } + return json; + } +} + +class UpdateCommand { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _description; + bool _descriptionSet = false; + + /// Name of the command + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Description of the command + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + UpdateCommand() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + UpdateCommand.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + return json; + } +} + +class UpdateFolder { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _parentId; + bool _parentIdSet = false; + + /// Unique Name + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Id of Parent. If the parent id is null, this is a root-level entry + + String get parentId { + if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { + _parentId = _apiMapResponse['parent_id'] == null + ? null + : _apiMapResponse['parent_id'].toString(); + _parentIdSet = true; + } + return _parentId; + } + + set parentId(String v) { + _parentId = v; + _parentIdSet = true; + } + + UpdateFolder() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + UpdateFolder.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_parentIdSet || _apiMapResponse.containsKey('parent_id')) { + json['parent_id'] = parentId; + } + return json; + } +} + +class User { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _avatarUrl; + bool _avatarUrlSet = false; + + String _avatarUrlWithoutSizing; + bool _avatarUrlWithoutSizingSet = false; + + List _credentialsApi3; + bool _credentialsApi3Set = false; + + CredentialsEmail _credentialsEmail; + bool _credentialsEmailSet = false; + + List _credentialsEmbed; + bool _credentialsEmbedSet = false; + + CredentialsGoogle _credentialsGoogle; + bool _credentialsGoogleSet = false; + + CredentialsLDAP _credentialsLdap; + bool _credentialsLdapSet = false; + + CredentialsLookerOpenid _credentialsLookerOpenid; + bool _credentialsLookerOpenidSet = false; + + CredentialsOIDC _credentialsOidc; + bool _credentialsOidcSet = false; + + CredentialsSaml _credentialsSaml; + bool _credentialsSamlSet = false; + + CredentialsTotp _credentialsTotp; + bool _credentialsTotpSet = false; + + String _displayName; + bool _displayNameSet = false; + + String _email; + bool _emailSet = false; + + int _embedGroupSpaceId; + bool _embedGroupSpaceIdSet = false; + + String _firstName; + bool _firstNameSet = false; + + List _groupIds; + bool _groupIdsSet = false; + + String _homeFolderId; + bool _homeFolderIdSet = false; + + int _id; + bool _idSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _lastName; + bool _lastNameSet = false; + + String _locale; + bool _localeSet = false; + + List _lookerVersions; + bool _lookerVersionsSet = false; + + bool _modelsDirValidated; + bool _modelsDirValidatedSet = false; + + int _personalFolderId; + bool _personalFolderIdSet = false; + + bool _presumedLookerEmployee; + bool _presumedLookerEmployeeSet = false; + + List _roleIds; + bool _roleIdsSet = false; + + List _sessions; + bool _sessionsSet = false; + + Map _uiState; + bool _uiStateSet = false; + + bool _verifiedLookerEmployee; + bool _verifiedLookerEmployeeSet = false; + + bool _rolesExternallyManaged; + bool _rolesExternallyManagedSet = false; + + bool _allowDirectRoles; + bool _allowDirectRolesSet = false; + + bool _allowNormalGroupMembership; + bool _allowNormalGroupMembershipSet = false; + + bool _allowRolesFromNormalGroups; + bool _allowRolesFromNormalGroupsSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// URL for the avatar image (may be generic) (read-only) + + String get avatarUrl { + if (!_avatarUrlSet && _apiMapResponse.containsKey('avatar_url')) { + _avatarUrl = _apiMapResponse['avatar_url'] == null + ? null + : _apiMapResponse['avatar_url'].toString(); + _avatarUrlSet = true; + } + return _avatarUrl; + } + + set avatarUrl(String v) { + _avatarUrl = v; + _avatarUrlSet = true; + } + + /// URL for the avatar image (may be generic), does not specify size (read-only) + + String get avatarUrlWithoutSizing { + if (!_avatarUrlWithoutSizingSet && + _apiMapResponse.containsKey('avatar_url_without_sizing')) { + _avatarUrlWithoutSizing = + _apiMapResponse['avatar_url_without_sizing'] == null + ? null + : _apiMapResponse['avatar_url_without_sizing'].toString(); + _avatarUrlWithoutSizingSet = true; + } + return _avatarUrlWithoutSizing; + } + + set avatarUrlWithoutSizing(String v) { + _avatarUrlWithoutSizing = v; + _avatarUrlWithoutSizingSet = true; + } + + /// API 3 credentials (read-only) + + List get credentialsApi3 { + if (!_credentialsApi3Set && + _apiMapResponse.containsKey('credentials_api3')) { + _credentialsApi3 = _apiMapResponse['credentials_api3'] == null + ? null + : (_apiMapResponse['credentials_api3'] as List) + .map((i) => + CredentialsApi3.fromResponse(i, apiResponseContentType)) + .toList(); + _credentialsApi3Set = true; + } + return _credentialsApi3; + } + + set credentialsApi3(List v) { + _credentialsApi3 = v; + _credentialsApi3Set = true; + } + + CredentialsEmail get credentialsEmail { + if (!_credentialsEmailSet && + _apiMapResponse.containsKey('credentials_email')) { + _credentialsEmail = _apiMapResponse['credentials_email'] == null + ? null + : CredentialsEmail.fromResponse( + _apiMapResponse['credentials_email'], apiResponseContentType); + _credentialsEmailSet = true; + } + return _credentialsEmail; + } + + set credentialsEmail(CredentialsEmail v) { + _credentialsEmail = v; + _credentialsEmailSet = true; + } + + /// Embed credentials (read-only) + + List get credentialsEmbed { + if (!_credentialsEmbedSet && + _apiMapResponse.containsKey('credentials_embed')) { + _credentialsEmbed = _apiMapResponse['credentials_embed'] == null + ? null + : (_apiMapResponse['credentials_embed'] as List) + .map((i) => + CredentialsEmbed.fromResponse(i, apiResponseContentType)) + .toList(); + _credentialsEmbedSet = true; + } + return _credentialsEmbed; + } + + set credentialsEmbed(List v) { + _credentialsEmbed = v; + _credentialsEmbedSet = true; + } + + CredentialsGoogle get credentialsGoogle { + if (!_credentialsGoogleSet && + _apiMapResponse.containsKey('credentials_google')) { + _credentialsGoogle = _apiMapResponse['credentials_google'] == null + ? null + : CredentialsGoogle.fromResponse( + _apiMapResponse['credentials_google'], apiResponseContentType); + _credentialsGoogleSet = true; + } + return _credentialsGoogle; + } + + set credentialsGoogle(CredentialsGoogle v) { + _credentialsGoogle = v; + _credentialsGoogleSet = true; + } + + CredentialsLDAP get credentialsLdap { + if (!_credentialsLdapSet && + _apiMapResponse.containsKey('credentials_ldap')) { + _credentialsLdap = _apiMapResponse['credentials_ldap'] == null + ? null + : CredentialsLDAP.fromResponse( + _apiMapResponse['credentials_ldap'], apiResponseContentType); + _credentialsLdapSet = true; + } + return _credentialsLdap; + } + + set credentialsLdap(CredentialsLDAP v) { + _credentialsLdap = v; + _credentialsLdapSet = true; + } + + CredentialsLookerOpenid get credentialsLookerOpenid { + if (!_credentialsLookerOpenidSet && + _apiMapResponse.containsKey('credentials_looker_openid')) { + _credentialsLookerOpenid = + _apiMapResponse['credentials_looker_openid'] == null + ? null + : CredentialsLookerOpenid.fromResponse( + _apiMapResponse['credentials_looker_openid'], + apiResponseContentType); + _credentialsLookerOpenidSet = true; + } + return _credentialsLookerOpenid; + } + + set credentialsLookerOpenid(CredentialsLookerOpenid v) { + _credentialsLookerOpenid = v; + _credentialsLookerOpenidSet = true; + } + + CredentialsOIDC get credentialsOidc { + if (!_credentialsOidcSet && + _apiMapResponse.containsKey('credentials_oidc')) { + _credentialsOidc = _apiMapResponse['credentials_oidc'] == null + ? null + : CredentialsOIDC.fromResponse( + _apiMapResponse['credentials_oidc'], apiResponseContentType); + _credentialsOidcSet = true; + } + return _credentialsOidc; + } + + set credentialsOidc(CredentialsOIDC v) { + _credentialsOidc = v; + _credentialsOidcSet = true; + } + + CredentialsSaml get credentialsSaml { + if (!_credentialsSamlSet && + _apiMapResponse.containsKey('credentials_saml')) { + _credentialsSaml = _apiMapResponse['credentials_saml'] == null + ? null + : CredentialsSaml.fromResponse( + _apiMapResponse['credentials_saml'], apiResponseContentType); + _credentialsSamlSet = true; + } + return _credentialsSaml; + } + + set credentialsSaml(CredentialsSaml v) { + _credentialsSaml = v; + _credentialsSamlSet = true; + } + + CredentialsTotp get credentialsTotp { + if (!_credentialsTotpSet && + _apiMapResponse.containsKey('credentials_totp')) { + _credentialsTotp = _apiMapResponse['credentials_totp'] == null + ? null + : CredentialsTotp.fromResponse( + _apiMapResponse['credentials_totp'], apiResponseContentType); + _credentialsTotpSet = true; + } + return _credentialsTotp; + } + + set credentialsTotp(CredentialsTotp v) { + _credentialsTotp = v; + _credentialsTotpSet = true; + } + + /// Full name for display (available only if both first_name and last_name are set) (read-only) + + String get displayName { + if (!_displayNameSet && _apiMapResponse.containsKey('display_name')) { + _displayName = _apiMapResponse['display_name'] == null + ? null + : _apiMapResponse['display_name'].toString(); + _displayNameSet = true; + } + return _displayName; + } + + set displayName(String v) { + _displayName = v; + _displayNameSet = true; + } + + /// EMail address (read-only) + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// (Embed only) ID of user's group space based on the external_group_id optionally specified during embed user login (read-only) + + int get embedGroupSpaceId { + if (!_embedGroupSpaceIdSet && + _apiMapResponse.containsKey('embed_group_space_id')) { + _embedGroupSpaceId = _apiMapResponse['embed_group_space_id']; + _embedGroupSpaceIdSet = true; + } + return _embedGroupSpaceId; + } + + set embedGroupSpaceId(int v) { + _embedGroupSpaceId = v; + _embedGroupSpaceIdSet = true; + } + + /// First name + + String get firstName { + if (!_firstNameSet && _apiMapResponse.containsKey('first_name')) { + _firstName = _apiMapResponse['first_name'] == null + ? null + : _apiMapResponse['first_name'].toString(); + _firstNameSet = true; + } + return _firstName; + } + + set firstName(String v) { + _firstName = v; + _firstNameSet = true; + } + + /// Array of ids of the groups for this user (read-only) + + List get groupIds { + if (!_groupIdsSet && _apiMapResponse.containsKey('group_ids')) { + _groupIds = _apiMapResponse['group_ids'] == null + ? null + : _apiMapResponse['group_ids'].map((i) => i as int).toList(); + _groupIdsSet = true; + } + return _groupIds; + } + + set groupIds(List v) { + _groupIds = v; + _groupIdsSet = true; + } + + /// ID string for user's home folder + + String get homeFolderId { + if (!_homeFolderIdSet && _apiMapResponse.containsKey('home_folder_id')) { + _homeFolderId = _apiMapResponse['home_folder_id'] == null + ? null + : _apiMapResponse['home_folder_id'].toString(); + _homeFolderIdSet = true; + } + return _homeFolderId; + } + + set homeFolderId(String v) { + _homeFolderId = v; + _homeFolderIdSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Account has been disabled + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Last name + + String get lastName { + if (!_lastNameSet && _apiMapResponse.containsKey('last_name')) { + _lastName = _apiMapResponse['last_name'] == null + ? null + : _apiMapResponse['last_name'].toString(); + _lastNameSet = true; + } + return _lastName; + } + + set lastName(String v) { + _lastName = v; + _lastNameSet = true; + } + + /// User's preferred locale. User locale takes precedence over Looker's system-wide default locale. Locale determines language of display strings and date and numeric formatting in API responses. Locale string must be a 2 letter language code or a combination of language code and region code: 'en' or 'en-US', for example. + + String get locale { + if (!_localeSet && _apiMapResponse.containsKey('locale')) { + _locale = _apiMapResponse['locale'] == null + ? null + : _apiMapResponse['locale'].toString(); + _localeSet = true; + } + return _locale; + } + + set locale(String v) { + _locale = v; + _localeSet = true; + } + + /// Array of strings representing the Looker versions that this user has used (this only goes back as far as '3.54.0') (read-only) + + List get lookerVersions { + if (!_lookerVersionsSet && _apiMapResponse.containsKey('looker_versions')) { + _lookerVersions = _apiMapResponse['looker_versions'] == null + ? null + : _apiMapResponse['looker_versions'] + .map((i) => i as String) + .toList(); + _lookerVersionsSet = true; + } + return _lookerVersions; + } + + set lookerVersions(List v) { + _lookerVersions = v; + _lookerVersionsSet = true; + } + + /// User's dev workspace has been checked for presence of applicable production projects + + bool get modelsDirValidated { + if (!_modelsDirValidatedSet && + _apiMapResponse.containsKey('models_dir_validated')) { + _modelsDirValidated = _apiMapResponse['models_dir_validated']; + _modelsDirValidatedSet = true; + } + return _modelsDirValidated; + } + + set modelsDirValidated(bool v) { + _modelsDirValidated = v; + _modelsDirValidatedSet = true; + } + + /// ID of user's personal folder (read-only) + + int get personalFolderId { + if (!_personalFolderIdSet && + _apiMapResponse.containsKey('personal_folder_id')) { + _personalFolderId = _apiMapResponse['personal_folder_id']; + _personalFolderIdSet = true; + } + return _personalFolderId; + } + + set personalFolderId(int v) { + _personalFolderId = v; + _personalFolderIdSet = true; + } + + /// User is identified as an employee of Looker (read-only) + + bool get presumedLookerEmployee { + if (!_presumedLookerEmployeeSet && + _apiMapResponse.containsKey('presumed_looker_employee')) { + _presumedLookerEmployee = _apiMapResponse['presumed_looker_employee']; + _presumedLookerEmployeeSet = true; + } + return _presumedLookerEmployee; + } + + set presumedLookerEmployee(bool v) { + _presumedLookerEmployee = v; + _presumedLookerEmployeeSet = true; + } + + /// Array of ids of the roles for this user (read-only) + + List get roleIds { + if (!_roleIdsSet && _apiMapResponse.containsKey('role_ids')) { + _roleIds = _apiMapResponse['role_ids'] == null + ? null + : _apiMapResponse['role_ids'].map((i) => i as int).toList(); + _roleIdsSet = true; + } + return _roleIds; + } + + set roleIds(List v) { + _roleIds = v; + _roleIdsSet = true; + } + + /// Active sessions (read-only) + + List get sessions { + if (!_sessionsSet && _apiMapResponse.containsKey('sessions')) { + _sessions = _apiMapResponse['sessions'] == null + ? null + : (_apiMapResponse['sessions'] as List) + .map((i) => Session.fromResponse(i, apiResponseContentType)) + .toList(); + _sessionsSet = true; + } + return _sessions; + } + + set sessions(List v) { + _sessions = v; + _sessionsSet = true; + } + + /// Per user dictionary of undocumented state information owned by the Looker UI. + + Map get uiState { + if (!_uiStateSet && _apiMapResponse.containsKey('ui_state')) { + _uiState = _apiMapResponse['ui_state']; + _uiStateSet = true; + } + return _uiState; + } + + set uiState(Map v) { + _uiState = v; + _uiStateSet = true; + } + + /// User is identified as an employee of Looker who has been verified via Looker corporate authentication (read-only) + + bool get verifiedLookerEmployee { + if (!_verifiedLookerEmployeeSet && + _apiMapResponse.containsKey('verified_looker_employee')) { + _verifiedLookerEmployee = _apiMapResponse['verified_looker_employee']; + _verifiedLookerEmployeeSet = true; + } + return _verifiedLookerEmployee; + } + + set verifiedLookerEmployee(bool v) { + _verifiedLookerEmployee = v; + _verifiedLookerEmployeeSet = true; + } + + /// User's roles are managed by an external directory like SAML or LDAP and can not be changed directly. (read-only) + + bool get rolesExternallyManaged { + if (!_rolesExternallyManagedSet && + _apiMapResponse.containsKey('roles_externally_managed')) { + _rolesExternallyManaged = _apiMapResponse['roles_externally_managed']; + _rolesExternallyManagedSet = true; + } + return _rolesExternallyManaged; + } + + set rolesExternallyManaged(bool v) { + _rolesExternallyManaged = v; + _rolesExternallyManagedSet = true; + } + + /// User can be directly assigned a role. (read-only) + + bool get allowDirectRoles { + if (!_allowDirectRolesSet && + _apiMapResponse.containsKey('allow_direct_roles')) { + _allowDirectRoles = _apiMapResponse['allow_direct_roles']; + _allowDirectRolesSet = true; + } + return _allowDirectRoles; + } + + set allowDirectRoles(bool v) { + _allowDirectRoles = v; + _allowDirectRolesSet = true; + } + + /// User can be a direct member of a normal Looker group. (read-only) + + bool get allowNormalGroupMembership { + if (!_allowNormalGroupMembershipSet && + _apiMapResponse.containsKey('allow_normal_group_membership')) { + _allowNormalGroupMembership = + _apiMapResponse['allow_normal_group_membership']; + _allowNormalGroupMembershipSet = true; + } + return _allowNormalGroupMembership; + } + + set allowNormalGroupMembership(bool v) { + _allowNormalGroupMembership = v; + _allowNormalGroupMembershipSet = true; + } + + /// User can inherit roles from a normal Looker group. (read-only) + + bool get allowRolesFromNormalGroups { + if (!_allowRolesFromNormalGroupsSet && + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + _allowRolesFromNormalGroups = + _apiMapResponse['allow_roles_from_normal_groups']; + _allowRolesFromNormalGroupsSet = true; + } + return _allowRolesFromNormalGroups; + } + + set allowRolesFromNormalGroups(bool v) { + _allowRolesFromNormalGroups = v; + _allowRolesFromNormalGroupsSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + User() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + User.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_avatarUrlSet || _apiMapResponse.containsKey('avatar_url')) { + json['avatar_url'] = avatarUrl; + } + if (_avatarUrlWithoutSizingSet || + _apiMapResponse.containsKey('avatar_url_without_sizing')) { + json['avatar_url_without_sizing'] = avatarUrlWithoutSizing; + } + if (_credentialsApi3Set || + _apiMapResponse.containsKey('credentials_api3')) { + json['credentials_api3'] = credentialsApi3 == null + ? null + : credentialsApi3.map((i) => i.toJson()).toList(); + } + if (_credentialsEmailSet || + _apiMapResponse.containsKey('credentials_email')) { + json['credentials_email'] = + credentialsEmail == null ? null : credentialsEmail.toJson(); + } + if (_credentialsEmbedSet || + _apiMapResponse.containsKey('credentials_embed')) { + json['credentials_embed'] = credentialsEmbed == null + ? null + : credentialsEmbed.map((i) => i.toJson()).toList(); + } + if (_credentialsGoogleSet || + _apiMapResponse.containsKey('credentials_google')) { + json['credentials_google'] = + credentialsGoogle == null ? null : credentialsGoogle.toJson(); + } + if (_credentialsLdapSet || + _apiMapResponse.containsKey('credentials_ldap')) { + json['credentials_ldap'] = + credentialsLdap == null ? null : credentialsLdap.toJson(); + } + if (_credentialsLookerOpenidSet || + _apiMapResponse.containsKey('credentials_looker_openid')) { + json['credentials_looker_openid'] = credentialsLookerOpenid == null + ? null + : credentialsLookerOpenid.toJson(); + } + if (_credentialsOidcSet || + _apiMapResponse.containsKey('credentials_oidc')) { + json['credentials_oidc'] = + credentialsOidc == null ? null : credentialsOidc.toJson(); + } + if (_credentialsSamlSet || + _apiMapResponse.containsKey('credentials_saml')) { + json['credentials_saml'] = + credentialsSaml == null ? null : credentialsSaml.toJson(); + } + if (_credentialsTotpSet || + _apiMapResponse.containsKey('credentials_totp')) { + json['credentials_totp'] = + credentialsTotp == null ? null : credentialsTotp.toJson(); + } + if (_displayNameSet || _apiMapResponse.containsKey('display_name')) { + json['display_name'] = displayName; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_embedGroupSpaceIdSet || + _apiMapResponse.containsKey('embed_group_space_id')) { + json['embed_group_space_id'] = embedGroupSpaceId; + } + if (_firstNameSet || _apiMapResponse.containsKey('first_name')) { + json['first_name'] = firstName; + } + if (_groupIdsSet || _apiMapResponse.containsKey('group_ids')) { + json['group_ids'] = groupIds; + } + if (_homeFolderIdSet || _apiMapResponse.containsKey('home_folder_id')) { + json['home_folder_id'] = homeFolderId; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_lastNameSet || _apiMapResponse.containsKey('last_name')) { + json['last_name'] = lastName; + } + if (_localeSet || _apiMapResponse.containsKey('locale')) { + json['locale'] = locale; + } + if (_lookerVersionsSet || _apiMapResponse.containsKey('looker_versions')) { + json['looker_versions'] = lookerVersions; + } + if (_modelsDirValidatedSet || + _apiMapResponse.containsKey('models_dir_validated')) { + json['models_dir_validated'] = modelsDirValidated; + } + if (_personalFolderIdSet || + _apiMapResponse.containsKey('personal_folder_id')) { + json['personal_folder_id'] = personalFolderId; + } + if (_presumedLookerEmployeeSet || + _apiMapResponse.containsKey('presumed_looker_employee')) { + json['presumed_looker_employee'] = presumedLookerEmployee; + } + if (_roleIdsSet || _apiMapResponse.containsKey('role_ids')) { + json['role_ids'] = roleIds; + } + if (_sessionsSet || _apiMapResponse.containsKey('sessions')) { + json['sessions'] = + sessions == null ? null : sessions.map((i) => i.toJson()).toList(); + } + if (_uiStateSet || _apiMapResponse.containsKey('ui_state')) { + json['ui_state'] = uiState; + } + if (_verifiedLookerEmployeeSet || + _apiMapResponse.containsKey('verified_looker_employee')) { + json['verified_looker_employee'] = verifiedLookerEmployee; + } + if (_rolesExternallyManagedSet || + _apiMapResponse.containsKey('roles_externally_managed')) { + json['roles_externally_managed'] = rolesExternallyManaged; + } + if (_allowDirectRolesSet || + _apiMapResponse.containsKey('allow_direct_roles')) { + json['allow_direct_roles'] = allowDirectRoles; + } + if (_allowNormalGroupMembershipSet || + _apiMapResponse.containsKey('allow_normal_group_membership')) { + json['allow_normal_group_membership'] = allowNormalGroupMembership; + } + if (_allowRolesFromNormalGroupsSet || + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + json['allow_roles_from_normal_groups'] = allowRolesFromNormalGroups; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class UserAttribute { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _name; + bool _nameSet = false; + + String _label; + bool _labelSet = false; + + String _type; + bool _typeSet = false; + + String _defaultValue; + bool _defaultValueSet = false; + + bool _isSystem; + bool _isSystemSet = false; + + bool _isPermanent; + bool _isPermanentSet = false; + + bool _valueIsHidden; + bool _valueIsHiddenSet = false; + + bool _userCanView; + bool _userCanViewSet = false; + + bool _userCanEdit; + bool _userCanEditSet = false; + + String _hiddenValueDomainWhitelist; + bool _hiddenValueDomainWhitelistSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Name of user attribute + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Human-friendly label for user attribute + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Type of user attribute ("string", "number", "datetime", "yesno", "zipcode") + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Default value for when no value is set on the user + + String get defaultValue { + if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { + _defaultValue = _apiMapResponse['default_value'] == null + ? null + : _apiMapResponse['default_value'].toString(); + _defaultValueSet = true; + } + return _defaultValue; + } + + set defaultValue(String v) { + _defaultValue = v; + _defaultValueSet = true; + } + + /// Attribute is a system default (read-only) + + bool get isSystem { + if (!_isSystemSet && _apiMapResponse.containsKey('is_system')) { + _isSystem = _apiMapResponse['is_system']; + _isSystemSet = true; + } + return _isSystem; + } + + set isSystem(bool v) { + _isSystem = v; + _isSystemSet = true; + } + + /// Attribute is permanent and cannot be deleted (read-only) + + bool get isPermanent { + if (!_isPermanentSet && _apiMapResponse.containsKey('is_permanent')) { + _isPermanent = _apiMapResponse['is_permanent']; + _isPermanentSet = true; + } + return _isPermanent; + } + + set isPermanent(bool v) { + _isPermanent = v; + _isPermanentSet = true; + } + + /// If true, users will not be able to view values of this attribute + + bool get valueIsHidden { + if (!_valueIsHiddenSet && _apiMapResponse.containsKey('value_is_hidden')) { + _valueIsHidden = _apiMapResponse['value_is_hidden']; + _valueIsHiddenSet = true; + } + return _valueIsHidden; + } + + set valueIsHidden(bool v) { + _valueIsHidden = v; + _valueIsHiddenSet = true; + } + + /// Non-admin users can see the values of their attributes and use them in filters + + bool get userCanView { + if (!_userCanViewSet && _apiMapResponse.containsKey('user_can_view')) { + _userCanView = _apiMapResponse['user_can_view']; + _userCanViewSet = true; + } + return _userCanView; + } + + set userCanView(bool v) { + _userCanView = v; + _userCanViewSet = true; + } + + /// Users can change the value of this attribute for themselves + + bool get userCanEdit { + if (!_userCanEditSet && _apiMapResponse.containsKey('user_can_edit')) { + _userCanEdit = _apiMapResponse['user_can_edit']; + _userCanEditSet = true; + } + return _userCanEdit; + } + + set userCanEdit(bool v) { + _userCanEdit = v; + _userCanEditSet = true; + } + + /// Destinations to which a hidden attribute may be sent. Once set, cannot be edited. + + String get hiddenValueDomainWhitelist { + if (!_hiddenValueDomainWhitelistSet && + _apiMapResponse.containsKey('hidden_value_domain_whitelist')) { + _hiddenValueDomainWhitelist = + _apiMapResponse['hidden_value_domain_whitelist'] == null + ? null + : _apiMapResponse['hidden_value_domain_whitelist'].toString(); + _hiddenValueDomainWhitelistSet = true; + } + return _hiddenValueDomainWhitelist; + } + + set hiddenValueDomainWhitelist(String v) { + _hiddenValueDomainWhitelist = v; + _hiddenValueDomainWhitelistSet = true; + } + + UserAttribute() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + UserAttribute.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_defaultValueSet || _apiMapResponse.containsKey('default_value')) { + json['default_value'] = defaultValue; + } + if (_isSystemSet || _apiMapResponse.containsKey('is_system')) { + json['is_system'] = isSystem; + } + if (_isPermanentSet || _apiMapResponse.containsKey('is_permanent')) { + json['is_permanent'] = isPermanent; + } + if (_valueIsHiddenSet || _apiMapResponse.containsKey('value_is_hidden')) { + json['value_is_hidden'] = valueIsHidden; + } + if (_userCanViewSet || _apiMapResponse.containsKey('user_can_view')) { + json['user_can_view'] = userCanView; + } + if (_userCanEditSet || _apiMapResponse.containsKey('user_can_edit')) { + json['user_can_edit'] = userCanEdit; + } + if (_hiddenValueDomainWhitelistSet || + _apiMapResponse.containsKey('hidden_value_domain_whitelist')) { + json['hidden_value_domain_whitelist'] = hiddenValueDomainWhitelist; + } + return json; + } +} + +/// An array of user attribute types that are allowed to be used in filters on this field. Valid values are: "advanced_filter_string", "advanced_filter_number", "advanced_filter_datetime", "string", "number", "datetime", "relative_url", "yesno", "zipcode". (Enum defined in LookmlModelExploreField) +enum UserAttributeFilterTypes { + advancedFilterString, + advancedFilterNumber, + advancedFilterDatetime, + string, + number, + datetime, + relativeUrl, + yesno, + zipcode +} + +class UserAttributeFilterTypesMapper { + static String toStringValue(UserAttributeFilterTypes e) { + switch (e) { + case UserAttributeFilterTypes.advancedFilterString: + return 'advanced_filter_string'; + case UserAttributeFilterTypes.advancedFilterNumber: + return 'advanced_filter_number'; + case UserAttributeFilterTypes.advancedFilterDatetime: + return 'advanced_filter_datetime'; + case UserAttributeFilterTypes.string: + return 'string'; + case UserAttributeFilterTypes.number: + return 'number'; + case UserAttributeFilterTypes.datetime: + return 'datetime'; + case UserAttributeFilterTypes.relativeUrl: + return 'relative_url'; + case UserAttributeFilterTypes.yesno: + return 'yesno'; + case UserAttributeFilterTypes.zipcode: + return 'zipcode'; + + default: + return null; + } + } + + static UserAttributeFilterTypes fromStringValue(String s) { + if (s == 'advanced_filter_string') { + return UserAttributeFilterTypes.advancedFilterString; + } + if (s == 'advanced_filter_number') { + return UserAttributeFilterTypes.advancedFilterNumber; + } + if (s == 'advanced_filter_datetime') { + return UserAttributeFilterTypes.advancedFilterDatetime; + } + if (s == 'string') { + return UserAttributeFilterTypes.string; + } + if (s == 'number') { + return UserAttributeFilterTypes.number; + } + if (s == 'datetime') { + return UserAttributeFilterTypes.datetime; + } + if (s == 'relative_url') { + return UserAttributeFilterTypes.relativeUrl; + } + if (s == 'yesno') { + return UserAttributeFilterTypes.yesno; + } + if (s == 'zipcode') { + return UserAttributeFilterTypes.zipcode; + } + return null; + } +} + +/// WARNING: no writeable properties found for POST, PUT, or PATCH +class UserAttributeGroupValue { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + int _groupId; + bool _groupIdSet = false; + + int _userAttributeId; + bool _userAttributeIdSet = false; + + bool _valueIsHidden; + bool _valueIsHiddenSet = false; + + int _rank; + bool _rankSet = false; + + String _value; + bool _valueSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id of this group-attribute relation (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Id of group (read-only) + + int get groupId { + if (!_groupIdSet && _apiMapResponse.containsKey('group_id')) { + _groupId = _apiMapResponse['group_id']; + _groupIdSet = true; + } + return _groupId; + } + + set groupId(int v) { + _groupId = v; + _groupIdSet = true; + } + + /// Id of user attribute (read-only) + + int get userAttributeId { + if (!_userAttributeIdSet && + _apiMapResponse.containsKey('user_attribute_id')) { + _userAttributeId = _apiMapResponse['user_attribute_id']; + _userAttributeIdSet = true; + } + return _userAttributeId; + } + + set userAttributeId(int v) { + _userAttributeId = v; + _userAttributeIdSet = true; + } + + /// If true, the "value" field will be null, because the attribute settings block access to this value (read-only) + + bool get valueIsHidden { + if (!_valueIsHiddenSet && _apiMapResponse.containsKey('value_is_hidden')) { + _valueIsHidden = _apiMapResponse['value_is_hidden']; + _valueIsHiddenSet = true; + } + return _valueIsHidden; + } + + set valueIsHidden(bool v) { + _valueIsHidden = v; + _valueIsHiddenSet = true; + } + + /// Precedence for resolving value for user (read-only) + + int get rank { + if (!_rankSet && _apiMapResponse.containsKey('rank')) { + _rank = _apiMapResponse['rank']; + _rankSet = true; + } + return _rank; + } + + set rank(int v) { + _rank = v; + _rankSet = true; + } + + /// Value of user attribute for group (read-only) + + String get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value'] == null + ? null + : _apiMapResponse['value'].toString(); + _valueSet = true; + } + return _value; + } + + set value(String v) { + _value = v; + _valueSet = true; + } + + UserAttributeGroupValue() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + UserAttributeGroupValue.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_groupIdSet || _apiMapResponse.containsKey('group_id')) { + json['group_id'] = groupId; + } + if (_userAttributeIdSet || + _apiMapResponse.containsKey('user_attribute_id')) { + json['user_attribute_id'] = userAttributeId; + } + if (_valueIsHiddenSet || _apiMapResponse.containsKey('value_is_hidden')) { + json['value_is_hidden'] = valueIsHidden; + } + if (_rankSet || _apiMapResponse.containsKey('rank')) { + json['rank'] = rank; + } + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + return json; + } +} + +class UserAttributeWithValue { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _name; + bool _nameSet = false; + + String _label; + bool _labelSet = false; + + int _rank; + bool _rankSet = false; + + String _value; + bool _valueSet = false; + + int _userId; + bool _userIdSet = false; + + bool _userCanEdit; + bool _userCanEditSet = false; + + bool _valueIsHidden; + bool _valueIsHiddenSet = false; + + int _userAttributeId; + bool _userAttributeIdSet = false; + + String _source; + bool _sourceSet = false; + + String _hiddenValueDomainWhitelist; + bool _hiddenValueDomainWhitelistSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Name of user attribute (read-only) + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Human-friendly label for user attribute (read-only) + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Precedence for setting value on user (lowest wins) (read-only) + + int get rank { + if (!_rankSet && _apiMapResponse.containsKey('rank')) { + _rank = _apiMapResponse['rank']; + _rankSet = true; + } + return _rank; + } + + set rank(int v) { + _rank = v; + _rankSet = true; + } + + /// Value of attribute for user + + String get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value'] == null + ? null + : _apiMapResponse['value'].toString(); + _valueSet = true; + } + return _value; + } + + set value(String v) { + _value = v; + _valueSet = true; + } + + /// Id of User (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Can the user set this value (read-only) + + bool get userCanEdit { + if (!_userCanEditSet && _apiMapResponse.containsKey('user_can_edit')) { + _userCanEdit = _apiMapResponse['user_can_edit']; + _userCanEditSet = true; + } + return _userCanEdit; + } + + set userCanEdit(bool v) { + _userCanEdit = v; + _userCanEditSet = true; + } + + /// If true, the "value" field will be null, because the attribute settings block access to this value (read-only) + + bool get valueIsHidden { + if (!_valueIsHiddenSet && _apiMapResponse.containsKey('value_is_hidden')) { + _valueIsHidden = _apiMapResponse['value_is_hidden']; + _valueIsHiddenSet = true; + } + return _valueIsHidden; + } + + set valueIsHidden(bool v) { + _valueIsHidden = v; + _valueIsHiddenSet = true; + } + + /// Id of User Attribute (read-only) + + int get userAttributeId { + if (!_userAttributeIdSet && + _apiMapResponse.containsKey('user_attribute_id')) { + _userAttributeId = _apiMapResponse['user_attribute_id']; + _userAttributeIdSet = true; + } + return _userAttributeId; + } + + set userAttributeId(int v) { + _userAttributeId = v; + _userAttributeIdSet = true; + } + + /// How user got this value for this attribute (read-only) + + String get source { + if (!_sourceSet && _apiMapResponse.containsKey('source')) { + _source = _apiMapResponse['source'] == null + ? null + : _apiMapResponse['source'].toString(); + _sourceSet = true; + } + return _source; + } + + set source(String v) { + _source = v; + _sourceSet = true; + } + + /// If this user attribute is hidden, whitelist of destinations to which it may be sent. (read-only) + + String get hiddenValueDomainWhitelist { + if (!_hiddenValueDomainWhitelistSet && + _apiMapResponse.containsKey('hidden_value_domain_whitelist')) { + _hiddenValueDomainWhitelist = + _apiMapResponse['hidden_value_domain_whitelist'] == null + ? null + : _apiMapResponse['hidden_value_domain_whitelist'].toString(); + _hiddenValueDomainWhitelistSet = true; + } + return _hiddenValueDomainWhitelist; + } + + set hiddenValueDomainWhitelist(String v) { + _hiddenValueDomainWhitelist = v; + _hiddenValueDomainWhitelistSet = true; + } + + UserAttributeWithValue() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + UserAttributeWithValue.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_rankSet || _apiMapResponse.containsKey('rank')) { + json['rank'] = rank; + } + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_userCanEditSet || _apiMapResponse.containsKey('user_can_edit')) { + json['user_can_edit'] = userCanEdit; + } + if (_valueIsHiddenSet || _apiMapResponse.containsKey('value_is_hidden')) { + json['value_is_hidden'] = valueIsHidden; + } + if (_userAttributeIdSet || + _apiMapResponse.containsKey('user_attribute_id')) { + json['user_attribute_id'] = userAttributeId; + } + if (_sourceSet || _apiMapResponse.containsKey('source')) { + json['source'] = source; + } + if (_hiddenValueDomainWhitelistSet || + _apiMapResponse.containsKey('hidden_value_domain_whitelist')) { + json['hidden_value_domain_whitelist'] = hiddenValueDomainWhitelist; + } + return json; + } +} + +class UserEmailOnly { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _email; + bool _emailSet = false; + + /// Email Address + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + UserEmailOnly() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + UserEmailOnly.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + return json; + } +} + +class UserLoginLockout { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _key; + bool _keySet = false; + + String _authType; + bool _authTypeSet = false; + + String _ip; + bool _ipSet = false; + + int _userId; + bool _userIdSet = false; + + String _remoteId; + bool _remoteIdSet = false; + + String _fullName; + bool _fullNameSet = false; + + String _email; + bool _emailSet = false; + + int _failCount; + bool _failCountSet = false; + + DateTime _lockoutAt; + bool _lockoutAtSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Hash of user's client id (read-only) + + String get key { + if (!_keySet && _apiMapResponse.containsKey('key')) { + _key = _apiMapResponse['key'] == null + ? null + : _apiMapResponse['key'].toString(); + _keySet = true; + } + return _key; + } + + set key(String v) { + _key = v; + _keySet = true; + } + + /// Authentication method for login failures (read-only) + + String get authType { + if (!_authTypeSet && _apiMapResponse.containsKey('auth_type')) { + _authType = _apiMapResponse['auth_type'] == null + ? null + : _apiMapResponse['auth_type'].toString(); + _authTypeSet = true; + } + return _authType; + } + + set authType(String v) { + _authType = v; + _authTypeSet = true; + } + + /// IP address of most recent failed attempt (read-only) + + String get ip { + if (!_ipSet && _apiMapResponse.containsKey('ip')) { + _ip = _apiMapResponse['ip'] == null + ? null + : _apiMapResponse['ip'].toString(); + _ipSet = true; + } + return _ip; + } + + set ip(String v) { + _ip = v; + _ipSet = true; + } + + /// User ID (read-only) + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Remote ID of user if using LDAP (read-only) + + String get remoteId { + if (!_remoteIdSet && _apiMapResponse.containsKey('remote_id')) { + _remoteId = _apiMapResponse['remote_id'] == null + ? null + : _apiMapResponse['remote_id'].toString(); + _remoteIdSet = true; + } + return _remoteId; + } + + set remoteId(String v) { + _remoteId = v; + _remoteIdSet = true; + } + + /// User's name (read-only) + + String get fullName { + if (!_fullNameSet && _apiMapResponse.containsKey('full_name')) { + _fullName = _apiMapResponse['full_name'] == null + ? null + : _apiMapResponse['full_name'].toString(); + _fullNameSet = true; + } + return _fullName; + } + + set fullName(String v) { + _fullName = v; + _fullNameSet = true; + } + + /// Email address associated with the user's account (read-only) + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// Number of failures that triggered the lockout (read-only) + + int get failCount { + if (!_failCountSet && _apiMapResponse.containsKey('fail_count')) { + _failCount = _apiMapResponse['fail_count']; + _failCountSet = true; + } + return _failCount; + } + + set failCount(int v) { + _failCount = v; + _failCountSet = true; + } + + /// Time when lockout was triggered (read-only) + + DateTime get lockoutAt { + if (!_lockoutAtSet && _apiMapResponse.containsKey('lockout_at')) { + _lockoutAt = _apiMapResponse['lockout_at'] == null + ? null + : DateTime.parse(_apiMapResponse['lockout_at']); + _lockoutAtSet = true; + } + return _lockoutAt; + } + + set lockoutAt(DateTime v) { + _lockoutAt = v; + _lockoutAtSet = true; + } + + UserLoginLockout() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + UserLoginLockout.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_keySet || _apiMapResponse.containsKey('key')) { + json['key'] = key; + } + if (_authTypeSet || _apiMapResponse.containsKey('auth_type')) { + json['auth_type'] = authType; + } + if (_ipSet || _apiMapResponse.containsKey('ip')) { + json['ip'] = ip; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_remoteIdSet || _apiMapResponse.containsKey('remote_id')) { + json['remote_id'] = remoteId; + } + if (_fullNameSet || _apiMapResponse.containsKey('full_name')) { + json['full_name'] = fullName; + } + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_failCountSet || _apiMapResponse.containsKey('fail_count')) { + json['fail_count'] = failCount; + } + if (_lockoutAtSet || _apiMapResponse.containsKey('lockout_at')) { + json['lockout_at'] = + lockoutAt == null ? null : lockoutAt.toIso8601String(); + } + return json; + } +} + +class UserPublic { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + int _id; + bool _idSet = false; + + String _firstName; + bool _firstNameSet = false; + + String _lastName; + bool _lastNameSet = false; + + String _displayName; + bool _displayNameSet = false; + + String _avatarUrl; + bool _avatarUrlSet = false; + + String _url; + bool _urlSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// First Name (read-only) + + String get firstName { + if (!_firstNameSet && _apiMapResponse.containsKey('first_name')) { + _firstName = _apiMapResponse['first_name'] == null + ? null + : _apiMapResponse['first_name'].toString(); + _firstNameSet = true; + } + return _firstName; + } + + set firstName(String v) { + _firstName = v; + _firstNameSet = true; + } + + /// Last Name (read-only) + + String get lastName { + if (!_lastNameSet && _apiMapResponse.containsKey('last_name')) { + _lastName = _apiMapResponse['last_name'] == null + ? null + : _apiMapResponse['last_name'].toString(); + _lastNameSet = true; + } + return _lastName; + } + + set lastName(String v) { + _lastName = v; + _lastNameSet = true; + } + + /// Full name for display (available only if both first_name and last_name are set) (read-only) + + String get displayName { + if (!_displayNameSet && _apiMapResponse.containsKey('display_name')) { + _displayName = _apiMapResponse['display_name'] == null + ? null + : _apiMapResponse['display_name'].toString(); + _displayNameSet = true; + } + return _displayName; + } + + set displayName(String v) { + _displayName = v; + _displayNameSet = true; + } + + /// URL for the avatar image (may be generic) (read-only) + + String get avatarUrl { + if (!_avatarUrlSet && _apiMapResponse.containsKey('avatar_url')) { + _avatarUrl = _apiMapResponse['avatar_url'] == null + ? null + : _apiMapResponse['avatar_url'].toString(); + _avatarUrlSet = true; + } + return _avatarUrl; + } + + set avatarUrl(String v) { + _avatarUrl = v; + _avatarUrlSet = true; + } + + /// Link to get this item (read-only) + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + UserPublic() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + UserPublic.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_firstNameSet || _apiMapResponse.containsKey('first_name')) { + json['first_name'] = firstName; + } + if (_lastNameSet || _apiMapResponse.containsKey('last_name')) { + json['last_name'] = lastName; + } + if (_displayNameSet || _apiMapResponse.containsKey('display_name')) { + json['display_name'] = displayName; + } + if (_avatarUrlSet || _apiMapResponse.containsKey('avatar_url')) { + json['avatar_url'] = avatarUrl; + } + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + return json; + } +} + +class ValidationError { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _message; + bool _messageSet = false; + + List _errors; + bool _errorsSet = false; + + String _documentationUrl; + bool _documentationUrlSet = false; + + /// Error details (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Error detail array (read-only) + + List get errors { + if (!_errorsSet && _apiMapResponse.containsKey('errors')) { + _errors = _apiMapResponse['errors'] == null + ? null + : (_apiMapResponse['errors'] as List) + .map((i) => + ValidationErrorDetail.fromResponse(i, apiResponseContentType)) + .toList(); + _errorsSet = true; + } + return _errors; + } + + set errors(List v) { + _errors = v; + _errorsSet = true; + } + + /// Documentation link (read-only) + + String get documentationUrl { + if (!_documentationUrlSet && + _apiMapResponse.containsKey('documentation_url')) { + _documentationUrl = _apiMapResponse['documentation_url'] == null + ? null + : _apiMapResponse['documentation_url'].toString(); + _documentationUrlSet = true; + } + return _documentationUrl; + } + + set documentationUrl(String v) { + _documentationUrl = v; + _documentationUrlSet = true; + } + + ValidationError() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ValidationError.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_errorsSet || _apiMapResponse.containsKey('errors')) { + json['errors'] = + errors == null ? null : errors.map((i) => i.toJson()).toList(); + } + if (_documentationUrlSet || + _apiMapResponse.containsKey('documentation_url')) { + json['documentation_url'] = documentationUrl; + } + return json; + } +} + +class ValidationErrorDetail { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _field; + bool _fieldSet = false; + + String _code; + bool _codeSet = false; + + String _message; + bool _messageSet = false; + + String _documentationUrl; + bool _documentationUrlSet = false; + + /// Field with error (read-only) + + String get field { + if (!_fieldSet && _apiMapResponse.containsKey('field')) { + _field = _apiMapResponse['field'] == null + ? null + : _apiMapResponse['field'].toString(); + _fieldSet = true; + } + return _field; + } + + set field(String v) { + _field = v; + _fieldSet = true; + } + + /// Error code (read-only) + + String get code { + if (!_codeSet && _apiMapResponse.containsKey('code')) { + _code = _apiMapResponse['code'] == null + ? null + : _apiMapResponse['code'].toString(); + _codeSet = true; + } + return _code; + } + + set code(String v) { + _code = v; + _codeSet = true; + } + + /// Error info message (read-only) + + String get message { + if (!_messageSet && _apiMapResponse.containsKey('message')) { + _message = _apiMapResponse['message'] == null + ? null + : _apiMapResponse['message'].toString(); + _messageSet = true; + } + return _message; + } + + set message(String v) { + _message = v; + _messageSet = true; + } + + /// Documentation link (read-only) + + String get documentationUrl { + if (!_documentationUrlSet && + _apiMapResponse.containsKey('documentation_url')) { + _documentationUrl = _apiMapResponse['documentation_url'] == null + ? null + : _apiMapResponse['documentation_url'].toString(); + _documentationUrlSet = true; + } + return _documentationUrl; + } + + set documentationUrl(String v) { + _documentationUrl = v; + _documentationUrlSet = true; + } + + ValidationErrorDetail() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + ValidationErrorDetail.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_fieldSet || _apiMapResponse.containsKey('field')) { + json['field'] = field; + } + if (_codeSet || _apiMapResponse.containsKey('code')) { + json['code'] = code; + } + if (_messageSet || _apiMapResponse.containsKey('message')) { + json['message'] = message; + } + if (_documentationUrlSet || + _apiMapResponse.containsKey('documentation_url')) { + json['documentation_url'] = documentationUrl; + } + return json; + } +} + +/// The name of the starting day of the week. Valid values are: "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday". (Enum defined in LookmlModelExploreField) +enum WeekStartDay { + monday, + tuesday, + wednesday, + thursday, + friday, + saturday, + sunday +} + +class WeekStartDayMapper { + static String toStringValue(WeekStartDay e) { + switch (e) { + case WeekStartDay.monday: + return 'monday'; + case WeekStartDay.tuesday: + return 'tuesday'; + case WeekStartDay.wednesday: + return 'wednesday'; + case WeekStartDay.thursday: + return 'thursday'; + case WeekStartDay.friday: + return 'friday'; + case WeekStartDay.saturday: + return 'saturday'; + case WeekStartDay.sunday: + return 'sunday'; + + default: + return null; + } + } + + static WeekStartDay fromStringValue(String s) { + if (s == 'monday') { + return WeekStartDay.monday; + } + if (s == 'tuesday') { + return WeekStartDay.tuesday; + } + if (s == 'wednesday') { + return WeekStartDay.wednesday; + } + if (s == 'thursday') { + return WeekStartDay.thursday; + } + if (s == 'friday') { + return WeekStartDay.friday; + } + if (s == 'saturday') { + return WeekStartDay.saturday; + } + if (s == 'sunday') { + return WeekStartDay.sunday; + } + return null; + } +} + +class WelcomeEmailTest { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _content; + bool _contentSet = false; + + String _subject; + bool _subjectSet = false; + + String _header; + bool _headerSet = false; + + /// The content that would be sent in the body of a custom welcome email + + String get content { + if (!_contentSet && _apiMapResponse.containsKey('content')) { + _content = _apiMapResponse['content'] == null + ? null + : _apiMapResponse['content'].toString(); + _contentSet = true; + } + return _content; + } + + set content(String v) { + _content = v; + _contentSet = true; + } + + /// The subject that would be sent for the custom welcome email + + String get subject { + if (!_subjectSet && _apiMapResponse.containsKey('subject')) { + _subject = _apiMapResponse['subject'] == null + ? null + : _apiMapResponse['subject'].toString(); + _subjectSet = true; + } + return _subject; + } + + set subject(String v) { + _subject = v; + _subjectSet = true; + } + + /// The header that would be sent in the body of a custom welcome email + + String get header { + if (!_headerSet && _apiMapResponse.containsKey('header')) { + _header = _apiMapResponse['header'] == null + ? null + : _apiMapResponse['header'].toString(); + _headerSet = true; + } + return _header; + } + + set header(String v) { + _header = v; + _headerSet = true; + } + + WelcomeEmailTest() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WelcomeEmailTest.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_contentSet || _apiMapResponse.containsKey('content')) { + json['content'] = content; + } + if (_subjectSet || _apiMapResponse.containsKey('subject')) { + json['subject'] = subject; + } + if (_headerSet || _apiMapResponse.containsKey('header')) { + json['header'] = header; + } + return json; + } +} + +class WhitelabelConfiguration { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _id; + bool _idSet = false; + + String _logoFile; + bool _logoFileSet = false; + + String _logoUrl; + bool _logoUrlSet = false; + + String _faviconFile; + bool _faviconFileSet = false; + + String _faviconUrl; + bool _faviconUrlSet = false; + + String _defaultTitle; + bool _defaultTitleSet = false; + + bool _showHelpMenu; + bool _showHelpMenuSet = false; + + bool _showDocs; + bool _showDocsSet = false; + + bool _showEmailSubOptions; + bool _showEmailSubOptionsSet = false; + + bool _allowLookerMentions; + bool _allowLookerMentionsSet = false; + + bool _allowLookerLinks; + bool _allowLookerLinksSet = false; + + bool _customWelcomeEmailAdvanced; + bool _customWelcomeEmailAdvancedSet = false; + + bool _setupMentions; + bool _setupMentionsSet = false; + + bool _alertsLogo; + bool _alertsLogoSet = false; + + bool _alertsLinks; + bool _alertsLinksSet = false; + + bool _foldersMentions; + bool _foldersMentionsSet = false; + + /// Unique Id (read-only) + + int get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id']; + _idSet = true; + } + return _id; + } + + set id(int v) { + _id = v; + _idSet = true; + } + + /// Customer logo image. Expected base64 encoded data (write-only) + + String get logoFile { + if (!_logoFileSet && _apiMapResponse.containsKey('logo_file')) { + _logoFile = _apiMapResponse['logo_file'] == null + ? null + : _apiMapResponse['logo_file'].toString(); + _logoFileSet = true; + } + return _logoFile; + } + + set logoFile(String v) { + _logoFile = v; + _logoFileSet = true; + } + + /// Logo image url (read-only) (read-only) + + String get logoUrl { + if (!_logoUrlSet && _apiMapResponse.containsKey('logo_url')) { + _logoUrl = _apiMapResponse['logo_url'] == null + ? null + : _apiMapResponse['logo_url'].toString(); + _logoUrlSet = true; + } + return _logoUrl; + } + + set logoUrl(String v) { + _logoUrl = v; + _logoUrlSet = true; + } + + /// Custom favicon image. Expected base64 encoded data (write-only) + + String get faviconFile { + if (!_faviconFileSet && _apiMapResponse.containsKey('favicon_file')) { + _faviconFile = _apiMapResponse['favicon_file'] == null + ? null + : _apiMapResponse['favicon_file'].toString(); + _faviconFileSet = true; + } + return _faviconFile; + } + + set faviconFile(String v) { + _faviconFile = v; + _faviconFileSet = true; + } + + /// Favicon image url (read-only) (read-only) + + String get faviconUrl { + if (!_faviconUrlSet && _apiMapResponse.containsKey('favicon_url')) { + _faviconUrl = _apiMapResponse['favicon_url'] == null + ? null + : _apiMapResponse['favicon_url'].toString(); + _faviconUrlSet = true; + } + return _faviconUrl; + } + + set faviconUrl(String v) { + _faviconUrl = v; + _faviconUrlSet = true; + } + + /// Default page title + + String get defaultTitle { + if (!_defaultTitleSet && _apiMapResponse.containsKey('default_title')) { + _defaultTitle = _apiMapResponse['default_title'] == null + ? null + : _apiMapResponse['default_title'].toString(); + _defaultTitleSet = true; + } + return _defaultTitle; + } + + set defaultTitle(String v) { + _defaultTitle = v; + _defaultTitleSet = true; + } + + /// Boolean to toggle showing help menus + + bool get showHelpMenu { + if (!_showHelpMenuSet && _apiMapResponse.containsKey('show_help_menu')) { + _showHelpMenu = _apiMapResponse['show_help_menu']; + _showHelpMenuSet = true; + } + return _showHelpMenu; + } + + set showHelpMenu(bool v) { + _showHelpMenu = v; + _showHelpMenuSet = true; + } + + /// Boolean to toggle showing docs + + bool get showDocs { + if (!_showDocsSet && _apiMapResponse.containsKey('show_docs')) { + _showDocs = _apiMapResponse['show_docs']; + _showDocsSet = true; + } + return _showDocs; + } + + set showDocs(bool v) { + _showDocs = v; + _showDocsSet = true; + } + + /// Boolean to toggle showing email subscription options. + + bool get showEmailSubOptions { + if (!_showEmailSubOptionsSet && + _apiMapResponse.containsKey('show_email_sub_options')) { + _showEmailSubOptions = _apiMapResponse['show_email_sub_options']; + _showEmailSubOptionsSet = true; + } + return _showEmailSubOptions; + } + + set showEmailSubOptions(bool v) { + _showEmailSubOptions = v; + _showEmailSubOptionsSet = true; + } + + /// Boolean to toggle mentions of Looker in emails + + bool get allowLookerMentions { + if (!_allowLookerMentionsSet && + _apiMapResponse.containsKey('allow_looker_mentions')) { + _allowLookerMentions = _apiMapResponse['allow_looker_mentions']; + _allowLookerMentionsSet = true; + } + return _allowLookerMentions; + } + + set allowLookerMentions(bool v) { + _allowLookerMentions = v; + _allowLookerMentionsSet = true; + } + + /// Boolean to toggle links to Looker in emails + + bool get allowLookerLinks { + if (!_allowLookerLinksSet && + _apiMapResponse.containsKey('allow_looker_links')) { + _allowLookerLinks = _apiMapResponse['allow_looker_links']; + _allowLookerLinksSet = true; + } + return _allowLookerLinks; + } + + set allowLookerLinks(bool v) { + _allowLookerLinks = v; + _allowLookerLinksSet = true; + } + + /// Allow subject line and email heading customization in customized emails” + + bool get customWelcomeEmailAdvanced { + if (!_customWelcomeEmailAdvancedSet && + _apiMapResponse.containsKey('custom_welcome_email_advanced')) { + _customWelcomeEmailAdvanced = + _apiMapResponse['custom_welcome_email_advanced']; + _customWelcomeEmailAdvancedSet = true; + } + return _customWelcomeEmailAdvanced; + } + + set customWelcomeEmailAdvanced(bool v) { + _customWelcomeEmailAdvanced = v; + _customWelcomeEmailAdvancedSet = true; + } + + /// Remove the word Looker from appearing in the account setup page + + bool get setupMentions { + if (!_setupMentionsSet && _apiMapResponse.containsKey('setup_mentions')) { + _setupMentions = _apiMapResponse['setup_mentions']; + _setupMentionsSet = true; + } + return _setupMentions; + } + + set setupMentions(bool v) { + _setupMentions = v; + _setupMentionsSet = true; + } + + /// Remove Looker logo from Alerts + + bool get alertsLogo { + if (!_alertsLogoSet && _apiMapResponse.containsKey('alerts_logo')) { + _alertsLogo = _apiMapResponse['alerts_logo']; + _alertsLogoSet = true; + } + return _alertsLogo; + } + + set alertsLogo(bool v) { + _alertsLogo = v; + _alertsLogoSet = true; + } + + /// Remove Looker links from Alerts + + bool get alertsLinks { + if (!_alertsLinksSet && _apiMapResponse.containsKey('alerts_links')) { + _alertsLinks = _apiMapResponse['alerts_links']; + _alertsLinksSet = true; + } + return _alertsLinks; + } + + set alertsLinks(bool v) { + _alertsLinks = v; + _alertsLinksSet = true; + } + + /// Remove Looker mentions in home folder page when you don’t have any items saved + + bool get foldersMentions { + if (!_foldersMentionsSet && + _apiMapResponse.containsKey('folders_mentions')) { + _foldersMentions = _apiMapResponse['folders_mentions']; + _foldersMentionsSet = true; + } + return _foldersMentions; + } + + set foldersMentions(bool v) { + _foldersMentions = v; + _foldersMentionsSet = true; + } + + WhitelabelConfiguration() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WhitelabelConfiguration.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_logoFileSet || _apiMapResponse.containsKey('logo_file')) { + json['logo_file'] = logoFile; + } + if (_logoUrlSet || _apiMapResponse.containsKey('logo_url')) { + json['logo_url'] = logoUrl; + } + if (_faviconFileSet || _apiMapResponse.containsKey('favicon_file')) { + json['favicon_file'] = faviconFile; + } + if (_faviconUrlSet || _apiMapResponse.containsKey('favicon_url')) { + json['favicon_url'] = faviconUrl; + } + if (_defaultTitleSet || _apiMapResponse.containsKey('default_title')) { + json['default_title'] = defaultTitle; + } + if (_showHelpMenuSet || _apiMapResponse.containsKey('show_help_menu')) { + json['show_help_menu'] = showHelpMenu; + } + if (_showDocsSet || _apiMapResponse.containsKey('show_docs')) { + json['show_docs'] = showDocs; + } + if (_showEmailSubOptionsSet || + _apiMapResponse.containsKey('show_email_sub_options')) { + json['show_email_sub_options'] = showEmailSubOptions; + } + if (_allowLookerMentionsSet || + _apiMapResponse.containsKey('allow_looker_mentions')) { + json['allow_looker_mentions'] = allowLookerMentions; + } + if (_allowLookerLinksSet || + _apiMapResponse.containsKey('allow_looker_links')) { + json['allow_looker_links'] = allowLookerLinks; + } + if (_customWelcomeEmailAdvancedSet || + _apiMapResponse.containsKey('custom_welcome_email_advanced')) { + json['custom_welcome_email_advanced'] = customWelcomeEmailAdvanced; + } + if (_setupMentionsSet || _apiMapResponse.containsKey('setup_mentions')) { + json['setup_mentions'] = setupMentions; + } + if (_alertsLogoSet || _apiMapResponse.containsKey('alerts_logo')) { + json['alerts_logo'] = alertsLogo; + } + if (_alertsLinksSet || _apiMapResponse.containsKey('alerts_links')) { + json['alerts_links'] = alertsLinks; + } + if (_foldersMentionsSet || + _apiMapResponse.containsKey('folders_mentions')) { + json['folders_mentions'] = foldersMentions; + } + return json; + } +} + +class Workspace { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + Map _can; + bool _canSet = false; + + String _id; + bool _idSet = false; + + List _projects; + bool _projectsSet = false; + + /// Operations the current user is able to perform on this object (read-only) + + Map get can { + if (!_canSet && _apiMapResponse.containsKey('can')) { + _can = _apiMapResponse['can']; + _canSet = true; + } + return _can; + } + + set can(Map v) { + _can = v; + _canSet = true; + } + + /// The unique id of this user workspace. Predefined workspace ids include "production" and "dev" (read-only) + + String get id { + if (!_idSet && _apiMapResponse.containsKey('id')) { + _id = _apiMapResponse['id'] == null + ? null + : _apiMapResponse['id'].toString(); + _idSet = true; + } + return _id; + } + + set id(String v) { + _id = v; + _idSet = true; + } + + /// The local state of each project in the workspace (read-only) + + List get projects { + if (!_projectsSet && _apiMapResponse.containsKey('projects')) { + _projects = _apiMapResponse['projects'] == null + ? null + : (_apiMapResponse['projects'] as List) + .map((i) => Project.fromResponse(i, apiResponseContentType)) + .toList(); + _projectsSet = true; + } + return _projects; + } + + set projects(List v) { + _projects = v; + _projectsSet = true; + } + + Workspace() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + Workspace.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canSet || _apiMapResponse.containsKey('can')) { + json['can'] = can; + } + if (_idSet || _apiMapResponse.containsKey('id')) { + json['id'] = id; + } + if (_projectsSet || _apiMapResponse.containsKey('projects')) { + json['projects'] = + projects == null ? null : projects.map((i) => i.toJson()).toList(); + } + return json; + } +} + +/// Dynamic writeable type for Alert removes: +/// followed, followable, id, investigative_content_title, owner_display_name +class WriteAlert { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _appliedDashboardFilters; + bool _appliedDashboardFiltersSet = false; + + ComparisonType _comparisonType; + bool _comparisonTypeSet = false; + + String _cron; + bool _cronSet = false; + + String _customTitle; + bool _customTitleSet = false; + + int _dashboardElementId; + bool _dashboardElementIdSet = false; + + String _description; + bool _descriptionSet = false; + + List _destinations; + bool _destinationsSet = false; + + AlertField _field; + bool _fieldSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _disabledReason; + bool _disabledReasonSet = false; + + bool _isPublic; + bool _isPublicSet = false; + + InvestigativeContentType _investigativeContentType; + bool _investigativeContentTypeSet = false; + + String _investigativeContentId; + bool _investigativeContentIdSet = false; + + String _lookmlDashboardId; + bool _lookmlDashboardIdSet = false; + + String _lookmlLinkId; + bool _lookmlLinkIdSet = false; + + int _ownerId; + bool _ownerIdSet = false; + + double _threshold; + bool _thresholdSet = false; + + AlertConditionState _timeSeriesConditionState; + bool _timeSeriesConditionStateSet = false; + + /// Filters coming from the dashboard that are applied. Example `[{ "filter_title": "Name", "field_name": "distribution_centers.name", "filter_value": "Los Angeles CA" }]` + + List get appliedDashboardFilters { + if (!_appliedDashboardFiltersSet && + _apiMapResponse.containsKey('applied_dashboard_filters')) { + _appliedDashboardFilters = + _apiMapResponse['applied_dashboard_filters'] == null + ? null + : (_apiMapResponse['applied_dashboard_filters'] as List) + .map((i) => AlertAppliedDashboardFilter.fromResponse( + i, apiResponseContentType)) + .toList(); + _appliedDashboardFiltersSet = true; + } + return _appliedDashboardFilters; + } + + set appliedDashboardFilters(List v) { + _appliedDashboardFilters = v; + _appliedDashboardFiltersSet = true; + } + + /// This property informs the check what kind of comparison we are performing. Only certain condition types are valid for time series alerts. For details, refer to [Setting Alert Conditions](https://docs.looker.com/sharing-and-publishing/creating-alerts#setting_alert_conditions) Valid values are: "EQUAL_TO", "GREATER_THAN", "GREATER_THAN_OR_EQUAL_TO", "LESS_THAN", "LESS_THAN_OR_EQUAL_TO", "INCREASES_BY", "DECREASES_BY", "CHANGES_BY". + + ComparisonType get comparisonType { + if (!_comparisonTypeSet && _apiMapResponse.containsKey('comparison_type')) { + _comparisonType = ComparisonTypeMapper.fromStringValue( + _apiMapResponse['comparison_type']); + _comparisonTypeSet = true; + } + return _comparisonType; + } + + set comparisonType(ComparisonType v) { + _comparisonType = v; + _comparisonTypeSet = true; + } + + /// Vixie-Style crontab specification when to run. At minumum, it has to be longer than 15 minute intervals + + String get cron { + if (!_cronSet && _apiMapResponse.containsKey('cron')) { + _cron = _apiMapResponse['cron'] == null + ? null + : _apiMapResponse['cron'].toString(); + _cronSet = true; + } + return _cron; + } + + set cron(String v) { + _cron = v; + _cronSet = true; + } + + /// An optional, user-defined title for the alert + + String get customTitle { + if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { + _customTitle = _apiMapResponse['custom_title'] == null + ? null + : _apiMapResponse['custom_title'].toString(); + _customTitleSet = true; + } + return _customTitle; + } + + set customTitle(String v) { + _customTitle = v; + _customTitleSet = true; + } + + /// ID of the dashboard element associated with the alert. Refer to [dashboard_element()](#!/Dashboard/DashboardElement) + + int get dashboardElementId { + if (!_dashboardElementIdSet && + _apiMapResponse.containsKey('dashboard_element_id')) { + _dashboardElementId = _apiMapResponse['dashboard_element_id']; + _dashboardElementIdSet = true; + } + return _dashboardElementId; + } + + set dashboardElementId(int v) { + _dashboardElementId = v; + _dashboardElementIdSet = true; + } + + /// An optional description for the alert. This supplements the title + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Array of destinations to send alerts to. Must be the same type of destination. Example `[{ "destination_type": "EMAIL", "email_address": "test@test.com" }]` + + List get destinations { + if (!_destinationsSet && _apiMapResponse.containsKey('destinations')) { + _destinations = _apiMapResponse['destinations'] == null + ? null + : (_apiMapResponse['destinations'] as List) + .map((i) => + AlertDestination.fromResponse(i, apiResponseContentType)) + .toList(); + _destinationsSet = true; + } + return _destinations; + } + + set destinations(List v) { + _destinations = v; + _destinationsSet = true; + } + + AlertField get field { + if (!_fieldSet && _apiMapResponse.containsKey('field')) { + _field = _apiMapResponse['field'] == null + ? null + : AlertField.fromResponse( + _apiMapResponse['field'], apiResponseContentType); + _fieldSet = true; + } + return _field; + } + + set field(AlertField v) { + _field = v; + _fieldSet = true; + } + + /// Whether or not the alert is disabled + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Reason for disabling alert + + String get disabledReason { + if (!_disabledReasonSet && _apiMapResponse.containsKey('disabled_reason')) { + _disabledReason = _apiMapResponse['disabled_reason'] == null + ? null + : _apiMapResponse['disabled_reason'].toString(); + _disabledReasonSet = true; + } + return _disabledReason; + } + + set disabledReason(String v) { + _disabledReason = v; + _disabledReasonSet = true; + } + + /// Whether or not the alert is public + + bool get isPublic { + if (!_isPublicSet && _apiMapResponse.containsKey('is_public')) { + _isPublic = _apiMapResponse['is_public']; + _isPublicSet = true; + } + return _isPublic; + } + + set isPublic(bool v) { + _isPublic = v; + _isPublicSet = true; + } + + /// The type of the investigative content Valid values are: "dashboard". + + InvestigativeContentType get investigativeContentType { + if (!_investigativeContentTypeSet && + _apiMapResponse.containsKey('investigative_content_type')) { + _investigativeContentType = + InvestigativeContentTypeMapper.fromStringValue( + _apiMapResponse['investigative_content_type']); + _investigativeContentTypeSet = true; + } + return _investigativeContentType; + } + + set investigativeContentType(InvestigativeContentType v) { + _investigativeContentType = v; + _investigativeContentTypeSet = true; + } + + /// The ID of the investigative content. For dashboards, this will be the dashboard ID + + String get investigativeContentId { + if (!_investigativeContentIdSet && + _apiMapResponse.containsKey('investigative_content_id')) { + _investigativeContentId = + _apiMapResponse['investigative_content_id'] == null + ? null + : _apiMapResponse['investigative_content_id'].toString(); + _investigativeContentIdSet = true; + } + return _investigativeContentId; + } + + set investigativeContentId(String v) { + _investigativeContentId = v; + _investigativeContentIdSet = true; + } + + /// ID of the LookML dashboard associated with the alert + + String get lookmlDashboardId { + if (!_lookmlDashboardIdSet && + _apiMapResponse.containsKey('lookml_dashboard_id')) { + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null + ? null + : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardIdSet = true; + } + return _lookmlDashboardId; + } + + set lookmlDashboardId(String v) { + _lookmlDashboardId = v; + _lookmlDashboardIdSet = true; + } + + /// ID of the LookML dashboard element associated with the alert + + String get lookmlLinkId { + if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { + _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null + ? null + : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkIdSet = true; + } + return _lookmlLinkId; + } + + set lookmlLinkId(String v) { + _lookmlLinkId = v; + _lookmlLinkIdSet = true; + } + + /// User id of alert owner + + int get ownerId { + if (!_ownerIdSet && _apiMapResponse.containsKey('owner_id')) { + _ownerId = _apiMapResponse['owner_id']; + _ownerIdSet = true; + } + return _ownerId; + } + + set ownerId(int v) { + _ownerId = v; + _ownerIdSet = true; + } + + /// Value of the alert threshold + + double get threshold { + if (!_thresholdSet && _apiMapResponse.containsKey('threshold')) { + _threshold = _apiMapResponse['threshold']; + _thresholdSet = true; + } + return _threshold; + } + + set threshold(double v) { + _threshold = v; + _thresholdSet = true; + } + + AlertConditionState get timeSeriesConditionState { + if (!_timeSeriesConditionStateSet && + _apiMapResponse.containsKey('time_series_condition_state')) { + _timeSeriesConditionState = + _apiMapResponse['time_series_condition_state'] == null + ? null + : AlertConditionState.fromResponse( + _apiMapResponse['time_series_condition_state'], + apiResponseContentType); + _timeSeriesConditionStateSet = true; + } + return _timeSeriesConditionState; + } + + set timeSeriesConditionState(AlertConditionState v) { + _timeSeriesConditionState = v; + _timeSeriesConditionStateSet = true; + } + + WriteAlert() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteAlert.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_appliedDashboardFiltersSet || + _apiMapResponse.containsKey('applied_dashboard_filters')) { + json['applied_dashboard_filters'] = appliedDashboardFilters == null + ? null + : appliedDashboardFilters.map((i) => i.toJson()).toList(); + } + if (_comparisonTypeSet || _apiMapResponse.containsKey('comparison_type')) { + json['comparison_type'] = + ComparisonTypeMapper.toStringValue(comparisonType); + } + if (_cronSet || _apiMapResponse.containsKey('cron')) { + json['cron'] = cron; + } + if (_customTitleSet || _apiMapResponse.containsKey('custom_title')) { + json['custom_title'] = customTitle; + } + if (_dashboardElementIdSet || + _apiMapResponse.containsKey('dashboard_element_id')) { + json['dashboard_element_id'] = dashboardElementId; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_destinationsSet || _apiMapResponse.containsKey('destinations')) { + json['destinations'] = destinations == null + ? null + : destinations.map((i) => i.toJson()).toList(); + } + if (_fieldSet || _apiMapResponse.containsKey('field')) { + json['field'] = field == null ? null : field.toJson(); + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_disabledReasonSet || _apiMapResponse.containsKey('disabled_reason')) { + json['disabled_reason'] = disabledReason; + } + if (_isPublicSet || _apiMapResponse.containsKey('is_public')) { + json['is_public'] = isPublic; + } + if (_investigativeContentTypeSet || + _apiMapResponse.containsKey('investigative_content_type')) { + json['investigative_content_type'] = + InvestigativeContentTypeMapper.toStringValue( + investigativeContentType); + } + if (_investigativeContentIdSet || + _apiMapResponse.containsKey('investigative_content_id')) { + json['investigative_content_id'] = investigativeContentId; + } + if (_lookmlDashboardIdSet || + _apiMapResponse.containsKey('lookml_dashboard_id')) { + json['lookml_dashboard_id'] = lookmlDashboardId; + } + if (_lookmlLinkIdSet || _apiMapResponse.containsKey('lookml_link_id')) { + json['lookml_link_id'] = lookmlLinkId; + } + if (_ownerIdSet || _apiMapResponse.containsKey('owner_id')) { + json['owner_id'] = ownerId; + } + if (_thresholdSet || _apiMapResponse.containsKey('threshold')) { + json['threshold'] = threshold; + } + if (_timeSeriesConditionStateSet || + _apiMapResponse.containsKey('time_series_condition_state')) { + json['time_series_condition_state'] = timeSeriesConditionState == null + ? null + : timeSeriesConditionState.toJson(); + } + return json; + } +} + +/// Dynamic writeable type for ApiSession removes: +/// can, sudo_user_id +class WriteApiSession { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _workspaceId; + bool _workspaceIdSet = false; + + /// The id of active workspace for this session + + String get workspaceId { + if (!_workspaceIdSet && _apiMapResponse.containsKey('workspace_id')) { + _workspaceId = _apiMapResponse['workspace_id'] == null + ? null + : _apiMapResponse['workspace_id'].toString(); + _workspaceIdSet = true; + } + return _workspaceId; + } + + set workspaceId(String v) { + _workspaceId = v; + _workspaceIdSet = true; + } + + WriteApiSession() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteApiSession.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_workspaceIdSet || _apiMapResponse.containsKey('workspace_id')) { + json['workspace_id'] = workspaceId; + } + return json; + } +} + +/// Dynamic writeable type for BackupConfiguration removes: +/// can, url +class WriteBackupConfiguration { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _type; + bool _typeSet = false; + + String _customS3Bucket; + bool _customS3BucketSet = false; + + String _customS3BucketRegion; + bool _customS3BucketRegionSet = false; + + String _customS3Key; + bool _customS3KeySet = false; + + String _customS3Secret; + bool _customS3SecretSet = false; + + /// Type of backup: looker-s3 or custom-s3 + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Name of bucket for custom-s3 backups + + String get customS3Bucket { + if (!_customS3BucketSet && + _apiMapResponse.containsKey('custom_s3_bucket')) { + _customS3Bucket = _apiMapResponse['custom_s3_bucket'] == null + ? null + : _apiMapResponse['custom_s3_bucket'].toString(); + _customS3BucketSet = true; + } + return _customS3Bucket; + } + + set customS3Bucket(String v) { + _customS3Bucket = v; + _customS3BucketSet = true; + } + + /// Name of region where the bucket is located + + String get customS3BucketRegion { + if (!_customS3BucketRegionSet && + _apiMapResponse.containsKey('custom_s3_bucket_region')) { + _customS3BucketRegion = _apiMapResponse['custom_s3_bucket_region'] == null + ? null + : _apiMapResponse['custom_s3_bucket_region'].toString(); + _customS3BucketRegionSet = true; + } + return _customS3BucketRegion; + } + + set customS3BucketRegion(String v) { + _customS3BucketRegion = v; + _customS3BucketRegionSet = true; + } + + /// (Write-Only) AWS S3 key used for custom-s3 backups + + String get customS3Key { + if (!_customS3KeySet && _apiMapResponse.containsKey('custom_s3_key')) { + _customS3Key = _apiMapResponse['custom_s3_key'] == null + ? null + : _apiMapResponse['custom_s3_key'].toString(); + _customS3KeySet = true; + } + return _customS3Key; + } + + set customS3Key(String v) { + _customS3Key = v; + _customS3KeySet = true; + } + + /// (Write-Only) AWS S3 secret used for custom-s3 backups + + String get customS3Secret { + if (!_customS3SecretSet && + _apiMapResponse.containsKey('custom_s3_secret')) { + _customS3Secret = _apiMapResponse['custom_s3_secret'] == null + ? null + : _apiMapResponse['custom_s3_secret'].toString(); + _customS3SecretSet = true; + } + return _customS3Secret; + } + + set customS3Secret(String v) { + _customS3Secret = v; + _customS3SecretSet = true; + } + + WriteBackupConfiguration() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteBackupConfiguration.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_customS3BucketSet || _apiMapResponse.containsKey('custom_s3_bucket')) { + json['custom_s3_bucket'] = customS3Bucket; + } + if (_customS3BucketRegionSet || + _apiMapResponse.containsKey('custom_s3_bucket_region')) { + json['custom_s3_bucket_region'] = customS3BucketRegion; + } + if (_customS3KeySet || _apiMapResponse.containsKey('custom_s3_key')) { + json['custom_s3_key'] = customS3Key; + } + if (_customS3SecretSet || _apiMapResponse.containsKey('custom_s3_secret')) { + json['custom_s3_secret'] = customS3Secret; + } + return json; + } +} + +/// Dynamic writeable type for Board removes: +/// can, content_metadata_id, created_at, board_sections, id, updated_at, user_id, primary_homepage +class WriteBoard { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + DateTime _deletedAt; + bool _deletedAtSet = false; + + String _description; + bool _descriptionSet = false; + + List _sectionOrder; + bool _sectionOrderSet = false; + + String _title; + bool _titleSet = false; + + /// Date of board deletion + + DateTime get deletedAt { + if (!_deletedAtSet && _apiMapResponse.containsKey('deleted_at')) { + _deletedAt = _apiMapResponse['deleted_at'] == null + ? null + : DateTime.parse(_apiMapResponse['deleted_at']); + _deletedAtSet = true; + } + return _deletedAt; + } + + set deletedAt(DateTime v) { + _deletedAt = v; + _deletedAtSet = true; + } + + /// Description of the board + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// ids of the board sections in the order they should be displayed + + List get sectionOrder { + if (!_sectionOrderSet && _apiMapResponse.containsKey('section_order')) { + _sectionOrder = _apiMapResponse['section_order'] == null + ? null + : _apiMapResponse['section_order'].map((i) => i as int).toList(); + _sectionOrderSet = true; + } + return _sectionOrder; + } + + set sectionOrder(List v) { + _sectionOrder = v; + _sectionOrderSet = true; + } + + /// Title of the board + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + WriteBoard() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteBoard.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { + json['deleted_at'] = + deletedAt == null ? null : deletedAt.toIso8601String(); + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_sectionOrderSet || _apiMapResponse.containsKey('section_order')) { + json['section_order'] = sectionOrder; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + return json; + } +} + +/// Dynamic writeable type for BoardItem removes: +/// can, content_created_by, content_favorite_id, content_metadata_id, content_updated_at, description, favorite_count, id, image_url, location, title, url, view_count +class WriteBoardItem { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _customDescription; + bool _customDescriptionSet = false; + + String _customTitle; + bool _customTitleSet = false; + + String _customUrl; + bool _customUrlSet = false; + + int _dashboardId; + bool _dashboardIdSet = false; + + int _boardSectionId; + bool _boardSectionIdSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _lookmlDashboardId; + bool _lookmlDashboardIdSet = false; + + int _order; + bool _orderSet = false; + + /// Custom description entered by the user, if present + + String get customDescription { + if (!_customDescriptionSet && + _apiMapResponse.containsKey('custom_description')) { + _customDescription = _apiMapResponse['custom_description'] == null + ? null + : _apiMapResponse['custom_description'].toString(); + _customDescriptionSet = true; + } + return _customDescription; + } + + set customDescription(String v) { + _customDescription = v; + _customDescriptionSet = true; + } + + /// Custom title entered by the user, if present + + String get customTitle { + if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { + _customTitle = _apiMapResponse['custom_title'] == null + ? null + : _apiMapResponse['custom_title'].toString(); + _customTitleSet = true; + } + return _customTitle; + } + + set customTitle(String v) { + _customTitle = v; + _customTitleSet = true; + } + + /// Custom url entered by the user, if present + + String get customUrl { + if (!_customUrlSet && _apiMapResponse.containsKey('custom_url')) { + _customUrl = _apiMapResponse['custom_url'] == null + ? null + : _apiMapResponse['custom_url'].toString(); + _customUrlSet = true; + } + return _customUrl; + } + + set customUrl(String v) { + _customUrl = v; + _customUrlSet = true; + } + + /// Dashboard to base this item on + + int get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id']; + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(int v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Associated Board Section + + int get boardSectionId { + if (!_boardSectionIdSet && + _apiMapResponse.containsKey('board_section_id')) { + _boardSectionId = _apiMapResponse['board_section_id']; + _boardSectionIdSet = true; + } + return _boardSectionId; + } + + set boardSectionId(int v) { + _boardSectionId = v; + _boardSectionIdSet = true; + } + + /// Look to base this item on + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// LookML Dashboard to base this item on + + String get lookmlDashboardId { + if (!_lookmlDashboardIdSet && + _apiMapResponse.containsKey('lookml_dashboard_id')) { + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null + ? null + : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardIdSet = true; + } + return _lookmlDashboardId; + } + + set lookmlDashboardId(String v) { + _lookmlDashboardId = v; + _lookmlDashboardIdSet = true; + } + + /// An arbitrary integer representing the sort order within the section + + int get order { + if (!_orderSet && _apiMapResponse.containsKey('order')) { + _order = _apiMapResponse['order']; + _orderSet = true; + } + return _order; + } + + set order(int v) { + _order = v; + _orderSet = true; + } + + WriteBoardItem() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteBoardItem.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_customDescriptionSet || + _apiMapResponse.containsKey('custom_description')) { + json['custom_description'] = customDescription; + } + if (_customTitleSet || _apiMapResponse.containsKey('custom_title')) { + json['custom_title'] = customTitle; + } + if (_customUrlSet || _apiMapResponse.containsKey('custom_url')) { + json['custom_url'] = customUrl; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_boardSectionIdSet || _apiMapResponse.containsKey('board_section_id')) { + json['board_section_id'] = boardSectionId; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_lookmlDashboardIdSet || + _apiMapResponse.containsKey('lookml_dashboard_id')) { + json['lookml_dashboard_id'] = lookmlDashboardId; + } + if (_orderSet || _apiMapResponse.containsKey('order')) { + json['order'] = order; + } + return json; + } +} + +/// Dynamic writeable type for BoardSection removes: +/// can, created_at, board_items, id, visible_item_order, updated_at +class WriteBoardSection { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + DateTime _deletedAt; + bool _deletedAtSet = false; + + String _description; + bool _descriptionSet = false; + + int _boardId; + bool _boardIdSet = false; + + List _itemOrder; + bool _itemOrderSet = false; + + String _title; + bool _titleSet = false; + + /// Time at which this section was deleted. + + DateTime get deletedAt { + if (!_deletedAtSet && _apiMapResponse.containsKey('deleted_at')) { + _deletedAt = _apiMapResponse['deleted_at'] == null + ? null + : DateTime.parse(_apiMapResponse['deleted_at']); + _deletedAtSet = true; + } + return _deletedAt; + } + + set deletedAt(DateTime v) { + _deletedAt = v; + _deletedAtSet = true; + } + + /// Description of the content found in this section. + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Id reference to parent board + + int get boardId { + if (!_boardIdSet && _apiMapResponse.containsKey('board_id')) { + _boardId = _apiMapResponse['board_id']; + _boardIdSet = true; + } + return _boardId; + } + + set boardId(int v) { + _boardId = v; + _boardIdSet = true; + } + + /// ids of the board items in the order they should be displayed + + List get itemOrder { + if (!_itemOrderSet && _apiMapResponse.containsKey('item_order')) { + _itemOrder = _apiMapResponse['item_order'] == null + ? null + : _apiMapResponse['item_order'].map((i) => i as int).toList(); + _itemOrderSet = true; + } + return _itemOrder; + } + + set itemOrder(List v) { + _itemOrder = v; + _itemOrderSet = true; + } + + /// Name of row + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + WriteBoardSection() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteBoardSection.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { + json['deleted_at'] = + deletedAt == null ? null : deletedAt.toIso8601String(); + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_boardIdSet || _apiMapResponse.containsKey('board_id')) { + json['board_id'] = boardId; + } + if (_itemOrderSet || _apiMapResponse.containsKey('item_order')) { + json['item_order'] = itemOrder; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + return json; + } +} + +/// Dynamic writeable type for ColorCollection removes: +/// id +class WriteColorCollection { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _label; + bool _labelSet = false; + + List _categoricalPalettes; + bool _categoricalPalettesSet = false; + + List _sequentialPalettes; + bool _sequentialPalettesSet = false; + + List _divergingPalettes; + bool _divergingPalettesSet = false; + + /// Label of color collection + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Array of categorical palette definitions + + List get categoricalPalettes { + if (!_categoricalPalettesSet && + _apiMapResponse.containsKey('categoricalPalettes')) { + _categoricalPalettes = _apiMapResponse['categoricalPalettes'] == null + ? null + : (_apiMapResponse['categoricalPalettes'] as List) + .map((i) => + DiscretePalette.fromResponse(i, apiResponseContentType)) + .toList(); + _categoricalPalettesSet = true; + } + return _categoricalPalettes; + } + + set categoricalPalettes(List v) { + _categoricalPalettes = v; + _categoricalPalettesSet = true; + } + + /// Array of discrete palette definitions + + List get sequentialPalettes { + if (!_sequentialPalettesSet && + _apiMapResponse.containsKey('sequentialPalettes')) { + _sequentialPalettes = _apiMapResponse['sequentialPalettes'] == null + ? null + : (_apiMapResponse['sequentialPalettes'] as List) + .map((i) => + ContinuousPalette.fromResponse(i, apiResponseContentType)) + .toList(); + _sequentialPalettesSet = true; + } + return _sequentialPalettes; + } + + set sequentialPalettes(List v) { + _sequentialPalettes = v; + _sequentialPalettesSet = true; + } + + /// Array of diverging palette definitions + + List get divergingPalettes { + if (!_divergingPalettesSet && + _apiMapResponse.containsKey('divergingPalettes')) { + _divergingPalettes = _apiMapResponse['divergingPalettes'] == null + ? null + : (_apiMapResponse['divergingPalettes'] as List) + .map((i) => + ContinuousPalette.fromResponse(i, apiResponseContentType)) + .toList(); + _divergingPalettesSet = true; + } + return _divergingPalettes; + } + + set divergingPalettes(List v) { + _divergingPalettes = v; + _divergingPalettesSet = true; + } + + WriteColorCollection() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteColorCollection.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_categoricalPalettesSet || + _apiMapResponse.containsKey('categoricalPalettes')) { + json['categoricalPalettes'] = categoricalPalettes == null + ? null + : categoricalPalettes.map((i) => i.toJson()).toList(); + } + if (_sequentialPalettesSet || + _apiMapResponse.containsKey('sequentialPalettes')) { + json['sequentialPalettes'] = sequentialPalettes == null + ? null + : sequentialPalettes.map((i) => i.toJson()).toList(); + } + if (_divergingPalettesSet || + _apiMapResponse.containsKey('divergingPalettes')) { + json['divergingPalettes'] = divergingPalettes == null + ? null + : divergingPalettes.map((i) => i.toJson()).toList(); + } + return json; + } +} + +/// Dynamic writeable type for Command removes: +/// id, author_id +class WriteCommand { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _description; + bool _descriptionSet = false; + + String _linkedContentId; + bool _linkedContentIdSet = false; + + LinkedContentType _linkedContentType; + bool _linkedContentTypeSet = false; + + /// Name of the command + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Description of the command + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Id of the content associated with the command + + String get linkedContentId { + if (!_linkedContentIdSet && + _apiMapResponse.containsKey('linked_content_id')) { + _linkedContentId = _apiMapResponse['linked_content_id'] == null + ? null + : _apiMapResponse['linked_content_id'].toString(); + _linkedContentIdSet = true; + } + return _linkedContentId; + } + + set linkedContentId(String v) { + _linkedContentId = v; + _linkedContentIdSet = true; + } + + /// Name of the command Valid values are: "dashboard", "lookml_dashboard". + + LinkedContentType get linkedContentType { + if (!_linkedContentTypeSet && + _apiMapResponse.containsKey('linked_content_type')) { + _linkedContentType = LinkedContentTypeMapper.fromStringValue( + _apiMapResponse['linked_content_type']); + _linkedContentTypeSet = true; + } + return _linkedContentType; + } + + set linkedContentType(LinkedContentType v) { + _linkedContentType = v; + _linkedContentTypeSet = true; + } + + WriteCommand() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteCommand.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_linkedContentIdSet || + _apiMapResponse.containsKey('linked_content_id')) { + json['linked_content_id'] = linkedContentId; + } + if (_linkedContentTypeSet || + _apiMapResponse.containsKey('linked_content_type')) { + json['linked_content_type'] = + LinkedContentTypeMapper.toStringValue(linkedContentType); + } + return json; + } +} + +/// Dynamic writeable type for ContentFavorite removes: +/// id, look_id, dashboard_id, board_id +class WriteContentFavorite { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _userId; + bool _userIdSet = false; + + int _contentMetadataId; + bool _contentMetadataIdSet = false; + + WriteLookBasic _look; + bool _lookSet = false; + + WriteDashboardBase _dashboard; + bool _dashboardSet = false; + + /// User Id which owns this ContentFavorite + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Content Metadata Id associated with this ContentFavorite + + int get contentMetadataId { + if (!_contentMetadataIdSet && + _apiMapResponse.containsKey('content_metadata_id')) { + _contentMetadataId = _apiMapResponse['content_metadata_id']; + _contentMetadataIdSet = true; + } + return _contentMetadataId; + } + + set contentMetadataId(int v) { + _contentMetadataId = v; + _contentMetadataIdSet = true; + } + + /// Dynamic writeable type for LookBasic removes: + /// can, content_metadata_id, id, title + + WriteLookBasic get look { + if (!_lookSet && _apiMapResponse.containsKey('look')) { + _look = _apiMapResponse['look'] == null + ? null + : WriteLookBasic.fromResponse( + _apiMapResponse['look'], apiResponseContentType); + _lookSet = true; + } + return _look; + } + + set look(WriteLookBasic v) { + _look = v; + _lookSet = true; + } + + /// Dynamic writeable type for DashboardBase removes: + /// can, content_favorite_id, content_metadata_id, description, hidden, id, model, query_timezone, readonly, refresh_interval, refresh_interval_to_i, title, user_id, slug, preferred_viewer + + WriteDashboardBase get dashboard { + if (!_dashboardSet && _apiMapResponse.containsKey('dashboard')) { + _dashboard = _apiMapResponse['dashboard'] == null + ? null + : WriteDashboardBase.fromResponse( + _apiMapResponse['dashboard'], apiResponseContentType); + _dashboardSet = true; + } + return _dashboard; + } + + set dashboard(WriteDashboardBase v) { + _dashboard = v; + _dashboardSet = true; + } + + WriteContentFavorite() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteContentFavorite.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_contentMetadataIdSet || + _apiMapResponse.containsKey('content_metadata_id')) { + json['content_metadata_id'] = contentMetadataId; + } + if (_lookSet || _apiMapResponse.containsKey('look')) { + json['look'] = look == null ? null : look.toJson(); + } + if (_dashboardSet || _apiMapResponse.containsKey('dashboard')) { + json['dashboard'] = dashboard == null ? null : dashboard.toJson(); + } + return json; + } +} + +/// Dynamic writeable type for ContentMeta removes: +/// can, id, name, parent_id, dashboard_id, look_id, folder_id, content_type, inheriting_id, slug +class WriteContentMeta { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _inherits; + bool _inheritsSet = false; + + /// Whether content inherits its access levels from parent + + bool get inherits { + if (!_inheritsSet && _apiMapResponse.containsKey('inherits')) { + _inherits = _apiMapResponse['inherits']; + _inheritsSet = true; + } + return _inherits; + } + + set inherits(bool v) { + _inherits = v; + _inheritsSet = true; + } + + WriteContentMeta() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteContentMeta.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_inheritsSet || _apiMapResponse.containsKey('inherits')) { + json['inherits'] = inherits; + } + return json; + } +} + +/// Dynamic writeable type for CreateDashboardFilter removes: +/// id, field +class WriteCreateDashboardFilter { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _name; + bool _nameSet = false; + + String _title; + bool _titleSet = false; + + String _type; + bool _typeSet = false; + + String _defaultValue; + bool _defaultValueSet = false; + + String _model; + bool _modelSet = false; + + String _explore; + bool _exploreSet = false; + + String _dimension; + bool _dimensionSet = false; + + int _row; + bool _rowSet = false; + + List _listensToFilters; + bool _listensToFiltersSet = false; + + bool _allowMultipleValues; + bool _allowMultipleValuesSet = false; + + bool _required; + bool _requiredSet = false; + + Map _uiConfig; + bool _uiConfigSet = false; + + /// Id of Dashboard + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Name of filter + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Title of filter + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Type of filter: one of date, number, string, or field + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Default value of filter + + String get defaultValue { + if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { + _defaultValue = _apiMapResponse['default_value'] == null + ? null + : _apiMapResponse['default_value'].toString(); + _defaultValueSet = true; + } + return _defaultValue; + } + + set defaultValue(String v) { + _defaultValue = v; + _defaultValueSet = true; + } + + /// Model of filter (required if type = field) + + String get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : _apiMapResponse['model'].toString(); + _modelSet = true; + } + return _model; + } + + set model(String v) { + _model = v; + _modelSet = true; + } + + /// Explore of filter (required if type = field) + + String get explore { + if (!_exploreSet && _apiMapResponse.containsKey('explore')) { + _explore = _apiMapResponse['explore'] == null + ? null + : _apiMapResponse['explore'].toString(); + _exploreSet = true; + } + return _explore; + } + + set explore(String v) { + _explore = v; + _exploreSet = true; + } + + /// Dimension of filter (required if type = field) + + String get dimension { + if (!_dimensionSet && _apiMapResponse.containsKey('dimension')) { + _dimension = _apiMapResponse['dimension'] == null + ? null + : _apiMapResponse['dimension'].toString(); + _dimensionSet = true; + } + return _dimension; + } + + set dimension(String v) { + _dimension = v; + _dimensionSet = true; + } + + /// Display order of this filter relative to other filters + + int get row { + if (!_rowSet && _apiMapResponse.containsKey('row')) { + _row = _apiMapResponse['row']; + _rowSet = true; + } + return _row; + } + + set row(int v) { + _row = v; + _rowSet = true; + } + + /// Array of listeners for faceted filters + + List get listensToFilters { + if (!_listensToFiltersSet && + _apiMapResponse.containsKey('listens_to_filters')) { + _listensToFilters = _apiMapResponse['listens_to_filters'] == null + ? null + : _apiMapResponse['listens_to_filters'] + .map((i) => i as String) + .toList(); + _listensToFiltersSet = true; + } + return _listensToFilters; + } + + set listensToFilters(List v) { + _listensToFilters = v; + _listensToFiltersSet = true; + } + + /// Whether the filter allows multiple filter values (deprecated in the latest version of dashboards) + + bool get allowMultipleValues { + if (!_allowMultipleValuesSet && + _apiMapResponse.containsKey('allow_multiple_values')) { + _allowMultipleValues = _apiMapResponse['allow_multiple_values']; + _allowMultipleValuesSet = true; + } + return _allowMultipleValues; + } + + set allowMultipleValues(bool v) { + _allowMultipleValues = v; + _allowMultipleValuesSet = true; + } + + /// Whether the filter requires a value to run the dashboard + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// The visual configuration for this filter. Used to set up how the UI for this filter should appear. + + Map get uiConfig { + if (!_uiConfigSet && _apiMapResponse.containsKey('ui_config')) { + _uiConfig = _apiMapResponse['ui_config']; + _uiConfigSet = true; + } + return _uiConfig; + } + + set uiConfig(Map v) { + _uiConfig = v; + _uiConfigSet = true; + } + + WriteCreateDashboardFilter() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteCreateDashboardFilter.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_defaultValueSet || _apiMapResponse.containsKey('default_value')) { + json['default_value'] = defaultValue; + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model; + } + if (_exploreSet || _apiMapResponse.containsKey('explore')) { + json['explore'] = explore; + } + if (_dimensionSet || _apiMapResponse.containsKey('dimension')) { + json['dimension'] = dimension; + } + if (_rowSet || _apiMapResponse.containsKey('row')) { + json['row'] = row; + } + if (_listensToFiltersSet || + _apiMapResponse.containsKey('listens_to_filters')) { + json['listens_to_filters'] = listensToFilters; + } + if (_allowMultipleValuesSet || + _apiMapResponse.containsKey('allow_multiple_values')) { + json['allow_multiple_values'] = allowMultipleValues; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_uiConfigSet || _apiMapResponse.containsKey('ui_config')) { + json['ui_config'] = uiConfig; + } + return json; + } +} + +/// Dynamic writeable type for CreateQueryTask removes: +/// can +class WriteCreateQueryTask { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _queryId; + bool _queryIdSet = false; + + ResultFormat _resultFormat; + bool _resultFormatSet = false; + + String _source; + bool _sourceSet = false; + + bool _deferred; + bool _deferredSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + /// Id of query to run + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// Desired async query result format. Valid values are: "inline_json", "json", "json_detail", "json_fe", "csv", "html", "md", "txt", "xlsx", "gsxml". + + ResultFormat get resultFormat { + if (!_resultFormatSet && _apiMapResponse.containsKey('result_format')) { + _resultFormat = + ResultFormatMapper.fromStringValue(_apiMapResponse['result_format']); + _resultFormatSet = true; + } + return _resultFormat; + } + + set resultFormat(ResultFormat v) { + _resultFormat = v; + _resultFormatSet = true; + } + + /// Source of query task + + String get source { + if (!_sourceSet && _apiMapResponse.containsKey('source')) { + _source = _apiMapResponse['source'] == null + ? null + : _apiMapResponse['source'].toString(); + _sourceSet = true; + } + return _source; + } + + set source(String v) { + _source = v; + _sourceSet = true; + } + + /// Create the task but defer execution + + bool get deferred { + if (!_deferredSet && _apiMapResponse.containsKey('deferred')) { + _deferred = _apiMapResponse['deferred']; + _deferredSet = true; + } + return _deferred; + } + + set deferred(bool v) { + _deferred = v; + _deferredSet = true; + } + + /// Id of look associated with query. + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Id of dashboard associated with query. + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + WriteCreateQueryTask() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteCreateQueryTask.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_resultFormatSet || _apiMapResponse.containsKey('result_format')) { + json['result_format'] = ResultFormatMapper.toStringValue(resultFormat); + } + if (_sourceSet || _apiMapResponse.containsKey('source')) { + json['source'] = source; + } + if (_deferredSet || _apiMapResponse.containsKey('deferred')) { + json['deferred'] = deferred; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + return json; + } +} + +/// Dynamic writeable type for CredentialsEmail removes: +/// can, created_at, is_disabled, logged_in_at, password_reset_url, type, url, user_url +class WriteCredentialsEmail { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _email; + bool _emailSet = false; + + bool _forcedPasswordResetAtNextLogin; + bool _forcedPasswordResetAtNextLoginSet = false; + + /// EMail address used for user login + + String get email { + if (!_emailSet && _apiMapResponse.containsKey('email')) { + _email = _apiMapResponse['email'] == null + ? null + : _apiMapResponse['email'].toString(); + _emailSet = true; + } + return _email; + } + + set email(String v) { + _email = v; + _emailSet = true; + } + + /// Force the user to change their password upon their next login + + bool get forcedPasswordResetAtNextLogin { + if (!_forcedPasswordResetAtNextLoginSet && + _apiMapResponse.containsKey('forced_password_reset_at_next_login')) { + _forcedPasswordResetAtNextLogin = + _apiMapResponse['forced_password_reset_at_next_login']; + _forcedPasswordResetAtNextLoginSet = true; + } + return _forcedPasswordResetAtNextLogin; + } + + set forcedPasswordResetAtNextLogin(bool v) { + _forcedPasswordResetAtNextLogin = v; + _forcedPasswordResetAtNextLoginSet = true; + } + + WriteCredentialsEmail() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteCredentialsEmail.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_emailSet || _apiMapResponse.containsKey('email')) { + json['email'] = email; + } + if (_forcedPasswordResetAtNextLoginSet || + _apiMapResponse.containsKey('forced_password_reset_at_next_login')) { + json['forced_password_reset_at_next_login'] = + forcedPasswordResetAtNextLogin; + } + return json; + } +} + +/// Dynamic writeable type for Dashboard removes: +/// can, content_favorite_id, content_metadata_id, id, model, readonly, refresh_interval_to_i, user_id, created_at, dashboard_elements, dashboard_filters, dashboard_layouts, deleted_at, deleter_id, edit_uri, favorite_count, last_accessed_at, last_viewed_at, updated_at, last_updater_id, last_updater_name, user_name, view_count, url +class WriteDashboard { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _description; + bool _descriptionSet = false; + + bool _hidden; + bool _hiddenSet = false; + + String _queryTimezone; + bool _queryTimezoneSet = false; + + String _refreshInterval; + bool _refreshIntervalSet = false; + + WriteFolderBase _folder; + bool _folderSet = false; + + String _title; + bool _titleSet = false; + + String _slug; + bool _slugSet = false; + + String _preferredViewer; + bool _preferredViewerSet = false; + + bool _alertSyncWithDashboardFilterEnabled; + bool _alertSyncWithDashboardFilterEnabledSet = false; + + String _backgroundColor; + bool _backgroundColorSet = false; + + bool _crossfilterEnabled; + bool _crossfilterEnabledSet = false; + + bool _deleted; + bool _deletedSet = false; + + bool _filtersBarCollapsed; + bool _filtersBarCollapsedSet = false; + + String _loadConfiguration; + bool _loadConfigurationSet = false; + + String _lookmlLinkId; + bool _lookmlLinkIdSet = false; + + bool _showFiltersBar; + bool _showFiltersBarSet = false; + + bool _showTitle; + bool _showTitleSet = false; + + String _folderId; + bool _folderIdSet = false; + + String _textTileTextColor; + bool _textTileTextColorSet = false; + + String _tileBackgroundColor; + bool _tileBackgroundColorSet = false; + + String _tileTextColor; + bool _tileTextColorSet = false; + + String _titleColor; + bool _titleColorSet = false; + + DashboardAppearance _appearance; + bool _appearanceSet = false; + + /// Description + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// Is Hidden + + bool get hidden { + if (!_hiddenSet && _apiMapResponse.containsKey('hidden')) { + _hidden = _apiMapResponse['hidden']; + _hiddenSet = true; + } + return _hidden; + } + + set hidden(bool v) { + _hidden = v; + _hiddenSet = true; + } + + /// Timezone in which the Dashboard will run by default. + + String get queryTimezone { + if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { + _queryTimezone = _apiMapResponse['query_timezone'] == null + ? null + : _apiMapResponse['query_timezone'].toString(); + _queryTimezoneSet = true; + } + return _queryTimezone; + } + + set queryTimezone(String v) { + _queryTimezone = v; + _queryTimezoneSet = true; + } + + /// Refresh Interval, as a time duration phrase like "2 hours 30 minutes". A number with no time units will be interpreted as whole seconds. + + String get refreshInterval { + if (!_refreshIntervalSet && + _apiMapResponse.containsKey('refresh_interval')) { + _refreshInterval = _apiMapResponse['refresh_interval'] == null + ? null + : _apiMapResponse['refresh_interval'].toString(); + _refreshIntervalSet = true; + } + return _refreshInterval; + } + + set refreshInterval(String v) { + _refreshInterval = v; + _refreshIntervalSet = true; + } + + /// Dynamic writeable type for FolderBase removes: + /// id, content_metadata_id, created_at, creator_id, child_count, external_id, is_embed, is_embed_shared_root, is_embed_users_root, is_personal, is_personal_descendant, is_shared_root, is_users_root, can + + WriteFolderBase get folder { + if (!_folderSet && _apiMapResponse.containsKey('folder')) { + _folder = _apiMapResponse['folder'] == null + ? null + : WriteFolderBase.fromResponse( + _apiMapResponse['folder'], apiResponseContentType); + _folderSet = true; + } + return _folder; + } + + set folder(WriteFolderBase v) { + _folder = v; + _folderSet = true; + } + + /// Dashboard Title + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Content Metadata Slug + + String get slug { + if (!_slugSet && _apiMapResponse.containsKey('slug')) { + _slug = _apiMapResponse['slug'] == null + ? null + : _apiMapResponse['slug'].toString(); + _slugSet = true; + } + return _slug; + } + + set slug(String v) { + _slug = v; + _slugSet = true; + } + + /// The preferred route for viewing this dashboard (ie: dashboards or dashboards-next) + + String get preferredViewer { + if (!_preferredViewerSet && + _apiMapResponse.containsKey('preferred_viewer')) { + _preferredViewer = _apiMapResponse['preferred_viewer'] == null + ? null + : _apiMapResponse['preferred_viewer'].toString(); + _preferredViewerSet = true; + } + return _preferredViewer; + } + + set preferredViewer(String v) { + _preferredViewer = v; + _preferredViewerSet = true; + } + + /// Enables alerts to keep in sync with dashboard filter changes + + bool get alertSyncWithDashboardFilterEnabled { + if (!_alertSyncWithDashboardFilterEnabledSet && + _apiMapResponse + .containsKey('alert_sync_with_dashboard_filter_enabled')) { + _alertSyncWithDashboardFilterEnabled = + _apiMapResponse['alert_sync_with_dashboard_filter_enabled']; + _alertSyncWithDashboardFilterEnabledSet = true; + } + return _alertSyncWithDashboardFilterEnabled; + } + + set alertSyncWithDashboardFilterEnabled(bool v) { + _alertSyncWithDashboardFilterEnabled = v; + _alertSyncWithDashboardFilterEnabledSet = true; + } + + /// Background color + + String get backgroundColor { + if (!_backgroundColorSet && + _apiMapResponse.containsKey('background_color')) { + _backgroundColor = _apiMapResponse['background_color'] == null + ? null + : _apiMapResponse['background_color'].toString(); + _backgroundColorSet = true; + } + return _backgroundColor; + } + + set backgroundColor(String v) { + _backgroundColor = v; + _backgroundColorSet = true; + } + + /// Enables crossfiltering in dashboards - only available in dashboards-next (beta) + + bool get crossfilterEnabled { + if (!_crossfilterEnabledSet && + _apiMapResponse.containsKey('crossfilter_enabled')) { + _crossfilterEnabled = _apiMapResponse['crossfilter_enabled']; + _crossfilterEnabledSet = true; + } + return _crossfilterEnabled; + } + + set crossfilterEnabled(bool v) { + _crossfilterEnabled = v; + _crossfilterEnabledSet = true; + } + + /// Whether or not a dashboard is 'soft' deleted. + + bool get deleted { + if (!_deletedSet && _apiMapResponse.containsKey('deleted')) { + _deleted = _apiMapResponse['deleted']; + _deletedSet = true; + } + return _deleted; + } + + set deleted(bool v) { + _deleted = v; + _deletedSet = true; + } + + /// Sets the default state of the filters bar to collapsed or open + + bool get filtersBarCollapsed { + if (!_filtersBarCollapsedSet && + _apiMapResponse.containsKey('filters_bar_collapsed')) { + _filtersBarCollapsed = _apiMapResponse['filters_bar_collapsed']; + _filtersBarCollapsedSet = true; + } + return _filtersBarCollapsed; + } + + set filtersBarCollapsed(bool v) { + _filtersBarCollapsed = v; + _filtersBarCollapsedSet = true; + } + + /// configuration option that governs how dashboard loading will happen. + + String get loadConfiguration { + if (!_loadConfigurationSet && + _apiMapResponse.containsKey('load_configuration')) { + _loadConfiguration = _apiMapResponse['load_configuration'] == null + ? null + : _apiMapResponse['load_configuration'].toString(); + _loadConfigurationSet = true; + } + return _loadConfiguration; + } + + set loadConfiguration(String v) { + _loadConfiguration = v; + _loadConfigurationSet = true; + } + + /// Links this dashboard to a particular LookML dashboard such that calling a **sync** operation on that LookML dashboard will update this dashboard to match. + + String get lookmlLinkId { + if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { + _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null + ? null + : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkIdSet = true; + } + return _lookmlLinkId; + } + + set lookmlLinkId(String v) { + _lookmlLinkId = v; + _lookmlLinkIdSet = true; + } + + /// Show filters bar. **Security Note:** This property only affects the *cosmetic* appearance of the dashboard, not a user's ability to access data. Hiding the filters bar does **NOT** prevent users from changing filters by other means. For information on how to set up secure data access control policies, see [Control User Access to Data](https://looker.com/docs/r/api/control-access) + + bool get showFiltersBar { + if (!_showFiltersBarSet && + _apiMapResponse.containsKey('show_filters_bar')) { + _showFiltersBar = _apiMapResponse['show_filters_bar']; + _showFiltersBarSet = true; + } + return _showFiltersBar; + } + + set showFiltersBar(bool v) { + _showFiltersBar = v; + _showFiltersBarSet = true; + } + + /// Show title + + bool get showTitle { + if (!_showTitleSet && _apiMapResponse.containsKey('show_title')) { + _showTitle = _apiMapResponse['show_title']; + _showTitleSet = true; + } + return _showTitle; + } + + set showTitle(bool v) { + _showTitle = v; + _showTitleSet = true; + } + + /// Id of folder + + String get folderId { + if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { + _folderId = _apiMapResponse['folder_id'] == null + ? null + : _apiMapResponse['folder_id'].toString(); + _folderIdSet = true; + } + return _folderId; + } + + set folderId(String v) { + _folderId = v; + _folderIdSet = true; + } + + /// Color of text on text tiles + + String get textTileTextColor { + if (!_textTileTextColorSet && + _apiMapResponse.containsKey('text_tile_text_color')) { + _textTileTextColor = _apiMapResponse['text_tile_text_color'] == null + ? null + : _apiMapResponse['text_tile_text_color'].toString(); + _textTileTextColorSet = true; + } + return _textTileTextColor; + } + + set textTileTextColor(String v) { + _textTileTextColor = v; + _textTileTextColorSet = true; + } + + /// Tile background color + + String get tileBackgroundColor { + if (!_tileBackgroundColorSet && + _apiMapResponse.containsKey('tile_background_color')) { + _tileBackgroundColor = _apiMapResponse['tile_background_color'] == null + ? null + : _apiMapResponse['tile_background_color'].toString(); + _tileBackgroundColorSet = true; + } + return _tileBackgroundColor; + } + + set tileBackgroundColor(String v) { + _tileBackgroundColor = v; + _tileBackgroundColorSet = true; + } + + /// Tile text color + + String get tileTextColor { + if (!_tileTextColorSet && _apiMapResponse.containsKey('tile_text_color')) { + _tileTextColor = _apiMapResponse['tile_text_color'] == null + ? null + : _apiMapResponse['tile_text_color'].toString(); + _tileTextColorSet = true; + } + return _tileTextColor; + } + + set tileTextColor(String v) { + _tileTextColor = v; + _tileTextColorSet = true; + } + + /// Title color + + String get titleColor { + if (!_titleColorSet && _apiMapResponse.containsKey('title_color')) { + _titleColor = _apiMapResponse['title_color'] == null + ? null + : _apiMapResponse['title_color'].toString(); + _titleColorSet = true; + } + return _titleColor; + } + + set titleColor(String v) { + _titleColor = v; + _titleColorSet = true; + } + + DashboardAppearance get appearance { + if (!_appearanceSet && _apiMapResponse.containsKey('appearance')) { + _appearance = _apiMapResponse['appearance'] == null + ? null + : DashboardAppearance.fromResponse( + _apiMapResponse['appearance'], apiResponseContentType); + _appearanceSet = true; + } + return _appearance; + } + + set appearance(DashboardAppearance v) { + _appearance = v; + _appearanceSet = true; + } + + WriteDashboard() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteDashboard.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_hiddenSet || _apiMapResponse.containsKey('hidden')) { + json['hidden'] = hidden; + } + if (_queryTimezoneSet || _apiMapResponse.containsKey('query_timezone')) { + json['query_timezone'] = queryTimezone; + } + if (_refreshIntervalSet || + _apiMapResponse.containsKey('refresh_interval')) { + json['refresh_interval'] = refreshInterval; + } + if (_folderSet || _apiMapResponse.containsKey('folder')) { + json['folder'] = folder == null ? null : folder.toJson(); + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_slugSet || _apiMapResponse.containsKey('slug')) { + json['slug'] = slug; + } + if (_preferredViewerSet || + _apiMapResponse.containsKey('preferred_viewer')) { + json['preferred_viewer'] = preferredViewer; + } + if (_alertSyncWithDashboardFilterEnabledSet || + _apiMapResponse + .containsKey('alert_sync_with_dashboard_filter_enabled')) { + json['alert_sync_with_dashboard_filter_enabled'] = + alertSyncWithDashboardFilterEnabled; + } + if (_backgroundColorSet || + _apiMapResponse.containsKey('background_color')) { + json['background_color'] = backgroundColor; + } + if (_crossfilterEnabledSet || + _apiMapResponse.containsKey('crossfilter_enabled')) { + json['crossfilter_enabled'] = crossfilterEnabled; + } + if (_deletedSet || _apiMapResponse.containsKey('deleted')) { + json['deleted'] = deleted; + } + if (_filtersBarCollapsedSet || + _apiMapResponse.containsKey('filters_bar_collapsed')) { + json['filters_bar_collapsed'] = filtersBarCollapsed; + } + if (_loadConfigurationSet || + _apiMapResponse.containsKey('load_configuration')) { + json['load_configuration'] = loadConfiguration; + } + if (_lookmlLinkIdSet || _apiMapResponse.containsKey('lookml_link_id')) { + json['lookml_link_id'] = lookmlLinkId; + } + if (_showFiltersBarSet || _apiMapResponse.containsKey('show_filters_bar')) { + json['show_filters_bar'] = showFiltersBar; + } + if (_showTitleSet || _apiMapResponse.containsKey('show_title')) { + json['show_title'] = showTitle; + } + if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { + json['folder_id'] = folderId; + } + if (_textTileTextColorSet || + _apiMapResponse.containsKey('text_tile_text_color')) { + json['text_tile_text_color'] = textTileTextColor; + } + if (_tileBackgroundColorSet || + _apiMapResponse.containsKey('tile_background_color')) { + json['tile_background_color'] = tileBackgroundColor; + } + if (_tileTextColorSet || _apiMapResponse.containsKey('tile_text_color')) { + json['tile_text_color'] = tileTextColor; + } + if (_titleColorSet || _apiMapResponse.containsKey('title_color')) { + json['title_color'] = titleColor; + } + if (_appearanceSet || _apiMapResponse.containsKey('appearance')) { + json['appearance'] = appearance == null ? null : appearance.toJson(); + } + return json; + } +} + +/// Dynamic writeable type for DashboardBase removes: +/// can, content_favorite_id, content_metadata_id, description, hidden, id, model, query_timezone, readonly, refresh_interval, refresh_interval_to_i, title, user_id, slug, preferred_viewer +class WriteDashboardBase { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + WriteFolderBase _folder; + bool _folderSet = false; + + /// Dynamic writeable type for FolderBase removes: + /// id, content_metadata_id, created_at, creator_id, child_count, external_id, is_embed, is_embed_shared_root, is_embed_users_root, is_personal, is_personal_descendant, is_shared_root, is_users_root, can + + WriteFolderBase get folder { + if (!_folderSet && _apiMapResponse.containsKey('folder')) { + _folder = _apiMapResponse['folder'] == null + ? null + : WriteFolderBase.fromResponse( + _apiMapResponse['folder'], apiResponseContentType); + _folderSet = true; + } + return _folder; + } + + set folder(WriteFolderBase v) { + _folder = v; + _folderSet = true; + } + + WriteDashboardBase() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteDashboardBase.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_folderSet || _apiMapResponse.containsKey('folder')) { + json['folder'] = folder == null ? null : folder.toJson(); + } + return json; + } +} + +/// Dynamic writeable type for DashboardElement removes: +/// can, body_text_as_html, edit_uri, id, lookml_link_id, note_text_as_html, refresh_interval_to_i, alert_count, title_text_as_html, subtitle_text_as_html +class WriteDashboardElement { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _bodyText; + bool _bodyTextSet = false; + + String _dashboardId; + bool _dashboardIdSet = false; + + WriteLookWithQuery _look; + bool _lookSet = false; + + String _lookId; + bool _lookIdSet = false; + + String _mergeResultId; + bool _mergeResultIdSet = false; + + String _noteDisplay; + bool _noteDisplaySet = false; + + String _noteState; + bool _noteStateSet = false; + + String _noteText; + bool _noteTextSet = false; + + WriteQuery _query; + bool _querySet = false; + + int _queryId; + bool _queryIdSet = false; + + String _refreshInterval; + bool _refreshIntervalSet = false; + + WriteResultMakerWithIdVisConfigAndDynamicFields _resultMaker; + bool _resultMakerSet = false; + + int _resultMakerId; + bool _resultMakerIdSet = false; + + String _subtitleText; + bool _subtitleTextSet = false; + + String _title; + bool _titleSet = false; + + bool _titleHidden; + bool _titleHiddenSet = false; + + String _titleText; + bool _titleTextSet = false; + + String _type; + bool _typeSet = false; + + /// Text tile body text + + String get bodyText { + if (!_bodyTextSet && _apiMapResponse.containsKey('body_text')) { + _bodyText = _apiMapResponse['body_text'] == null + ? null + : _apiMapResponse['body_text'].toString(); + _bodyTextSet = true; + } + return _bodyText; + } + + set bodyText(String v) { + _bodyText = v; + _bodyTextSet = true; + } + + /// Id of Dashboard + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Dynamic writeable type for LookWithQuery removes: + /// can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url + + WriteLookWithQuery get look { + if (!_lookSet && _apiMapResponse.containsKey('look')) { + _look = _apiMapResponse['look'] == null + ? null + : WriteLookWithQuery.fromResponse( + _apiMapResponse['look'], apiResponseContentType); + _lookSet = true; + } + return _look; + } + + set look(WriteLookWithQuery v) { + _look = v; + _lookSet = true; + } + + /// Id Of Look + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// ID of merge result + + String get mergeResultId { + if (!_mergeResultIdSet && _apiMapResponse.containsKey('merge_result_id')) { + _mergeResultId = _apiMapResponse['merge_result_id'] == null + ? null + : _apiMapResponse['merge_result_id'].toString(); + _mergeResultIdSet = true; + } + return _mergeResultId; + } + + set mergeResultId(String v) { + _mergeResultId = v; + _mergeResultIdSet = true; + } + + /// Note Display + + String get noteDisplay { + if (!_noteDisplaySet && _apiMapResponse.containsKey('note_display')) { + _noteDisplay = _apiMapResponse['note_display'] == null + ? null + : _apiMapResponse['note_display'].toString(); + _noteDisplaySet = true; + } + return _noteDisplay; + } + + set noteDisplay(String v) { + _noteDisplay = v; + _noteDisplaySet = true; + } + + /// Note State + + String get noteState { + if (!_noteStateSet && _apiMapResponse.containsKey('note_state')) { + _noteState = _apiMapResponse['note_state'] == null + ? null + : _apiMapResponse['note_state'].toString(); + _noteStateSet = true; + } + return _noteState; + } + + set noteState(String v) { + _noteState = v; + _noteStateSet = true; + } + + /// Note Text + + String get noteText { + if (!_noteTextSet && _apiMapResponse.containsKey('note_text')) { + _noteText = _apiMapResponse['note_text'] == null + ? null + : _apiMapResponse['note_text'].toString(); + _noteTextSet = true; + } + return _noteText; + } + + set noteText(String v) { + _noteText = v; + _noteTextSet = true; + } + + /// Dynamic writeable type for Query removes: + /// can, id, slug, share_url, expanded_share_url, url, has_table_calculations + + WriteQuery get query { + if (!_querySet && _apiMapResponse.containsKey('query')) { + _query = _apiMapResponse['query'] == null + ? null + : WriteQuery.fromResponse( + _apiMapResponse['query'], apiResponseContentType); + _querySet = true; + } + return _query; + } + + set query(WriteQuery v) { + _query = v; + _querySet = true; + } + + /// Id Of Query + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// Refresh Interval + + String get refreshInterval { + if (!_refreshIntervalSet && + _apiMapResponse.containsKey('refresh_interval')) { + _refreshInterval = _apiMapResponse['refresh_interval'] == null + ? null + : _apiMapResponse['refresh_interval'].toString(); + _refreshIntervalSet = true; + } + return _refreshInterval; + } + + set refreshInterval(String v) { + _refreshInterval = v; + _refreshIntervalSet = true; + } + + /// Dynamic writeable type for ResultMakerWithIdVisConfigAndDynamicFields removes: + /// id, dynamic_fields, filterables, sorts, merge_result_id, total, query_id, sql_query_id, vis_config + + WriteResultMakerWithIdVisConfigAndDynamicFields get resultMaker { + if (!_resultMakerSet && _apiMapResponse.containsKey('result_maker')) { + _resultMaker = _apiMapResponse['result_maker'] == null + ? null + : WriteResultMakerWithIdVisConfigAndDynamicFields.fromResponse( + _apiMapResponse['result_maker'], apiResponseContentType); + _resultMakerSet = true; + } + return _resultMaker; + } + + set resultMaker(WriteResultMakerWithIdVisConfigAndDynamicFields v) { + _resultMaker = v; + _resultMakerSet = true; + } + + /// ID of the ResultMakerLookup entry. + + int get resultMakerId { + if (!_resultMakerIdSet && _apiMapResponse.containsKey('result_maker_id')) { + _resultMakerId = _apiMapResponse['result_maker_id']; + _resultMakerIdSet = true; + } + return _resultMakerId; + } + + set resultMakerId(int v) { + _resultMakerId = v; + _resultMakerIdSet = true; + } + + /// Text tile subtitle text + + String get subtitleText { + if (!_subtitleTextSet && _apiMapResponse.containsKey('subtitle_text')) { + _subtitleText = _apiMapResponse['subtitle_text'] == null + ? null + : _apiMapResponse['subtitle_text'].toString(); + _subtitleTextSet = true; + } + return _subtitleText; + } + + set subtitleText(String v) { + _subtitleText = v; + _subtitleTextSet = true; + } + + /// Title of dashboard element + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Whether title is hidden + + bool get titleHidden { + if (!_titleHiddenSet && _apiMapResponse.containsKey('title_hidden')) { + _titleHidden = _apiMapResponse['title_hidden']; + _titleHiddenSet = true; + } + return _titleHidden; + } + + set titleHidden(bool v) { + _titleHidden = v; + _titleHiddenSet = true; + } + + /// Text tile title + + String get titleText { + if (!_titleTextSet && _apiMapResponse.containsKey('title_text')) { + _titleText = _apiMapResponse['title_text'] == null + ? null + : _apiMapResponse['title_text'].toString(); + _titleTextSet = true; + } + return _titleText; + } + + set titleText(String v) { + _titleText = v; + _titleTextSet = true; + } + + /// Type + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + WriteDashboardElement() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteDashboardElement.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_bodyTextSet || _apiMapResponse.containsKey('body_text')) { + json['body_text'] = bodyText; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_lookSet || _apiMapResponse.containsKey('look')) { + json['look'] = look == null ? null : look.toJson(); + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_mergeResultIdSet || _apiMapResponse.containsKey('merge_result_id')) { + json['merge_result_id'] = mergeResultId; + } + if (_noteDisplaySet || _apiMapResponse.containsKey('note_display')) { + json['note_display'] = noteDisplay; + } + if (_noteStateSet || _apiMapResponse.containsKey('note_state')) { + json['note_state'] = noteState; + } + if (_noteTextSet || _apiMapResponse.containsKey('note_text')) { + json['note_text'] = noteText; + } + if (_querySet || _apiMapResponse.containsKey('query')) { + json['query'] = query == null ? null : query.toJson(); + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_refreshIntervalSet || + _apiMapResponse.containsKey('refresh_interval')) { + json['refresh_interval'] = refreshInterval; + } + if (_resultMakerSet || _apiMapResponse.containsKey('result_maker')) { + json['result_maker'] = resultMaker == null ? null : resultMaker.toJson(); + } + if (_resultMakerIdSet || _apiMapResponse.containsKey('result_maker_id')) { + json['result_maker_id'] = resultMakerId; + } + if (_subtitleTextSet || _apiMapResponse.containsKey('subtitle_text')) { + json['subtitle_text'] = subtitleText; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_titleHiddenSet || _apiMapResponse.containsKey('title_hidden')) { + json['title_hidden'] = titleHidden; + } + if (_titleTextSet || _apiMapResponse.containsKey('title_text')) { + json['title_text'] = titleText; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + return json; + } +} + +/// Dynamic writeable type for DashboardFilter removes: +/// can, id, dashboard_id, field +class WriteDashboardFilter { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _title; + bool _titleSet = false; + + String _type; + bool _typeSet = false; + + String _defaultValue; + bool _defaultValueSet = false; + + String _model; + bool _modelSet = false; + + String _explore; + bool _exploreSet = false; + + String _dimension; + bool _dimensionSet = false; + + int _row; + bool _rowSet = false; + + List _listensToFilters; + bool _listensToFiltersSet = false; + + bool _allowMultipleValues; + bool _allowMultipleValuesSet = false; + + bool _required; + bool _requiredSet = false; + + Map _uiConfig; + bool _uiConfigSet = false; + + /// Name of filter + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Title of filter + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// Type of filter: one of date, number, string, or field + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Default value of filter + + String get defaultValue { + if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { + _defaultValue = _apiMapResponse['default_value'] == null + ? null + : _apiMapResponse['default_value'].toString(); + _defaultValueSet = true; + } + return _defaultValue; + } + + set defaultValue(String v) { + _defaultValue = v; + _defaultValueSet = true; + } + + /// Model of filter (required if type = field) + + String get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : _apiMapResponse['model'].toString(); + _modelSet = true; + } + return _model; + } + + set model(String v) { + _model = v; + _modelSet = true; + } + + /// Explore of filter (required if type = field) + + String get explore { + if (!_exploreSet && _apiMapResponse.containsKey('explore')) { + _explore = _apiMapResponse['explore'] == null + ? null + : _apiMapResponse['explore'].toString(); + _exploreSet = true; + } + return _explore; + } + + set explore(String v) { + _explore = v; + _exploreSet = true; + } + + /// Dimension of filter (required if type = field) + + String get dimension { + if (!_dimensionSet && _apiMapResponse.containsKey('dimension')) { + _dimension = _apiMapResponse['dimension'] == null + ? null + : _apiMapResponse['dimension'].toString(); + _dimensionSet = true; + } + return _dimension; + } + + set dimension(String v) { + _dimension = v; + _dimensionSet = true; + } + + /// Display order of this filter relative to other filters + + int get row { + if (!_rowSet && _apiMapResponse.containsKey('row')) { + _row = _apiMapResponse['row']; + _rowSet = true; + } + return _row; + } + + set row(int v) { + _row = v; + _rowSet = true; + } + + /// Array of listeners for faceted filters + + List get listensToFilters { + if (!_listensToFiltersSet && + _apiMapResponse.containsKey('listens_to_filters')) { + _listensToFilters = _apiMapResponse['listens_to_filters'] == null + ? null + : _apiMapResponse['listens_to_filters'] + .map((i) => i as String) + .toList(); + _listensToFiltersSet = true; + } + return _listensToFilters; + } + + set listensToFilters(List v) { + _listensToFilters = v; + _listensToFiltersSet = true; + } + + /// Whether the filter allows multiple filter values (deprecated in the latest version of dashboards) + + bool get allowMultipleValues { + if (!_allowMultipleValuesSet && + _apiMapResponse.containsKey('allow_multiple_values')) { + _allowMultipleValues = _apiMapResponse['allow_multiple_values']; + _allowMultipleValuesSet = true; + } + return _allowMultipleValues; + } + + set allowMultipleValues(bool v) { + _allowMultipleValues = v; + _allowMultipleValuesSet = true; + } + + /// Whether the filter requires a value to run the dashboard + + bool get required { + if (!_requiredSet && _apiMapResponse.containsKey('required')) { + _required = _apiMapResponse['required']; + _requiredSet = true; + } + return _required; + } + + set required(bool v) { + _required = v; + _requiredSet = true; + } + + /// The visual configuration for this filter. Used to set up how the UI for this filter should appear. + + Map get uiConfig { + if (!_uiConfigSet && _apiMapResponse.containsKey('ui_config')) { + _uiConfig = _apiMapResponse['ui_config']; + _uiConfigSet = true; + } + return _uiConfig; + } + + set uiConfig(Map v) { + _uiConfig = v; + _uiConfigSet = true; + } + + WriteDashboardFilter() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteDashboardFilter.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_defaultValueSet || _apiMapResponse.containsKey('default_value')) { + json['default_value'] = defaultValue; + } + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model; + } + if (_exploreSet || _apiMapResponse.containsKey('explore')) { + json['explore'] = explore; + } + if (_dimensionSet || _apiMapResponse.containsKey('dimension')) { + json['dimension'] = dimension; + } + if (_rowSet || _apiMapResponse.containsKey('row')) { + json['row'] = row; + } + if (_listensToFiltersSet || + _apiMapResponse.containsKey('listens_to_filters')) { + json['listens_to_filters'] = listensToFilters; + } + if (_allowMultipleValuesSet || + _apiMapResponse.containsKey('allow_multiple_values')) { + json['allow_multiple_values'] = allowMultipleValues; + } + if (_requiredSet || _apiMapResponse.containsKey('required')) { + json['required'] = required; + } + if (_uiConfigSet || _apiMapResponse.containsKey('ui_config')) { + json['ui_config'] = uiConfig; + } + return json; + } +} + +/// Dynamic writeable type for DashboardLayout removes: +/// can, id, deleted, dashboard_title, dashboard_layout_components +class WriteDashboardLayout { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _dashboardId; + bool _dashboardIdSet = false; + + String _type; + bool _typeSet = false; + + bool _active; + bool _activeSet = false; + + int _columnWidth; + bool _columnWidthSet = false; + + int _width; + bool _widthSet = false; + + /// Id of Dashboard + + String get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id'] == null + ? null + : _apiMapResponse['dashboard_id'].toString(); + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(String v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Type + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Is Active + + bool get active { + if (!_activeSet && _apiMapResponse.containsKey('active')) { + _active = _apiMapResponse['active']; + _activeSet = true; + } + return _active; + } + + set active(bool v) { + _active = v; + _activeSet = true; + } + + /// Column Width + + int get columnWidth { + if (!_columnWidthSet && _apiMapResponse.containsKey('column_width')) { + _columnWidth = _apiMapResponse['column_width']; + _columnWidthSet = true; + } + return _columnWidth; + } + + set columnWidth(int v) { + _columnWidth = v; + _columnWidthSet = true; + } + + /// Width + + int get width { + if (!_widthSet && _apiMapResponse.containsKey('width')) { + _width = _apiMapResponse['width']; + _widthSet = true; + } + return _width; + } + + set width(int v) { + _width = v; + _widthSet = true; + } + + WriteDashboardLayout() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteDashboardLayout.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_activeSet || _apiMapResponse.containsKey('active')) { + json['active'] = active; + } + if (_columnWidthSet || _apiMapResponse.containsKey('column_width')) { + json['column_width'] = columnWidth; + } + if (_widthSet || _apiMapResponse.containsKey('width')) { + json['width'] = width; + } + return json; + } +} + +/// Dynamic writeable type for DashboardLayoutComponent removes: +/// can, id, deleted, element_title, element_title_hidden, vis_type +class WriteDashboardLayoutComponent { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _dashboardLayoutId; + bool _dashboardLayoutIdSet = false; + + String _dashboardElementId; + bool _dashboardElementIdSet = false; + + int _row; + bool _rowSet = false; + + int _column; + bool _columnSet = false; + + int _width; + bool _widthSet = false; + + int _height; + bool _heightSet = false; + + /// Id of Dashboard Layout + + String get dashboardLayoutId { + if (!_dashboardLayoutIdSet && + _apiMapResponse.containsKey('dashboard_layout_id')) { + _dashboardLayoutId = _apiMapResponse['dashboard_layout_id'] == null + ? null + : _apiMapResponse['dashboard_layout_id'].toString(); + _dashboardLayoutIdSet = true; + } + return _dashboardLayoutId; + } + + set dashboardLayoutId(String v) { + _dashboardLayoutId = v; + _dashboardLayoutIdSet = true; + } + + /// Id Of Dashboard Element + + String get dashboardElementId { + if (!_dashboardElementIdSet && + _apiMapResponse.containsKey('dashboard_element_id')) { + _dashboardElementId = _apiMapResponse['dashboard_element_id'] == null + ? null + : _apiMapResponse['dashboard_element_id'].toString(); + _dashboardElementIdSet = true; + } + return _dashboardElementId; + } + + set dashboardElementId(String v) { + _dashboardElementId = v; + _dashboardElementIdSet = true; + } + + /// Row + + int get row { + if (!_rowSet && _apiMapResponse.containsKey('row')) { + _row = _apiMapResponse['row']; + _rowSet = true; + } + return _row; + } + + set row(int v) { + _row = v; + _rowSet = true; + } + + /// Column + + int get column { + if (!_columnSet && _apiMapResponse.containsKey('column')) { + _column = _apiMapResponse['column']; + _columnSet = true; + } + return _column; + } + + set column(int v) { + _column = v; + _columnSet = true; + } + + /// Width + + int get width { + if (!_widthSet && _apiMapResponse.containsKey('width')) { + _width = _apiMapResponse['width']; + _widthSet = true; + } + return _width; + } + + set width(int v) { + _width = v; + _widthSet = true; + } + + /// Height + + int get height { + if (!_heightSet && _apiMapResponse.containsKey('height')) { + _height = _apiMapResponse['height']; + _heightSet = true; + } + return _height; + } + + set height(int v) { + _height = v; + _heightSet = true; + } + + WriteDashboardLayoutComponent() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteDashboardLayoutComponent.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_dashboardLayoutIdSet || + _apiMapResponse.containsKey('dashboard_layout_id')) { + json['dashboard_layout_id'] = dashboardLayoutId; + } + if (_dashboardElementIdSet || + _apiMapResponse.containsKey('dashboard_element_id')) { + json['dashboard_element_id'] = dashboardElementId; + } + if (_rowSet || _apiMapResponse.containsKey('row')) { + json['row'] = row; + } + if (_columnSet || _apiMapResponse.containsKey('column')) { + json['column'] = column; + } + if (_widthSet || _apiMapResponse.containsKey('width')) { + json['width'] = width; + } + if (_heightSet || _apiMapResponse.containsKey('height')) { + json['height'] = height; + } + return json; + } +} + +/// Dynamic writeable type for Datagroup removes: +/// can, created_at, id, model_name, name, trigger_check_at, trigger_error, trigger_value +class WriteDatagroup { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _staleBefore; + bool _staleBeforeSet = false; + + int _triggeredAt; + bool _triggeredAtSet = false; + + /// UNIX timestamp before which cache entries are considered stale. Cannot be in the future. + + int get staleBefore { + if (!_staleBeforeSet && _apiMapResponse.containsKey('stale_before')) { + _staleBefore = _apiMapResponse['stale_before']; + _staleBeforeSet = true; + } + return _staleBefore; + } + + set staleBefore(int v) { + _staleBefore = v; + _staleBeforeSet = true; + } + + /// UNIX timestamp at which this entry became triggered. Cannot be in the future. + + int get triggeredAt { + if (!_triggeredAtSet && _apiMapResponse.containsKey('triggered_at')) { + _triggeredAt = _apiMapResponse['triggered_at']; + _triggeredAtSet = true; + } + return _triggeredAt; + } + + set triggeredAt(int v) { + _triggeredAt = v; + _triggeredAtSet = true; + } + + WriteDatagroup() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteDatagroup.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_staleBeforeSet || _apiMapResponse.containsKey('stale_before')) { + json['stale_before'] = staleBefore; + } + if (_triggeredAtSet || _apiMapResponse.containsKey('triggered_at')) { + json['triggered_at'] = triggeredAt; + } + return json; + } +} + +/// Dynamic writeable type for DBConnection removes: +/// can, dialect, snippets, pdts_enabled, uses_oauth, created_at, user_id, example, last_regen_at, last_reap_at, managed +class WriteDBConnection { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _host; + bool _hostSet = false; + + String _port; + bool _portSet = false; + + String _username; + bool _usernameSet = false; + + String _password; + bool _passwordSet = false; + + String _certificate; + bool _certificateSet = false; + + String _fileType; + bool _fileTypeSet = false; + + String _database; + bool _databaseSet = false; + + String _dbTimezone; + bool _dbTimezoneSet = false; + + String _queryTimezone; + bool _queryTimezoneSet = false; + + String _schema; + bool _schemaSet = false; + + int _maxConnections; + bool _maxConnectionsSet = false; + + String _maxBillingGigabytes; + bool _maxBillingGigabytesSet = false; + + bool _ssl; + bool _sslSet = false; + + bool _verifySsl; + bool _verifySslSet = false; + + String _tmpDbName; + bool _tmpDbNameSet = false; + + String _jdbcAdditionalParams; + bool _jdbcAdditionalParamsSet = false; + + int _poolTimeout; + bool _poolTimeoutSet = false; + + String _dialectName; + bool _dialectNameSet = false; + + bool _userDbCredentials; + bool _userDbCredentialsSet = false; + + List _userAttributeFields; + bool _userAttributeFieldsSet = false; + + String _maintenanceCron; + bool _maintenanceCronSet = false; + + bool _sqlRunnerPrecacheTables; + bool _sqlRunnerPrecacheTablesSet = false; + + bool _sqlWritingWithInfoSchema; + bool _sqlWritingWithInfoSchemaSet = false; + + String _afterConnectStatements; + bool _afterConnectStatementsSet = false; + + WriteDBConnectionOverride _pdtContextOverride; + bool _pdtContextOverrideSet = false; + + String _tunnelId; + bool _tunnelIdSet = false; + + int _pdtConcurrency; + bool _pdtConcurrencySet = false; + + bool _disableContextComment; + bool _disableContextCommentSet = false; + + int _oauthApplicationId; + bool _oauthApplicationIdSet = false; + + bool _alwaysRetryFailedBuilds; + bool _alwaysRetryFailedBuildsSet = false; + + /// Name of the connection. Also used as the unique identifier + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Host name/address of server + + String get host { + if (!_hostSet && _apiMapResponse.containsKey('host')) { + _host = _apiMapResponse['host'] == null + ? null + : _apiMapResponse['host'].toString(); + _hostSet = true; + } + return _host; + } + + set host(String v) { + _host = v; + _hostSet = true; + } + + /// Port number on server + + String get port { + if (!_portSet && _apiMapResponse.containsKey('port')) { + _port = _apiMapResponse['port'] == null + ? null + : _apiMapResponse['port'].toString(); + _portSet = true; + } + return _port; + } + + set port(String v) { + _port = v; + _portSet = true; + } + + /// Username for server authentication + + String get username { + if (!_usernameSet && _apiMapResponse.containsKey('username')) { + _username = _apiMapResponse['username'] == null + ? null + : _apiMapResponse['username'].toString(); + _usernameSet = true; + } + return _username; + } + + set username(String v) { + _username = v; + _usernameSet = true; + } + + /// (Write-Only) Password for server authentication + + String get password { + if (!_passwordSet && _apiMapResponse.containsKey('password')) { + _password = _apiMapResponse['password'] == null + ? null + : _apiMapResponse['password'].toString(); + _passwordSet = true; + } + return _password; + } + + set password(String v) { + _password = v; + _passwordSet = true; + } + + /// (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). + + String get certificate { + if (!_certificateSet && _apiMapResponse.containsKey('certificate')) { + _certificate = _apiMapResponse['certificate'] == null + ? null + : _apiMapResponse['certificate'].toString(); + _certificateSet = true; + } + return _certificate; + } + + set certificate(String v) { + _certificate = v; + _certificateSet = true; + } + + /// (Write-Only) Certificate keyfile type - .json or .p12 + + String get fileType { + if (!_fileTypeSet && _apiMapResponse.containsKey('file_type')) { + _fileType = _apiMapResponse['file_type'] == null + ? null + : _apiMapResponse['file_type'].toString(); + _fileTypeSet = true; + } + return _fileType; + } + + set fileType(String v) { + _fileType = v; + _fileTypeSet = true; + } + + /// Database name + + String get database { + if (!_databaseSet && _apiMapResponse.containsKey('database')) { + _database = _apiMapResponse['database'] == null + ? null + : _apiMapResponse['database'].toString(); + _databaseSet = true; + } + return _database; + } + + set database(String v) { + _database = v; + _databaseSet = true; + } + + /// Time zone of database + + String get dbTimezone { + if (!_dbTimezoneSet && _apiMapResponse.containsKey('db_timezone')) { + _dbTimezone = _apiMapResponse['db_timezone'] == null + ? null + : _apiMapResponse['db_timezone'].toString(); + _dbTimezoneSet = true; + } + return _dbTimezone; + } + + set dbTimezone(String v) { + _dbTimezone = v; + _dbTimezoneSet = true; + } + + /// Timezone to use in queries + + String get queryTimezone { + if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { + _queryTimezone = _apiMapResponse['query_timezone'] == null + ? null + : _apiMapResponse['query_timezone'].toString(); + _queryTimezoneSet = true; + } + return _queryTimezone; + } + + set queryTimezone(String v) { + _queryTimezone = v; + _queryTimezoneSet = true; + } + + /// Scheme name + + String get schema { + if (!_schemaSet && _apiMapResponse.containsKey('schema')) { + _schema = _apiMapResponse['schema'] == null + ? null + : _apiMapResponse['schema'].toString(); + _schemaSet = true; + } + return _schema; + } + + set schema(String v) { + _schema = v; + _schemaSet = true; + } + + /// Maximum number of concurrent connection to use + + int get maxConnections { + if (!_maxConnectionsSet && _apiMapResponse.containsKey('max_connections')) { + _maxConnections = _apiMapResponse['max_connections']; + _maxConnectionsSet = true; + } + return _maxConnections; + } + + set maxConnections(int v) { + _maxConnections = v; + _maxConnectionsSet = true; + } + + /// Maximum size of query in GBs (BigQuery only, can be a user_attribute name) + + String get maxBillingGigabytes { + if (!_maxBillingGigabytesSet && + _apiMapResponse.containsKey('max_billing_gigabytes')) { + _maxBillingGigabytes = _apiMapResponse['max_billing_gigabytes'] == null + ? null + : _apiMapResponse['max_billing_gigabytes'].toString(); + _maxBillingGigabytesSet = true; + } + return _maxBillingGigabytes; + } + + set maxBillingGigabytes(String v) { + _maxBillingGigabytes = v; + _maxBillingGigabytesSet = true; + } + + /// Use SSL/TLS when connecting to server + + bool get ssl { + if (!_sslSet && _apiMapResponse.containsKey('ssl')) { + _ssl = _apiMapResponse['ssl']; + _sslSet = true; + } + return _ssl; + } + + set ssl(bool v) { + _ssl = v; + _sslSet = true; + } + + /// Verify the SSL + + bool get verifySsl { + if (!_verifySslSet && _apiMapResponse.containsKey('verify_ssl')) { + _verifySsl = _apiMapResponse['verify_ssl']; + _verifySslSet = true; + } + return _verifySsl; + } + + set verifySsl(bool v) { + _verifySsl = v; + _verifySslSet = true; + } + + /// Name of temporary database (if used) + + String get tmpDbName { + if (!_tmpDbNameSet && _apiMapResponse.containsKey('tmp_db_name')) { + _tmpDbName = _apiMapResponse['tmp_db_name'] == null + ? null + : _apiMapResponse['tmp_db_name'].toString(); + _tmpDbNameSet = true; + } + return _tmpDbName; + } + + set tmpDbName(String v) { + _tmpDbName = v; + _tmpDbNameSet = true; + } + + /// Additional params to add to JDBC connection string + + String get jdbcAdditionalParams { + if (!_jdbcAdditionalParamsSet && + _apiMapResponse.containsKey('jdbc_additional_params')) { + _jdbcAdditionalParams = _apiMapResponse['jdbc_additional_params'] == null + ? null + : _apiMapResponse['jdbc_additional_params'].toString(); + _jdbcAdditionalParamsSet = true; + } + return _jdbcAdditionalParams; + } + + set jdbcAdditionalParams(String v) { + _jdbcAdditionalParams = v; + _jdbcAdditionalParamsSet = true; + } + + /// Connection Pool Timeout, in seconds + + int get poolTimeout { + if (!_poolTimeoutSet && _apiMapResponse.containsKey('pool_timeout')) { + _poolTimeout = _apiMapResponse['pool_timeout']; + _poolTimeoutSet = true; + } + return _poolTimeout; + } + + set poolTimeout(int v) { + _poolTimeout = v; + _poolTimeoutSet = true; + } + + /// (Read/Write) SQL Dialect name + + String get dialectName { + if (!_dialectNameSet && _apiMapResponse.containsKey('dialect_name')) { + _dialectName = _apiMapResponse['dialect_name'] == null + ? null + : _apiMapResponse['dialect_name'].toString(); + _dialectNameSet = true; + } + return _dialectName; + } + + set dialectName(String v) { + _dialectName = v; + _dialectNameSet = true; + } + + /// (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password + + bool get userDbCredentials { + if (!_userDbCredentialsSet && + _apiMapResponse.containsKey('user_db_credentials')) { + _userDbCredentials = _apiMapResponse['user_db_credentials']; + _userDbCredentialsSet = true; + } + return _userDbCredentials; + } + + set userDbCredentials(bool v) { + _userDbCredentials = v; + _userDbCredentialsSet = true; + } + + /// Fields whose values map to user attribute names + + List get userAttributeFields { + if (!_userAttributeFieldsSet && + _apiMapResponse.containsKey('user_attribute_fields')) { + _userAttributeFields = _apiMapResponse['user_attribute_fields'] == null + ? null + : _apiMapResponse['user_attribute_fields'] + .map((i) => i as String) + .toList(); + _userAttributeFieldsSet = true; + } + return _userAttributeFields; + } + + set userAttributeFields(List v) { + _userAttributeFields = v; + _userAttributeFieldsSet = true; + } + + /// Cron string specifying when maintenance such as PDT trigger checks and drops should be performed + + String get maintenanceCron { + if (!_maintenanceCronSet && + _apiMapResponse.containsKey('maintenance_cron')) { + _maintenanceCron = _apiMapResponse['maintenance_cron'] == null + ? null + : _apiMapResponse['maintenance_cron'].toString(); + _maintenanceCronSet = true; + } + return _maintenanceCron; + } + + set maintenanceCron(String v) { + _maintenanceCron = v; + _maintenanceCronSet = true; + } + + /// Precache tables in the SQL Runner + + bool get sqlRunnerPrecacheTables { + if (!_sqlRunnerPrecacheTablesSet && + _apiMapResponse.containsKey('sql_runner_precache_tables')) { + _sqlRunnerPrecacheTables = _apiMapResponse['sql_runner_precache_tables']; + _sqlRunnerPrecacheTablesSet = true; + } + return _sqlRunnerPrecacheTables; + } + + set sqlRunnerPrecacheTables(bool v) { + _sqlRunnerPrecacheTables = v; + _sqlRunnerPrecacheTablesSet = true; + } + + /// Fetch Information Schema For SQL Writing + + bool get sqlWritingWithInfoSchema { + if (!_sqlWritingWithInfoSchemaSet && + _apiMapResponse.containsKey('sql_writing_with_info_schema')) { + _sqlWritingWithInfoSchema = + _apiMapResponse['sql_writing_with_info_schema']; + _sqlWritingWithInfoSchemaSet = true; + } + return _sqlWritingWithInfoSchema; + } + + set sqlWritingWithInfoSchema(bool v) { + _sqlWritingWithInfoSchema = v; + _sqlWritingWithInfoSchemaSet = true; + } + + /// SQL statements (semicolon separated) to issue after connecting to the database. Requires `custom_after_connect_statements` license feature + + String get afterConnectStatements { + if (!_afterConnectStatementsSet && + _apiMapResponse.containsKey('after_connect_statements')) { + _afterConnectStatements = + _apiMapResponse['after_connect_statements'] == null + ? null + : _apiMapResponse['after_connect_statements'].toString(); + _afterConnectStatementsSet = true; + } + return _afterConnectStatements; + } + + set afterConnectStatements(String v) { + _afterConnectStatements = v; + _afterConnectStatementsSet = true; + } + + /// Dynamic writeable type for DBConnectionOverride removes: + /// has_password + + WriteDBConnectionOverride get pdtContextOverride { + if (!_pdtContextOverrideSet && + _apiMapResponse.containsKey('pdt_context_override')) { + _pdtContextOverride = _apiMapResponse['pdt_context_override'] == null + ? null + : WriteDBConnectionOverride.fromResponse( + _apiMapResponse['pdt_context_override'], apiResponseContentType); + _pdtContextOverrideSet = true; + } + return _pdtContextOverride; + } + + set pdtContextOverride(WriteDBConnectionOverride v) { + _pdtContextOverride = v; + _pdtContextOverrideSet = true; + } + + /// The Id of the ssh tunnel this connection uses + + String get tunnelId { + if (!_tunnelIdSet && _apiMapResponse.containsKey('tunnel_id')) { + _tunnelId = _apiMapResponse['tunnel_id'] == null + ? null + : _apiMapResponse['tunnel_id'].toString(); + _tunnelIdSet = true; + } + return _tunnelId; + } + + set tunnelId(String v) { + _tunnelId = v; + _tunnelIdSet = true; + } + + /// Maximum number of threads to use to build PDTs in parallel + + int get pdtConcurrency { + if (!_pdtConcurrencySet && _apiMapResponse.containsKey('pdt_concurrency')) { + _pdtConcurrency = _apiMapResponse['pdt_concurrency']; + _pdtConcurrencySet = true; + } + return _pdtConcurrency; + } + + set pdtConcurrency(int v) { + _pdtConcurrency = v; + _pdtConcurrencySet = true; + } + + /// When disable_context_comment is true comment will not be added to SQL + + bool get disableContextComment { + if (!_disableContextCommentSet && + _apiMapResponse.containsKey('disable_context_comment')) { + _disableContextComment = _apiMapResponse['disable_context_comment']; + _disableContextCommentSet = true; + } + return _disableContextComment; + } + + set disableContextComment(bool v) { + _disableContextComment = v; + _disableContextCommentSet = true; + } + + /// An External OAuth Application to use for authenticating to the database + + int get oauthApplicationId { + if (!_oauthApplicationIdSet && + _apiMapResponse.containsKey('oauth_application_id')) { + _oauthApplicationId = _apiMapResponse['oauth_application_id']; + _oauthApplicationIdSet = true; + } + return _oauthApplicationId; + } + + set oauthApplicationId(int v) { + _oauthApplicationId = v; + _oauthApplicationIdSet = true; + } + + /// When true, error PDTs will be retried every regenerator cycle + + bool get alwaysRetryFailedBuilds { + if (!_alwaysRetryFailedBuildsSet && + _apiMapResponse.containsKey('always_retry_failed_builds')) { + _alwaysRetryFailedBuilds = _apiMapResponse['always_retry_failed_builds']; + _alwaysRetryFailedBuildsSet = true; + } + return _alwaysRetryFailedBuilds; + } + + set alwaysRetryFailedBuilds(bool v) { + _alwaysRetryFailedBuilds = v; + _alwaysRetryFailedBuildsSet = true; + } + + WriteDBConnection() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteDBConnection.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_hostSet || _apiMapResponse.containsKey('host')) { + json['host'] = host; + } + if (_portSet || _apiMapResponse.containsKey('port')) { + json['port'] = port; + } + if (_usernameSet || _apiMapResponse.containsKey('username')) { + json['username'] = username; + } + if (_passwordSet || _apiMapResponse.containsKey('password')) { + json['password'] = password; + } + if (_certificateSet || _apiMapResponse.containsKey('certificate')) { + json['certificate'] = certificate; + } + if (_fileTypeSet || _apiMapResponse.containsKey('file_type')) { + json['file_type'] = fileType; + } + if (_databaseSet || _apiMapResponse.containsKey('database')) { + json['database'] = database; + } + if (_dbTimezoneSet || _apiMapResponse.containsKey('db_timezone')) { + json['db_timezone'] = dbTimezone; + } + if (_queryTimezoneSet || _apiMapResponse.containsKey('query_timezone')) { + json['query_timezone'] = queryTimezone; + } + if (_schemaSet || _apiMapResponse.containsKey('schema')) { + json['schema'] = schema; + } + if (_maxConnectionsSet || _apiMapResponse.containsKey('max_connections')) { + json['max_connections'] = maxConnections; + } + if (_maxBillingGigabytesSet || + _apiMapResponse.containsKey('max_billing_gigabytes')) { + json['max_billing_gigabytes'] = maxBillingGigabytes; + } + if (_sslSet || _apiMapResponse.containsKey('ssl')) { + json['ssl'] = ssl; + } + if (_verifySslSet || _apiMapResponse.containsKey('verify_ssl')) { + json['verify_ssl'] = verifySsl; + } + if (_tmpDbNameSet || _apiMapResponse.containsKey('tmp_db_name')) { + json['tmp_db_name'] = tmpDbName; + } + if (_jdbcAdditionalParamsSet || + _apiMapResponse.containsKey('jdbc_additional_params')) { + json['jdbc_additional_params'] = jdbcAdditionalParams; + } + if (_poolTimeoutSet || _apiMapResponse.containsKey('pool_timeout')) { + json['pool_timeout'] = poolTimeout; + } + if (_dialectNameSet || _apiMapResponse.containsKey('dialect_name')) { + json['dialect_name'] = dialectName; + } + if (_userDbCredentialsSet || + _apiMapResponse.containsKey('user_db_credentials')) { + json['user_db_credentials'] = userDbCredentials; + } + if (_userAttributeFieldsSet || + _apiMapResponse.containsKey('user_attribute_fields')) { + json['user_attribute_fields'] = userAttributeFields; + } + if (_maintenanceCronSet || + _apiMapResponse.containsKey('maintenance_cron')) { + json['maintenance_cron'] = maintenanceCron; + } + if (_sqlRunnerPrecacheTablesSet || + _apiMapResponse.containsKey('sql_runner_precache_tables')) { + json['sql_runner_precache_tables'] = sqlRunnerPrecacheTables; + } + if (_sqlWritingWithInfoSchemaSet || + _apiMapResponse.containsKey('sql_writing_with_info_schema')) { + json['sql_writing_with_info_schema'] = sqlWritingWithInfoSchema; + } + if (_afterConnectStatementsSet || + _apiMapResponse.containsKey('after_connect_statements')) { + json['after_connect_statements'] = afterConnectStatements; + } + if (_pdtContextOverrideSet || + _apiMapResponse.containsKey('pdt_context_override')) { + json['pdt_context_override'] = + pdtContextOverride == null ? null : pdtContextOverride.toJson(); + } + if (_tunnelIdSet || _apiMapResponse.containsKey('tunnel_id')) { + json['tunnel_id'] = tunnelId; + } + if (_pdtConcurrencySet || _apiMapResponse.containsKey('pdt_concurrency')) { + json['pdt_concurrency'] = pdtConcurrency; + } + if (_disableContextCommentSet || + _apiMapResponse.containsKey('disable_context_comment')) { + json['disable_context_comment'] = disableContextComment; + } + if (_oauthApplicationIdSet || + _apiMapResponse.containsKey('oauth_application_id')) { + json['oauth_application_id'] = oauthApplicationId; + } + if (_alwaysRetryFailedBuildsSet || + _apiMapResponse.containsKey('always_retry_failed_builds')) { + json['always_retry_failed_builds'] = alwaysRetryFailedBuilds; + } + return json; + } +} + +/// Dynamic writeable type for DBConnectionOverride removes: +/// has_password +class WriteDBConnectionOverride { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _context; + bool _contextSet = false; + + String _host; + bool _hostSet = false; + + String _port; + bool _portSet = false; + + String _username; + bool _usernameSet = false; + + String _password; + bool _passwordSet = false; + + String _certificate; + bool _certificateSet = false; + + String _fileType; + bool _fileTypeSet = false; + + String _database; + bool _databaseSet = false; + + String _schema; + bool _schemaSet = false; + + String _jdbcAdditionalParams; + bool _jdbcAdditionalParamsSet = false; + + String _afterConnectStatements; + bool _afterConnectStatementsSet = false; + + /// Context in which to override (`pdt` is the only allowed value) + + String get context { + if (!_contextSet && _apiMapResponse.containsKey('context')) { + _context = _apiMapResponse['context'] == null + ? null + : _apiMapResponse['context'].toString(); + _contextSet = true; + } + return _context; + } + + set context(String v) { + _context = v; + _contextSet = true; + } + + /// Host name/address of server + + String get host { + if (!_hostSet && _apiMapResponse.containsKey('host')) { + _host = _apiMapResponse['host'] == null + ? null + : _apiMapResponse['host'].toString(); + _hostSet = true; + } + return _host; + } + + set host(String v) { + _host = v; + _hostSet = true; + } + + /// Port number on server + + String get port { + if (!_portSet && _apiMapResponse.containsKey('port')) { + _port = _apiMapResponse['port'] == null + ? null + : _apiMapResponse['port'].toString(); + _portSet = true; + } + return _port; + } + + set port(String v) { + _port = v; + _portSet = true; + } + + /// Username for server authentication + + String get username { + if (!_usernameSet && _apiMapResponse.containsKey('username')) { + _username = _apiMapResponse['username'] == null + ? null + : _apiMapResponse['username'].toString(); + _usernameSet = true; + } + return _username; + } + + set username(String v) { + _username = v; + _usernameSet = true; + } + + /// (Write-Only) Password for server authentication + + String get password { + if (!_passwordSet && _apiMapResponse.containsKey('password')) { + _password = _apiMapResponse['password'] == null + ? null + : _apiMapResponse['password'].toString(); + _passwordSet = true; + } + return _password; + } + + set password(String v) { + _password = v; + _passwordSet = true; + } + + /// (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). + + String get certificate { + if (!_certificateSet && _apiMapResponse.containsKey('certificate')) { + _certificate = _apiMapResponse['certificate'] == null + ? null + : _apiMapResponse['certificate'].toString(); + _certificateSet = true; + } + return _certificate; + } + + set certificate(String v) { + _certificate = v; + _certificateSet = true; + } + + /// (Write-Only) Certificate keyfile type - .json or .p12 + + String get fileType { + if (!_fileTypeSet && _apiMapResponse.containsKey('file_type')) { + _fileType = _apiMapResponse['file_type'] == null + ? null + : _apiMapResponse['file_type'].toString(); + _fileTypeSet = true; + } + return _fileType; + } + + set fileType(String v) { + _fileType = v; + _fileTypeSet = true; + } + + /// Database name + + String get database { + if (!_databaseSet && _apiMapResponse.containsKey('database')) { + _database = _apiMapResponse['database'] == null + ? null + : _apiMapResponse['database'].toString(); + _databaseSet = true; + } + return _database; + } + + set database(String v) { + _database = v; + _databaseSet = true; + } + + /// Scheme name + + String get schema { + if (!_schemaSet && _apiMapResponse.containsKey('schema')) { + _schema = _apiMapResponse['schema'] == null + ? null + : _apiMapResponse['schema'].toString(); + _schemaSet = true; + } + return _schema; + } + + set schema(String v) { + _schema = v; + _schemaSet = true; + } + + /// Additional params to add to JDBC connection string + + String get jdbcAdditionalParams { + if (!_jdbcAdditionalParamsSet && + _apiMapResponse.containsKey('jdbc_additional_params')) { + _jdbcAdditionalParams = _apiMapResponse['jdbc_additional_params'] == null + ? null + : _apiMapResponse['jdbc_additional_params'].toString(); + _jdbcAdditionalParamsSet = true; + } + return _jdbcAdditionalParams; + } + + set jdbcAdditionalParams(String v) { + _jdbcAdditionalParams = v; + _jdbcAdditionalParamsSet = true; + } + + /// SQL statements (semicolon separated) to issue after connecting to the database. Requires `custom_after_connect_statements` license feature + + String get afterConnectStatements { + if (!_afterConnectStatementsSet && + _apiMapResponse.containsKey('after_connect_statements')) { + _afterConnectStatements = + _apiMapResponse['after_connect_statements'] == null + ? null + : _apiMapResponse['after_connect_statements'].toString(); + _afterConnectStatementsSet = true; + } + return _afterConnectStatements; + } + + set afterConnectStatements(String v) { + _afterConnectStatements = v; + _afterConnectStatementsSet = true; + } + + WriteDBConnectionOverride() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteDBConnectionOverride.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_contextSet || _apiMapResponse.containsKey('context')) { + json['context'] = context; + } + if (_hostSet || _apiMapResponse.containsKey('host')) { + json['host'] = host; + } + if (_portSet || _apiMapResponse.containsKey('port')) { + json['port'] = port; + } + if (_usernameSet || _apiMapResponse.containsKey('username')) { + json['username'] = username; + } + if (_passwordSet || _apiMapResponse.containsKey('password')) { + json['password'] = password; + } + if (_certificateSet || _apiMapResponse.containsKey('certificate')) { + json['certificate'] = certificate; + } + if (_fileTypeSet || _apiMapResponse.containsKey('file_type')) { + json['file_type'] = fileType; + } + if (_databaseSet || _apiMapResponse.containsKey('database')) { + json['database'] = database; + } + if (_schemaSet || _apiMapResponse.containsKey('schema')) { + json['schema'] = schema; + } + if (_jdbcAdditionalParamsSet || + _apiMapResponse.containsKey('jdbc_additional_params')) { + json['jdbc_additional_params'] = jdbcAdditionalParams; + } + if (_afterConnectStatementsSet || + _apiMapResponse.containsKey('after_connect_statements')) { + json['after_connect_statements'] = afterConnectStatements; + } + return json; + } +} + +/// Dynamic writeable type for EmbedSecret removes: +/// created_at, id, secret, user_id +class WriteEmbedSecret { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _algorithm; + bool _algorithmSet = false; + + bool _enabled; + bool _enabledSet = false; + + /// Signing algorithm to use with this secret. Either `hmac/sha-256`(default) or `hmac/sha-1` + + String get algorithm { + if (!_algorithmSet && _apiMapResponse.containsKey('algorithm')) { + _algorithm = _apiMapResponse['algorithm'] == null + ? null + : _apiMapResponse['algorithm'].toString(); + _algorithmSet = true; + } + return _algorithm; + } + + set algorithm(String v) { + _algorithm = v; + _algorithmSet = true; + } + + /// Is this secret currently enabled + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + WriteEmbedSecret() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteEmbedSecret.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_algorithmSet || _apiMapResponse.containsKey('algorithm')) { + json['algorithm'] = algorithm; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + return json; + } +} + +/// Dynamic writeable type for ExternalOauthApplication removes: +/// can, id, created_at +class WriteExternalOauthApplication { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _clientId; + bool _clientIdSet = false; + + String _clientSecret; + bool _clientSecretSet = false; + + String _dialectName; + bool _dialectNameSet = false; + + /// The name of this application. For Snowflake connections, this should be the name of the host database. + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// The OAuth Client ID for this application + + String get clientId { + if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { + _clientId = _apiMapResponse['client_id'] == null + ? null + : _apiMapResponse['client_id'].toString(); + _clientIdSet = true; + } + return _clientId; + } + + set clientId(String v) { + _clientId = v; + _clientIdSet = true; + } + + /// (Write-Only) The OAuth Client Secret for this application + + String get clientSecret { + if (!_clientSecretSet && _apiMapResponse.containsKey('client_secret')) { + _clientSecret = _apiMapResponse['client_secret'] == null + ? null + : _apiMapResponse['client_secret'].toString(); + _clientSecretSet = true; + } + return _clientSecret; + } + + set clientSecret(String v) { + _clientSecret = v; + _clientSecretSet = true; + } + + /// The database dialect for this application. + + String get dialectName { + if (!_dialectNameSet && _apiMapResponse.containsKey('dialect_name')) { + _dialectName = _apiMapResponse['dialect_name'] == null + ? null + : _apiMapResponse['dialect_name'].toString(); + _dialectNameSet = true; + } + return _dialectName; + } + + set dialectName(String v) { + _dialectName = v; + _dialectNameSet = true; + } + + WriteExternalOauthApplication() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteExternalOauthApplication.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_clientIdSet || _apiMapResponse.containsKey('client_id')) { + json['client_id'] = clientId; + } + if (_clientSecretSet || _apiMapResponse.containsKey('client_secret')) { + json['client_secret'] = clientSecret; + } + if (_dialectNameSet || _apiMapResponse.containsKey('dialect_name')) { + json['dialect_name'] = dialectName; + } + return json; + } +} + +/// Dynamic writeable type for FolderBase removes: +/// id, content_metadata_id, created_at, creator_id, child_count, external_id, is_embed, is_embed_shared_root, is_embed_users_root, is_personal, is_personal_descendant, is_shared_root, is_users_root, can +class WriteFolderBase { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _parentId; + bool _parentIdSet = false; + + /// Unique Name + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Id of Parent. If the parent id is null, this is a root-level entry + + String get parentId { + if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { + _parentId = _apiMapResponse['parent_id'] == null + ? null + : _apiMapResponse['parent_id'].toString(); + _parentIdSet = true; + } + return _parentId; + } + + set parentId(String v) { + _parentId = v; + _parentIdSet = true; + } + + WriteFolderBase() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteFolderBase.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_parentIdSet || _apiMapResponse.containsKey('parent_id')) { + json['parent_id'] = parentId; + } + return json; + } +} + +/// Dynamic writeable type for GitBranch removes: +/// can, remote, remote_name, error, message, owner_name, readonly, personal, is_local, is_remote, is_production, ahead_count, behind_count, commit_at, remote_ref +class WriteGitBranch { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _ref; + bool _refSet = false; + + /// The short name on the local. Updating `name` results in `git checkout ` + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// The resolved ref of this branch. Updating `ref` results in `git reset --hard ``. + + String get ref { + if (!_refSet && _apiMapResponse.containsKey('ref')) { + _ref = _apiMapResponse['ref'] == null + ? null + : _apiMapResponse['ref'].toString(); + _refSet = true; + } + return _ref; + } + + set ref(String v) { + _ref = v; + _refSet = true; + } + + WriteGitBranch() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteGitBranch.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_refSet || _apiMapResponse.containsKey('ref')) { + json['ref'] = ref; + } + return json; + } +} + +/// Dynamic writeable type for Group removes: +/// can, contains_current_user, external_group_id, externally_managed, id, include_by_default, user_count +class WriteGroup { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _canAddToContentMetadata; + bool _canAddToContentMetadataSet = false; + + String _name; + bool _nameSet = false; + + /// Group can be used in content access controls + + bool get canAddToContentMetadata { + if (!_canAddToContentMetadataSet && + _apiMapResponse.containsKey('can_add_to_content_metadata')) { + _canAddToContentMetadata = _apiMapResponse['can_add_to_content_metadata']; + _canAddToContentMetadataSet = true; + } + return _canAddToContentMetadata; + } + + set canAddToContentMetadata(bool v) { + _canAddToContentMetadata = v; + _canAddToContentMetadataSet = true; + } + + /// Name of group + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + WriteGroup() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteGroup.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_canAddToContentMetadataSet || + _apiMapResponse.containsKey('can_add_to_content_metadata')) { + json['can_add_to_content_metadata'] = canAddToContentMetadata; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + return json; + } +} + +/// Dynamic writeable type for Integration removes: +/// can, id, integration_hub_id, label, description, supported_formats, supported_action_types, supported_formattings, supported_visualization_formattings, supported_download_settings, icon_url, uses_oauth, required_fields, delegate_oauth +class WriteIntegration { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _enabled; + bool _enabledSet = false; + + List _params; + bool _paramsSet = false; + + List _installedDelegateOauthTargets; + bool _installedDelegateOauthTargetsSet = false; + + /// Whether the integration is available to users. + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Array of params for the integration. + + List get params { + if (!_paramsSet && _apiMapResponse.containsKey('params')) { + _params = _apiMapResponse['params'] == null + ? null + : (_apiMapResponse['params'] as List) + .map((i) => + IntegrationParam.fromResponse(i, apiResponseContentType)) + .toList(); + _paramsSet = true; + } + return _params; + } + + set params(List v) { + _params = v; + _paramsSet = true; + } + + /// Whether the integration is available to users. + + List get installedDelegateOauthTargets { + if (!_installedDelegateOauthTargetsSet && + _apiMapResponse.containsKey('installed_delegate_oauth_targets')) { + _installedDelegateOauthTargets = + _apiMapResponse['installed_delegate_oauth_targets'] == null + ? null + : _apiMapResponse['installed_delegate_oauth_targets'] + .map((i) => i as int) + .toList(); + _installedDelegateOauthTargetsSet = true; + } + return _installedDelegateOauthTargets; + } + + set installedDelegateOauthTargets(List v) { + _installedDelegateOauthTargets = v; + _installedDelegateOauthTargetsSet = true; + } + + WriteIntegration() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteIntegration.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_paramsSet || _apiMapResponse.containsKey('params')) { + json['params'] = + params == null ? null : params.map((i) => i.toJson()).toList(); + } + if (_installedDelegateOauthTargetsSet || + _apiMapResponse.containsKey('installed_delegate_oauth_targets')) { + json['installed_delegate_oauth_targets'] = installedDelegateOauthTargets; + } + return json; + } +} + +/// Dynamic writeable type for IntegrationHub removes: +/// can, id, label, official, fetch_error_message, has_authorization_token, legal_agreement_signed, legal_agreement_required, legal_agreement_text +class WriteIntegrationHub { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _url; + bool _urlSet = false; + + String _authorizationToken; + bool _authorizationTokenSet = false; + + /// URL of the hub. + + String get url { + if (!_urlSet && _apiMapResponse.containsKey('url')) { + _url = _apiMapResponse['url'] == null + ? null + : _apiMapResponse['url'].toString(); + _urlSet = true; + } + return _url; + } + + set url(String v) { + _url = v; + _urlSet = true; + } + + /// (Write-Only) An authorization key that will be sent to the integration hub on every request. + + String get authorizationToken { + if (!_authorizationTokenSet && + _apiMapResponse.containsKey('authorization_token')) { + _authorizationToken = _apiMapResponse['authorization_token'] == null + ? null + : _apiMapResponse['authorization_token'].toString(); + _authorizationTokenSet = true; + } + return _authorizationToken; + } + + set authorizationToken(String v) { + _authorizationToken = v; + _authorizationTokenSet = true; + } + + WriteIntegrationHub() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteIntegrationHub.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_urlSet || _apiMapResponse.containsKey('url')) { + json['url'] = url; + } + if (_authorizationTokenSet || + _apiMapResponse.containsKey('authorization_token')) { + json['authorization_token'] = authorizationToken; + } + return json; + } +} + +/// Dynamic writeable type for InternalHelpResources removes: +/// can +class WriteInternalHelpResources { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _enabled; + bool _enabledSet = false; + + /// If true and internal help resources content is not blank then the link for internal help resources will be shown in the help menu and the content displayed within Looker + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + WriteInternalHelpResources() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteInternalHelpResources.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + return json; + } +} + +/// Dynamic writeable type for InternalHelpResourcesContent removes: +/// can +class WriteInternalHelpResourcesContent { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _organizationName; + bool _organizationNameSet = false; + + String _markdownContent; + bool _markdownContentSet = false; + + /// Text to display in the help menu item which will display the internal help resources + + String get organizationName { + if (!_organizationNameSet && + _apiMapResponse.containsKey('organization_name')) { + _organizationName = _apiMapResponse['organization_name'] == null + ? null + : _apiMapResponse['organization_name'].toString(); + _organizationNameSet = true; + } + return _organizationName; + } + + set organizationName(String v) { + _organizationName = v; + _organizationNameSet = true; + } + + /// Content to be displayed in the internal help resources page/modal + + String get markdownContent { + if (!_markdownContentSet && + _apiMapResponse.containsKey('markdown_content')) { + _markdownContent = _apiMapResponse['markdown_content'] == null + ? null + : _apiMapResponse['markdown_content'].toString(); + _markdownContentSet = true; + } + return _markdownContent; + } + + set markdownContent(String v) { + _markdownContent = v; + _markdownContentSet = true; + } + + WriteInternalHelpResourcesContent() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteInternalHelpResourcesContent.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_organizationNameSet || + _apiMapResponse.containsKey('organization_name')) { + json['organization_name'] = organizationName; + } + if (_markdownContentSet || + _apiMapResponse.containsKey('markdown_content')) { + json['markdown_content'] = markdownContent; + } + return json; + } +} + +/// Dynamic writeable type for LDAPConfig removes: +/// can, default_new_user_groups, default_new_user_roles, groups, has_auth_password, modified_at, modified_by, user_attributes, url +class WriteLDAPConfig { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _alternateEmailLoginAllowed; + bool _alternateEmailLoginAllowedSet = false; + + String _authPassword; + bool _authPasswordSet = false; + + bool _authRequiresRole; + bool _authRequiresRoleSet = false; + + String _authUsername; + bool _authUsernameSet = false; + + String _connectionHost; + bool _connectionHostSet = false; + + String _connectionPort; + bool _connectionPortSet = false; + + bool _connectionTls; + bool _connectionTlsSet = false; + + bool _connectionTlsNoVerify; + bool _connectionTlsNoVerifySet = false; + + List _defaultNewUserGroupIds; + bool _defaultNewUserGroupIdsSet = false; + + List _defaultNewUserRoleIds; + bool _defaultNewUserRoleIdsSet = false; + + bool _enabled; + bool _enabledSet = false; + + bool _forceNoPage; + bool _forceNoPageSet = false; + + String _groupsBaseDn; + bool _groupsBaseDnSet = false; + + String _groupsFinderType; + bool _groupsFinderTypeSet = false; + + String _groupsMemberAttribute; + bool _groupsMemberAttributeSet = false; + + String _groupsObjectclasses; + bool _groupsObjectclassesSet = false; + + String _groupsUserAttribute; + bool _groupsUserAttributeSet = false; + + List _groupsWithRoleIds; + bool _groupsWithRoleIdsSet = false; + + bool _mergeNewUsersByEmail; + bool _mergeNewUsersByEmailSet = false; + + bool _setRolesFromGroups; + bool _setRolesFromGroupsSet = false; + + String _testLdapPassword; + bool _testLdapPasswordSet = false; + + String _testLdapUser; + bool _testLdapUserSet = false; + + String _userAttributeMapEmail; + bool _userAttributeMapEmailSet = false; + + String _userAttributeMapFirstName; + bool _userAttributeMapFirstNameSet = false; + + String _userAttributeMapLastName; + bool _userAttributeMapLastNameSet = false; + + String _userAttributeMapLdapId; + bool _userAttributeMapLdapIdSet = false; + + List _userAttributesWithIds; + bool _userAttributesWithIdsSet = false; + + String _userBindBaseDn; + bool _userBindBaseDnSet = false; + + String _userCustomFilter; + bool _userCustomFilterSet = false; + + String _userIdAttributeNames; + bool _userIdAttributeNamesSet = false; + + String _userObjectclass; + bool _userObjectclassSet = false; + + bool _allowNormalGroupMembership; + bool _allowNormalGroupMembershipSet = false; + + bool _allowRolesFromNormalGroups; + bool _allowRolesFromNormalGroupsSet = false; + + bool _allowDirectRoles; + bool _allowDirectRolesSet = false; + + /// Allow alternate email-based login via '/login/email' for admins and for specified users with the 'login_special_email' permission. This option is useful as a fallback during ldap setup, if ldap config problems occur later, or if you need to support some users who are not in your ldap directory. Looker email/password logins are always disabled for regular users when ldap is enabled. + + bool get alternateEmailLoginAllowed { + if (!_alternateEmailLoginAllowedSet && + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + _alternateEmailLoginAllowed = + _apiMapResponse['alternate_email_login_allowed']; + _alternateEmailLoginAllowedSet = true; + } + return _alternateEmailLoginAllowed; + } + + set alternateEmailLoginAllowed(bool v) { + _alternateEmailLoginAllowed = v; + _alternateEmailLoginAllowedSet = true; + } + + /// (Write-Only) Password for the LDAP account used to access the LDAP server + + String get authPassword { + if (!_authPasswordSet && _apiMapResponse.containsKey('auth_password')) { + _authPassword = _apiMapResponse['auth_password'] == null + ? null + : _apiMapResponse['auth_password'].toString(); + _authPasswordSet = true; + } + return _authPassword; + } + + set authPassword(String v) { + _authPassword = v; + _authPasswordSet = true; + } + + /// Users will not be allowed to login at all unless a role for them is found in LDAP if set to true + + bool get authRequiresRole { + if (!_authRequiresRoleSet && + _apiMapResponse.containsKey('auth_requires_role')) { + _authRequiresRole = _apiMapResponse['auth_requires_role']; + _authRequiresRoleSet = true; + } + return _authRequiresRole; + } + + set authRequiresRole(bool v) { + _authRequiresRole = v; + _authRequiresRoleSet = true; + } + + /// Distinguished name of LDAP account used to access the LDAP server + + String get authUsername { + if (!_authUsernameSet && _apiMapResponse.containsKey('auth_username')) { + _authUsername = _apiMapResponse['auth_username'] == null + ? null + : _apiMapResponse['auth_username'].toString(); + _authUsernameSet = true; + } + return _authUsername; + } + + set authUsername(String v) { + _authUsername = v; + _authUsernameSet = true; + } + + /// LDAP server hostname + + String get connectionHost { + if (!_connectionHostSet && _apiMapResponse.containsKey('connection_host')) { + _connectionHost = _apiMapResponse['connection_host'] == null + ? null + : _apiMapResponse['connection_host'].toString(); + _connectionHostSet = true; + } + return _connectionHost; + } + + set connectionHost(String v) { + _connectionHost = v; + _connectionHostSet = true; + } + + /// LDAP host port + + String get connectionPort { + if (!_connectionPortSet && _apiMapResponse.containsKey('connection_port')) { + _connectionPort = _apiMapResponse['connection_port'] == null + ? null + : _apiMapResponse['connection_port'].toString(); + _connectionPortSet = true; + } + return _connectionPort; + } + + set connectionPort(String v) { + _connectionPort = v; + _connectionPortSet = true; + } + + /// Use Transport Layer Security + + bool get connectionTls { + if (!_connectionTlsSet && _apiMapResponse.containsKey('connection_tls')) { + _connectionTls = _apiMapResponse['connection_tls']; + _connectionTlsSet = true; + } + return _connectionTls; + } + + set connectionTls(bool v) { + _connectionTls = v; + _connectionTlsSet = true; + } + + /// Do not verify peer when using TLS + + bool get connectionTlsNoVerify { + if (!_connectionTlsNoVerifySet && + _apiMapResponse.containsKey('connection_tls_no_verify')) { + _connectionTlsNoVerify = _apiMapResponse['connection_tls_no_verify']; + _connectionTlsNoVerifySet = true; + } + return _connectionTlsNoVerify; + } + + set connectionTlsNoVerify(bool v) { + _connectionTlsNoVerify = v; + _connectionTlsNoVerifySet = true; + } + + /// (Write-Only) Array of ids of groups that will be applied to new users the first time they login via LDAP + + List get defaultNewUserGroupIds { + if (!_defaultNewUserGroupIdsSet && + _apiMapResponse.containsKey('default_new_user_group_ids')) { + _defaultNewUserGroupIds = + _apiMapResponse['default_new_user_group_ids'] == null + ? null + : _apiMapResponse['default_new_user_group_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserGroupIdsSet = true; + } + return _defaultNewUserGroupIds; + } + + set defaultNewUserGroupIds(List v) { + _defaultNewUserGroupIds = v; + _defaultNewUserGroupIdsSet = true; + } + + /// (Write-Only) Array of ids of roles that will be applied to new users the first time they login via LDAP + + List get defaultNewUserRoleIds { + if (!_defaultNewUserRoleIdsSet && + _apiMapResponse.containsKey('default_new_user_role_ids')) { + _defaultNewUserRoleIds = + _apiMapResponse['default_new_user_role_ids'] == null + ? null + : _apiMapResponse['default_new_user_role_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserRoleIdsSet = true; + } + return _defaultNewUserRoleIds; + } + + set defaultNewUserRoleIds(List v) { + _defaultNewUserRoleIds = v; + _defaultNewUserRoleIdsSet = true; + } + + /// Enable/Disable LDAP authentication for the server + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Don't attempt to do LDAP search result paging (RFC 2696) even if the LDAP server claims to support it. + + bool get forceNoPage { + if (!_forceNoPageSet && _apiMapResponse.containsKey('force_no_page')) { + _forceNoPage = _apiMapResponse['force_no_page']; + _forceNoPageSet = true; + } + return _forceNoPage; + } + + set forceNoPage(bool v) { + _forceNoPage = v; + _forceNoPageSet = true; + } + + /// Base dn for finding groups in LDAP searches + + String get groupsBaseDn { + if (!_groupsBaseDnSet && _apiMapResponse.containsKey('groups_base_dn')) { + _groupsBaseDn = _apiMapResponse['groups_base_dn'] == null + ? null + : _apiMapResponse['groups_base_dn'].toString(); + _groupsBaseDnSet = true; + } + return _groupsBaseDn; + } + + set groupsBaseDn(String v) { + _groupsBaseDn = v; + _groupsBaseDnSet = true; + } + + /// Identifier for a strategy for how Looker will search for groups in the LDAP server + + String get groupsFinderType { + if (!_groupsFinderTypeSet && + _apiMapResponse.containsKey('groups_finder_type')) { + _groupsFinderType = _apiMapResponse['groups_finder_type'] == null + ? null + : _apiMapResponse['groups_finder_type'].toString(); + _groupsFinderTypeSet = true; + } + return _groupsFinderType; + } + + set groupsFinderType(String v) { + _groupsFinderType = v; + _groupsFinderTypeSet = true; + } + + /// LDAP Group attribute that signifies the members of the groups. Most commonly 'member' + + String get groupsMemberAttribute { + if (!_groupsMemberAttributeSet && + _apiMapResponse.containsKey('groups_member_attribute')) { + _groupsMemberAttribute = + _apiMapResponse['groups_member_attribute'] == null + ? null + : _apiMapResponse['groups_member_attribute'].toString(); + _groupsMemberAttributeSet = true; + } + return _groupsMemberAttribute; + } + + set groupsMemberAttribute(String v) { + _groupsMemberAttribute = v; + _groupsMemberAttributeSet = true; + } + + /// Optional comma-separated list of supported LDAP objectclass for groups when doing groups searches + + String get groupsObjectclasses { + if (!_groupsObjectclassesSet && + _apiMapResponse.containsKey('groups_objectclasses')) { + _groupsObjectclasses = _apiMapResponse['groups_objectclasses'] == null + ? null + : _apiMapResponse['groups_objectclasses'].toString(); + _groupsObjectclassesSet = true; + } + return _groupsObjectclasses; + } + + set groupsObjectclasses(String v) { + _groupsObjectclasses = v; + _groupsObjectclassesSet = true; + } + + /// LDAP Group attribute that signifies the user in a group. Most commonly 'dn' + + String get groupsUserAttribute { + if (!_groupsUserAttributeSet && + _apiMapResponse.containsKey('groups_user_attribute')) { + _groupsUserAttribute = _apiMapResponse['groups_user_attribute'] == null + ? null + : _apiMapResponse['groups_user_attribute'].toString(); + _groupsUserAttributeSet = true; + } + return _groupsUserAttribute; + } + + set groupsUserAttribute(String v) { + _groupsUserAttribute = v; + _groupsUserAttributeSet = true; + } + + /// (Read/Write) Array of mappings between LDAP Groups and arrays of Looker Role ids + + List get groupsWithRoleIds { + if (!_groupsWithRoleIdsSet && + _apiMapResponse.containsKey('groups_with_role_ids')) { + _groupsWithRoleIds = _apiMapResponse['groups_with_role_ids'] == null + ? null + : (_apiMapResponse['groups_with_role_ids'] as List) + .map( + (i) => LDAPGroupWrite.fromResponse(i, apiResponseContentType)) + .toList(); + _groupsWithRoleIdsSet = true; + } + return _groupsWithRoleIds; + } + + set groupsWithRoleIds(List v) { + _groupsWithRoleIds = v; + _groupsWithRoleIdsSet = true; + } + + /// Merge first-time ldap login to existing user account by email addresses. When a user logs in for the first time via ldap this option will connect this user into their existing account by finding the account with a matching email address. Otherwise a new user account will be created for the user. + + bool get mergeNewUsersByEmail { + if (!_mergeNewUsersByEmailSet && + _apiMapResponse.containsKey('merge_new_users_by_email')) { + _mergeNewUsersByEmail = _apiMapResponse['merge_new_users_by_email']; + _mergeNewUsersByEmailSet = true; + } + return _mergeNewUsersByEmail; + } + + set mergeNewUsersByEmail(bool v) { + _mergeNewUsersByEmail = v; + _mergeNewUsersByEmailSet = true; + } + + /// Set user roles in Looker based on groups from LDAP + + bool get setRolesFromGroups { + if (!_setRolesFromGroupsSet && + _apiMapResponse.containsKey('set_roles_from_groups')) { + _setRolesFromGroups = _apiMapResponse['set_roles_from_groups']; + _setRolesFromGroupsSet = true; + } + return _setRolesFromGroups; + } + + set setRolesFromGroups(bool v) { + _setRolesFromGroups = v; + _setRolesFromGroupsSet = true; + } + + /// (Write-Only) Test LDAP user password. For ldap tests only. + + String get testLdapPassword { + if (!_testLdapPasswordSet && + _apiMapResponse.containsKey('test_ldap_password')) { + _testLdapPassword = _apiMapResponse['test_ldap_password'] == null + ? null + : _apiMapResponse['test_ldap_password'].toString(); + _testLdapPasswordSet = true; + } + return _testLdapPassword; + } + + set testLdapPassword(String v) { + _testLdapPassword = v; + _testLdapPasswordSet = true; + } + + /// (Write-Only) Test LDAP user login id. For ldap tests only. + + String get testLdapUser { + if (!_testLdapUserSet && _apiMapResponse.containsKey('test_ldap_user')) { + _testLdapUser = _apiMapResponse['test_ldap_user'] == null + ? null + : _apiMapResponse['test_ldap_user'].toString(); + _testLdapUserSet = true; + } + return _testLdapUser; + } + + set testLdapUser(String v) { + _testLdapUser = v; + _testLdapUserSet = true; + } + + /// Name of user record attributes used to indicate email address field + + String get userAttributeMapEmail { + if (!_userAttributeMapEmailSet && + _apiMapResponse.containsKey('user_attribute_map_email')) { + _userAttributeMapEmail = + _apiMapResponse['user_attribute_map_email'] == null + ? null + : _apiMapResponse['user_attribute_map_email'].toString(); + _userAttributeMapEmailSet = true; + } + return _userAttributeMapEmail; + } + + set userAttributeMapEmail(String v) { + _userAttributeMapEmail = v; + _userAttributeMapEmailSet = true; + } + + /// Name of user record attributes used to indicate first name + + String get userAttributeMapFirstName { + if (!_userAttributeMapFirstNameSet && + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + _userAttributeMapFirstName = + _apiMapResponse['user_attribute_map_first_name'] == null + ? null + : _apiMapResponse['user_attribute_map_first_name'].toString(); + _userAttributeMapFirstNameSet = true; + } + return _userAttributeMapFirstName; + } + + set userAttributeMapFirstName(String v) { + _userAttributeMapFirstName = v; + _userAttributeMapFirstNameSet = true; + } + + /// Name of user record attributes used to indicate last name + + String get userAttributeMapLastName { + if (!_userAttributeMapLastNameSet && + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + _userAttributeMapLastName = + _apiMapResponse['user_attribute_map_last_name'] == null + ? null + : _apiMapResponse['user_attribute_map_last_name'].toString(); + _userAttributeMapLastNameSet = true; + } + return _userAttributeMapLastName; + } + + set userAttributeMapLastName(String v) { + _userAttributeMapLastName = v; + _userAttributeMapLastNameSet = true; + } + + /// Name of user record attributes used to indicate unique record id + + String get userAttributeMapLdapId { + if (!_userAttributeMapLdapIdSet && + _apiMapResponse.containsKey('user_attribute_map_ldap_id')) { + _userAttributeMapLdapId = + _apiMapResponse['user_attribute_map_ldap_id'] == null + ? null + : _apiMapResponse['user_attribute_map_ldap_id'].toString(); + _userAttributeMapLdapIdSet = true; + } + return _userAttributeMapLdapId; + } + + set userAttributeMapLdapId(String v) { + _userAttributeMapLdapId = v; + _userAttributeMapLdapIdSet = true; + } + + /// (Read/Write) Array of mappings between LDAP User Attributes and arrays of Looker User Attribute ids + + List get userAttributesWithIds { + if (!_userAttributesWithIdsSet && + _apiMapResponse.containsKey('user_attributes_with_ids')) { + _userAttributesWithIds = + _apiMapResponse['user_attributes_with_ids'] == null + ? null + : (_apiMapResponse['user_attributes_with_ids'] as List) + .map((i) => LDAPUserAttributeWrite.fromResponse( + i, apiResponseContentType)) + .toList(); + _userAttributesWithIdsSet = true; + } + return _userAttributesWithIds; + } + + set userAttributesWithIds(List v) { + _userAttributesWithIds = v; + _userAttributesWithIdsSet = true; + } + + /// Distinguished name of LDAP node used as the base for user searches + + String get userBindBaseDn { + if (!_userBindBaseDnSet && + _apiMapResponse.containsKey('user_bind_base_dn')) { + _userBindBaseDn = _apiMapResponse['user_bind_base_dn'] == null + ? null + : _apiMapResponse['user_bind_base_dn'].toString(); + _userBindBaseDnSet = true; + } + return _userBindBaseDn; + } + + set userBindBaseDn(String v) { + _userBindBaseDn = v; + _userBindBaseDnSet = true; + } + + /// (Optional) Custom RFC-2254 filter clause for use in finding user during login. Combined via 'and' with the other generated filter clauses. + + String get userCustomFilter { + if (!_userCustomFilterSet && + _apiMapResponse.containsKey('user_custom_filter')) { + _userCustomFilter = _apiMapResponse['user_custom_filter'] == null + ? null + : _apiMapResponse['user_custom_filter'].toString(); + _userCustomFilterSet = true; + } + return _userCustomFilter; + } + + set userCustomFilter(String v) { + _userCustomFilter = v; + _userCustomFilterSet = true; + } + + /// Name(s) of user record attributes used for matching user login id (comma separated list) + + String get userIdAttributeNames { + if (!_userIdAttributeNamesSet && + _apiMapResponse.containsKey('user_id_attribute_names')) { + _userIdAttributeNames = _apiMapResponse['user_id_attribute_names'] == null + ? null + : _apiMapResponse['user_id_attribute_names'].toString(); + _userIdAttributeNamesSet = true; + } + return _userIdAttributeNames; + } + + set userIdAttributeNames(String v) { + _userIdAttributeNames = v; + _userIdAttributeNamesSet = true; + } + + /// (Optional) Name of user record objectclass used for finding user during login id + + String get userObjectclass { + if (!_userObjectclassSet && + _apiMapResponse.containsKey('user_objectclass')) { + _userObjectclass = _apiMapResponse['user_objectclass'] == null + ? null + : _apiMapResponse['user_objectclass'].toString(); + _userObjectclassSet = true; + } + return _userObjectclass; + } + + set userObjectclass(String v) { + _userObjectclass = v; + _userObjectclassSet = true; + } + + /// Allow LDAP auth'd users to be members of non-reflected Looker groups. If 'false', user will be removed from non-reflected groups on login. + + bool get allowNormalGroupMembership { + if (!_allowNormalGroupMembershipSet && + _apiMapResponse.containsKey('allow_normal_group_membership')) { + _allowNormalGroupMembership = + _apiMapResponse['allow_normal_group_membership']; + _allowNormalGroupMembershipSet = true; + } + return _allowNormalGroupMembership; + } + + set allowNormalGroupMembership(bool v) { + _allowNormalGroupMembership = v; + _allowNormalGroupMembershipSet = true; + } + + /// LDAP auth'd users will be able to inherit roles from non-reflected Looker groups. + + bool get allowRolesFromNormalGroups { + if (!_allowRolesFromNormalGroupsSet && + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + _allowRolesFromNormalGroups = + _apiMapResponse['allow_roles_from_normal_groups']; + _allowRolesFromNormalGroupsSet = true; + } + return _allowRolesFromNormalGroups; + } + + set allowRolesFromNormalGroups(bool v) { + _allowRolesFromNormalGroups = v; + _allowRolesFromNormalGroupsSet = true; + } + + /// Allows roles to be directly assigned to LDAP auth'd users. + + bool get allowDirectRoles { + if (!_allowDirectRolesSet && + _apiMapResponse.containsKey('allow_direct_roles')) { + _allowDirectRoles = _apiMapResponse['allow_direct_roles']; + _allowDirectRolesSet = true; + } + return _allowDirectRoles; + } + + set allowDirectRoles(bool v) { + _allowDirectRoles = v; + _allowDirectRolesSet = true; + } + + WriteLDAPConfig() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteLDAPConfig.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_alternateEmailLoginAllowedSet || + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + json['alternate_email_login_allowed'] = alternateEmailLoginAllowed; + } + if (_authPasswordSet || _apiMapResponse.containsKey('auth_password')) { + json['auth_password'] = authPassword; + } + if (_authRequiresRoleSet || + _apiMapResponse.containsKey('auth_requires_role')) { + json['auth_requires_role'] = authRequiresRole; + } + if (_authUsernameSet || _apiMapResponse.containsKey('auth_username')) { + json['auth_username'] = authUsername; + } + if (_connectionHostSet || _apiMapResponse.containsKey('connection_host')) { + json['connection_host'] = connectionHost; + } + if (_connectionPortSet || _apiMapResponse.containsKey('connection_port')) { + json['connection_port'] = connectionPort; + } + if (_connectionTlsSet || _apiMapResponse.containsKey('connection_tls')) { + json['connection_tls'] = connectionTls; + } + if (_connectionTlsNoVerifySet || + _apiMapResponse.containsKey('connection_tls_no_verify')) { + json['connection_tls_no_verify'] = connectionTlsNoVerify; + } + if (_defaultNewUserGroupIdsSet || + _apiMapResponse.containsKey('default_new_user_group_ids')) { + json['default_new_user_group_ids'] = defaultNewUserGroupIds; + } + if (_defaultNewUserRoleIdsSet || + _apiMapResponse.containsKey('default_new_user_role_ids')) { + json['default_new_user_role_ids'] = defaultNewUserRoleIds; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_forceNoPageSet || _apiMapResponse.containsKey('force_no_page')) { + json['force_no_page'] = forceNoPage; + } + if (_groupsBaseDnSet || _apiMapResponse.containsKey('groups_base_dn')) { + json['groups_base_dn'] = groupsBaseDn; + } + if (_groupsFinderTypeSet || + _apiMapResponse.containsKey('groups_finder_type')) { + json['groups_finder_type'] = groupsFinderType; + } + if (_groupsMemberAttributeSet || + _apiMapResponse.containsKey('groups_member_attribute')) { + json['groups_member_attribute'] = groupsMemberAttribute; + } + if (_groupsObjectclassesSet || + _apiMapResponse.containsKey('groups_objectclasses')) { + json['groups_objectclasses'] = groupsObjectclasses; + } + if (_groupsUserAttributeSet || + _apiMapResponse.containsKey('groups_user_attribute')) { + json['groups_user_attribute'] = groupsUserAttribute; + } + if (_groupsWithRoleIdsSet || + _apiMapResponse.containsKey('groups_with_role_ids')) { + json['groups_with_role_ids'] = groupsWithRoleIds == null + ? null + : groupsWithRoleIds.map((i) => i.toJson()).toList(); + } + if (_mergeNewUsersByEmailSet || + _apiMapResponse.containsKey('merge_new_users_by_email')) { + json['merge_new_users_by_email'] = mergeNewUsersByEmail; + } + if (_setRolesFromGroupsSet || + _apiMapResponse.containsKey('set_roles_from_groups')) { + json['set_roles_from_groups'] = setRolesFromGroups; + } + if (_testLdapPasswordSet || + _apiMapResponse.containsKey('test_ldap_password')) { + json['test_ldap_password'] = testLdapPassword; + } + if (_testLdapUserSet || _apiMapResponse.containsKey('test_ldap_user')) { + json['test_ldap_user'] = testLdapUser; + } + if (_userAttributeMapEmailSet || + _apiMapResponse.containsKey('user_attribute_map_email')) { + json['user_attribute_map_email'] = userAttributeMapEmail; + } + if (_userAttributeMapFirstNameSet || + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + json['user_attribute_map_first_name'] = userAttributeMapFirstName; + } + if (_userAttributeMapLastNameSet || + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + json['user_attribute_map_last_name'] = userAttributeMapLastName; + } + if (_userAttributeMapLdapIdSet || + _apiMapResponse.containsKey('user_attribute_map_ldap_id')) { + json['user_attribute_map_ldap_id'] = userAttributeMapLdapId; + } + if (_userAttributesWithIdsSet || + _apiMapResponse.containsKey('user_attributes_with_ids')) { + json['user_attributes_with_ids'] = userAttributesWithIds == null + ? null + : userAttributesWithIds.map((i) => i.toJson()).toList(); + } + if (_userBindBaseDnSet || + _apiMapResponse.containsKey('user_bind_base_dn')) { + json['user_bind_base_dn'] = userBindBaseDn; + } + if (_userCustomFilterSet || + _apiMapResponse.containsKey('user_custom_filter')) { + json['user_custom_filter'] = userCustomFilter; + } + if (_userIdAttributeNamesSet || + _apiMapResponse.containsKey('user_id_attribute_names')) { + json['user_id_attribute_names'] = userIdAttributeNames; + } + if (_userObjectclassSet || + _apiMapResponse.containsKey('user_objectclass')) { + json['user_objectclass'] = userObjectclass; + } + if (_allowNormalGroupMembershipSet || + _apiMapResponse.containsKey('allow_normal_group_membership')) { + json['allow_normal_group_membership'] = allowNormalGroupMembership; + } + if (_allowRolesFromNormalGroupsSet || + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + json['allow_roles_from_normal_groups'] = allowRolesFromNormalGroups; + } + if (_allowDirectRolesSet || + _apiMapResponse.containsKey('allow_direct_roles')) { + json['allow_direct_roles'] = allowDirectRoles; + } + return json; + } +} + +/// Dynamic writeable type for LegacyFeature removes: +/// can, id, name, description, enabled, disallowed_as_of_version, disable_on_upgrade_to_version, end_of_life_version, documentation_url, approximate_disable_date, approximate_end_of_life_date, has_disabled_on_upgrade +class WriteLegacyFeature { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _enabledLocally; + bool _enabledLocallySet = false; + + /// Whether this feature has been enabled by a user + + bool get enabledLocally { + if (!_enabledLocallySet && _apiMapResponse.containsKey('enabled_locally')) { + _enabledLocally = _apiMapResponse['enabled_locally']; + _enabledLocallySet = true; + } + return _enabledLocally; + } + + set enabledLocally(bool v) { + _enabledLocally = v; + _enabledLocallySet = true; + } + + WriteLegacyFeature() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteLegacyFeature.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_enabledLocallySet || _apiMapResponse.containsKey('enabled_locally')) { + json['enabled_locally'] = enabledLocally; + } + return json; + } +} + +/// Dynamic writeable type for LookBasic removes: +/// can, content_metadata_id, id, title +class WriteLookBasic { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _userId; + bool _userIdSet = false; + + /// User Id + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + WriteLookBasic() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteLookBasic.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + return json; + } +} + +/// Dynamic writeable type for LookmlModel removes: +/// can, explores, has_content, label +class WriteLookmlModel { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _allowedDbConnectionNames; + bool _allowedDbConnectionNamesSet = false; + + String _name; + bool _nameSet = false; + + String _projectName; + bool _projectNameSet = false; + + bool _unlimitedDbConnections; + bool _unlimitedDbConnectionsSet = false; + + /// Array of names of connections this model is allowed to use + + List get allowedDbConnectionNames { + if (!_allowedDbConnectionNamesSet && + _apiMapResponse.containsKey('allowed_db_connection_names')) { + _allowedDbConnectionNames = + _apiMapResponse['allowed_db_connection_names'] == null + ? null + : _apiMapResponse['allowed_db_connection_names'] + .map((i) => i as String) + .toList(); + _allowedDbConnectionNamesSet = true; + } + return _allowedDbConnectionNames; + } + + set allowedDbConnectionNames(List v) { + _allowedDbConnectionNames = v; + _allowedDbConnectionNamesSet = true; + } + + /// Name of the model. Also used as the unique identifier + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Name of project containing the model + + String get projectName { + if (!_projectNameSet && _apiMapResponse.containsKey('project_name')) { + _projectName = _apiMapResponse['project_name'] == null + ? null + : _apiMapResponse['project_name'].toString(); + _projectNameSet = true; + } + return _projectName; + } + + set projectName(String v) { + _projectName = v; + _projectNameSet = true; + } + + /// Is this model allowed to use all current and future connections + + bool get unlimitedDbConnections { + if (!_unlimitedDbConnectionsSet && + _apiMapResponse.containsKey('unlimited_db_connections')) { + _unlimitedDbConnections = _apiMapResponse['unlimited_db_connections']; + _unlimitedDbConnectionsSet = true; + } + return _unlimitedDbConnections; + } + + set unlimitedDbConnections(bool v) { + _unlimitedDbConnections = v; + _unlimitedDbConnectionsSet = true; + } + + WriteLookmlModel() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteLookmlModel.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_allowedDbConnectionNamesSet || + _apiMapResponse.containsKey('allowed_db_connection_names')) { + json['allowed_db_connection_names'] = allowedDbConnectionNames; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_projectNameSet || _apiMapResponse.containsKey('project_name')) { + json['project_name'] = projectName; + } + if (_unlimitedDbConnectionsSet || + _apiMapResponse.containsKey('unlimited_db_connections')) { + json['unlimited_db_connections'] = unlimitedDbConnections; + } + return json; + } +} + +/// Dynamic writeable type for LookWithQuery removes: +/// can, content_metadata_id, id, content_favorite_id, created_at, deleted_at, deleter_id, embed_url, excel_file_url, favorite_count, google_spreadsheet_formula, image_embed_url, last_accessed_at, last_updater_id, last_viewed_at, model, public_slug, public_url, short_url, updated_at, view_count, url +class WriteLookWithQuery { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _title; + bool _titleSet = false; + + int _userId; + bool _userIdSet = false; + + bool _deleted; + bool _deletedSet = false; + + String _description; + bool _descriptionSet = false; + + bool _isRunOnLoad; + bool _isRunOnLoadSet = false; + + bool _public; + bool _publicSet = false; + + int _queryId; + bool _queryIdSet = false; + + WriteFolderBase _folder; + bool _folderSet = false; + + String _folderId; + bool _folderIdSet = false; + + WriteQuery _query; + bool _querySet = false; + + /// Look Title + + String get title { + if (!_titleSet && _apiMapResponse.containsKey('title')) { + _title = _apiMapResponse['title'] == null + ? null + : _apiMapResponse['title'].toString(); + _titleSet = true; + } + return _title; + } + + set title(String v) { + _title = v; + _titleSet = true; + } + + /// User Id + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Whether or not a look is 'soft' deleted. + + bool get deleted { + if (!_deletedSet && _apiMapResponse.containsKey('deleted')) { + _deleted = _apiMapResponse['deleted']; + _deletedSet = true; + } + return _deleted; + } + + set deleted(bool v) { + _deleted = v; + _deletedSet = true; + } + + /// Description + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// auto-run query when Look viewed + + bool get isRunOnLoad { + if (!_isRunOnLoadSet && _apiMapResponse.containsKey('is_run_on_load')) { + _isRunOnLoad = _apiMapResponse['is_run_on_load']; + _isRunOnLoadSet = true; + } + return _isRunOnLoad; + } + + set isRunOnLoad(bool v) { + _isRunOnLoad = v; + _isRunOnLoadSet = true; + } + + /// Is Public + + bool get public { + if (!_publicSet && _apiMapResponse.containsKey('public')) { + _public = _apiMapResponse['public']; + _publicSet = true; + } + return _public; + } + + set public(bool v) { + _public = v; + _publicSet = true; + } + + /// Query Id + + int get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id']; + _queryIdSet = true; + } + return _queryId; + } + + set queryId(int v) { + _queryId = v; + _queryIdSet = true; + } + + /// Dynamic writeable type for FolderBase removes: + /// id, content_metadata_id, created_at, creator_id, child_count, external_id, is_embed, is_embed_shared_root, is_embed_users_root, is_personal, is_personal_descendant, is_shared_root, is_users_root, can + + WriteFolderBase get folder { + if (!_folderSet && _apiMapResponse.containsKey('folder')) { + _folder = _apiMapResponse['folder'] == null + ? null + : WriteFolderBase.fromResponse( + _apiMapResponse['folder'], apiResponseContentType); + _folderSet = true; + } + return _folder; + } + + set folder(WriteFolderBase v) { + _folder = v; + _folderSet = true; + } + + /// Folder Id + + String get folderId { + if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { + _folderId = _apiMapResponse['folder_id'] == null + ? null + : _apiMapResponse['folder_id'].toString(); + _folderIdSet = true; + } + return _folderId; + } + + set folderId(String v) { + _folderId = v; + _folderIdSet = true; + } + + /// Dynamic writeable type for Query removes: + /// can, id, slug, share_url, expanded_share_url, url, has_table_calculations + + WriteQuery get query { + if (!_querySet && _apiMapResponse.containsKey('query')) { + _query = _apiMapResponse['query'] == null + ? null + : WriteQuery.fromResponse( + _apiMapResponse['query'], apiResponseContentType); + _querySet = true; + } + return _query; + } + + set query(WriteQuery v) { + _query = v; + _querySet = true; + } + + WriteLookWithQuery() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteLookWithQuery.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_titleSet || _apiMapResponse.containsKey('title')) { + json['title'] = title; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_deletedSet || _apiMapResponse.containsKey('deleted')) { + json['deleted'] = deleted; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_isRunOnLoadSet || _apiMapResponse.containsKey('is_run_on_load')) { + json['is_run_on_load'] = isRunOnLoad; + } + if (_publicSet || _apiMapResponse.containsKey('public')) { + json['public'] = public; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_folderSet || _apiMapResponse.containsKey('folder')) { + json['folder'] = folder == null ? null : folder.toJson(); + } + if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { + json['folder_id'] = folderId; + } + if (_querySet || _apiMapResponse.containsKey('query')) { + json['query'] = query == null ? null : query.toJson(); + } + return json; + } +} + +/// Dynamic writeable type for MergeQuery removes: +/// can, id, result_maker_id +class WriteMergeQuery { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _columnLimit; + bool _columnLimitSet = false; + + String _dynamicFields; + bool _dynamicFieldsSet = false; + + List _pivots; + bool _pivotsSet = false; + + List _sorts; + bool _sortsSet = false; + + List _sourceQueries; + bool _sourceQueriesSet = false; + + bool _total; + bool _totalSet = false; + + Map _visConfig; + bool _visConfigSet = false; + + /// Column Limit + + String get columnLimit { + if (!_columnLimitSet && _apiMapResponse.containsKey('column_limit')) { + _columnLimit = _apiMapResponse['column_limit'] == null + ? null + : _apiMapResponse['column_limit'].toString(); + _columnLimitSet = true; + } + return _columnLimit; + } + + set columnLimit(String v) { + _columnLimit = v; + _columnLimitSet = true; + } + + /// Dynamic Fields + + String get dynamicFields { + if (!_dynamicFieldsSet && _apiMapResponse.containsKey('dynamic_fields')) { + _dynamicFields = _apiMapResponse['dynamic_fields'] == null + ? null + : _apiMapResponse['dynamic_fields'].toString(); + _dynamicFieldsSet = true; + } + return _dynamicFields; + } + + set dynamicFields(String v) { + _dynamicFields = v; + _dynamicFieldsSet = true; + } + + /// Pivots + + List get pivots { + if (!_pivotsSet && _apiMapResponse.containsKey('pivots')) { + _pivots = _apiMapResponse['pivots'] == null + ? null + : _apiMapResponse['pivots'].map((i) => i as String).toList(); + _pivotsSet = true; + } + return _pivots; + } + + set pivots(List v) { + _pivots = v; + _pivotsSet = true; + } + + /// Sorts + + List get sorts { + if (!_sortsSet && _apiMapResponse.containsKey('sorts')) { + _sorts = _apiMapResponse['sorts'] == null + ? null + : _apiMapResponse['sorts'].map((i) => i as String).toList(); + _sortsSet = true; + } + return _sorts; + } + + set sorts(List v) { + _sorts = v; + _sortsSet = true; + } + + /// Source Queries defining the results to be merged. + + List get sourceQueries { + if (!_sourceQueriesSet && _apiMapResponse.containsKey('source_queries')) { + _sourceQueries = _apiMapResponse['source_queries'] == null + ? null + : (_apiMapResponse['source_queries'] as List) + .map((i) => + MergeQuerySourceQuery.fromResponse(i, apiResponseContentType)) + .toList(); + _sourceQueriesSet = true; + } + return _sourceQueries; + } + + set sourceQueries(List v) { + _sourceQueries = v; + _sourceQueriesSet = true; + } + + /// Total + + bool get total { + if (!_totalSet && _apiMapResponse.containsKey('total')) { + _total = _apiMapResponse['total']; + _totalSet = true; + } + return _total; + } + + set total(bool v) { + _total = v; + _totalSet = true; + } + + /// Visualization Config + + Map get visConfig { + if (!_visConfigSet && _apiMapResponse.containsKey('vis_config')) { + _visConfig = _apiMapResponse['vis_config']; + _visConfigSet = true; + } + return _visConfig; + } + + set visConfig(Map v) { + _visConfig = v; + _visConfigSet = true; + } + + WriteMergeQuery() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteMergeQuery.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_columnLimitSet || _apiMapResponse.containsKey('column_limit')) { + json['column_limit'] = columnLimit; + } + if (_dynamicFieldsSet || _apiMapResponse.containsKey('dynamic_fields')) { + json['dynamic_fields'] = dynamicFields; + } + if (_pivotsSet || _apiMapResponse.containsKey('pivots')) { + json['pivots'] = pivots; + } + if (_sortsSet || _apiMapResponse.containsKey('sorts')) { + json['sorts'] = sorts; + } + if (_sourceQueriesSet || _apiMapResponse.containsKey('source_queries')) { + json['source_queries'] = sourceQueries == null + ? null + : sourceQueries.map((i) => i.toJson()).toList(); + } + if (_totalSet || _apiMapResponse.containsKey('total')) { + json['total'] = total; + } + if (_visConfigSet || _apiMapResponse.containsKey('vis_config')) { + json['vis_config'] = visConfig; + } + return json; + } +} + +/// Dynamic writeable type for ModelSet removes: +/// can, all_access, built_in, id, url +class WriteModelSet { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + List _models; + bool _modelsSet = false; + + String _name; + bool _nameSet = false; + + List get models { + if (!_modelsSet && _apiMapResponse.containsKey('models')) { + _models = _apiMapResponse['models'] == null + ? null + : _apiMapResponse['models'].map((i) => i as String).toList(); + _modelsSet = true; + } + return _models; + } + + set models(List v) { + _models = v; + _modelsSet = true; + } + + /// Name of ModelSet + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + WriteModelSet() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteModelSet.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_modelsSet || _apiMapResponse.containsKey('models')) { + json['models'] = models; + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + return json; + } +} + +/// Dynamic writeable type for OauthClientApp removes: +/// can, client_guid, tokens_invalid_before, activated_users +class WriteOauthClientApp { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _redirectUri; + bool _redirectUriSet = false; + + String _displayName; + bool _displayNameSet = false; + + String _description; + bool _descriptionSet = false; + + bool _enabled; + bool _enabledSet = false; + + int _groupId; + bool _groupIdSet = false; + + /// The uri with which this application will receive an auth code by browser redirect. + + String get redirectUri { + if (!_redirectUriSet && _apiMapResponse.containsKey('redirect_uri')) { + _redirectUri = _apiMapResponse['redirect_uri'] == null + ? null + : _apiMapResponse['redirect_uri'].toString(); + _redirectUriSet = true; + } + return _redirectUri; + } + + set redirectUri(String v) { + _redirectUri = v; + _redirectUriSet = true; + } + + /// The application's display name + + String get displayName { + if (!_displayNameSet && _apiMapResponse.containsKey('display_name')) { + _displayName = _apiMapResponse['display_name'] == null + ? null + : _apiMapResponse['display_name'].toString(); + _displayNameSet = true; + } + return _displayName; + } + + set displayName(String v) { + _displayName = v; + _displayNameSet = true; + } + + /// A description of the application that will be displayed to users + + String get description { + if (!_descriptionSet && _apiMapResponse.containsKey('description')) { + _description = _apiMapResponse['description'] == null + ? null + : _apiMapResponse['description'].toString(); + _descriptionSet = true; + } + return _description; + } + + set description(String v) { + _description = v; + _descriptionSet = true; + } + + /// When enabled is true, OAuth2 and API requests will be accepted from this app. When false, all requests from this app will be refused. + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// If set, only Looker users who are members of this group can use this web app with Looker. If group_id is not set, any Looker user may use this app to access this Looker instance + + int get groupId { + if (!_groupIdSet && _apiMapResponse.containsKey('group_id')) { + _groupId = _apiMapResponse['group_id']; + _groupIdSet = true; + } + return _groupId; + } + + set groupId(int v) { + _groupId = v; + _groupIdSet = true; + } + + WriteOauthClientApp() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteOauthClientApp.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_redirectUriSet || _apiMapResponse.containsKey('redirect_uri')) { + json['redirect_uri'] = redirectUri; + } + if (_displayNameSet || _apiMapResponse.containsKey('display_name')) { + json['display_name'] = displayName; + } + if (_descriptionSet || _apiMapResponse.containsKey('description')) { + json['description'] = description; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_groupIdSet || _apiMapResponse.containsKey('group_id')) { + json['group_id'] = groupId; + } + return json; + } +} + +/// Dynamic writeable type for OIDCConfig removes: +/// can, default_new_user_groups, default_new_user_roles, groups, modified_at, modified_by, test_slug, user_attributes, url +class WriteOIDCConfig { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _alternateEmailLoginAllowed; + bool _alternateEmailLoginAllowedSet = false; + + String _audience; + bool _audienceSet = false; + + bool _authRequiresRole; + bool _authRequiresRoleSet = false; + + String _authorizationEndpoint; + bool _authorizationEndpointSet = false; + + List _defaultNewUserGroupIds; + bool _defaultNewUserGroupIdsSet = false; + + List _defaultNewUserRoleIds; + bool _defaultNewUserRoleIdsSet = false; + + bool _enabled; + bool _enabledSet = false; + + String _groupsAttribute; + bool _groupsAttributeSet = false; + + List _groupsWithRoleIds; + bool _groupsWithRoleIdsSet = false; + + String _identifier; + bool _identifierSet = false; + + String _issuer; + bool _issuerSet = false; + + String _newUserMigrationTypes; + bool _newUserMigrationTypesSet = false; + + List _scopes; + bool _scopesSet = false; + + String _secret; + bool _secretSet = false; + + bool _setRolesFromGroups; + bool _setRolesFromGroupsSet = false; + + String _tokenEndpoint; + bool _tokenEndpointSet = false; + + String _userAttributeMapEmail; + bool _userAttributeMapEmailSet = false; + + String _userAttributeMapFirstName; + bool _userAttributeMapFirstNameSet = false; + + String _userAttributeMapLastName; + bool _userAttributeMapLastNameSet = false; + + List _userAttributesWithIds; + bool _userAttributesWithIdsSet = false; + + String _userinfoEndpoint; + bool _userinfoEndpointSet = false; + + bool _allowNormalGroupMembership; + bool _allowNormalGroupMembershipSet = false; + + bool _allowRolesFromNormalGroups; + bool _allowRolesFromNormalGroupsSet = false; + + bool _allowDirectRoles; + bool _allowDirectRolesSet = false; + + /// Allow alternate email-based login via '/login/email' for admins and for specified users with the 'login_special_email' permission. This option is useful as a fallback during ldap setup, if ldap config problems occur later, or if you need to support some users who are not in your ldap directory. Looker email/password logins are always disabled for regular users when ldap is enabled. + + bool get alternateEmailLoginAllowed { + if (!_alternateEmailLoginAllowedSet && + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + _alternateEmailLoginAllowed = + _apiMapResponse['alternate_email_login_allowed']; + _alternateEmailLoginAllowedSet = true; + } + return _alternateEmailLoginAllowed; + } + + set alternateEmailLoginAllowed(bool v) { + _alternateEmailLoginAllowed = v; + _alternateEmailLoginAllowedSet = true; + } + + /// OpenID Provider Audience + + String get audience { + if (!_audienceSet && _apiMapResponse.containsKey('audience')) { + _audience = _apiMapResponse['audience'] == null + ? null + : _apiMapResponse['audience'].toString(); + _audienceSet = true; + } + return _audience; + } + + set audience(String v) { + _audience = v; + _audienceSet = true; + } + + /// Users will not be allowed to login at all unless a role for them is found in OIDC if set to true + + bool get authRequiresRole { + if (!_authRequiresRoleSet && + _apiMapResponse.containsKey('auth_requires_role')) { + _authRequiresRole = _apiMapResponse['auth_requires_role']; + _authRequiresRoleSet = true; + } + return _authRequiresRole; + } + + set authRequiresRole(bool v) { + _authRequiresRole = v; + _authRequiresRoleSet = true; + } + + /// OpenID Provider Authorization Url + + String get authorizationEndpoint { + if (!_authorizationEndpointSet && + _apiMapResponse.containsKey('authorization_endpoint')) { + _authorizationEndpoint = _apiMapResponse['authorization_endpoint'] == null + ? null + : _apiMapResponse['authorization_endpoint'].toString(); + _authorizationEndpointSet = true; + } + return _authorizationEndpoint; + } + + set authorizationEndpoint(String v) { + _authorizationEndpoint = v; + _authorizationEndpointSet = true; + } + + /// (Write-Only) Array of ids of groups that will be applied to new users the first time they login via OIDC + + List get defaultNewUserGroupIds { + if (!_defaultNewUserGroupIdsSet && + _apiMapResponse.containsKey('default_new_user_group_ids')) { + _defaultNewUserGroupIds = + _apiMapResponse['default_new_user_group_ids'] == null + ? null + : _apiMapResponse['default_new_user_group_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserGroupIdsSet = true; + } + return _defaultNewUserGroupIds; + } + + set defaultNewUserGroupIds(List v) { + _defaultNewUserGroupIds = v; + _defaultNewUserGroupIdsSet = true; + } + + /// (Write-Only) Array of ids of roles that will be applied to new users the first time they login via OIDC + + List get defaultNewUserRoleIds { + if (!_defaultNewUserRoleIdsSet && + _apiMapResponse.containsKey('default_new_user_role_ids')) { + _defaultNewUserRoleIds = + _apiMapResponse['default_new_user_role_ids'] == null + ? null + : _apiMapResponse['default_new_user_role_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserRoleIdsSet = true; + } + return _defaultNewUserRoleIds; + } + + set defaultNewUserRoleIds(List v) { + _defaultNewUserRoleIds = v; + _defaultNewUserRoleIdsSet = true; + } + + /// Enable/Disable OIDC authentication for the server + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Name of user record attributes used to indicate groups. Used when 'groups_finder_type' is set to 'grouped_attribute_values' + + String get groupsAttribute { + if (!_groupsAttributeSet && + _apiMapResponse.containsKey('groups_attribute')) { + _groupsAttribute = _apiMapResponse['groups_attribute'] == null + ? null + : _apiMapResponse['groups_attribute'].toString(); + _groupsAttributeSet = true; + } + return _groupsAttribute; + } + + set groupsAttribute(String v) { + _groupsAttribute = v; + _groupsAttributeSet = true; + } + + /// (Read/Write) Array of mappings between OIDC Groups and arrays of Looker Role ids + + List get groupsWithRoleIds { + if (!_groupsWithRoleIdsSet && + _apiMapResponse.containsKey('groups_with_role_ids')) { + _groupsWithRoleIds = _apiMapResponse['groups_with_role_ids'] == null + ? null + : (_apiMapResponse['groups_with_role_ids'] as List) + .map( + (i) => OIDCGroupWrite.fromResponse(i, apiResponseContentType)) + .toList(); + _groupsWithRoleIdsSet = true; + } + return _groupsWithRoleIds; + } + + set groupsWithRoleIds(List v) { + _groupsWithRoleIds = v; + _groupsWithRoleIdsSet = true; + } + + /// Relying Party Identifier (provided by OpenID Provider) + + String get identifier { + if (!_identifierSet && _apiMapResponse.containsKey('identifier')) { + _identifier = _apiMapResponse['identifier'] == null + ? null + : _apiMapResponse['identifier'].toString(); + _identifierSet = true; + } + return _identifier; + } + + set identifier(String v) { + _identifier = v; + _identifierSet = true; + } + + /// OpenID Provider Issuer + + String get issuer { + if (!_issuerSet && _apiMapResponse.containsKey('issuer')) { + _issuer = _apiMapResponse['issuer'] == null + ? null + : _apiMapResponse['issuer'].toString(); + _issuerSet = true; + } + return _issuer; + } + + set issuer(String v) { + _issuer = v; + _issuerSet = true; + } + + /// Merge first-time oidc login to existing user account by email addresses. When a user logs in for the first time via oidc this option will connect this user into their existing account by finding the account with a matching email address by testing the given types of credentials for existing users. Otherwise a new user account will be created for the user. This list (if provided) must be a comma separated list of string like 'email,ldap,google' + + String get newUserMigrationTypes { + if (!_newUserMigrationTypesSet && + _apiMapResponse.containsKey('new_user_migration_types')) { + _newUserMigrationTypes = + _apiMapResponse['new_user_migration_types'] == null + ? null + : _apiMapResponse['new_user_migration_types'].toString(); + _newUserMigrationTypesSet = true; + } + return _newUserMigrationTypes; + } + + set newUserMigrationTypes(String v) { + _newUserMigrationTypes = v; + _newUserMigrationTypesSet = true; + } + + /// Array of scopes to request. + + List get scopes { + if (!_scopesSet && _apiMapResponse.containsKey('scopes')) { + _scopes = _apiMapResponse['scopes'] == null + ? null + : _apiMapResponse['scopes'].map((i) => i as String).toList(); + _scopesSet = true; + } + return _scopes; + } + + set scopes(List v) { + _scopes = v; + _scopesSet = true; + } + + /// (Write-Only) Relying Party Secret (provided by OpenID Provider) + + String get secret { + if (!_secretSet && _apiMapResponse.containsKey('secret')) { + _secret = _apiMapResponse['secret'] == null + ? null + : _apiMapResponse['secret'].toString(); + _secretSet = true; + } + return _secret; + } + + set secret(String v) { + _secret = v; + _secretSet = true; + } + + /// Set user roles in Looker based on groups from OIDC + + bool get setRolesFromGroups { + if (!_setRolesFromGroupsSet && + _apiMapResponse.containsKey('set_roles_from_groups')) { + _setRolesFromGroups = _apiMapResponse['set_roles_from_groups']; + _setRolesFromGroupsSet = true; + } + return _setRolesFromGroups; + } + + set setRolesFromGroups(bool v) { + _setRolesFromGroups = v; + _setRolesFromGroupsSet = true; + } + + /// OpenID Provider Token Url + + String get tokenEndpoint { + if (!_tokenEndpointSet && _apiMapResponse.containsKey('token_endpoint')) { + _tokenEndpoint = _apiMapResponse['token_endpoint'] == null + ? null + : _apiMapResponse['token_endpoint'].toString(); + _tokenEndpointSet = true; + } + return _tokenEndpoint; + } + + set tokenEndpoint(String v) { + _tokenEndpoint = v; + _tokenEndpointSet = true; + } + + /// Name of user record attributes used to indicate email address field + + String get userAttributeMapEmail { + if (!_userAttributeMapEmailSet && + _apiMapResponse.containsKey('user_attribute_map_email')) { + _userAttributeMapEmail = + _apiMapResponse['user_attribute_map_email'] == null + ? null + : _apiMapResponse['user_attribute_map_email'].toString(); + _userAttributeMapEmailSet = true; + } + return _userAttributeMapEmail; + } + + set userAttributeMapEmail(String v) { + _userAttributeMapEmail = v; + _userAttributeMapEmailSet = true; + } + + /// Name of user record attributes used to indicate first name + + String get userAttributeMapFirstName { + if (!_userAttributeMapFirstNameSet && + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + _userAttributeMapFirstName = + _apiMapResponse['user_attribute_map_first_name'] == null + ? null + : _apiMapResponse['user_attribute_map_first_name'].toString(); + _userAttributeMapFirstNameSet = true; + } + return _userAttributeMapFirstName; + } + + set userAttributeMapFirstName(String v) { + _userAttributeMapFirstName = v; + _userAttributeMapFirstNameSet = true; + } + + /// Name of user record attributes used to indicate last name + + String get userAttributeMapLastName { + if (!_userAttributeMapLastNameSet && + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + _userAttributeMapLastName = + _apiMapResponse['user_attribute_map_last_name'] == null + ? null + : _apiMapResponse['user_attribute_map_last_name'].toString(); + _userAttributeMapLastNameSet = true; + } + return _userAttributeMapLastName; + } + + set userAttributeMapLastName(String v) { + _userAttributeMapLastName = v; + _userAttributeMapLastNameSet = true; + } + + /// (Read/Write) Array of mappings between OIDC User Attributes and arrays of Looker User Attribute ids + + List get userAttributesWithIds { + if (!_userAttributesWithIdsSet && + _apiMapResponse.containsKey('user_attributes_with_ids')) { + _userAttributesWithIds = + _apiMapResponse['user_attributes_with_ids'] == null + ? null + : (_apiMapResponse['user_attributes_with_ids'] as List) + .map((i) => OIDCUserAttributeWrite.fromResponse( + i, apiResponseContentType)) + .toList(); + _userAttributesWithIdsSet = true; + } + return _userAttributesWithIds; + } + + set userAttributesWithIds(List v) { + _userAttributesWithIds = v; + _userAttributesWithIdsSet = true; + } + + /// OpenID Provider User Information Url + + String get userinfoEndpoint { + if (!_userinfoEndpointSet && + _apiMapResponse.containsKey('userinfo_endpoint')) { + _userinfoEndpoint = _apiMapResponse['userinfo_endpoint'] == null + ? null + : _apiMapResponse['userinfo_endpoint'].toString(); + _userinfoEndpointSet = true; + } + return _userinfoEndpoint; + } + + set userinfoEndpoint(String v) { + _userinfoEndpoint = v; + _userinfoEndpointSet = true; + } + + /// Allow OIDC auth'd users to be members of non-reflected Looker groups. If 'false', user will be removed from non-reflected groups on login. + + bool get allowNormalGroupMembership { + if (!_allowNormalGroupMembershipSet && + _apiMapResponse.containsKey('allow_normal_group_membership')) { + _allowNormalGroupMembership = + _apiMapResponse['allow_normal_group_membership']; + _allowNormalGroupMembershipSet = true; + } + return _allowNormalGroupMembership; + } + + set allowNormalGroupMembership(bool v) { + _allowNormalGroupMembership = v; + _allowNormalGroupMembershipSet = true; + } + + /// OIDC auth'd users will inherit roles from non-reflected Looker groups. + + bool get allowRolesFromNormalGroups { + if (!_allowRolesFromNormalGroupsSet && + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + _allowRolesFromNormalGroups = + _apiMapResponse['allow_roles_from_normal_groups']; + _allowRolesFromNormalGroupsSet = true; + } + return _allowRolesFromNormalGroups; + } + + set allowRolesFromNormalGroups(bool v) { + _allowRolesFromNormalGroups = v; + _allowRolesFromNormalGroupsSet = true; + } + + /// Allows roles to be directly assigned to OIDC auth'd users. + + bool get allowDirectRoles { + if (!_allowDirectRolesSet && + _apiMapResponse.containsKey('allow_direct_roles')) { + _allowDirectRoles = _apiMapResponse['allow_direct_roles']; + _allowDirectRolesSet = true; + } + return _allowDirectRoles; + } + + set allowDirectRoles(bool v) { + _allowDirectRoles = v; + _allowDirectRolesSet = true; + } + + WriteOIDCConfig() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteOIDCConfig.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_alternateEmailLoginAllowedSet || + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + json['alternate_email_login_allowed'] = alternateEmailLoginAllowed; + } + if (_audienceSet || _apiMapResponse.containsKey('audience')) { + json['audience'] = audience; + } + if (_authRequiresRoleSet || + _apiMapResponse.containsKey('auth_requires_role')) { + json['auth_requires_role'] = authRequiresRole; + } + if (_authorizationEndpointSet || + _apiMapResponse.containsKey('authorization_endpoint')) { + json['authorization_endpoint'] = authorizationEndpoint; + } + if (_defaultNewUserGroupIdsSet || + _apiMapResponse.containsKey('default_new_user_group_ids')) { + json['default_new_user_group_ids'] = defaultNewUserGroupIds; + } + if (_defaultNewUserRoleIdsSet || + _apiMapResponse.containsKey('default_new_user_role_ids')) { + json['default_new_user_role_ids'] = defaultNewUserRoleIds; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_groupsAttributeSet || + _apiMapResponse.containsKey('groups_attribute')) { + json['groups_attribute'] = groupsAttribute; + } + if (_groupsWithRoleIdsSet || + _apiMapResponse.containsKey('groups_with_role_ids')) { + json['groups_with_role_ids'] = groupsWithRoleIds == null + ? null + : groupsWithRoleIds.map((i) => i.toJson()).toList(); + } + if (_identifierSet || _apiMapResponse.containsKey('identifier')) { + json['identifier'] = identifier; + } + if (_issuerSet || _apiMapResponse.containsKey('issuer')) { + json['issuer'] = issuer; + } + if (_newUserMigrationTypesSet || + _apiMapResponse.containsKey('new_user_migration_types')) { + json['new_user_migration_types'] = newUserMigrationTypes; + } + if (_scopesSet || _apiMapResponse.containsKey('scopes')) { + json['scopes'] = scopes; + } + if (_secretSet || _apiMapResponse.containsKey('secret')) { + json['secret'] = secret; + } + if (_setRolesFromGroupsSet || + _apiMapResponse.containsKey('set_roles_from_groups')) { + json['set_roles_from_groups'] = setRolesFromGroups; + } + if (_tokenEndpointSet || _apiMapResponse.containsKey('token_endpoint')) { + json['token_endpoint'] = tokenEndpoint; + } + if (_userAttributeMapEmailSet || + _apiMapResponse.containsKey('user_attribute_map_email')) { + json['user_attribute_map_email'] = userAttributeMapEmail; + } + if (_userAttributeMapFirstNameSet || + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + json['user_attribute_map_first_name'] = userAttributeMapFirstName; + } + if (_userAttributeMapLastNameSet || + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + json['user_attribute_map_last_name'] = userAttributeMapLastName; + } + if (_userAttributesWithIdsSet || + _apiMapResponse.containsKey('user_attributes_with_ids')) { + json['user_attributes_with_ids'] = userAttributesWithIds == null + ? null + : userAttributesWithIds.map((i) => i.toJson()).toList(); + } + if (_userinfoEndpointSet || + _apiMapResponse.containsKey('userinfo_endpoint')) { + json['userinfo_endpoint'] = userinfoEndpoint; + } + if (_allowNormalGroupMembershipSet || + _apiMapResponse.containsKey('allow_normal_group_membership')) { + json['allow_normal_group_membership'] = allowNormalGroupMembership; + } + if (_allowRolesFromNormalGroupsSet || + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + json['allow_roles_from_normal_groups'] = allowRolesFromNormalGroups; + } + if (_allowDirectRolesSet || + _apiMapResponse.containsKey('allow_direct_roles')) { + json['allow_direct_roles'] = allowDirectRoles; + } + return json; + } +} + +/// Dynamic writeable type for PasswordConfig removes: +/// can +class WritePasswordConfig { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + int _minLength; + bool _minLengthSet = false; + + bool _requireNumeric; + bool _requireNumericSet = false; + + bool _requireUpperlower; + bool _requireUpperlowerSet = false; + + bool _requireSpecial; + bool _requireSpecialSet = false; + + /// Minimum number of characters required for a new password. Must be between 7 and 100 + + int get minLength { + if (!_minLengthSet && _apiMapResponse.containsKey('min_length')) { + _minLength = _apiMapResponse['min_length']; + _minLengthSet = true; + } + return _minLength; + } + + set minLength(int v) { + _minLength = v; + _minLengthSet = true; + } + + /// Require at least one numeric character + + bool get requireNumeric { + if (!_requireNumericSet && _apiMapResponse.containsKey('require_numeric')) { + _requireNumeric = _apiMapResponse['require_numeric']; + _requireNumericSet = true; + } + return _requireNumeric; + } + + set requireNumeric(bool v) { + _requireNumeric = v; + _requireNumericSet = true; + } + + /// Require at least one uppercase and one lowercase letter + + bool get requireUpperlower { + if (!_requireUpperlowerSet && + _apiMapResponse.containsKey('require_upperlower')) { + _requireUpperlower = _apiMapResponse['require_upperlower']; + _requireUpperlowerSet = true; + } + return _requireUpperlower; + } + + set requireUpperlower(bool v) { + _requireUpperlower = v; + _requireUpperlowerSet = true; + } + + /// Require at least one special character + + bool get requireSpecial { + if (!_requireSpecialSet && _apiMapResponse.containsKey('require_special')) { + _requireSpecial = _apiMapResponse['require_special']; + _requireSpecialSet = true; + } + return _requireSpecial; + } + + set requireSpecial(bool v) { + _requireSpecial = v; + _requireSpecialSet = true; + } + + WritePasswordConfig() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WritePasswordConfig.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_minLengthSet || _apiMapResponse.containsKey('min_length')) { + json['min_length'] = minLength; + } + if (_requireNumericSet || _apiMapResponse.containsKey('require_numeric')) { + json['require_numeric'] = requireNumeric; + } + if (_requireUpperlowerSet || + _apiMapResponse.containsKey('require_upperlower')) { + json['require_upperlower'] = requireUpperlower; + } + if (_requireSpecialSet || _apiMapResponse.containsKey('require_special')) { + json['require_special'] = requireSpecial; + } + return json; + } +} + +/// Dynamic writeable type for PermissionSet removes: +/// can, all_access, built_in, id, url +class WritePermissionSet { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + List _permissions; + bool _permissionsSet = false; + + /// Name of PermissionSet + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + List get permissions { + if (!_permissionsSet && _apiMapResponse.containsKey('permissions')) { + _permissions = _apiMapResponse['permissions'] == null + ? null + : _apiMapResponse['permissions'] + .map((i) => i as String) + .toList(); + _permissionsSet = true; + } + return _permissions; + } + + set permissions(List v) { + _permissions = v; + _permissionsSet = true; + } + + WritePermissionSet() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WritePermissionSet.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_permissionsSet || _apiMapResponse.containsKey('permissions')) { + json['permissions'] = permissions; + } + return json; + } +} + +/// Dynamic writeable type for Project removes: +/// can, id, uses_git, is_example +class WriteProject { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _gitRemoteUrl; + bool _gitRemoteUrlSet = false; + + String _gitUsername; + bool _gitUsernameSet = false; + + String _gitPassword; + bool _gitPasswordSet = false; + + String _gitProductionBranchName; + bool _gitProductionBranchNameSet = false; + + bool _useGitCookieAuth; + bool _useGitCookieAuthSet = false; + + String _gitUsernameUserAttribute; + bool _gitUsernameUserAttributeSet = false; + + String _gitPasswordUserAttribute; + bool _gitPasswordUserAttributeSet = false; + + String _gitServiceName; + bool _gitServiceNameSet = false; + + int _gitApplicationServerHttpPort; + bool _gitApplicationServerHttpPortSet = false; + + String _gitApplicationServerHttpScheme; + bool _gitApplicationServerHttpSchemeSet = false; + + String _deploySecret; + bool _deploySecretSet = false; + + bool _unsetDeploySecret; + bool _unsetDeploySecretSet = false; + + PullRequestMode _pullRequestMode; + bool _pullRequestModeSet = false; + + bool _validationRequired; + bool _validationRequiredSet = false; + + bool _gitReleaseMgmtEnabled; + bool _gitReleaseMgmtEnabledSet = false; + + bool _allowWarnings; + bool _allowWarningsSet = false; + + String _dependencyStatus; + bool _dependencyStatusSet = false; + + /// Project display name + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Git remote repository url + + String get gitRemoteUrl { + if (!_gitRemoteUrlSet && _apiMapResponse.containsKey('git_remote_url')) { + _gitRemoteUrl = _apiMapResponse['git_remote_url'] == null + ? null + : _apiMapResponse['git_remote_url'].toString(); + _gitRemoteUrlSet = true; + } + return _gitRemoteUrl; + } + + set gitRemoteUrl(String v) { + _gitRemoteUrl = v; + _gitRemoteUrlSet = true; + } + + /// Git username for HTTPS authentication. (For production only, if using user attributes.) + + String get gitUsername { + if (!_gitUsernameSet && _apiMapResponse.containsKey('git_username')) { + _gitUsername = _apiMapResponse['git_username'] == null + ? null + : _apiMapResponse['git_username'].toString(); + _gitUsernameSet = true; + } + return _gitUsername; + } + + set gitUsername(String v) { + _gitUsername = v; + _gitUsernameSet = true; + } + + /// (Write-Only) Git password for HTTPS authentication. (For production only, if using user attributes.) + + String get gitPassword { + if (!_gitPasswordSet && _apiMapResponse.containsKey('git_password')) { + _gitPassword = _apiMapResponse['git_password'] == null + ? null + : _apiMapResponse['git_password'].toString(); + _gitPasswordSet = true; + } + return _gitPassword; + } + + set gitPassword(String v) { + _gitPassword = v; + _gitPasswordSet = true; + } + + /// Git production branch name. Defaults to master. Supported only in Looker 21.0 and higher. + + String get gitProductionBranchName { + if (!_gitProductionBranchNameSet && + _apiMapResponse.containsKey('git_production_branch_name')) { + _gitProductionBranchName = + _apiMapResponse['git_production_branch_name'] == null + ? null + : _apiMapResponse['git_production_branch_name'].toString(); + _gitProductionBranchNameSet = true; + } + return _gitProductionBranchName; + } + + set gitProductionBranchName(String v) { + _gitProductionBranchName = v; + _gitProductionBranchNameSet = true; + } + + /// If true, the project uses a git cookie for authentication. + + bool get useGitCookieAuth { + if (!_useGitCookieAuthSet && + _apiMapResponse.containsKey('use_git_cookie_auth')) { + _useGitCookieAuth = _apiMapResponse['use_git_cookie_auth']; + _useGitCookieAuthSet = true; + } + return _useGitCookieAuth; + } + + set useGitCookieAuth(bool v) { + _useGitCookieAuth = v; + _useGitCookieAuthSet = true; + } + + /// User attribute name for username in per-user HTTPS authentication. + + String get gitUsernameUserAttribute { + if (!_gitUsernameUserAttributeSet && + _apiMapResponse.containsKey('git_username_user_attribute')) { + _gitUsernameUserAttribute = + _apiMapResponse['git_username_user_attribute'] == null + ? null + : _apiMapResponse['git_username_user_attribute'].toString(); + _gitUsernameUserAttributeSet = true; + } + return _gitUsernameUserAttribute; + } + + set gitUsernameUserAttribute(String v) { + _gitUsernameUserAttribute = v; + _gitUsernameUserAttributeSet = true; + } + + /// User attribute name for password in per-user HTTPS authentication. + + String get gitPasswordUserAttribute { + if (!_gitPasswordUserAttributeSet && + _apiMapResponse.containsKey('git_password_user_attribute')) { + _gitPasswordUserAttribute = + _apiMapResponse['git_password_user_attribute'] == null + ? null + : _apiMapResponse['git_password_user_attribute'].toString(); + _gitPasswordUserAttributeSet = true; + } + return _gitPasswordUserAttribute; + } + + set gitPasswordUserAttribute(String v) { + _gitPasswordUserAttribute = v; + _gitPasswordUserAttributeSet = true; + } + + /// Name of the git service provider + + String get gitServiceName { + if (!_gitServiceNameSet && + _apiMapResponse.containsKey('git_service_name')) { + _gitServiceName = _apiMapResponse['git_service_name'] == null + ? null + : _apiMapResponse['git_service_name'].toString(); + _gitServiceNameSet = true; + } + return _gitServiceName; + } + + set gitServiceName(String v) { + _gitServiceName = v; + _gitServiceNameSet = true; + } + + /// Port that HTTP(S) application server is running on (for PRs, file browsing, etc.) + + int get gitApplicationServerHttpPort { + if (!_gitApplicationServerHttpPortSet && + _apiMapResponse.containsKey('git_application_server_http_port')) { + _gitApplicationServerHttpPort = + _apiMapResponse['git_application_server_http_port']; + _gitApplicationServerHttpPortSet = true; + } + return _gitApplicationServerHttpPort; + } + + set gitApplicationServerHttpPort(int v) { + _gitApplicationServerHttpPort = v; + _gitApplicationServerHttpPortSet = true; + } + + /// Scheme that is running on application server (for PRs, file browsing, etc.) + + String get gitApplicationServerHttpScheme { + if (!_gitApplicationServerHttpSchemeSet && + _apiMapResponse.containsKey('git_application_server_http_scheme')) { + _gitApplicationServerHttpScheme = + _apiMapResponse['git_application_server_http_scheme'] == null + ? null + : _apiMapResponse['git_application_server_http_scheme'] + .toString(); + _gitApplicationServerHttpSchemeSet = true; + } + return _gitApplicationServerHttpScheme; + } + + set gitApplicationServerHttpScheme(String v) { + _gitApplicationServerHttpScheme = v; + _gitApplicationServerHttpSchemeSet = true; + } + + /// (Write-Only) Optional secret token with which to authenticate requests to the webhook deploy endpoint. If not set, endpoint is unauthenticated. + + String get deploySecret { + if (!_deploySecretSet && _apiMapResponse.containsKey('deploy_secret')) { + _deploySecret = _apiMapResponse['deploy_secret'] == null + ? null + : _apiMapResponse['deploy_secret'].toString(); + _deploySecretSet = true; + } + return _deploySecret; + } + + set deploySecret(String v) { + _deploySecret = v; + _deploySecretSet = true; + } + + /// (Write-Only) When true, unsets the deploy secret to allow unauthenticated access to the webhook deploy endpoint. + + bool get unsetDeploySecret { + if (!_unsetDeploySecretSet && + _apiMapResponse.containsKey('unset_deploy_secret')) { + _unsetDeploySecret = _apiMapResponse['unset_deploy_secret']; + _unsetDeploySecretSet = true; + } + return _unsetDeploySecret; + } + + set unsetDeploySecret(bool v) { + _unsetDeploySecret = v; + _unsetDeploySecretSet = true; + } + + /// The git pull request policy for this project. Valid values are: "off", "links", "recommended", "required". + + PullRequestMode get pullRequestMode { + if (!_pullRequestModeSet && + _apiMapResponse.containsKey('pull_request_mode')) { + _pullRequestMode = PullRequestModeMapper.fromStringValue( + _apiMapResponse['pull_request_mode']); + _pullRequestModeSet = true; + } + return _pullRequestMode; + } + + set pullRequestMode(PullRequestMode v) { + _pullRequestMode = v; + _pullRequestModeSet = true; + } + + /// Validation policy: If true, the project must pass validation checks before project changes can be committed to the git repository + + bool get validationRequired { + if (!_validationRequiredSet && + _apiMapResponse.containsKey('validation_required')) { + _validationRequired = _apiMapResponse['validation_required']; + _validationRequiredSet = true; + } + return _validationRequired; + } + + set validationRequired(bool v) { + _validationRequired = v; + _validationRequiredSet = true; + } + + /// If true, advanced git release management is enabled for this project + + bool get gitReleaseMgmtEnabled { + if (!_gitReleaseMgmtEnabledSet && + _apiMapResponse.containsKey('git_release_mgmt_enabled')) { + _gitReleaseMgmtEnabled = _apiMapResponse['git_release_mgmt_enabled']; + _gitReleaseMgmtEnabledSet = true; + } + return _gitReleaseMgmtEnabled; + } + + set gitReleaseMgmtEnabled(bool v) { + _gitReleaseMgmtEnabled = v; + _gitReleaseMgmtEnabledSet = true; + } + + /// Validation policy: If true, the project can be committed with warnings when `validation_required` is true. (`allow_warnings` does nothing if `validation_required` is false). + + bool get allowWarnings { + if (!_allowWarningsSet && _apiMapResponse.containsKey('allow_warnings')) { + _allowWarnings = _apiMapResponse['allow_warnings']; + _allowWarningsSet = true; + } + return _allowWarnings; + } + + set allowWarnings(bool v) { + _allowWarnings = v; + _allowWarningsSet = true; + } + + /// Status of dependencies in your manifest & lockfile + + String get dependencyStatus { + if (!_dependencyStatusSet && + _apiMapResponse.containsKey('dependency_status')) { + _dependencyStatus = _apiMapResponse['dependency_status'] == null + ? null + : _apiMapResponse['dependency_status'].toString(); + _dependencyStatusSet = true; + } + return _dependencyStatus; + } + + set dependencyStatus(String v) { + _dependencyStatus = v; + _dependencyStatusSet = true; + } + + WriteProject() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteProject.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_gitRemoteUrlSet || _apiMapResponse.containsKey('git_remote_url')) { + json['git_remote_url'] = gitRemoteUrl; + } + if (_gitUsernameSet || _apiMapResponse.containsKey('git_username')) { + json['git_username'] = gitUsername; + } + if (_gitPasswordSet || _apiMapResponse.containsKey('git_password')) { + json['git_password'] = gitPassword; + } + if (_gitProductionBranchNameSet || + _apiMapResponse.containsKey('git_production_branch_name')) { + json['git_production_branch_name'] = gitProductionBranchName; + } + if (_useGitCookieAuthSet || + _apiMapResponse.containsKey('use_git_cookie_auth')) { + json['use_git_cookie_auth'] = useGitCookieAuth; + } + if (_gitUsernameUserAttributeSet || + _apiMapResponse.containsKey('git_username_user_attribute')) { + json['git_username_user_attribute'] = gitUsernameUserAttribute; + } + if (_gitPasswordUserAttributeSet || + _apiMapResponse.containsKey('git_password_user_attribute')) { + json['git_password_user_attribute'] = gitPasswordUserAttribute; + } + if (_gitServiceNameSet || _apiMapResponse.containsKey('git_service_name')) { + json['git_service_name'] = gitServiceName; + } + if (_gitApplicationServerHttpPortSet || + _apiMapResponse.containsKey('git_application_server_http_port')) { + json['git_application_server_http_port'] = gitApplicationServerHttpPort; + } + if (_gitApplicationServerHttpSchemeSet || + _apiMapResponse.containsKey('git_application_server_http_scheme')) { + json['git_application_server_http_scheme'] = + gitApplicationServerHttpScheme; + } + if (_deploySecretSet || _apiMapResponse.containsKey('deploy_secret')) { + json['deploy_secret'] = deploySecret; + } + if (_unsetDeploySecretSet || + _apiMapResponse.containsKey('unset_deploy_secret')) { + json['unset_deploy_secret'] = unsetDeploySecret; + } + if (_pullRequestModeSet || + _apiMapResponse.containsKey('pull_request_mode')) { + json['pull_request_mode'] = + PullRequestModeMapper.toStringValue(pullRequestMode); + } + if (_validationRequiredSet || + _apiMapResponse.containsKey('validation_required')) { + json['validation_required'] = validationRequired; + } + if (_gitReleaseMgmtEnabledSet || + _apiMapResponse.containsKey('git_release_mgmt_enabled')) { + json['git_release_mgmt_enabled'] = gitReleaseMgmtEnabled; + } + if (_allowWarningsSet || _apiMapResponse.containsKey('allow_warnings')) { + json['allow_warnings'] = allowWarnings; + } + if (_dependencyStatusSet || + _apiMapResponse.containsKey('dependency_status')) { + json['dependency_status'] = dependencyStatus; + } + return json; + } +} + +/// Dynamic writeable type for Query removes: +/// can, id, slug, share_url, expanded_share_url, url, has_table_calculations +class WriteQuery { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _model; + bool _modelSet = false; + + String _view; + bool _viewSet = false; + + List _fields; + bool _fieldsSet = false; + + List _pivots; + bool _pivotsSet = false; + + List _fillFields; + bool _fillFieldsSet = false; + + Map _filters; + bool _filtersSet = false; + + String _filterExpression; + bool _filterExpressionSet = false; + + List _sorts; + bool _sortsSet = false; + + String _limit; + bool _limitSet = false; + + String _columnLimit; + bool _columnLimitSet = false; + + bool _total; + bool _totalSet = false; + + String _rowTotal; + bool _rowTotalSet = false; + + List _subtotals; + bool _subtotalsSet = false; + + Map _visConfig; + bool _visConfigSet = false; + + Map _filterConfig; + bool _filterConfigSet = false; + + String _visibleUiSections; + bool _visibleUiSectionsSet = false; + + String _dynamicFields; + bool _dynamicFieldsSet = false; + + String _clientId; + bool _clientIdSet = false; + + String _queryTimezone; + bool _queryTimezoneSet = false; + + /// Model + + String get model { + if (!_modelSet && _apiMapResponse.containsKey('model')) { + _model = _apiMapResponse['model'] == null + ? null + : _apiMapResponse['model'].toString(); + _modelSet = true; + } + return _model; + } + + set model(String v) { + _model = v; + _modelSet = true; + } + + /// Explore Name + + String get view { + if (!_viewSet && _apiMapResponse.containsKey('view')) { + _view = _apiMapResponse['view'] == null + ? null + : _apiMapResponse['view'].toString(); + _viewSet = true; + } + return _view; + } + + set view(String v) { + _view = v; + _viewSet = true; + } + + /// Fields + + List get fields { + if (!_fieldsSet && _apiMapResponse.containsKey('fields')) { + _fields = _apiMapResponse['fields'] == null + ? null + : _apiMapResponse['fields'].map((i) => i as String).toList(); + _fieldsSet = true; + } + return _fields; + } + + set fields(List v) { + _fields = v; + _fieldsSet = true; + } + + /// Pivots + + List get pivots { + if (!_pivotsSet && _apiMapResponse.containsKey('pivots')) { + _pivots = _apiMapResponse['pivots'] == null + ? null + : _apiMapResponse['pivots'].map((i) => i as String).toList(); + _pivotsSet = true; + } + return _pivots; + } + + set pivots(List v) { + _pivots = v; + _pivotsSet = true; + } + + /// Fill Fields + + List get fillFields { + if (!_fillFieldsSet && _apiMapResponse.containsKey('fill_fields')) { + _fillFields = _apiMapResponse['fill_fields'] == null + ? null + : _apiMapResponse['fill_fields'] + .map((i) => i as String) + .toList(); + _fillFieldsSet = true; + } + return _fillFields; + } + + set fillFields(List v) { + _fillFields = v; + _fillFieldsSet = true; + } + + /// Filters + + Map get filters { + if (!_filtersSet && _apiMapResponse.containsKey('filters')) { + _filters = _apiMapResponse['filters']; + _filtersSet = true; + } + return _filters; + } + + set filters(Map v) { + _filters = v; + _filtersSet = true; + } + + /// Filter Expression + + String get filterExpression { + if (!_filterExpressionSet && + _apiMapResponse.containsKey('filter_expression')) { + _filterExpression = _apiMapResponse['filter_expression'] == null + ? null + : _apiMapResponse['filter_expression'].toString(); + _filterExpressionSet = true; + } + return _filterExpression; + } + + set filterExpression(String v) { + _filterExpression = v; + _filterExpressionSet = true; + } + + /// Sorting for the query results. Use the format `["view.field", ...]` to sort on fields in ascending order. Use the format `["view.field desc", ...]` to sort on fields in descending order. Use `["__UNSORTED__"]` (2 underscores before and after) to disable sorting entirely. Empty sorts `[]` will trigger a default sort. + + List get sorts { + if (!_sortsSet && _apiMapResponse.containsKey('sorts')) { + _sorts = _apiMapResponse['sorts'] == null + ? null + : _apiMapResponse['sorts'].map((i) => i as String).toList(); + _sortsSet = true; + } + return _sorts; + } + + set sorts(List v) { + _sorts = v; + _sortsSet = true; + } + + /// Limit + + String get limit { + if (!_limitSet && _apiMapResponse.containsKey('limit')) { + _limit = _apiMapResponse['limit'] == null + ? null + : _apiMapResponse['limit'].toString(); + _limitSet = true; + } + return _limit; + } + + set limit(String v) { + _limit = v; + _limitSet = true; + } + + /// Column Limit + + String get columnLimit { + if (!_columnLimitSet && _apiMapResponse.containsKey('column_limit')) { + _columnLimit = _apiMapResponse['column_limit'] == null + ? null + : _apiMapResponse['column_limit'].toString(); + _columnLimitSet = true; + } + return _columnLimit; + } + + set columnLimit(String v) { + _columnLimit = v; + _columnLimitSet = true; + } + + /// Total + + bool get total { + if (!_totalSet && _apiMapResponse.containsKey('total')) { + _total = _apiMapResponse['total']; + _totalSet = true; + } + return _total; + } + + set total(bool v) { + _total = v; + _totalSet = true; + } + + /// Raw Total + + String get rowTotal { + if (!_rowTotalSet && _apiMapResponse.containsKey('row_total')) { + _rowTotal = _apiMapResponse['row_total'] == null + ? null + : _apiMapResponse['row_total'].toString(); + _rowTotalSet = true; + } + return _rowTotal; + } + + set rowTotal(String v) { + _rowTotal = v; + _rowTotalSet = true; + } + + /// Fields on which to run subtotals + + List get subtotals { + if (!_subtotalsSet && _apiMapResponse.containsKey('subtotals')) { + _subtotals = _apiMapResponse['subtotals'] == null + ? null + : _apiMapResponse['subtotals'] + .map((i) => i as String) + .toList(); + _subtotalsSet = true; + } + return _subtotals; + } + + set subtotals(List v) { + _subtotals = v; + _subtotalsSet = true; + } + + /// Visualization configuration properties. These properties are typically opaque and differ based on the type of visualization used. There is no specified set of allowed keys. The values can be any type supported by JSON. A "type" key with a string value is often present, and is used by Looker to determine which visualization to present. Visualizations ignore unknown vis_config properties. + + Map get visConfig { + if (!_visConfigSet && _apiMapResponse.containsKey('vis_config')) { + _visConfig = _apiMapResponse['vis_config']; + _visConfigSet = true; + } + return _visConfig; + } + + set visConfig(Map v) { + _visConfig = v; + _visConfigSet = true; + } + + /// The filter_config represents the state of the filter UI on the explore page for a given query. When running a query via the Looker UI, this parameter takes precedence over "filters". When creating a query or modifying an existing query, "filter_config" should be set to null. Setting it to any other value could cause unexpected filtering behavior. The format should be considered opaque. + + Map get filterConfig { + if (!_filterConfigSet && _apiMapResponse.containsKey('filter_config')) { + _filterConfig = _apiMapResponse['filter_config']; + _filterConfigSet = true; + } + return _filterConfig; + } + + set filterConfig(Map v) { + _filterConfig = v; + _filterConfigSet = true; + } + + /// Visible UI Sections + + String get visibleUiSections { + if (!_visibleUiSectionsSet && + _apiMapResponse.containsKey('visible_ui_sections')) { + _visibleUiSections = _apiMapResponse['visible_ui_sections'] == null + ? null + : _apiMapResponse['visible_ui_sections'].toString(); + _visibleUiSectionsSet = true; + } + return _visibleUiSections; + } + + set visibleUiSections(String v) { + _visibleUiSections = v; + _visibleUiSectionsSet = true; + } + + /// Dynamic Fields + + String get dynamicFields { + if (!_dynamicFieldsSet && _apiMapResponse.containsKey('dynamic_fields')) { + _dynamicFields = _apiMapResponse['dynamic_fields'] == null + ? null + : _apiMapResponse['dynamic_fields'].toString(); + _dynamicFieldsSet = true; + } + return _dynamicFields; + } + + set dynamicFields(String v) { + _dynamicFields = v; + _dynamicFieldsSet = true; + } + + /// Client Id: used to generate shortened explore URLs. If set by client, must be a unique 22 character alphanumeric string. Otherwise one will be generated. + + String get clientId { + if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { + _clientId = _apiMapResponse['client_id'] == null + ? null + : _apiMapResponse['client_id'].toString(); + _clientIdSet = true; + } + return _clientId; + } + + set clientId(String v) { + _clientId = v; + _clientIdSet = true; + } + + /// Query Timezone + + String get queryTimezone { + if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { + _queryTimezone = _apiMapResponse['query_timezone'] == null + ? null + : _apiMapResponse['query_timezone'].toString(); + _queryTimezoneSet = true; + } + return _queryTimezone; + } + + set queryTimezone(String v) { + _queryTimezone = v; + _queryTimezoneSet = true; + } + + WriteQuery() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteQuery.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_modelSet || _apiMapResponse.containsKey('model')) { + json['model'] = model; + } + if (_viewSet || _apiMapResponse.containsKey('view')) { + json['view'] = view; + } + if (_fieldsSet || _apiMapResponse.containsKey('fields')) { + json['fields'] = fields; + } + if (_pivotsSet || _apiMapResponse.containsKey('pivots')) { + json['pivots'] = pivots; + } + if (_fillFieldsSet || _apiMapResponse.containsKey('fill_fields')) { + json['fill_fields'] = fillFields; + } + if (_filtersSet || _apiMapResponse.containsKey('filters')) { + json['filters'] = filters; + } + if (_filterExpressionSet || + _apiMapResponse.containsKey('filter_expression')) { + json['filter_expression'] = filterExpression; + } + if (_sortsSet || _apiMapResponse.containsKey('sorts')) { + json['sorts'] = sorts; + } + if (_limitSet || _apiMapResponse.containsKey('limit')) { + json['limit'] = limit; + } + if (_columnLimitSet || _apiMapResponse.containsKey('column_limit')) { + json['column_limit'] = columnLimit; + } + if (_totalSet || _apiMapResponse.containsKey('total')) { + json['total'] = total; + } + if (_rowTotalSet || _apiMapResponse.containsKey('row_total')) { + json['row_total'] = rowTotal; + } + if (_subtotalsSet || _apiMapResponse.containsKey('subtotals')) { + json['subtotals'] = subtotals; + } + if (_visConfigSet || _apiMapResponse.containsKey('vis_config')) { + json['vis_config'] = visConfig; + } + if (_filterConfigSet || _apiMapResponse.containsKey('filter_config')) { + json['filter_config'] = filterConfig; + } + if (_visibleUiSectionsSet || + _apiMapResponse.containsKey('visible_ui_sections')) { + json['visible_ui_sections'] = visibleUiSections; + } + if (_dynamicFieldsSet || _apiMapResponse.containsKey('dynamic_fields')) { + json['dynamic_fields'] = dynamicFields; + } + if (_clientIdSet || _apiMapResponse.containsKey('client_id')) { + json['client_id'] = clientId; + } + if (_queryTimezoneSet || _apiMapResponse.containsKey('query_timezone')) { + json['query_timezone'] = queryTimezone; + } + return json; + } +} + +/// Dynamic writeable type for RepositoryCredential removes: +/// can, id, root_project_id, remote_url, is_configured +class WriteRepositoryCredential { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _gitUsername; + bool _gitUsernameSet = false; + + String _gitPassword; + bool _gitPasswordSet = false; + + String _sshPublicKey; + bool _sshPublicKeySet = false; + + /// Git username for HTTPS authentication. + + String get gitUsername { + if (!_gitUsernameSet && _apiMapResponse.containsKey('git_username')) { + _gitUsername = _apiMapResponse['git_username'] == null + ? null + : _apiMapResponse['git_username'].toString(); + _gitUsernameSet = true; + } + return _gitUsername; + } + + set gitUsername(String v) { + _gitUsername = v; + _gitUsernameSet = true; + } + + /// (Write-Only) Git password for HTTPS authentication. + + String get gitPassword { + if (!_gitPasswordSet && _apiMapResponse.containsKey('git_password')) { + _gitPassword = _apiMapResponse['git_password'] == null + ? null + : _apiMapResponse['git_password'].toString(); + _gitPasswordSet = true; + } + return _gitPassword; + } + + set gitPassword(String v) { + _gitPassword = v; + _gitPasswordSet = true; + } + + /// Public deploy key for SSH authentication. + + String get sshPublicKey { + if (!_sshPublicKeySet && _apiMapResponse.containsKey('ssh_public_key')) { + _sshPublicKey = _apiMapResponse['ssh_public_key'] == null + ? null + : _apiMapResponse['ssh_public_key'].toString(); + _sshPublicKeySet = true; + } + return _sshPublicKey; + } + + set sshPublicKey(String v) { + _sshPublicKey = v; + _sshPublicKeySet = true; + } + + WriteRepositoryCredential() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteRepositoryCredential.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_gitUsernameSet || _apiMapResponse.containsKey('git_username')) { + json['git_username'] = gitUsername; + } + if (_gitPasswordSet || _apiMapResponse.containsKey('git_password')) { + json['git_password'] = gitPassword; + } + if (_sshPublicKeySet || _apiMapResponse.containsKey('ssh_public_key')) { + json['ssh_public_key'] = sshPublicKey; + } + return json; + } +} + +/// Dynamic writeable type for ResultMakerWithIdVisConfigAndDynamicFields removes: +/// id, dynamic_fields, filterables, sorts, merge_result_id, total, query_id, sql_query_id, vis_config +class WriteResultMakerWithIdVisConfigAndDynamicFields { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + WriteQuery _query; + bool _querySet = false; + + /// Dynamic writeable type for Query removes: + /// can, id, slug, share_url, expanded_share_url, url, has_table_calculations + + WriteQuery get query { + if (!_querySet && _apiMapResponse.containsKey('query')) { + _query = _apiMapResponse['query'] == null + ? null + : WriteQuery.fromResponse( + _apiMapResponse['query'], apiResponseContentType); + _querySet = true; + } + return _query; + } + + set query(WriteQuery v) { + _query = v; + _querySet = true; + } + + WriteResultMakerWithIdVisConfigAndDynamicFields() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteResultMakerWithIdVisConfigAndDynamicFields.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_querySet || _apiMapResponse.containsKey('query')) { + json['query'] = query == null ? null : query.toJson(); + } + return json; + } +} + +/// Dynamic writeable type for Role removes: +/// can, id, url, users_url +class WriteRole { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + WritePermissionSet _permissionSet; + bool _permissionSetSet = false; + + int _permissionSetId; + bool _permissionSetIdSet = false; + + WriteModelSet _modelSet; + bool _modelSetSet = false; + + int _modelSetId; + bool _modelSetIdSet = false; + + /// Name of Role + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Dynamic writeable type for PermissionSet removes: + /// can, all_access, built_in, id, url + + WritePermissionSet get permissionSet { + if (!_permissionSetSet && _apiMapResponse.containsKey('permission_set')) { + _permissionSet = _apiMapResponse['permission_set'] == null + ? null + : WritePermissionSet.fromResponse( + _apiMapResponse['permission_set'], apiResponseContentType); + _permissionSetSet = true; + } + return _permissionSet; + } + + set permissionSet(WritePermissionSet v) { + _permissionSet = v; + _permissionSetSet = true; + } + + /// (Write-Only) Id of permission set + + int get permissionSetId { + if (!_permissionSetIdSet && + _apiMapResponse.containsKey('permission_set_id')) { + _permissionSetId = _apiMapResponse['permission_set_id']; + _permissionSetIdSet = true; + } + return _permissionSetId; + } + + set permissionSetId(int v) { + _permissionSetId = v; + _permissionSetIdSet = true; + } + + /// Dynamic writeable type for ModelSet removes: + /// can, all_access, built_in, id, url + + WriteModelSet get modelSet { + if (!_modelSetSet && _apiMapResponse.containsKey('model_set')) { + _modelSet = _apiMapResponse['model_set'] == null + ? null + : WriteModelSet.fromResponse( + _apiMapResponse['model_set'], apiResponseContentType); + _modelSetSet = true; + } + return _modelSet; + } + + set modelSet(WriteModelSet v) { + _modelSet = v; + _modelSetSet = true; + } + + /// (Write-Only) Id of model set + + int get modelSetId { + if (!_modelSetIdSet && _apiMapResponse.containsKey('model_set_id')) { + _modelSetId = _apiMapResponse['model_set_id']; + _modelSetIdSet = true; + } + return _modelSetId; + } + + set modelSetId(int v) { + _modelSetId = v; + _modelSetIdSet = true; + } + + WriteRole() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteRole.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_permissionSetSet || _apiMapResponse.containsKey('permission_set')) { + json['permission_set'] = + permissionSet == null ? null : permissionSet.toJson(); + } + if (_permissionSetIdSet || + _apiMapResponse.containsKey('permission_set_id')) { + json['permission_set_id'] = permissionSetId; + } + if (_modelSetSet || _apiMapResponse.containsKey('model_set')) { + json['model_set'] = modelSet == null ? null : modelSet.toJson(); + } + if (_modelSetIdSet || _apiMapResponse.containsKey('model_set_id')) { + json['model_set_id'] = modelSetId; + } + return json; + } +} + +/// Dynamic writeable type for SamlConfig removes: +/// can, test_slug, modified_at, modified_by, default_new_user_roles, default_new_user_groups, groups, user_attributes, url +class WriteSamlConfig { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _enabled; + bool _enabledSet = false; + + String _idpCert; + bool _idpCertSet = false; + + String _idpUrl; + bool _idpUrlSet = false; + + String _idpIssuer; + bool _idpIssuerSet = false; + + String _idpAudience; + bool _idpAudienceSet = false; + + int _allowedClockDrift; + bool _allowedClockDriftSet = false; + + String _userAttributeMapEmail; + bool _userAttributeMapEmailSet = false; + + String _userAttributeMapFirstName; + bool _userAttributeMapFirstNameSet = false; + + String _userAttributeMapLastName; + bool _userAttributeMapLastNameSet = false; + + String _newUserMigrationTypes; + bool _newUserMigrationTypesSet = false; + + bool _alternateEmailLoginAllowed; + bool _alternateEmailLoginAllowedSet = false; + + List _defaultNewUserRoleIds; + bool _defaultNewUserRoleIdsSet = false; + + List _defaultNewUserGroupIds; + bool _defaultNewUserGroupIdsSet = false; + + bool _setRolesFromGroups; + bool _setRolesFromGroupsSet = false; + + String _groupsAttribute; + bool _groupsAttributeSet = false; + + List _groupsWithRoleIds; + bool _groupsWithRoleIdsSet = false; + + bool _authRequiresRole; + bool _authRequiresRoleSet = false; + + List _userAttributesWithIds; + bool _userAttributesWithIdsSet = false; + + String _groupsFinderType; + bool _groupsFinderTypeSet = false; + + String _groupsMemberValue; + bool _groupsMemberValueSet = false; + + bool _bypassLoginPage; + bool _bypassLoginPageSet = false; + + bool _allowNormalGroupMembership; + bool _allowNormalGroupMembershipSet = false; + + bool _allowRolesFromNormalGroups; + bool _allowRolesFromNormalGroupsSet = false; + + bool _allowDirectRoles; + bool _allowDirectRolesSet = false; + + /// Enable/Disable Saml authentication for the server + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Identity Provider Certificate (provided by IdP) + + String get idpCert { + if (!_idpCertSet && _apiMapResponse.containsKey('idp_cert')) { + _idpCert = _apiMapResponse['idp_cert'] == null + ? null + : _apiMapResponse['idp_cert'].toString(); + _idpCertSet = true; + } + return _idpCert; + } + + set idpCert(String v) { + _idpCert = v; + _idpCertSet = true; + } + + /// Identity Provider Url (provided by IdP) + + String get idpUrl { + if (!_idpUrlSet && _apiMapResponse.containsKey('idp_url')) { + _idpUrl = _apiMapResponse['idp_url'] == null + ? null + : _apiMapResponse['idp_url'].toString(); + _idpUrlSet = true; + } + return _idpUrl; + } + + set idpUrl(String v) { + _idpUrl = v; + _idpUrlSet = true; + } + + /// Identity Provider Issuer (provided by IdP) + + String get idpIssuer { + if (!_idpIssuerSet && _apiMapResponse.containsKey('idp_issuer')) { + _idpIssuer = _apiMapResponse['idp_issuer'] == null + ? null + : _apiMapResponse['idp_issuer'].toString(); + _idpIssuerSet = true; + } + return _idpIssuer; + } + + set idpIssuer(String v) { + _idpIssuer = v; + _idpIssuerSet = true; + } + + /// Identity Provider Audience (set in IdP config). Optional in Looker. Set this only if you want Looker to validate the audience value returned by the IdP. + + String get idpAudience { + if (!_idpAudienceSet && _apiMapResponse.containsKey('idp_audience')) { + _idpAudience = _apiMapResponse['idp_audience'] == null + ? null + : _apiMapResponse['idp_audience'].toString(); + _idpAudienceSet = true; + } + return _idpAudience; + } + + set idpAudience(String v) { + _idpAudience = v; + _idpAudienceSet = true; + } + + /// Count of seconds of clock drift to allow when validating timestamps of assertions. + + int get allowedClockDrift { + if (!_allowedClockDriftSet && + _apiMapResponse.containsKey('allowed_clock_drift')) { + _allowedClockDrift = _apiMapResponse['allowed_clock_drift']; + _allowedClockDriftSet = true; + } + return _allowedClockDrift; + } + + set allowedClockDrift(int v) { + _allowedClockDrift = v; + _allowedClockDriftSet = true; + } + + /// Name of user record attributes used to indicate email address field + + String get userAttributeMapEmail { + if (!_userAttributeMapEmailSet && + _apiMapResponse.containsKey('user_attribute_map_email')) { + _userAttributeMapEmail = + _apiMapResponse['user_attribute_map_email'] == null + ? null + : _apiMapResponse['user_attribute_map_email'].toString(); + _userAttributeMapEmailSet = true; + } + return _userAttributeMapEmail; + } + + set userAttributeMapEmail(String v) { + _userAttributeMapEmail = v; + _userAttributeMapEmailSet = true; + } + + /// Name of user record attributes used to indicate first name + + String get userAttributeMapFirstName { + if (!_userAttributeMapFirstNameSet && + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + _userAttributeMapFirstName = + _apiMapResponse['user_attribute_map_first_name'] == null + ? null + : _apiMapResponse['user_attribute_map_first_name'].toString(); + _userAttributeMapFirstNameSet = true; + } + return _userAttributeMapFirstName; + } + + set userAttributeMapFirstName(String v) { + _userAttributeMapFirstName = v; + _userAttributeMapFirstNameSet = true; + } + + /// Name of user record attributes used to indicate last name + + String get userAttributeMapLastName { + if (!_userAttributeMapLastNameSet && + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + _userAttributeMapLastName = + _apiMapResponse['user_attribute_map_last_name'] == null + ? null + : _apiMapResponse['user_attribute_map_last_name'].toString(); + _userAttributeMapLastNameSet = true; + } + return _userAttributeMapLastName; + } + + set userAttributeMapLastName(String v) { + _userAttributeMapLastName = v; + _userAttributeMapLastNameSet = true; + } + + /// Merge first-time saml login to existing user account by email addresses. When a user logs in for the first time via saml this option will connect this user into their existing account by finding the account with a matching email address by testing the given types of credentials for existing users. Otherwise a new user account will be created for the user. This list (if provided) must be a comma separated list of string like 'email,ldap,google' + + String get newUserMigrationTypes { + if (!_newUserMigrationTypesSet && + _apiMapResponse.containsKey('new_user_migration_types')) { + _newUserMigrationTypes = + _apiMapResponse['new_user_migration_types'] == null + ? null + : _apiMapResponse['new_user_migration_types'].toString(); + _newUserMigrationTypesSet = true; + } + return _newUserMigrationTypes; + } + + set newUserMigrationTypes(String v) { + _newUserMigrationTypes = v; + _newUserMigrationTypesSet = true; + } + + /// Allow alternate email-based login via '/login/email' for admins and for specified users with the 'login_special_email' permission. This option is useful as a fallback during ldap setup, if ldap config problems occur later, or if you need to support some users who are not in your ldap directory. Looker email/password logins are always disabled for regular users when ldap is enabled. + + bool get alternateEmailLoginAllowed { + if (!_alternateEmailLoginAllowedSet && + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + _alternateEmailLoginAllowed = + _apiMapResponse['alternate_email_login_allowed']; + _alternateEmailLoginAllowedSet = true; + } + return _alternateEmailLoginAllowed; + } + + set alternateEmailLoginAllowed(bool v) { + _alternateEmailLoginAllowed = v; + _alternateEmailLoginAllowedSet = true; + } + + /// (Write-Only) Array of ids of roles that will be applied to new users the first time they login via Saml + + List get defaultNewUserRoleIds { + if (!_defaultNewUserRoleIdsSet && + _apiMapResponse.containsKey('default_new_user_role_ids')) { + _defaultNewUserRoleIds = + _apiMapResponse['default_new_user_role_ids'] == null + ? null + : _apiMapResponse['default_new_user_role_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserRoleIdsSet = true; + } + return _defaultNewUserRoleIds; + } + + set defaultNewUserRoleIds(List v) { + _defaultNewUserRoleIds = v; + _defaultNewUserRoleIdsSet = true; + } + + /// (Write-Only) Array of ids of groups that will be applied to new users the first time they login via Saml + + List get defaultNewUserGroupIds { + if (!_defaultNewUserGroupIdsSet && + _apiMapResponse.containsKey('default_new_user_group_ids')) { + _defaultNewUserGroupIds = + _apiMapResponse['default_new_user_group_ids'] == null + ? null + : _apiMapResponse['default_new_user_group_ids'] + .map((i) => i as int) + .toList(); + _defaultNewUserGroupIdsSet = true; + } + return _defaultNewUserGroupIds; + } + + set defaultNewUserGroupIds(List v) { + _defaultNewUserGroupIds = v; + _defaultNewUserGroupIdsSet = true; + } + + /// Set user roles in Looker based on groups from Saml + + bool get setRolesFromGroups { + if (!_setRolesFromGroupsSet && + _apiMapResponse.containsKey('set_roles_from_groups')) { + _setRolesFromGroups = _apiMapResponse['set_roles_from_groups']; + _setRolesFromGroupsSet = true; + } + return _setRolesFromGroups; + } + + set setRolesFromGroups(bool v) { + _setRolesFromGroups = v; + _setRolesFromGroupsSet = true; + } + + /// Name of user record attributes used to indicate groups. Used when 'groups_finder_type' is set to 'grouped_attribute_values' + + String get groupsAttribute { + if (!_groupsAttributeSet && + _apiMapResponse.containsKey('groups_attribute')) { + _groupsAttribute = _apiMapResponse['groups_attribute'] == null + ? null + : _apiMapResponse['groups_attribute'].toString(); + _groupsAttributeSet = true; + } + return _groupsAttribute; + } + + set groupsAttribute(String v) { + _groupsAttribute = v; + _groupsAttributeSet = true; + } + + /// (Read/Write) Array of mappings between Saml Groups and arrays of Looker Role ids + + List get groupsWithRoleIds { + if (!_groupsWithRoleIdsSet && + _apiMapResponse.containsKey('groups_with_role_ids')) { + _groupsWithRoleIds = _apiMapResponse['groups_with_role_ids'] == null + ? null + : (_apiMapResponse['groups_with_role_ids'] as List) + .map( + (i) => SamlGroupWrite.fromResponse(i, apiResponseContentType)) + .toList(); + _groupsWithRoleIdsSet = true; + } + return _groupsWithRoleIds; + } + + set groupsWithRoleIds(List v) { + _groupsWithRoleIds = v; + _groupsWithRoleIdsSet = true; + } + + /// Users will not be allowed to login at all unless a role for them is found in Saml if set to true + + bool get authRequiresRole { + if (!_authRequiresRoleSet && + _apiMapResponse.containsKey('auth_requires_role')) { + _authRequiresRole = _apiMapResponse['auth_requires_role']; + _authRequiresRoleSet = true; + } + return _authRequiresRole; + } + + set authRequiresRole(bool v) { + _authRequiresRole = v; + _authRequiresRoleSet = true; + } + + /// (Read/Write) Array of mappings between Saml User Attributes and arrays of Looker User Attribute ids + + List get userAttributesWithIds { + if (!_userAttributesWithIdsSet && + _apiMapResponse.containsKey('user_attributes_with_ids')) { + _userAttributesWithIds = + _apiMapResponse['user_attributes_with_ids'] == null + ? null + : (_apiMapResponse['user_attributes_with_ids'] as List) + .map((i) => SamlUserAttributeWrite.fromResponse( + i, apiResponseContentType)) + .toList(); + _userAttributesWithIdsSet = true; + } + return _userAttributesWithIds; + } + + set userAttributesWithIds(List v) { + _userAttributesWithIds = v; + _userAttributesWithIdsSet = true; + } + + /// Identifier for a strategy for how Looker will find groups in the SAML response. One of ['grouped_attribute_values', 'individual_attributes'] + + String get groupsFinderType { + if (!_groupsFinderTypeSet && + _apiMapResponse.containsKey('groups_finder_type')) { + _groupsFinderType = _apiMapResponse['groups_finder_type'] == null + ? null + : _apiMapResponse['groups_finder_type'].toString(); + _groupsFinderTypeSet = true; + } + return _groupsFinderType; + } + + set groupsFinderType(String v) { + _groupsFinderType = v; + _groupsFinderTypeSet = true; + } + + /// Value for group attribute used to indicate membership. Used when 'groups_finder_type' is set to 'individual_attributes' + + String get groupsMemberValue { + if (!_groupsMemberValueSet && + _apiMapResponse.containsKey('groups_member_value')) { + _groupsMemberValue = _apiMapResponse['groups_member_value'] == null + ? null + : _apiMapResponse['groups_member_value'].toString(); + _groupsMemberValueSet = true; + } + return _groupsMemberValue; + } + + set groupsMemberValue(String v) { + _groupsMemberValue = v; + _groupsMemberValueSet = true; + } + + /// Bypass the login page when user authentication is required. Redirect to IdP immediately instead. + + bool get bypassLoginPage { + if (!_bypassLoginPageSet && + _apiMapResponse.containsKey('bypass_login_page')) { + _bypassLoginPage = _apiMapResponse['bypass_login_page']; + _bypassLoginPageSet = true; + } + return _bypassLoginPage; + } + + set bypassLoginPage(bool v) { + _bypassLoginPage = v; + _bypassLoginPageSet = true; + } + + /// Allow SAML auth'd users to be members of non-reflected Looker groups. If 'false', user will be removed from non-reflected groups on login. + + bool get allowNormalGroupMembership { + if (!_allowNormalGroupMembershipSet && + _apiMapResponse.containsKey('allow_normal_group_membership')) { + _allowNormalGroupMembership = + _apiMapResponse['allow_normal_group_membership']; + _allowNormalGroupMembershipSet = true; + } + return _allowNormalGroupMembership; + } + + set allowNormalGroupMembership(bool v) { + _allowNormalGroupMembership = v; + _allowNormalGroupMembershipSet = true; + } + + /// SAML auth'd users will inherit roles from non-reflected Looker groups. + + bool get allowRolesFromNormalGroups { + if (!_allowRolesFromNormalGroupsSet && + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + _allowRolesFromNormalGroups = + _apiMapResponse['allow_roles_from_normal_groups']; + _allowRolesFromNormalGroupsSet = true; + } + return _allowRolesFromNormalGroups; + } + + set allowRolesFromNormalGroups(bool v) { + _allowRolesFromNormalGroups = v; + _allowRolesFromNormalGroupsSet = true; + } + + /// Allows roles to be directly assigned to SAML auth'd users. + + bool get allowDirectRoles { + if (!_allowDirectRolesSet && + _apiMapResponse.containsKey('allow_direct_roles')) { + _allowDirectRoles = _apiMapResponse['allow_direct_roles']; + _allowDirectRolesSet = true; + } + return _allowDirectRoles; + } + + set allowDirectRoles(bool v) { + _allowDirectRoles = v; + _allowDirectRolesSet = true; + } + + WriteSamlConfig() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteSamlConfig.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_idpCertSet || _apiMapResponse.containsKey('idp_cert')) { + json['idp_cert'] = idpCert; + } + if (_idpUrlSet || _apiMapResponse.containsKey('idp_url')) { + json['idp_url'] = idpUrl; + } + if (_idpIssuerSet || _apiMapResponse.containsKey('idp_issuer')) { + json['idp_issuer'] = idpIssuer; + } + if (_idpAudienceSet || _apiMapResponse.containsKey('idp_audience')) { + json['idp_audience'] = idpAudience; + } + if (_allowedClockDriftSet || + _apiMapResponse.containsKey('allowed_clock_drift')) { + json['allowed_clock_drift'] = allowedClockDrift; + } + if (_userAttributeMapEmailSet || + _apiMapResponse.containsKey('user_attribute_map_email')) { + json['user_attribute_map_email'] = userAttributeMapEmail; + } + if (_userAttributeMapFirstNameSet || + _apiMapResponse.containsKey('user_attribute_map_first_name')) { + json['user_attribute_map_first_name'] = userAttributeMapFirstName; + } + if (_userAttributeMapLastNameSet || + _apiMapResponse.containsKey('user_attribute_map_last_name')) { + json['user_attribute_map_last_name'] = userAttributeMapLastName; + } + if (_newUserMigrationTypesSet || + _apiMapResponse.containsKey('new_user_migration_types')) { + json['new_user_migration_types'] = newUserMigrationTypes; + } + if (_alternateEmailLoginAllowedSet || + _apiMapResponse.containsKey('alternate_email_login_allowed')) { + json['alternate_email_login_allowed'] = alternateEmailLoginAllowed; + } + if (_defaultNewUserRoleIdsSet || + _apiMapResponse.containsKey('default_new_user_role_ids')) { + json['default_new_user_role_ids'] = defaultNewUserRoleIds; + } + if (_defaultNewUserGroupIdsSet || + _apiMapResponse.containsKey('default_new_user_group_ids')) { + json['default_new_user_group_ids'] = defaultNewUserGroupIds; + } + if (_setRolesFromGroupsSet || + _apiMapResponse.containsKey('set_roles_from_groups')) { + json['set_roles_from_groups'] = setRolesFromGroups; + } + if (_groupsAttributeSet || + _apiMapResponse.containsKey('groups_attribute')) { + json['groups_attribute'] = groupsAttribute; + } + if (_groupsWithRoleIdsSet || + _apiMapResponse.containsKey('groups_with_role_ids')) { + json['groups_with_role_ids'] = groupsWithRoleIds == null + ? null + : groupsWithRoleIds.map((i) => i.toJson()).toList(); + } + if (_authRequiresRoleSet || + _apiMapResponse.containsKey('auth_requires_role')) { + json['auth_requires_role'] = authRequiresRole; + } + if (_userAttributesWithIdsSet || + _apiMapResponse.containsKey('user_attributes_with_ids')) { + json['user_attributes_with_ids'] = userAttributesWithIds == null + ? null + : userAttributesWithIds.map((i) => i.toJson()).toList(); + } + if (_groupsFinderTypeSet || + _apiMapResponse.containsKey('groups_finder_type')) { + json['groups_finder_type'] = groupsFinderType; + } + if (_groupsMemberValueSet || + _apiMapResponse.containsKey('groups_member_value')) { + json['groups_member_value'] = groupsMemberValue; + } + if (_bypassLoginPageSet || + _apiMapResponse.containsKey('bypass_login_page')) { + json['bypass_login_page'] = bypassLoginPage; + } + if (_allowNormalGroupMembershipSet || + _apiMapResponse.containsKey('allow_normal_group_membership')) { + json['allow_normal_group_membership'] = allowNormalGroupMembership; + } + if (_allowRolesFromNormalGroupsSet || + _apiMapResponse.containsKey('allow_roles_from_normal_groups')) { + json['allow_roles_from_normal_groups'] = allowRolesFromNormalGroups; + } + if (_allowDirectRolesSet || + _apiMapResponse.containsKey('allow_direct_roles')) { + json['allow_direct_roles'] = allowDirectRoles; + } + return json; + } +} + +/// Dynamic writeable type for ScheduledPlan removes: +/// id, created_at, updated_at, title, user, next_run_at, last_run_at, can +class WriteScheduledPlan { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + int _userId; + bool _userIdSet = false; + + bool _runAsRecipient; + bool _runAsRecipientSet = false; + + bool _enabled; + bool _enabledSet = false; + + String _lookId; + bool _lookIdSet = false; + + int _dashboardId; + bool _dashboardIdSet = false; + + String _lookmlDashboardId; + bool _lookmlDashboardIdSet = false; + + String _filtersString; + bool _filtersStringSet = false; + + String _dashboardFilters; + bool _dashboardFiltersSet = false; + + bool _requireResults; + bool _requireResultsSet = false; + + bool _requireNoResults; + bool _requireNoResultsSet = false; + + bool _requireChange; + bool _requireChangeSet = false; + + bool _sendAllResults; + bool _sendAllResultsSet = false; + + String _crontab; + bool _crontabSet = false; + + String _datagroup; + bool _datagroupSet = false; + + String _timezone; + bool _timezoneSet = false; + + String _queryId; + bool _queryIdSet = false; + + List _scheduledPlanDestination; + bool _scheduledPlanDestinationSet = false; + + bool _runOnce; + bool _runOnceSet = false; + + bool _includeLinks; + bool _includeLinksSet = false; + + String _pdfPaperSize; + bool _pdfPaperSizeSet = false; + + bool _pdfLandscape; + bool _pdfLandscapeSet = false; + + bool _embed; + bool _embedSet = false; + + String _colorTheme; + bool _colorThemeSet = false; + + bool _longTables; + bool _longTablesSet = false; + + int _inlineTableWidth; + bool _inlineTableWidthSet = false; + + /// Name of this scheduled plan + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// User Id which owns this scheduled plan + + int get userId { + if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { + _userId = _apiMapResponse['user_id']; + _userIdSet = true; + } + return _userId; + } + + set userId(int v) { + _userId = v; + _userIdSet = true; + } + + /// Whether schedule is run as recipient (only applicable for email recipients) + + bool get runAsRecipient { + if (!_runAsRecipientSet && + _apiMapResponse.containsKey('run_as_recipient')) { + _runAsRecipient = _apiMapResponse['run_as_recipient']; + _runAsRecipientSet = true; + } + return _runAsRecipient; + } + + set runAsRecipient(bool v) { + _runAsRecipient = v; + _runAsRecipientSet = true; + } + + /// Whether the ScheduledPlan is enabled + + bool get enabled { + if (!_enabledSet && _apiMapResponse.containsKey('enabled')) { + _enabled = _apiMapResponse['enabled']; + _enabledSet = true; + } + return _enabled; + } + + set enabled(bool v) { + _enabled = v; + _enabledSet = true; + } + + /// Id of a look + + String get lookId { + if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { + _lookId = _apiMapResponse['look_id'] == null + ? null + : _apiMapResponse['look_id'].toString(); + _lookIdSet = true; + } + return _lookId; + } + + set lookId(String v) { + _lookId = v; + _lookIdSet = true; + } + + /// Id of a dashboard + + int get dashboardId { + if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { + _dashboardId = _apiMapResponse['dashboard_id']; + _dashboardIdSet = true; + } + return _dashboardId; + } + + set dashboardId(int v) { + _dashboardId = v; + _dashboardIdSet = true; + } + + /// Id of a LookML dashboard + + String get lookmlDashboardId { + if (!_lookmlDashboardIdSet && + _apiMapResponse.containsKey('lookml_dashboard_id')) { + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null + ? null + : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardIdSet = true; + } + return _lookmlDashboardId; + } + + set lookmlDashboardId(String v) { + _lookmlDashboardId = v; + _lookmlDashboardIdSet = true; + } + + /// Query string to run look or dashboard with + + String get filtersString { + if (!_filtersStringSet && _apiMapResponse.containsKey('filters_string')) { + _filtersString = _apiMapResponse['filters_string'] == null + ? null + : _apiMapResponse['filters_string'].toString(); + _filtersStringSet = true; + } + return _filtersString; + } + + set filtersString(String v) { + _filtersString = v; + _filtersStringSet = true; + } + + /// (DEPRECATED) Alias for filters_string field + + String get dashboardFilters { + if (!_dashboardFiltersSet && + _apiMapResponse.containsKey('dashboard_filters')) { + _dashboardFilters = _apiMapResponse['dashboard_filters'] == null + ? null + : _apiMapResponse['dashboard_filters'].toString(); + _dashboardFiltersSet = true; + } + return _dashboardFilters; + } + + set dashboardFilters(String v) { + _dashboardFilters = v; + _dashboardFiltersSet = true; + } + + /// Delivery should occur if running the dashboard or look returns results + + bool get requireResults { + if (!_requireResultsSet && _apiMapResponse.containsKey('require_results')) { + _requireResults = _apiMapResponse['require_results']; + _requireResultsSet = true; + } + return _requireResults; + } + + set requireResults(bool v) { + _requireResults = v; + _requireResultsSet = true; + } + + /// Delivery should occur if the dashboard look does not return results + + bool get requireNoResults { + if (!_requireNoResultsSet && + _apiMapResponse.containsKey('require_no_results')) { + _requireNoResults = _apiMapResponse['require_no_results']; + _requireNoResultsSet = true; + } + return _requireNoResults; + } + + set requireNoResults(bool v) { + _requireNoResults = v; + _requireNoResultsSet = true; + } + + /// Delivery should occur if data have changed since the last run + + bool get requireChange { + if (!_requireChangeSet && _apiMapResponse.containsKey('require_change')) { + _requireChange = _apiMapResponse['require_change']; + _requireChangeSet = true; + } + return _requireChange; + } + + set requireChange(bool v) { + _requireChange = v; + _requireChangeSet = true; + } + + /// Will run an unlimited query and send all results. + + bool get sendAllResults { + if (!_sendAllResultsSet && + _apiMapResponse.containsKey('send_all_results')) { + _sendAllResults = _apiMapResponse['send_all_results']; + _sendAllResultsSet = true; + } + return _sendAllResults; + } + + set sendAllResults(bool v) { + _sendAllResults = v; + _sendAllResultsSet = true; + } + + /// Vixie-Style crontab specification when to run + + String get crontab { + if (!_crontabSet && _apiMapResponse.containsKey('crontab')) { + _crontab = _apiMapResponse['crontab'] == null + ? null + : _apiMapResponse['crontab'].toString(); + _crontabSet = true; + } + return _crontab; + } + + set crontab(String v) { + _crontab = v; + _crontabSet = true; + } + + /// Name of a datagroup; if specified will run when datagroup triggered (can't be used with cron string) + + String get datagroup { + if (!_datagroupSet && _apiMapResponse.containsKey('datagroup')) { + _datagroup = _apiMapResponse['datagroup'] == null + ? null + : _apiMapResponse['datagroup'].toString(); + _datagroupSet = true; + } + return _datagroup; + } + + set datagroup(String v) { + _datagroup = v; + _datagroupSet = true; + } + + /// Timezone for interpreting the specified crontab (default is Looker instance timezone) + + String get timezone { + if (!_timezoneSet && _apiMapResponse.containsKey('timezone')) { + _timezone = _apiMapResponse['timezone'] == null + ? null + : _apiMapResponse['timezone'].toString(); + _timezoneSet = true; + } + return _timezone; + } + + set timezone(String v) { + _timezone = v; + _timezoneSet = true; + } + + /// Query id + + String get queryId { + if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { + _queryId = _apiMapResponse['query_id'] == null + ? null + : _apiMapResponse['query_id'].toString(); + _queryIdSet = true; + } + return _queryId; + } + + set queryId(String v) { + _queryId = v; + _queryIdSet = true; + } + + /// Scheduled plan destinations + + List get scheduledPlanDestination { + if (!_scheduledPlanDestinationSet && + _apiMapResponse.containsKey('scheduled_plan_destination')) { + _scheduledPlanDestination = + _apiMapResponse['scheduled_plan_destination'] == null + ? null + : (_apiMapResponse['scheduled_plan_destination'] as List) + .map((i) => ScheduledPlanDestination.fromResponse( + i, apiResponseContentType)) + .toList(); + _scheduledPlanDestinationSet = true; + } + return _scheduledPlanDestination; + } + + set scheduledPlanDestination(List v) { + _scheduledPlanDestination = v; + _scheduledPlanDestinationSet = true; + } + + /// Whether the plan in question should only be run once (usually for testing) + + bool get runOnce { + if (!_runOnceSet && _apiMapResponse.containsKey('run_once')) { + _runOnce = _apiMapResponse['run_once']; + _runOnceSet = true; + } + return _runOnce; + } + + set runOnce(bool v) { + _runOnce = v; + _runOnceSet = true; + } + + /// Whether links back to Looker should be included in this ScheduledPlan + + bool get includeLinks { + if (!_includeLinksSet && _apiMapResponse.containsKey('include_links')) { + _includeLinks = _apiMapResponse['include_links']; + _includeLinksSet = true; + } + return _includeLinks; + } + + set includeLinks(bool v) { + _includeLinks = v; + _includeLinksSet = true; + } + + /// The size of paper the PDF should be formatted to fit. Valid values are: "letter", "legal", "tabloid", "a0", "a1", "a2", "a3", "a4", "a5". + + String get pdfPaperSize { + if (!_pdfPaperSizeSet && _apiMapResponse.containsKey('pdf_paper_size')) { + _pdfPaperSize = _apiMapResponse['pdf_paper_size'] == null + ? null + : _apiMapResponse['pdf_paper_size'].toString(); + _pdfPaperSizeSet = true; + } + return _pdfPaperSize; + } + + set pdfPaperSize(String v) { + _pdfPaperSize = v; + _pdfPaperSizeSet = true; + } + + /// Whether the PDF should be formatted for landscape orientation + + bool get pdfLandscape { + if (!_pdfLandscapeSet && _apiMapResponse.containsKey('pdf_landscape')) { + _pdfLandscape = _apiMapResponse['pdf_landscape']; + _pdfLandscapeSet = true; + } + return _pdfLandscape; + } + + set pdfLandscape(bool v) { + _pdfLandscape = v; + _pdfLandscapeSet = true; + } + + /// Whether this schedule is in an embed context or not + + bool get embed { + if (!_embedSet && _apiMapResponse.containsKey('embed')) { + _embed = _apiMapResponse['embed']; + _embedSet = true; + } + return _embed; + } + + set embed(bool v) { + _embed = v; + _embedSet = true; + } + + /// Color scheme of the dashboard if applicable + + String get colorTheme { + if (!_colorThemeSet && _apiMapResponse.containsKey('color_theme')) { + _colorTheme = _apiMapResponse['color_theme'] == null + ? null + : _apiMapResponse['color_theme'].toString(); + _colorThemeSet = true; + } + return _colorTheme; + } + + set colorTheme(String v) { + _colorTheme = v; + _colorThemeSet = true; + } + + /// Whether or not to expand table vis to full length + + bool get longTables { + if (!_longTablesSet && _apiMapResponse.containsKey('long_tables')) { + _longTables = _apiMapResponse['long_tables']; + _longTablesSet = true; + } + return _longTables; + } + + set longTables(bool v) { + _longTables = v; + _longTablesSet = true; + } + + /// The pixel width at which we render the inline table visualizations + + int get inlineTableWidth { + if (!_inlineTableWidthSet && + _apiMapResponse.containsKey('inline_table_width')) { + _inlineTableWidth = _apiMapResponse['inline_table_width']; + _inlineTableWidthSet = true; + } + return _inlineTableWidth; + } + + set inlineTableWidth(int v) { + _inlineTableWidth = v; + _inlineTableWidthSet = true; + } + + WriteScheduledPlan() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteScheduledPlan.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_userIdSet || _apiMapResponse.containsKey('user_id')) { + json['user_id'] = userId; + } + if (_runAsRecipientSet || _apiMapResponse.containsKey('run_as_recipient')) { + json['run_as_recipient'] = runAsRecipient; + } + if (_enabledSet || _apiMapResponse.containsKey('enabled')) { + json['enabled'] = enabled; + } + if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { + json['look_id'] = lookId; + } + if (_dashboardIdSet || _apiMapResponse.containsKey('dashboard_id')) { + json['dashboard_id'] = dashboardId; + } + if (_lookmlDashboardIdSet || + _apiMapResponse.containsKey('lookml_dashboard_id')) { + json['lookml_dashboard_id'] = lookmlDashboardId; + } + if (_filtersStringSet || _apiMapResponse.containsKey('filters_string')) { + json['filters_string'] = filtersString; + } + if (_dashboardFiltersSet || + _apiMapResponse.containsKey('dashboard_filters')) { + json['dashboard_filters'] = dashboardFilters; + } + if (_requireResultsSet || _apiMapResponse.containsKey('require_results')) { + json['require_results'] = requireResults; + } + if (_requireNoResultsSet || + _apiMapResponse.containsKey('require_no_results')) { + json['require_no_results'] = requireNoResults; + } + if (_requireChangeSet || _apiMapResponse.containsKey('require_change')) { + json['require_change'] = requireChange; + } + if (_sendAllResultsSet || _apiMapResponse.containsKey('send_all_results')) { + json['send_all_results'] = sendAllResults; + } + if (_crontabSet || _apiMapResponse.containsKey('crontab')) { + json['crontab'] = crontab; + } + if (_datagroupSet || _apiMapResponse.containsKey('datagroup')) { + json['datagroup'] = datagroup; + } + if (_timezoneSet || _apiMapResponse.containsKey('timezone')) { + json['timezone'] = timezone; + } + if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { + json['query_id'] = queryId; + } + if (_scheduledPlanDestinationSet || + _apiMapResponse.containsKey('scheduled_plan_destination')) { + json['scheduled_plan_destination'] = scheduledPlanDestination == null + ? null + : scheduledPlanDestination.map((i) => i.toJson()).toList(); + } + if (_runOnceSet || _apiMapResponse.containsKey('run_once')) { + json['run_once'] = runOnce; + } + if (_includeLinksSet || _apiMapResponse.containsKey('include_links')) { + json['include_links'] = includeLinks; + } + if (_pdfPaperSizeSet || _apiMapResponse.containsKey('pdf_paper_size')) { + json['pdf_paper_size'] = pdfPaperSize; + } + if (_pdfLandscapeSet || _apiMapResponse.containsKey('pdf_landscape')) { + json['pdf_landscape'] = pdfLandscape; + } + if (_embedSet || _apiMapResponse.containsKey('embed')) { + json['embed'] = embed; + } + if (_colorThemeSet || _apiMapResponse.containsKey('color_theme')) { + json['color_theme'] = colorTheme; + } + if (_longTablesSet || _apiMapResponse.containsKey('long_tables')) { + json['long_tables'] = longTables; + } + if (_inlineTableWidthSet || + _apiMapResponse.containsKey('inline_table_width')) { + json['inline_table_width'] = inlineTableWidth; + } + return json; + } +} + +/// Dynamic writeable type for SessionConfig removes: +/// can +class WriteSessionConfig { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _allowPersistentSessions; + bool _allowPersistentSessionsSet = false; + + int _sessionMinutes; + bool _sessionMinutesSet = false; + + bool _unlimitedSessionsPerUser; + bool _unlimitedSessionsPerUserSet = false; + + bool _useInactivityBasedLogout; + bool _useInactivityBasedLogoutSet = false; + + bool _trackSessionLocation; + bool _trackSessionLocationSet = false; + + /// Allow users to have persistent sessions when they login + + bool get allowPersistentSessions { + if (!_allowPersistentSessionsSet && + _apiMapResponse.containsKey('allow_persistent_sessions')) { + _allowPersistentSessions = _apiMapResponse['allow_persistent_sessions']; + _allowPersistentSessionsSet = true; + } + return _allowPersistentSessions; + } + + set allowPersistentSessions(bool v) { + _allowPersistentSessions = v; + _allowPersistentSessionsSet = true; + } + + /// Number of minutes for user sessions. Must be between 5 and 43200 + + int get sessionMinutes { + if (!_sessionMinutesSet && _apiMapResponse.containsKey('session_minutes')) { + _sessionMinutes = _apiMapResponse['session_minutes']; + _sessionMinutesSet = true; + } + return _sessionMinutes; + } + + set sessionMinutes(int v) { + _sessionMinutes = v; + _sessionMinutesSet = true; + } + + /// Allow users to have an unbounded number of concurrent sessions (otherwise, users will be limited to only one session at a time). + + bool get unlimitedSessionsPerUser { + if (!_unlimitedSessionsPerUserSet && + _apiMapResponse.containsKey('unlimited_sessions_per_user')) { + _unlimitedSessionsPerUser = + _apiMapResponse['unlimited_sessions_per_user']; + _unlimitedSessionsPerUserSet = true; + } + return _unlimitedSessionsPerUser; + } + + set unlimitedSessionsPerUser(bool v) { + _unlimitedSessionsPerUser = v; + _unlimitedSessionsPerUserSet = true; + } + + /// Enforce session logout for sessions that are inactive for 15 minutes. + + bool get useInactivityBasedLogout { + if (!_useInactivityBasedLogoutSet && + _apiMapResponse.containsKey('use_inactivity_based_logout')) { + _useInactivityBasedLogout = + _apiMapResponse['use_inactivity_based_logout']; + _useInactivityBasedLogoutSet = true; + } + return _useInactivityBasedLogout; + } + + set useInactivityBasedLogout(bool v) { + _useInactivityBasedLogout = v; + _useInactivityBasedLogoutSet = true; + } + + /// Track location of session when user logs in. + + bool get trackSessionLocation { + if (!_trackSessionLocationSet && + _apiMapResponse.containsKey('track_session_location')) { + _trackSessionLocation = _apiMapResponse['track_session_location']; + _trackSessionLocationSet = true; + } + return _trackSessionLocation; + } + + set trackSessionLocation(bool v) { + _trackSessionLocation = v; + _trackSessionLocationSet = true; + } + + WriteSessionConfig() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteSessionConfig.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_allowPersistentSessionsSet || + _apiMapResponse.containsKey('allow_persistent_sessions')) { + json['allow_persistent_sessions'] = allowPersistentSessions; + } + if (_sessionMinutesSet || _apiMapResponse.containsKey('session_minutes')) { + json['session_minutes'] = sessionMinutes; + } + if (_unlimitedSessionsPerUserSet || + _apiMapResponse.containsKey('unlimited_sessions_per_user')) { + json['unlimited_sessions_per_user'] = unlimitedSessionsPerUser; + } + if (_useInactivityBasedLogoutSet || + _apiMapResponse.containsKey('use_inactivity_based_logout')) { + json['use_inactivity_based_logout'] = useInactivityBasedLogout; + } + if (_trackSessionLocationSet || + _apiMapResponse.containsKey('track_session_location')) { + json['track_session_location'] = trackSessionLocation; + } + return json; + } +} + +/// Dynamic writeable type for Setting +class WriteSetting { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + bool _extensionFrameworkEnabled; + bool _extensionFrameworkEnabledSet = false; + + bool _marketplaceAutoInstallEnabled; + bool _marketplaceAutoInstallEnabledSet = false; + + bool _marketplaceEnabled; + bool _marketplaceEnabledSet = false; + + WriteWhitelabelConfiguration _whitelabelConfiguration; + bool _whitelabelConfigurationSet = false; + + CustomWelcomeEmail _customWelcomeEmail; + bool _customWelcomeEmailSet = false; + + /// Toggle extension framework on or off + + bool get extensionFrameworkEnabled { + if (!_extensionFrameworkEnabledSet && + _apiMapResponse.containsKey('extension_framework_enabled')) { + _extensionFrameworkEnabled = + _apiMapResponse['extension_framework_enabled']; + _extensionFrameworkEnabledSet = true; + } + return _extensionFrameworkEnabled; + } + + set extensionFrameworkEnabled(bool v) { + _extensionFrameworkEnabled = v; + _extensionFrameworkEnabledSet = true; + } + + /// Toggle marketplace auto install on or off. Note that auto install only runs if marketplace is enabled. + + bool get marketplaceAutoInstallEnabled { + if (!_marketplaceAutoInstallEnabledSet && + _apiMapResponse.containsKey('marketplace_auto_install_enabled')) { + _marketplaceAutoInstallEnabled = + _apiMapResponse['marketplace_auto_install_enabled']; + _marketplaceAutoInstallEnabledSet = true; + } + return _marketplaceAutoInstallEnabled; + } + + set marketplaceAutoInstallEnabled(bool v) { + _marketplaceAutoInstallEnabled = v; + _marketplaceAutoInstallEnabledSet = true; + } + + /// Toggle marketplace on or off + + bool get marketplaceEnabled { + if (!_marketplaceEnabledSet && + _apiMapResponse.containsKey('marketplace_enabled')) { + _marketplaceEnabled = _apiMapResponse['marketplace_enabled']; + _marketplaceEnabledSet = true; + } + return _marketplaceEnabled; + } + + set marketplaceEnabled(bool v) { + _marketplaceEnabled = v; + _marketplaceEnabledSet = true; + } + + /// Dynamic writeable type for WhitelabelConfiguration removes: + /// id, logo_url, favicon_url + + WriteWhitelabelConfiguration get whitelabelConfiguration { + if (!_whitelabelConfigurationSet && + _apiMapResponse.containsKey('whitelabel_configuration')) { + _whitelabelConfiguration = + _apiMapResponse['whitelabel_configuration'] == null + ? null + : WriteWhitelabelConfiguration.fromResponse( + _apiMapResponse['whitelabel_configuration'], + apiResponseContentType); + _whitelabelConfigurationSet = true; + } + return _whitelabelConfiguration; + } + + set whitelabelConfiguration(WriteWhitelabelConfiguration v) { + _whitelabelConfiguration = v; + _whitelabelConfigurationSet = true; + } + + CustomWelcomeEmail get customWelcomeEmail { + if (!_customWelcomeEmailSet && + _apiMapResponse.containsKey('custom_welcome_email')) { + _customWelcomeEmail = _apiMapResponse['custom_welcome_email'] == null + ? null + : CustomWelcomeEmail.fromResponse( + _apiMapResponse['custom_welcome_email'], apiResponseContentType); + _customWelcomeEmailSet = true; + } + return _customWelcomeEmail; + } + + set customWelcomeEmail(CustomWelcomeEmail v) { + _customWelcomeEmail = v; + _customWelcomeEmailSet = true; + } + + WriteSetting() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteSetting.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_extensionFrameworkEnabledSet || + _apiMapResponse.containsKey('extension_framework_enabled')) { + json['extension_framework_enabled'] = extensionFrameworkEnabled; + } + if (_marketplaceAutoInstallEnabledSet || + _apiMapResponse.containsKey('marketplace_auto_install_enabled')) { + json['marketplace_auto_install_enabled'] = marketplaceAutoInstallEnabled; + } + if (_marketplaceEnabledSet || + _apiMapResponse.containsKey('marketplace_enabled')) { + json['marketplace_enabled'] = marketplaceEnabled; + } + if (_whitelabelConfigurationSet || + _apiMapResponse.containsKey('whitelabel_configuration')) { + json['whitelabel_configuration'] = whitelabelConfiguration == null + ? null + : whitelabelConfiguration.toJson(); + } + if (_customWelcomeEmailSet || + _apiMapResponse.containsKey('custom_welcome_email')) { + json['custom_welcome_email'] = + customWelcomeEmail == null ? null : customWelcomeEmail.toJson(); + } + return json; + } +} + +/// Dynamic writeable type for SshServer removes: +/// ssh_server_id, finger_print, sha_finger_print, public_key, status +class WriteSshServer { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _sshServerName; + bool _sshServerNameSet = false; + + String _sshServerHost; + bool _sshServerHostSet = false; + + int _sshServerPort; + bool _sshServerPortSet = false; + + String _sshServerUser; + bool _sshServerUserSet = false; + + /// The name to identify this SSH Server + + String get sshServerName { + if (!_sshServerNameSet && _apiMapResponse.containsKey('ssh_server_name')) { + _sshServerName = _apiMapResponse['ssh_server_name'] == null + ? null + : _apiMapResponse['ssh_server_name'].toString(); + _sshServerNameSet = true; + } + return _sshServerName; + } + + set sshServerName(String v) { + _sshServerName = v; + _sshServerNameSet = true; + } + + /// The hostname or ip address of the SSH Server + + String get sshServerHost { + if (!_sshServerHostSet && _apiMapResponse.containsKey('ssh_server_host')) { + _sshServerHost = _apiMapResponse['ssh_server_host'] == null + ? null + : _apiMapResponse['ssh_server_host'].toString(); + _sshServerHostSet = true; + } + return _sshServerHost; + } + + set sshServerHost(String v) { + _sshServerHost = v; + _sshServerHostSet = true; + } + + /// The port to connect to on the SSH Server + + int get sshServerPort { + if (!_sshServerPortSet && _apiMapResponse.containsKey('ssh_server_port')) { + _sshServerPort = _apiMapResponse['ssh_server_port']; + _sshServerPortSet = true; + } + return _sshServerPort; + } + + set sshServerPort(int v) { + _sshServerPort = v; + _sshServerPortSet = true; + } + + /// The username used to connect to the SSH Server + + String get sshServerUser { + if (!_sshServerUserSet && _apiMapResponse.containsKey('ssh_server_user')) { + _sshServerUser = _apiMapResponse['ssh_server_user'] == null + ? null + : _apiMapResponse['ssh_server_user'].toString(); + _sshServerUserSet = true; + } + return _sshServerUser; + } + + set sshServerUser(String v) { + _sshServerUser = v; + _sshServerUserSet = true; + } + + WriteSshServer() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteSshServer.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_sshServerNameSet || _apiMapResponse.containsKey('ssh_server_name')) { + json['ssh_server_name'] = sshServerName; + } + if (_sshServerHostSet || _apiMapResponse.containsKey('ssh_server_host')) { + json['ssh_server_host'] = sshServerHost; + } + if (_sshServerPortSet || _apiMapResponse.containsKey('ssh_server_port')) { + json['ssh_server_port'] = sshServerPort; + } + if (_sshServerUserSet || _apiMapResponse.containsKey('ssh_server_user')) { + json['ssh_server_user'] = sshServerUser; + } + return json; + } +} + +/// Dynamic writeable type for SshTunnel removes: +/// tunnel_id, ssh_server_name, ssh_server_host, ssh_server_port, ssh_server_user, last_attempt, local_host_port, status +class WriteSshTunnel { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _sshServerId; + bool _sshServerIdSet = false; + + String _databaseHost; + bool _databaseHostSet = false; + + int _databasePort; + bool _databasePortSet = false; + + /// SSH Server ID + + String get sshServerId { + if (!_sshServerIdSet && _apiMapResponse.containsKey('ssh_server_id')) { + _sshServerId = _apiMapResponse['ssh_server_id'] == null + ? null + : _apiMapResponse['ssh_server_id'].toString(); + _sshServerIdSet = true; + } + return _sshServerId; + } + + set sshServerId(String v) { + _sshServerId = v; + _sshServerIdSet = true; + } + + /// Hostname or IP Address of the Database Server + + String get databaseHost { + if (!_databaseHostSet && _apiMapResponse.containsKey('database_host')) { + _databaseHost = _apiMapResponse['database_host'] == null + ? null + : _apiMapResponse['database_host'].toString(); + _databaseHostSet = true; + } + return _databaseHost; + } + + set databaseHost(String v) { + _databaseHost = v; + _databaseHostSet = true; + } + + /// Port that the Database Server is listening on + + int get databasePort { + if (!_databasePortSet && _apiMapResponse.containsKey('database_port')) { + _databasePort = _apiMapResponse['database_port']; + _databasePortSet = true; + } + return _databasePort; + } + + set databasePort(int v) { + _databasePort = v; + _databasePortSet = true; + } + + WriteSshTunnel() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteSshTunnel.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_sshServerIdSet || _apiMapResponse.containsKey('ssh_server_id')) { + json['ssh_server_id'] = sshServerId; + } + if (_databaseHostSet || _apiMapResponse.containsKey('database_host')) { + json['database_host'] = databaseHost; + } + if (_databasePortSet || _apiMapResponse.containsKey('database_port')) { + json['database_port'] = databasePort; + } + return json; + } +} + +/// Dynamic writeable type for Theme removes: +/// can, id +class WriteTheme { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + DateTime _beginAt; + bool _beginAtSet = false; + + DateTime _endAt; + bool _endAtSet = false; + + String _name; + bool _nameSet = false; + + ThemeSettings _settings; + bool _settingsSet = false; + + /// Timestamp for when this theme becomes active. Null=always + + DateTime get beginAt { + if (!_beginAtSet && _apiMapResponse.containsKey('begin_at')) { + _beginAt = _apiMapResponse['begin_at'] == null + ? null + : DateTime.parse(_apiMapResponse['begin_at']); + _beginAtSet = true; + } + return _beginAt; + } + + set beginAt(DateTime v) { + _beginAt = v; + _beginAtSet = true; + } + + /// Timestamp for when this theme expires. Null=never + + DateTime get endAt { + if (!_endAtSet && _apiMapResponse.containsKey('end_at')) { + _endAt = _apiMapResponse['end_at'] == null + ? null + : DateTime.parse(_apiMapResponse['end_at']); + _endAtSet = true; + } + return _endAt; + } + + set endAt(DateTime v) { + _endAt = v; + _endAtSet = true; + } + + /// Name of theme. Can only be alphanumeric and underscores. + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + ThemeSettings get settings { + if (!_settingsSet && _apiMapResponse.containsKey('settings')) { + _settings = _apiMapResponse['settings'] == null + ? null + : ThemeSettings.fromResponse( + _apiMapResponse['settings'], apiResponseContentType); + _settingsSet = true; + } + return _settings; + } + + set settings(ThemeSettings v) { + _settings = v; + _settingsSet = true; + } + + WriteTheme() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteTheme.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_beginAtSet || _apiMapResponse.containsKey('begin_at')) { + json['begin_at'] = beginAt == null ? null : beginAt.toIso8601String(); + } + if (_endAtSet || _apiMapResponse.containsKey('end_at')) { + json['end_at'] = endAt == null ? null : endAt.toIso8601String(); + } + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_settingsSet || _apiMapResponse.containsKey('settings')) { + json['settings'] = settings == null ? null : settings.toJson(); + } + return json; + } +} + +/// Dynamic writeable type for User removes: +/// can, avatar_url, avatar_url_without_sizing, credentials_api3, credentials_embed, credentials_google, credentials_ldap, credentials_looker_openid, credentials_oidc, credentials_saml, credentials_totp, display_name, email, embed_group_space_id, group_ids, id, looker_versions, personal_folder_id, presumed_looker_employee, role_ids, sessions, verified_looker_employee, roles_externally_managed, allow_direct_roles, allow_normal_group_membership, allow_roles_from_normal_groups, url +class WriteUser { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + WriteCredentialsEmail _credentialsEmail; + bool _credentialsEmailSet = false; + + String _firstName; + bool _firstNameSet = false; + + String _homeFolderId; + bool _homeFolderIdSet = false; + + bool _isDisabled; + bool _isDisabledSet = false; + + String _lastName; + bool _lastNameSet = false; + + String _locale; + bool _localeSet = false; + + bool _modelsDirValidated; + bool _modelsDirValidatedSet = false; + + Map _uiState; + bool _uiStateSet = false; + + /// Dynamic writeable type for CredentialsEmail removes: + /// can, created_at, is_disabled, logged_in_at, password_reset_url, type, url, user_url + + WriteCredentialsEmail get credentialsEmail { + if (!_credentialsEmailSet && + _apiMapResponse.containsKey('credentials_email')) { + _credentialsEmail = _apiMapResponse['credentials_email'] == null + ? null + : WriteCredentialsEmail.fromResponse( + _apiMapResponse['credentials_email'], apiResponseContentType); + _credentialsEmailSet = true; + } + return _credentialsEmail; + } + + set credentialsEmail(WriteCredentialsEmail v) { + _credentialsEmail = v; + _credentialsEmailSet = true; + } + + /// First name + + String get firstName { + if (!_firstNameSet && _apiMapResponse.containsKey('first_name')) { + _firstName = _apiMapResponse['first_name'] == null + ? null + : _apiMapResponse['first_name'].toString(); + _firstNameSet = true; + } + return _firstName; + } + + set firstName(String v) { + _firstName = v; + _firstNameSet = true; + } + + /// ID string for user's home folder + + String get homeFolderId { + if (!_homeFolderIdSet && _apiMapResponse.containsKey('home_folder_id')) { + _homeFolderId = _apiMapResponse['home_folder_id'] == null + ? null + : _apiMapResponse['home_folder_id'].toString(); + _homeFolderIdSet = true; + } + return _homeFolderId; + } + + set homeFolderId(String v) { + _homeFolderId = v; + _homeFolderIdSet = true; + } + + /// Account has been disabled + + bool get isDisabled { + if (!_isDisabledSet && _apiMapResponse.containsKey('is_disabled')) { + _isDisabled = _apiMapResponse['is_disabled']; + _isDisabledSet = true; + } + return _isDisabled; + } + + set isDisabled(bool v) { + _isDisabled = v; + _isDisabledSet = true; + } + + /// Last name + + String get lastName { + if (!_lastNameSet && _apiMapResponse.containsKey('last_name')) { + _lastName = _apiMapResponse['last_name'] == null + ? null + : _apiMapResponse['last_name'].toString(); + _lastNameSet = true; + } + return _lastName; + } + + set lastName(String v) { + _lastName = v; + _lastNameSet = true; + } + + /// User's preferred locale. User locale takes precedence over Looker's system-wide default locale. Locale determines language of display strings and date and numeric formatting in API responses. Locale string must be a 2 letter language code or a combination of language code and region code: 'en' or 'en-US', for example. + + String get locale { + if (!_localeSet && _apiMapResponse.containsKey('locale')) { + _locale = _apiMapResponse['locale'] == null + ? null + : _apiMapResponse['locale'].toString(); + _localeSet = true; + } + return _locale; + } + + set locale(String v) { + _locale = v; + _localeSet = true; + } + + /// User's dev workspace has been checked for presence of applicable production projects + + bool get modelsDirValidated { + if (!_modelsDirValidatedSet && + _apiMapResponse.containsKey('models_dir_validated')) { + _modelsDirValidated = _apiMapResponse['models_dir_validated']; + _modelsDirValidatedSet = true; + } + return _modelsDirValidated; + } + + set modelsDirValidated(bool v) { + _modelsDirValidated = v; + _modelsDirValidatedSet = true; + } + + /// Per user dictionary of undocumented state information owned by the Looker UI. + + Map get uiState { + if (!_uiStateSet && _apiMapResponse.containsKey('ui_state')) { + _uiState = _apiMapResponse['ui_state']; + _uiStateSet = true; + } + return _uiState; + } + + set uiState(Map v) { + _uiState = v; + _uiStateSet = true; + } + + WriteUser() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteUser.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_credentialsEmailSet || + _apiMapResponse.containsKey('credentials_email')) { + json['credentials_email'] = + credentialsEmail == null ? null : credentialsEmail.toJson(); + } + if (_firstNameSet || _apiMapResponse.containsKey('first_name')) { + json['first_name'] = firstName; + } + if (_homeFolderIdSet || _apiMapResponse.containsKey('home_folder_id')) { + json['home_folder_id'] = homeFolderId; + } + if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { + json['is_disabled'] = isDisabled; + } + if (_lastNameSet || _apiMapResponse.containsKey('last_name')) { + json['last_name'] = lastName; + } + if (_localeSet || _apiMapResponse.containsKey('locale')) { + json['locale'] = locale; + } + if (_modelsDirValidatedSet || + _apiMapResponse.containsKey('models_dir_validated')) { + json['models_dir_validated'] = modelsDirValidated; + } + if (_uiStateSet || _apiMapResponse.containsKey('ui_state')) { + json['ui_state'] = uiState; + } + return json; + } +} + +/// Dynamic writeable type for UserAttribute removes: +/// can, id, is_system, is_permanent +class WriteUserAttribute { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _name; + bool _nameSet = false; + + String _label; + bool _labelSet = false; + + String _type; + bool _typeSet = false; + + String _defaultValue; + bool _defaultValueSet = false; + + bool _valueIsHidden; + bool _valueIsHiddenSet = false; + + bool _userCanView; + bool _userCanViewSet = false; + + bool _userCanEdit; + bool _userCanEditSet = false; + + String _hiddenValueDomainWhitelist; + bool _hiddenValueDomainWhitelistSet = false; + + /// Name of user attribute + + String get name { + if (!_nameSet && _apiMapResponse.containsKey('name')) { + _name = _apiMapResponse['name'] == null + ? null + : _apiMapResponse['name'].toString(); + _nameSet = true; + } + return _name; + } + + set name(String v) { + _name = v; + _nameSet = true; + } + + /// Human-friendly label for user attribute + + String get label { + if (!_labelSet && _apiMapResponse.containsKey('label')) { + _label = _apiMapResponse['label'] == null + ? null + : _apiMapResponse['label'].toString(); + _labelSet = true; + } + return _label; + } + + set label(String v) { + _label = v; + _labelSet = true; + } + + /// Type of user attribute ("string", "number", "datetime", "yesno", "zipcode") + + String get type { + if (!_typeSet && _apiMapResponse.containsKey('type')) { + _type = _apiMapResponse['type'] == null + ? null + : _apiMapResponse['type'].toString(); + _typeSet = true; + } + return _type; + } + + set type(String v) { + _type = v; + _typeSet = true; + } + + /// Default value for when no value is set on the user + + String get defaultValue { + if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { + _defaultValue = _apiMapResponse['default_value'] == null + ? null + : _apiMapResponse['default_value'].toString(); + _defaultValueSet = true; + } + return _defaultValue; + } + + set defaultValue(String v) { + _defaultValue = v; + _defaultValueSet = true; + } + + /// If true, users will not be able to view values of this attribute + + bool get valueIsHidden { + if (!_valueIsHiddenSet && _apiMapResponse.containsKey('value_is_hidden')) { + _valueIsHidden = _apiMapResponse['value_is_hidden']; + _valueIsHiddenSet = true; + } + return _valueIsHidden; + } + + set valueIsHidden(bool v) { + _valueIsHidden = v; + _valueIsHiddenSet = true; + } + + /// Non-admin users can see the values of their attributes and use them in filters + + bool get userCanView { + if (!_userCanViewSet && _apiMapResponse.containsKey('user_can_view')) { + _userCanView = _apiMapResponse['user_can_view']; + _userCanViewSet = true; + } + return _userCanView; + } + + set userCanView(bool v) { + _userCanView = v; + _userCanViewSet = true; + } + + /// Users can change the value of this attribute for themselves + + bool get userCanEdit { + if (!_userCanEditSet && _apiMapResponse.containsKey('user_can_edit')) { + _userCanEdit = _apiMapResponse['user_can_edit']; + _userCanEditSet = true; + } + return _userCanEdit; + } + + set userCanEdit(bool v) { + _userCanEdit = v; + _userCanEditSet = true; + } + + /// Destinations to which a hidden attribute may be sent. Once set, cannot be edited. + + String get hiddenValueDomainWhitelist { + if (!_hiddenValueDomainWhitelistSet && + _apiMapResponse.containsKey('hidden_value_domain_whitelist')) { + _hiddenValueDomainWhitelist = + _apiMapResponse['hidden_value_domain_whitelist'] == null + ? null + : _apiMapResponse['hidden_value_domain_whitelist'].toString(); + _hiddenValueDomainWhitelistSet = true; + } + return _hiddenValueDomainWhitelist; + } + + set hiddenValueDomainWhitelist(String v) { + _hiddenValueDomainWhitelist = v; + _hiddenValueDomainWhitelistSet = true; + } + + WriteUserAttribute() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteUserAttribute.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_nameSet || _apiMapResponse.containsKey('name')) { + json['name'] = name; + } + if (_labelSet || _apiMapResponse.containsKey('label')) { + json['label'] = label; + } + if (_typeSet || _apiMapResponse.containsKey('type')) { + json['type'] = type; + } + if (_defaultValueSet || _apiMapResponse.containsKey('default_value')) { + json['default_value'] = defaultValue; + } + if (_valueIsHiddenSet || _apiMapResponse.containsKey('value_is_hidden')) { + json['value_is_hidden'] = valueIsHidden; + } + if (_userCanViewSet || _apiMapResponse.containsKey('user_can_view')) { + json['user_can_view'] = userCanView; + } + if (_userCanEditSet || _apiMapResponse.containsKey('user_can_edit')) { + json['user_can_edit'] = userCanEdit; + } + if (_hiddenValueDomainWhitelistSet || + _apiMapResponse.containsKey('hidden_value_domain_whitelist')) { + json['hidden_value_domain_whitelist'] = hiddenValueDomainWhitelist; + } + return json; + } +} + +/// Dynamic writeable type for UserAttributeWithValue removes: +/// can, name, label, rank, user_id, user_can_edit, value_is_hidden, user_attribute_id, source, hidden_value_domain_whitelist +class WriteUserAttributeWithValue { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _value; + bool _valueSet = false; + + /// Value of attribute for user + + String get value { + if (!_valueSet && _apiMapResponse.containsKey('value')) { + _value = _apiMapResponse['value'] == null + ? null + : _apiMapResponse['value'].toString(); + _valueSet = true; + } + return _value; + } + + set value(String v) { + _value = v; + _valueSet = true; + } + + WriteUserAttributeWithValue() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteUserAttributeWithValue.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_valueSet || _apiMapResponse.containsKey('value')) { + json['value'] = value; + } + return json; + } +} + +/// Dynamic writeable type for WhitelabelConfiguration removes: +/// id, logo_url, favicon_url +class WriteWhitelabelConfiguration { + Object _apiRawResponse; + Map _apiMapResponse; + String _apiResponseContentType; + + String _logoFile; + bool _logoFileSet = false; + + String _faviconFile; + bool _faviconFileSet = false; + + String _defaultTitle; + bool _defaultTitleSet = false; + + bool _showHelpMenu; + bool _showHelpMenuSet = false; + + bool _showDocs; + bool _showDocsSet = false; + + bool _showEmailSubOptions; + bool _showEmailSubOptionsSet = false; + + bool _allowLookerMentions; + bool _allowLookerMentionsSet = false; + + bool _allowLookerLinks; + bool _allowLookerLinksSet = false; + + bool _customWelcomeEmailAdvanced; + bool _customWelcomeEmailAdvancedSet = false; + + bool _setupMentions; + bool _setupMentionsSet = false; + + bool _alertsLogo; + bool _alertsLogoSet = false; + + bool _alertsLinks; + bool _alertsLinksSet = false; + + bool _foldersMentions; + bool _foldersMentionsSet = false; + + /// Customer logo image. Expected base64 encoded data (write-only) + + String get logoFile { + if (!_logoFileSet && _apiMapResponse.containsKey('logo_file')) { + _logoFile = _apiMapResponse['logo_file'] == null + ? null + : _apiMapResponse['logo_file'].toString(); + _logoFileSet = true; + } + return _logoFile; + } + + set logoFile(String v) { + _logoFile = v; + _logoFileSet = true; + } + + /// Custom favicon image. Expected base64 encoded data (write-only) + + String get faviconFile { + if (!_faviconFileSet && _apiMapResponse.containsKey('favicon_file')) { + _faviconFile = _apiMapResponse['favicon_file'] == null + ? null + : _apiMapResponse['favicon_file'].toString(); + _faviconFileSet = true; + } + return _faviconFile; + } + + set faviconFile(String v) { + _faviconFile = v; + _faviconFileSet = true; + } + + /// Default page title + + String get defaultTitle { + if (!_defaultTitleSet && _apiMapResponse.containsKey('default_title')) { + _defaultTitle = _apiMapResponse['default_title'] == null + ? null + : _apiMapResponse['default_title'].toString(); + _defaultTitleSet = true; + } + return _defaultTitle; + } + + set defaultTitle(String v) { + _defaultTitle = v; + _defaultTitleSet = true; + } + + /// Boolean to toggle showing help menus + + bool get showHelpMenu { + if (!_showHelpMenuSet && _apiMapResponse.containsKey('show_help_menu')) { + _showHelpMenu = _apiMapResponse['show_help_menu']; + _showHelpMenuSet = true; + } + return _showHelpMenu; + } + + set showHelpMenu(bool v) { + _showHelpMenu = v; + _showHelpMenuSet = true; + } + + /// Boolean to toggle showing docs + + bool get showDocs { + if (!_showDocsSet && _apiMapResponse.containsKey('show_docs')) { + _showDocs = _apiMapResponse['show_docs']; + _showDocsSet = true; + } + return _showDocs; + } + + set showDocs(bool v) { + _showDocs = v; + _showDocsSet = true; + } + + /// Boolean to toggle showing email subscription options. + + bool get showEmailSubOptions { + if (!_showEmailSubOptionsSet && + _apiMapResponse.containsKey('show_email_sub_options')) { + _showEmailSubOptions = _apiMapResponse['show_email_sub_options']; + _showEmailSubOptionsSet = true; + } + return _showEmailSubOptions; + } + + set showEmailSubOptions(bool v) { + _showEmailSubOptions = v; + _showEmailSubOptionsSet = true; + } + + /// Boolean to toggle mentions of Looker in emails + + bool get allowLookerMentions { + if (!_allowLookerMentionsSet && + _apiMapResponse.containsKey('allow_looker_mentions')) { + _allowLookerMentions = _apiMapResponse['allow_looker_mentions']; + _allowLookerMentionsSet = true; + } + return _allowLookerMentions; + } + + set allowLookerMentions(bool v) { + _allowLookerMentions = v; + _allowLookerMentionsSet = true; + } + + /// Boolean to toggle links to Looker in emails + + bool get allowLookerLinks { + if (!_allowLookerLinksSet && + _apiMapResponse.containsKey('allow_looker_links')) { + _allowLookerLinks = _apiMapResponse['allow_looker_links']; + _allowLookerLinksSet = true; + } + return _allowLookerLinks; + } + + set allowLookerLinks(bool v) { + _allowLookerLinks = v; + _allowLookerLinksSet = true; + } + + /// Allow subject line and email heading customization in customized emails” + + bool get customWelcomeEmailAdvanced { + if (!_customWelcomeEmailAdvancedSet && + _apiMapResponse.containsKey('custom_welcome_email_advanced')) { + _customWelcomeEmailAdvanced = + _apiMapResponse['custom_welcome_email_advanced']; + _customWelcomeEmailAdvancedSet = true; + } + return _customWelcomeEmailAdvanced; + } + + set customWelcomeEmailAdvanced(bool v) { + _customWelcomeEmailAdvanced = v; + _customWelcomeEmailAdvancedSet = true; + } + + /// Remove the word Looker from appearing in the account setup page + + bool get setupMentions { + if (!_setupMentionsSet && _apiMapResponse.containsKey('setup_mentions')) { + _setupMentions = _apiMapResponse['setup_mentions']; + _setupMentionsSet = true; + } + return _setupMentions; + } + + set setupMentions(bool v) { + _setupMentions = v; + _setupMentionsSet = true; + } + + /// Remove Looker logo from Alerts + + bool get alertsLogo { + if (!_alertsLogoSet && _apiMapResponse.containsKey('alerts_logo')) { + _alertsLogo = _apiMapResponse['alerts_logo']; + _alertsLogoSet = true; + } + return _alertsLogo; + } + + set alertsLogo(bool v) { + _alertsLogo = v; + _alertsLogoSet = true; + } + + /// Remove Looker links from Alerts + + bool get alertsLinks { + if (!_alertsLinksSet && _apiMapResponse.containsKey('alerts_links')) { + _alertsLinks = _apiMapResponse['alerts_links']; + _alertsLinksSet = true; + } + return _alertsLinks; + } + + set alertsLinks(bool v) { + _alertsLinks = v; + _alertsLinksSet = true; + } + + /// Remove Looker mentions in home folder page when you don’t have any items saved + + bool get foldersMentions { + if (!_foldersMentionsSet && + _apiMapResponse.containsKey('folders_mentions')) { + _foldersMentions = _apiMapResponse['folders_mentions']; + _foldersMentionsSet = true; + } + return _foldersMentions; + } + + set foldersMentions(bool v) { + _foldersMentions = v; + _foldersMentionsSet = true; + } + + WriteWhitelabelConfiguration() { + _apiMapResponse = {}; + } + + Object get apiRawResponse { + return _apiRawResponse; + } + + Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; + } + + String get apiResponseContentType { + return _apiResponseContentType; + } + + WriteWhitelabelConfiguration.fromResponse( + Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; + } + + Map toJson() { + var json = {}; + if (_logoFileSet || _apiMapResponse.containsKey('logo_file')) { + json['logo_file'] = logoFile; + } + if (_faviconFileSet || _apiMapResponse.containsKey('favicon_file')) { + json['favicon_file'] = faviconFile; + } + if (_defaultTitleSet || _apiMapResponse.containsKey('default_title')) { + json['default_title'] = defaultTitle; + } + if (_showHelpMenuSet || _apiMapResponse.containsKey('show_help_menu')) { + json['show_help_menu'] = showHelpMenu; + } + if (_showDocsSet || _apiMapResponse.containsKey('show_docs')) { + json['show_docs'] = showDocs; + } + if (_showEmailSubOptionsSet || + _apiMapResponse.containsKey('show_email_sub_options')) { + json['show_email_sub_options'] = showEmailSubOptions; + } + if (_allowLookerMentionsSet || + _apiMapResponse.containsKey('allow_looker_mentions')) { + json['allow_looker_mentions'] = allowLookerMentions; + } + if (_allowLookerLinksSet || + _apiMapResponse.containsKey('allow_looker_links')) { + json['allow_looker_links'] = allowLookerLinks; + } + if (_customWelcomeEmailAdvancedSet || + _apiMapResponse.containsKey('custom_welcome_email_advanced')) { + json['custom_welcome_email_advanced'] = customWelcomeEmailAdvanced; + } + if (_setupMentionsSet || _apiMapResponse.containsKey('setup_mentions')) { + json['setup_mentions'] = setupMentions; + } + if (_alertsLogoSet || _apiMapResponse.containsKey('alerts_logo')) { + json['alerts_logo'] = alertsLogo; + } + if (_alertsLinksSet || _apiMapResponse.containsKey('alerts_links')) { + json['alerts_links'] = alertsLinks; + } + if (_foldersMentionsSet || + _apiMapResponse.containsKey('folders_mentions')) { + json['folders_mentions'] = foldersMentions; + } + return json; + } +} diff --git a/dart/looker_sdk/package.json b/dart/looker_sdk/package.json new file mode 100644 index 000000000..9980f2079 --- /dev/null +++ b/dart/looker_sdk/package.json @@ -0,0 +1,12 @@ +{ + "name": "looker_dart_sdk", + "license": "MIT", + "scripts": { + "test": "dart test test", + "test:unit": "dart test test/unit", + "test:e2e": "dart test test/e2e", + "example": "dart run example/main.dart", + "lint": "dart format -o none --set-exit-if-changed .", + "format": "dart format ." + } +} diff --git a/dart/looker_sdk/pubspec.yaml b/dart/looker_sdk/pubspec.yaml new file mode 100644 index 000000000..51a87a5c7 --- /dev/null +++ b/dart/looker_sdk/pubspec.yaml @@ -0,0 +1,10 @@ +name: looker_sdk +version: 0.0.1 +environment: + sdk: '>=2.9.0 <3.0.0' +dependencies: + http: ^0.12.0+2 + pedantic: ^1.9.0 + dotenv: ^2.0.0 +dev_dependencies: + test: ^1.16.5 diff --git a/dart/looker_sdk/test/e2e/boards_test.dart b/dart/looker_sdk/test/e2e/boards_test.dart new file mode 100644 index 000000000..56f7d0169 --- /dev/null +++ b/dart/looker_sdk/test/e2e/boards_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:looker_sdk/looker_sdk.dart'; +import './utils.dart'; + +void main() { + LookerSDK sdk; + setUp(() async { + sdk = await utils.getSdk(); + }); + + test('boards', () async { + var boards = await sdk.ok(sdk.all_boards()); + if (boards.isNotEmpty) { + expect(boards[0].createdAt, isNotNull); + print(boards[0].createdAt.toIso8601String()); + print(boards[0].getApiRawValue('created_at')); + } else { + print('No boards to run tests against'); + } + }); +} diff --git a/dart/looker_sdk/test/e2e/connections_test.dart b/dart/looker_sdk/test/e2e/connections_test.dart new file mode 100644 index 000000000..0e3b71d09 --- /dev/null +++ b/dart/looker_sdk/test/e2e/connections_test.dart @@ -0,0 +1,62 @@ +import 'package:test/test.dart'; +import 'package:looker_sdk/looker_sdk.dart'; +import './utils.dart'; + +void main() { + LookerSDK sdk; + setUp(() async { + sdk = await utils.getSdk(); + }); + + void cleanup() async { + try { + await sdk.ok(sdk.delete_connection('TestConnection')); + } catch (error) { + // ignore + } + } + + test('connections', () async { + cleanup(); + var connections = await sdk.ok(sdk.all_connections()); + expect(connections.length, isNonNegative); + connections.forEach((connection) => expect(connection.name, isNotNull)); + if (connections.isNotEmpty) { + var connection = await sdk + .ok(sdk.connection(connections[0].name, fields: 'name,host,port')); + expect(connection.name, isNotNull); + } else { + print('No connections to print'); + } + var newConnection = WriteDBConnection(); + newConnection.name = 'TestConnection'; + newConnection.dialectName = 'mysql'; + newConnection.host = 'db1.looker.com'; + newConnection.port = '3306'; + newConnection.username = 'looker_demoX'; + newConnection.password = 'look_your_data'; + newConnection.database = 'demo_db2'; + newConnection.tmpDbName = 'looker_demo_scratch'; + var connection = await sdk.ok(sdk.create_connection(newConnection)); + expect(connection.name, equals(newConnection.name.toLowerCase())); + expect(connection.username, equals(newConnection.username)); + connection = await sdk + .ok(sdk.connection('TestConnection', fields: 'name,host,port')); + expect(connection.name, equals(newConnection.name.toLowerCase())); + expect(connection.host, equals(newConnection.host)); + expect(connection.port, equals(newConnection.port)); + expect(connection.username, isNull); + var updateConnection = WriteDBConnection(); + updateConnection.username = 'looker_demo'; + connection = + await sdk.ok(sdk.update_connection('TestConnection', updateConnection)); + expect(connection.name, equals(newConnection.name.toLowerCase())); + expect(connection.username, equals(updateConnection.username)); + var testResults = await sdk.ok( + sdk.test_connection('TestConnection', tests: DelimList(['connect']))); + expect(testResults[0].name, equals('connect')); + expect(testResults[0].message, equals('Can connect')); + var deleteResult = await sdk.ok(sdk.delete_connection('TestConnection')); + expect(deleteResult, equals('')); + }); +} diff --git a/dart/looker_sdk/test/e2e/dashboards_test.dart b/dart/looker_sdk/test/e2e/dashboards_test.dart new file mode 100644 index 000000000..807fae1ac --- /dev/null +++ b/dart/looker_sdk/test/e2e/dashboards_test.dart @@ -0,0 +1,22 @@ +import 'package:test/test.dart'; +import 'package:looker_sdk/looker_sdk.dart'; +import './utils.dart'; + +void main() { + LookerSDK sdk; + setUp(() async { + sdk = await utils.getSdk(); + }); + + test('get dashboards', () async { + var dashboards = await sdk.ok(sdk.all_dashboards()); + expect(dashboards.length, isNonNegative); + dashboards.forEach((dashboard) => expect(dashboard.id, isNotNull)); + if (dashboards.isNotEmpty) { + var dashboard = await sdk.ok(sdk.dashboard(dashboards[0].id)); + expect(dashboard.id, isNotNull); + } else { + print('No dashboards to run tests against'); + } + }); +} diff --git a/dart/looker_sdk/test/e2e/looks_test.dart b/dart/looker_sdk/test/e2e/looks_test.dart new file mode 100644 index 000000000..274efea43 --- /dev/null +++ b/dart/looker_sdk/test/e2e/looks_test.dart @@ -0,0 +1,23 @@ +import 'package:test/test.dart'; +import 'package:looker_sdk/looker_sdk.dart'; +import './utils.dart'; + +void main() { + LookerSDK sdk; + setUp(() async { + sdk = await utils.getSdk(); + }); + + test('looks', () async { + var looks = await sdk.ok(sdk.all_looks()); + if (looks.isNotEmpty) { + var result = + await sdk.ok(sdk.run_look(looks[looks.length - 1].id, 'png')); + expect(result.runtimeType.toString(), equals('Uint8List')); + result = await sdk.ok(sdk.run_look(looks[looks.length - 1].id, 'csv')); + expect(result.runtimeType.toString(), equals('String')); + } else { + print('No looks to run tests against'); + } + }, timeout: Timeout(Duration(minutes: 5))); +} diff --git a/dart/looker_sdk/test/e2e/utils.dart b/dart/looker_sdk/test/e2e/utils.dart new file mode 100644 index 000000000..dad8630e6 --- /dev/null +++ b/dart/looker_sdk/test/e2e/utils.dart @@ -0,0 +1,25 @@ +import 'package:dotenv/dotenv.dart' show load, env; +import 'package:looker_sdk/looker_sdk.dart'; + +class Utils { + Utils() { + load(); + } + + Map _credentials() { + return { + 'client_id': env['CLIENT_ID'], + 'client_secret': env['CLIENT_SECRET'] + }; + } + + Future getSdk() { + return Sdk.createSdk({ + 'base_url': env['URL'], + 'verify_ssl': false, + 'credentials_callback': _credentials + }); + } +} + +Utils utils = Utils(); diff --git a/dart/looker_sdk/test/unit/looker_sdk_test.dart b/dart/looker_sdk/test/unit/looker_sdk_test.dart new file mode 100644 index 000000000..85d9b821c --- /dev/null +++ b/dart/looker_sdk/test/unit/looker_sdk_test.dart @@ -0,0 +1,189 @@ +import 'package:test/test.dart'; +import 'package:looker_sdk/looker_sdk.dart'; + +void main() { + test('DelimList', () { + var d = DelimList([]); + expect(d.toString(), equals('')); + d = DelimList(['X']); + expect(d.toString(), equals('X')); + d = DelimList(['X', 'Y']); + expect(d.toString(), equals('X,Y')); + d = DelimList(['X', 'Y'], ' '); + expect(d.toString(), equals('X Y')); + d = DelimList(['X', 'Y'], ',', '\\'); + expect(d.toString(), equals('\\X,Y')); + d = DelimList(['X', 'Y'], ',', '', '/'); + expect(d.toString(), equals('X,Y/')); + d = DelimList(['X', 'Y'], ',', '"', '"'); + expect(d.toString(), equals('"X,Y"')); + }); + + test('model non json fromResponse', () { + var td = ''; + var v = AlertAppliedDashboardFilter.fromResponse(td, 'application/json'); + expect(v.apiResponseContentType, equals('application/json')); + expect(v.apiRawResponse, equals(td)); + expect(v.filterTitle, isNull); + expect(v.getApiRawValue('filter_title'), isNull); + expect(v.fieldName, isNull); + }); + + test('model basic json fromResponse', () { + var td = {'filter_title': 'Filter Title'}; + var v = AlertAppliedDashboardFilter.fromResponse(td, 'application/json'); + expect(v.apiResponseContentType, equals('application/json')); + expect(v.apiRawResponse, equals(td)); + expect(v.filterTitle, equals('Filter Title')); + expect(v.getApiRawValue('filter_title'), equals('Filter Title')); + expect(v.fieldName, isNull); + }); + + test('model basic toJson fromResponse constructor', () { + var td = {'filter_title': 'Filter Title'}; + var v = AlertAppliedDashboardFilter.fromResponse(td, 'application/json'); + expect(v.toJson(), equals(td)); + }); + + test('model basic toJson fromResponse constructor updated', () { + var td = {'filter_title': 'Filter Title'}; + var v = AlertAppliedDashboardFilter.fromResponse(td, 'application/json'); + v.filterTitle = null; + v.filterDescription = 'No filter'; + expect(v.toJson(), + equals({'filter_title': null, 'filter_description': 'No filter'})); + }); + + test('model basic toJson default constructor', () { + var v = AlertAppliedDashboardFilter(); + expect(v.toJson(), equals({})); + }); + + test('property named default', () { + var json = {'default': 'DEFAULT'}; + var v = DataActionFormField.fromResponse(json, 'application/json'); + expect(v.defaultValue, equals('DEFAULT')); + expect(v.toJson(), equals(json)); + v.defaultValue = 'UPDATED_DEFAULT'; + expect(v.defaultValue, equals('UPDATED_DEFAULT')); + expect(v.toJson(), equals({'default': 'UPDATED_DEFAULT'})); + }); + + test('DateTime property', () { + var v = Board(); + expect(v.createdAt, isNull); + expect(v.toJson(), equals({})); + v.createdAt = DateTime(2022, 1, 11, 20, 42, 59); + expect(v.createdAt, equals(DateTime(2022, 1, 11, 20, 42, 59))); + expect(v.toJson(), {'created_at': '2022-01-11T20:42:59.000'}); + v = Board.fromResponse({'created_at': '2021-08-13T19:04:02.308+00:00'}, ''); + expect(v.createdAt.toIso8601String(), equals('2021-08-13T19:04:02.308Z')); + }); + + test('primitive array', () { + var v = DBConnection(); + expect(v.userAttributeFields, isNull); + expect(v.toJson(), equals({})); + var a = []; + v.userAttributeFields = a; + expect(v.userAttributeFields, equals([])); + a.add('ABCD'); + expect(v.userAttributeFields, equals(['ABCD'])); + expect( + v.toJson(), + equals({ + 'user_attribute_fields': ['ABCD'] + })); + v = DBConnection.fromResponse({ + 'user_attribute_fields': ['WXYX'] + }, ''); + expect(v.userAttributeFields, equals(['WXYX'])); + expect( + v.toJson(), + equals({ + 'user_attribute_fields': ['WXYX'] + })); + }); + + test('enum type', () { + var v = ProjectWorkspace(); + expect(v.dependencyStatus, isNull); + v.dependencyStatus = DependencyStatus.installNone; + expect(v.dependencyStatus, DependencyStatus.installNone); + expect(v.toJson(), equals({'dependency_status': 'install_none'})); + v = ProjectWorkspace.fromResponse( + {'dependency_status': 'lock_optional'}, ''); + expect(v.dependencyStatus, DependencyStatus.lockOptional); + }); + + test('Map type', () { + var v = DBConnection(); + expect(v.can, isNull); + expect(v.toJson(), equals({})); + var p = {'index': true}; + v.can = p; + expect(v.can, equals({'index': true})); + expect( + v.toJson(), + equals({ + 'can': {'index': true} + })); + v = DBConnection.fromResponse({ + 'can': {'show': true} + }, ''); + expect(v.can, equals({'show': true})); + expect( + v.toJson(), + equals({ + 'can': {'show': true} + })); + }); + + test('Custom property', () { + var v = DataActionForm(); + expect(v.state, isNull); + expect(v.toJson(), equals({})); + v.state = DataActionUserState(); + expect(v.state, isNotNull); + expect(v.toJson(), equals({'state': {}})); + v.state.data = 'ABCD'; + expect( + v.toJson(), + equals({ + 'state': {'data': 'ABCD'} + })); + v = DataActionForm.fromResponse({ + 'state': {'data': 'WXYZ'} + }, ''); + expect(v.state.toJson(), equals({'data': 'WXYZ'})); + }); + + test('Custom property array', () { + var v = DataActionForm(); + v.fields = []; + expect(v.fields, equals([])); + expect(v.toJson(), equals({'fields': []})); + v.fields.add(DataActionFormField()); + expect( + v.toJson(), + equals({ + 'fields': [{}] + })); + v.fields[0].label = 'test label'; + expect( + v.toJson(), + equals({ + 'fields': [ + {'label': 'test label'} + ] + })); + v = DataActionForm.fromResponse({ + 'fields': [ + {'label': 'label test 1'}, + {'label': 'label test 2'} + ] + }, ''); + expect(v.fields[0].label, equals('label test 1')); + expect(v.fields[1].label, equals('label test 2')); + }); +} diff --git a/packages/sdk-codegen-scripts/src/reformatter.ts b/packages/sdk-codegen-scripts/src/reformatter.ts index de13b6094..018acf33a 100644 --- a/packages/sdk-codegen-scripts/src/reformatter.ts +++ b/packages/sdk-codegen-scripts/src/reformatter.ts @@ -295,6 +295,64 @@ class GoFormatter extends BaseFormatter { } } +class DartFormatter extends BaseFormatter { + constructor() { + super('Dart') + } + + errorMessage = 'dart command not found. have dart tools been installed?' + + reformat(files: string[]): string { + const dartExists = run( + 'command', + ['dart', '--version'], + this.errorMessage, + true + ) + if (dartExists.includes('Dart')) { + files.forEach((f) => { + run('command', ['dart', 'format', f], `Failed to format ${f}`) + }) + return success(files) + } else { + return danger(this.errorMessage) + } + } + + versionStamp(gen: ICodeGen) { + if (gen.versions && gen.versions.lookerVersion) { + const stampFile = gen.fileName('./rtl/constants') + if (!isFileSync(stampFile)) { + warn(`${stampFile} was not found. Skipping version update.`) + } + let content = readFileSync(stampFile) + const lookerPattern = /lookerVersion = ['"].*['"]/i + const apiPattern = /\bapiVersion = ['"].*['"]/i + const envPattern = /environmentPrefix = ['"].*['"]/i + content = content.replace( + lookerPattern, + `lookerVersion = '${gen.versions.lookerVersion}'` + ) + content = content.replace( + apiPattern, + `apiVersion = '${gen.versions.spec.version}'` + ) + content = content.replace( + envPattern, + `environmentPrefix = '${gen.environmentPrefix}'` + ) + writeFile(stampFile, content) + return success( + `updated ${stampFile} to ${gen.versions.spec.version}.${gen.versions.lookerVersion}` + ) + } + + return warn( + 'Version information was not retrieved. Skipping Typescript SDK version updating.' + ) + } +} + type IFormatFiles = { [key: string]: string[] } type IFormatters = { [key: string]: IReformat } @@ -306,6 +364,7 @@ const fileFormatters: IFormatters = { '.swift': new SwiftFormatter(), '.ts': new TypescriptFormatter(), '.go': new GoFormatter(), + '.dart': new DartFormatter(), } export class FilesFormatter { diff --git a/packages/sdk-codegen/src/codeGen.ts b/packages/sdk-codegen/src/codeGen.ts index 03ae726cf..9849d41b6 100644 --- a/packages/sdk-codegen/src/codeGen.ts +++ b/packages/sdk-codegen/src/codeGen.ts @@ -151,6 +151,10 @@ export interface ICodeGen { /** use special handling for a JSON value that can be a string or a number. Introduced for Swift. */ anyString: boolean + /** + * omit the version number from the path + */ + omitVersionFromPath?: boolean /** current version of the Api being generated */ apiVersion: string diff --git a/packages/sdk-codegen/src/codeGenerators.ts b/packages/sdk-codegen/src/codeGenerators.ts index 22099fe4c..19c88bbd1 100644 --- a/packages/sdk-codegen/src/codeGenerators.ts +++ b/packages/sdk-codegen/src/codeGenerators.ts @@ -32,6 +32,7 @@ import { SwiftGen } from './swift.gen' import { PythonGen } from './python.gen' import { TypescriptGen } from './typescript.gen' import { GoGen } from './go.gen' +import { DartGen } from './dart.gen' export interface IGeneratorSpec { /** source code file extension regex */ @@ -89,6 +90,12 @@ export const Generators: Array = [ options: '-papiPackage=Looker -ppackageName=looker', extension: /\.go/gi, }, + { + factory: (api: ApiModel, versions?: IVersionInfo) => + new DartGen(api, versions), + language: 'Dart', + extension: /\.dart/gi, + }, { language: 'java', legacy: 'java', diff --git a/packages/sdk-codegen/src/dart.gen.spec.ts b/packages/sdk-codegen/src/dart.gen.spec.ts new file mode 100644 index 000000000..1926e12d2 --- /dev/null +++ b/packages/sdk-codegen/src/dart.gen.spec.ts @@ -0,0 +1,379 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + */ + +import type * as OAS from 'openapi3-ts' +import { TestConfig } from './testUtils' +import { DartGen } from './dart.gen' +import type { IMappedType, IParameter, IProperty, IType, ApiModel } from '.' +import { EnumType } from '.' + +const config = TestConfig() +const apiTestModel = config.apiTestModel + +describe('Dart generator', () => { + let gen: DartGen + beforeEach(() => { + gen = new DartGen(apiTestModel) + }) + + it('defaultApi', () => { + gen.apiVersion = '4.0' + expect(gen.isDefaultApi()).toEqual(true) + gen.apiVersion = '3.1' + expect(gen.isDefaultApi()).toEqual(false) + }) + + it('supportsMultiApi', () => { + expect(gen.supportsMultiApi()).toEqual(false) + }) + + it('sdkFileName', () => { + expect(gen.sdkFileName('methods')).toEqual( + './dart/looker_sdk/lib/src/sdk/methods.dart' + ) + }) + + it('declareProperty', () => { + let prop = gen.declareProperty('', { + type: { name: 'String' }, + name: 'my_prop', + } as IProperty) + expect(prop).toEqual( + ` + String _myProp; + bool _myPropSet = false; +` + ) + prop = gen.declareProperty('', { + type: { name: 'String' }, + name: 'default', + } as IProperty) + expect(prop).toEqual( + ` + String _defaultValue; + bool _defaultValueSet = false; +` + ) + }) + + it('declarePropertyGetSet', () => { + let prop = gen.declarePropertyGetSet('', { + type: { name: 'String' }, + name: 'my_prop', + description: '', + } as IProperty) + expect(prop).toEqual( + ` + String get myProp { + if (!_myPropSet && _apiMapResponse.containsKey('my_prop')) { + _myProp = _apiMapResponse['my_prop'] == null ? null : _apiMapResponse['my_prop'].toString(); + _myPropSet = true; + } + return _myProp; + } + + set myProp(String v) { + _myProp = v; + _myPropSet = true; + } +` + ) + prop = gen.declarePropertyGetSet('', { + type: { name: 'String' }, + name: 'default', + description: '', + } as IProperty) + expect(prop).toEqual( + ` + String get defaultValue { + if (!_defaultValueSet && _apiMapResponse.containsKey('default')) { + _defaultValue = _apiMapResponse['default'] == null ? null : _apiMapResponse['default'].toString(); + _defaultValueSet = true; + } + return _defaultValue; + } + + set defaultValue(String v) { + _defaultValue = v; + _defaultValueSet = true; + } +` + ) + }) + + it('methodsPrologue', () => { + gen.apiVersion = '4.0' + const prologue = gen.methodsPrologue('') + expect(prologue).toEqual(` +// NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 +import 'package:looker_sdk/looker_sdk.dart'; + +class LookerSDK extends APIMethods { + LookerSDK(AuthSession authSession) : super(authSession); +`) + }) + + it('methodsEpilogue', () => { + gen.apiVersion = '4.0' + const s = gen.methodsEpilogue('') + expect(s).toEqual('}') + }) + + it('modelsPrologue', () => { + gen.apiVersion = '4.0' + const prologue = gen.modelsPrologue('') + expect(prologue).toEqual(` +// NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 +`) + }) + + it('modelsEpilogue', () => { + gen.apiVersion = '4.0' + const s = gen.modelsEpilogue('') + expect(s).toEqual('') + }) + + it('commentHeader', () => { + gen.apiVersion = '4.0' + let s = gen.commentHeader('', undefined) + expect(s).toEqual('') + s = gen.commentHeader('', 'this is a comment', ' ') + expect(s).toEqual(`/* + + this is a comment + + */ +`) + gen.apiVersion = '4.0' + s = gen.commentHeader('', 'this is a comment') + expect(s).toEqual(`/// this is a comment +`) + }) + + it('beginRegion', () => { + gen.apiVersion = '4.0' + const s = gen.beginRegion('', 'MyMethod') + expect(s).toEqual('// #region MyMethod') + }) + + it('endRegion', () => { + gen.apiVersion = '4.0' + const s = gen.endRegion('', 'MyMethod') + expect(s).toEqual('// #endregion MyMethod') + }) + + it('enumMapper', () => { + gen.apiVersion = '4.0' + const s = gen.enumMapper({ + name: 'MyEnum', + values: ['value1', 'value2'], + } as EnumType) + expect(s).toEqual(`class MyEnumMapper { + static String toStringValue(MyEnum e) { + switch(e) { +case MyEnum.value1: + return 'value1'; +case MyEnum.value2: + return 'value2'; + + default: + return null; + } + } + + static MyEnum fromStringValue(String s) { + + if (s == 'value1') { + return MyEnum.value1; + } + if (s == 'value2') { + return MyEnum.value2; + } + return null; + } + }`) + }) + + it('declareEnumValue', () => { + const s = gen.declareEnumValue('', 'value_xyz') + expect(s).toEqual('valueXyz') + }) + + it('defaultConstructor', () => { + let s = gen.defaultConstructor( + new EnumType( + { name: 'MyEnum' } as IType, + { 'x-looker-values': [] } as OAS.SchemaObject, + { getEnumList: () => ({}), types: {} } as ApiModel + ) + ) + s = gen.defaultConstructor({ name: 'MyType' } as IType) + expect(s).toEqual(` +MyType() { + _apiMapResponse = {}; +} +`) + }) + + it('getApiRawResponse', () => { + const s = gen.getApiRawResponse({ name: 'MyType' } as IType) + expect(s).toEqual(` +Object get apiRawResponse { + return _apiRawResponse; +} +`) + }) + + it('getApiRawValue', () => { + const s = gen.getApiRawValue({ name: 'MyType' } as IType) + expect(s).toEqual(` +Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; +} +`) + }) + + it('getContentType', () => { + const s = gen.getContentType({ + name: 'MyType', + } as IType) + expect(s).toEqual(` +String get apiResponseContentType { + return _apiResponseContentType; +} +`) + }) + + it('toJson', () => { + const s = gen.toJson({ + name: 'MyType', + properties: { + my_prop: { name: 'my_prop', type: { name: 'String' } } as IProperty, + }, + } as unknown as IType) + expect(s).toEqual(` +Map toJson() { + var json = {}; +if (_myPropSet || _apiMapResponse.containsKey('my_prop')) { +json['my_prop'] = myProp; +} + return json; +} +`) + }) + + it('fromResponse', () => { + const s = gen.fromResponse({ + name: 'MyType', + properties: { + my_prop: { name: 'my_prop', type: { name: 'String' } } as IProperty, + }, + } as unknown as IType) + expect(s).toEqual(` +MyType.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; +} +`) + }) + + it('propertyFromJson', () => { + const s = gen.propertyFromJson( + { name: 'my_prop', type: { name: 'String' } } as IProperty, + '_apiMapResponse' + ) + expect(s).toEqual( + "_myProp = _apiMapResponse['my_prop'] == null ? null : _apiMapResponse['my_prop'].toString()" + ) + }) + + it('summary', () => { + const s = gen.summary('', 'ignored') + expect(s).toEqual('') + }) + + it('typeSignature', () => { + const s = gen.typeSignature('', { + name: 'MyType', + description: 'This is my type', + } as IType) + expect(s).toEqual(`/// This is my type +class MyType { +`) + }) + + it('sdkClassName', () => { + const s = gen.sdkClassName() + expect(s).toEqual('LookerSDK') + }) + + it.each([ + [ + { + refCount: 0, + name: 'string', + }, + 'String', + { + refCount: 0, + name: 'boolean', + }, + { + refCount: 0, + name: 'date', + }, + 'DateTime', + ], + ])('typeMap', (type, expected) => { + const s = gen.typeMap(type as unknown as IType) + expect(s.name).toEqual(expected) + }) + + it('paramComment', () => { + const s = gen.paramComment( + { + name: 'myParam', + description: 'My parameters desciption', + } as IParameter, + { name: 'string' } as IMappedType + ) + expect(s).toEqual('@param {string} myParam My parameters desciption') + }) + + // it('declareParameter', () => {}) + + // it('methodHeaderDeclaration', () => {}) + + // it('encodePathParams', () => {}) + + // it('responseHandler', () => {}) + + // it('httpCall', () => {}) +}) diff --git a/packages/sdk-codegen/src/dart.gen.ts b/packages/sdk-codegen/src/dart.gen.ts new file mode 100644 index 000000000..8116655c6 --- /dev/null +++ b/packages/sdk-codegen/src/dart.gen.ts @@ -0,0 +1,669 @@ +/* + + MIT License + + Copyright (c) 2021 Looker Data Sciences, Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + */ + +import type { IMappedType } from './codeGen' +import { CodeGen, commentBlock } from './codeGen' +import type { + IMethod, + IParameter, + IProperty, + IType, + Arg, + EnumValueType, +} from './sdkModels' +import { EnumType, mayQuote, strBody, camelCase } from './sdkModels' + +/** + * Dart generator + */ +export class DartGen extends CodeGen { + codePath = './dart/looker_sdk/lib/src' + packagePath = '' + omitVersionFromPath = true + sdkPath = 'sdk' + itself = '' + fileExtension = '.dart' + commentStr = '// ' + nullStr = 'null' + transport = 'transport' + + argDelimiter = ', ' + paramDelimiter = ',\n' + propDelimiter = '\n' + codeQuote = '"' + enumDelimiter = ',\n' + + indentStr = ' ' + endTypeStr = '\n}' + needsRequestTypes = false + willItStream = false + + private readonly defaultApi = '4.0' + + isDefaultApi() { + return this.apiVersion === this.defaultApi + } + + supportsMultiApi() { + return false + } + + sdkFileName(baseFileName: string) { + return this.fileName(`${this.sdkPath}/${baseFileName}`) + } + + declareProperty(indent: string, property: IProperty): string { + // const optional = !property.required ? '? = null' : '' + const type = this.typeMap(property.type) + // TODO figure out the impact of this! Impacts DataActionFormField + const name = + property.name === 'default' ? 'defaultValue' : camelCase(property.name) + // const attr = property.hasSpecialNeeds + // ? `${indent}@JsonProperty("${property.jsonName}")\n` + // : '' + return ` + ${indent}${type.name} _${name}; + ${indent}bool _${name}Set = false; +` + } + + declarePropertyGetSet(indent: string, property: IProperty): string { + // const optional = !property.required ? '? = null' : '' + const type = this.typeMap(property.type) + // TODO figure out the impact of this! Impacts DataActionFormField + const name = + property.name === 'default' ? 'defaultValue' : camelCase(property.name) + // const attr = property.hasSpecialNeeds + // ? `${indent}@JsonProperty("${property.jsonName}")\n` + // : '' + return ( + this.commentHeader(indent, this.describeProperty(property)) + + ` + ${type.name} get ${name} { + if (!_${name}Set && _apiMapResponse.containsKey('${property.name}')) { + ${this.propertyFromJson(property, '_apiMapResponse')}; + _${name}Set = true; + } + return _${name}; + } + + set ${name}(${type.name} v) { + _${name} = v; + _${name}Set = true; + } +` + ) + } + + methodsPrologue(_indent: string): string { + return ` +// ${this.warnEditing()} +import 'package:looker_sdk/looker_sdk.dart'; + +class ${this.sdkClassName()} extends APIMethods { + ${this.sdkClassName()}(AuthSession authSession) : super(authSession); +` + } + + methodsEpilogue(_indent: string): string { + return '}' + } + + streamsPrologue(_indent: string): string { + return '' + } + + modelsPrologue(_indent: string): string { + return ` +// ${this.warnEditing()} +` + } + + modelsEpilogue(_indent: string): string { + return '' + } + + commentHeader(indent: string, text: string | undefined, commentStr = '/// ') { + if (!text) return '' + if (commentStr === ' ') { + return `${indent}/*\n\n${commentBlock( + text, + indent, + commentStr + )}\n\n${indent} */\n` + } + return `${indent}${commentBlock(text, indent, commentStr)}\n` + } + + beginRegion(indent: string, description: string): string { + return `${indent}// #region ${description}` + } + + endRegion(indent: string, description: string): string { + return `${indent}// #endregion ${description}` + } + + declareType(indent: string, type: IType) { + const bump = this.bumper(indent) + const props: string[] = [] + const propGetSets: string[] = [] + let ender = this.endTypeStr + let propertyValues = '' + let propertyGetSetValues = '' + if (type instanceof EnumType) { + ender = `\n}` + const num = type as EnumType + num.values.forEach((value) => + props.push(this.declareEnumValue(bump, value)) + ) + propertyValues = props.join(this.enumDelimiter) + return ( + this.typeSignature(indent, type) + + propertyValues + + `${this.endTypeStr ? indent : ''}${ender}` + + this.enumMapper(type) + ) + } else { + props.push('Object _apiRawResponse;') + props.push('Map _apiMapResponse;') + props.push('String _apiResponseContentType;') + Object.values(type.properties).forEach((prop) => { + props.push(this.declareProperty(bump, prop)) + propGetSets.push(this.declarePropertyGetSet(bump, prop)) + }) + propertyValues = props.join(this.propDelimiter) + propertyGetSetValues = propGetSets.join(this.propDelimiter) + return ( + this.typeSignature(indent, type) + + propertyValues + + propertyGetSetValues + + this.defaultConstructor(type) + + this.getApiRawResponse(type) + + this.getApiRawValue(type) + + this.getContentType(type) + + this.fromResponse(type) + + this.toJson(type) + + `${this.endTypeStr ? indent : ''}${ender}` + ) + } + } + + enumMapper(type: EnumType) { + const toMaps = type.values + .map( + (v) => `case ${type.name}.${camelCase(v as string)}: + return '${v}'; +` + ) + .join('') + const fromMaps = type.values + .map( + (v) => ` + if (s == '${v}') { + return ${type.name}.${camelCase(v as string)}; + }` + ) + .join('') + return `class ${type.name}Mapper { + static String toStringValue(${type.name} e) { + switch(e) { +${toMaps} + default: + return null; + } + } + + static ${type.name} fromStringValue(String s) { +${fromMaps} + return null; + } + }` + } + + declareEnumValue(indent: string, value: EnumValueType) { + return `${indent}${mayQuote(camelCase(value as string))}` + } + + defaultConstructor(type: IType) { + return type instanceof EnumType + ? '' + : ` +${type.name}() { + _apiMapResponse = {}; +} +` + } + + getApiRawResponse(type: IType) { + let src + if (!(type instanceof EnumType)) { + src = ` +Object get apiRawResponse { + return _apiRawResponse; +} +` + } + return src + } + + getApiRawValue(type: IType) { + let src + if (!(type instanceof EnumType)) { + src = ` +Object getApiRawValue(String valueName) { + return _apiMapResponse == null ? null : _apiMapResponse[valueName]; +} +` + } + return src + } + + getContentType(type: IType) { + let src + if (!(type instanceof EnumType)) { + src = ` +String get apiResponseContentType { + return _apiResponseContentType; +} +` + } + return src + } + + // if (_filterTitleSet || _apiMapResponse.containsKey('filter_title')) { + // json['filter_title'] = filterTitle; + // } + + toJson(type: IType) { + let toJson = '' + if (!(type instanceof EnumType)) { + const props: string[] = [] + Object.values(type.properties).forEach((prop) => { + const name = + prop.name === 'default' ? 'defaultValue' : camelCase(prop.name) + props.push( + `if (_${name}Set || _apiMapResponse.containsKey('${prop.name}')) {` + ) + if (prop.type.customType) { + if (prop.type.className === 'ArrayType') { + props.push( + `json['${prop.name}'] = ${name} == null ? null : ${name}.map((i) => i.toJson()).toList();` + ) + } else { + props.push( + `json['${prop.name}'] = ${name} == null ? null : ${name}.toJson();` + ) + } + } else { + if (prop.type instanceof EnumType) { + props.push( + `json['${prop.name}'] = ${prop.type.name}Mapper.toStringValue(${name});` + ) + } else if (prop.type.className === 'ArrayType') { + // TODO - handle array of DateTime (there are none at the moment) + props.push(`json['${prop.name}'] = ${name};`) + } else { + const mapped = this.typeMap(prop.type) + if (mapped.name === 'DateTime') { + props.push( + `json['${prop.name}'] = ${name} == null ? null : ${name}.toIso8601String();` + ) + } else { + props.push(`json['${prop.name}'] = ${name};`) + } + } + } + props.push('}') + }) + toJson = ` +Map toJson() { + var json = {}; +${props.join('\n')} + return json; +} +` + } + return toJson + } + + fromResponse(type: IType) { + let fromResponse = '' + if (!(type instanceof EnumType)) { + fromResponse = ` +${type.name}.fromResponse(Object apiRawResponse, String apiResponseContentType) { + _apiRawResponse = apiRawResponse; + _apiMapResponse = {}; + if (apiRawResponse is Map) { + _apiMapResponse = apiRawResponse; + } + _apiResponseContentType = apiResponseContentType ?? ''; +} +` + } + return fromResponse + } + + propertyFromJson(prop: IProperty, sourceName: string) { + const name = + prop.name === 'default' ? '_defaultValue' : '_' + camelCase(prop.name) + if (prop.type.customType) { + if (prop.type.className === 'ArrayType') { + return `${name} = ${sourceName}['${prop.name}'] == null ? null : (${sourceName}['${prop.name}'] as List).map((i) => ${prop.type.customType}.fromResponse(i, apiResponseContentType)).toList()` + } else { + return `${name} = ${sourceName}['${prop.name}'] == null ? null : ${prop.type.customType}.fromResponse(${sourceName}['${prop.name}'], apiResponseContentType)` + } + } else { + if (prop.type instanceof EnumType) { + return `${name} = ${prop.type.name}Mapper.fromStringValue(${sourceName}['${prop.name}'])` + } else if (prop.type.className === 'ArrayType') { + const listType = this.typeMap(prop.type!.elementType!).name + return `${name} = ${sourceName}['${prop.name}'] == null ? null : ${sourceName}['${prop.name}'].map<${listType}>((i) => i as ${listType}).toList()` + } else { + const propType = this.typeMap(prop.type!).name + if (propType === 'String') { + // Dart is very picky about types. Coorce type to string + return `${name} = ${sourceName}['${prop.name}'] == null ? null : ${sourceName}['${prop.name}'].toString()` + } else if (propType === 'DateTime') { + return `${name} = ${sourceName}['${prop.name}'] == null ? null : DateTime.parse(${sourceName}['${prop.name}'])` + } else { + return `${name} = ${sourceName}['${prop.name}']` + } + } + } + } + + summary(_indent: string, _text: string | undefined): string { + return '' + } + + typeSignature(indent: string, type: IType) { + const isEnum = type instanceof EnumType + const kind = isEnum ? 'enum' : 'class' + const opener = ' {' + return ( + this.commentHeader(indent, type.description) + + `${indent}${kind} ${type.name} ${opener}\n` + ) + } + + sdkClassName() { + return 'LookerSDK' + } + + typeMap(type: IType): IMappedType { + super.typeMap(type) + const mt = this.nullStr + const dartTypes: Record = { + any: { default: mt, name: 'dynamic' }, + boolean: { default: mt, name: 'bool' }, + byte: { default: mt, name: 'binary' }, + date: { default: mt, name: 'DateTime' }, + datetime: { default: mt, name: 'DateTime' }, + double: { default: mt, name: 'double' }, + float: { default: mt, name: 'double' }, + int32: { default: mt, name: 'int' }, + int64: { default: mt, name: 'int' }, + integer: { default: mt, name: 'int' }, + number: { default: mt, name: 'double' }, + object: { default: mt, name: 'Map' }, + password: { default: mt, name: 'Password' }, + string: { default: mt, name: 'String' }, + uri: { default: mt, name: 'String' }, + url: { default: mt, name: 'String' }, + void: { default: mt, name: 'void' }, + } + + if (type.elementType) { + // This is a structure with nested types + const map = this.typeMap(type.elementType) + switch (type.className) { + case 'ArrayType': + return { default: this.nullStr, name: `List<${map.name}>` } + case 'HashType': { + const mapName = 'dynamic' + // type.elementType.name === 'string' ? 'dynamic' : map.name // TODO fix bad API spec, like MergeQuery vis_config + // TODO figure out this bizarre string template error either in IntelliJ or Typescript + // return {name: `Map`, default: '{}'} + return { default: this.nullStr, name: 'Map` } + } + case 'DelimArrayType': + return { default: this.nullStr, name: `DelimList<${map.name}>` } + case 'EnumType': + return { default: '', name: type.name } + } + throw new Error(`Don't know how to handle: ${JSON.stringify(type)}`) + } + + if (type.name) { + return ( + dartTypes[type.name] || { default: this.nullStr, name: `${type.name}` } + ) + } else { + throw new Error('Cannot output a nameless type.') + } + } + + paramComment(param: IParameter, mapped: IMappedType) { + return `@param {${mapped.name}} ${param.name} ${param.description}` + } + + declareParameter(indent: string, method: IMethod, param: IParameter) { + const type = + param.location === strBody + ? this.writeableType(param.type, method) || param.type + : param.type + const mapped = this.typeMap(type) + return ( + this.commentHeader(indent, this.paramComment(param, mapped)) + + `${indent}${mapped.name} ${param.name}` + + (param.required + ? '' + : mapped.default && mapped.default !== 'null' + ? ` = ${mapped.default}` + : '') + ) + } + + methodHeaderDeclaration(indent: string, method: IMethod, streamer = false) { + const type = this.typeMap(method.type) + const resultType = streamer ? 'ByteArray' : type.name + const head = method.description?.trim() + let headComment = + (head ? `${head}\n\n` : '') + + `${method.httpMethod} ${method.endpoint} -> ${resultType}` + let fragment = '' + const requestType = this.requestTypeName(method) + const bump = indent + this.indentStr + + if (requestType) { + // TODO remove this Typescript cruft + fragment = `request: Partial<${requestType}>` + } else { + const params: string[] = [] + const optionalParams: string[] = [] + const args = method.allParams // get the params in signature order + if (args && args.length > 0) { + args.forEach((p) => { + if (p.required) { + params.push(this.declareParameter(bump, method, p)) + } else { + optionalParams.push(this.declareParameter(bump, method, p)) + } + }) + } + fragment = + params.length > 0 ? `\n${params.join(this.paramDelimiter)}\n` : '' + if (optionalParams.length > 0) { + if (params.length > 0) { + fragment += ', ' + } + fragment += `\n{${optionalParams.join(this.paramDelimiter)}}\n` + } + } + if (method.responseIsBoth()) { + headComment += `\n\n**Note**: Binary content may be returned by this method.` + } else if (method.responseIsBinary()) { + headComment += `\n\n**Note**: Binary content is returned by this method.\n` + } + const returnType = + !method.returnType && !method.type.customType ? 'dynamic' : type.name + // const callback = `callback: (readable: Readable) => Promise<${type.name}>,` + const header = + this.commentHeader(indent, headComment) + + `${indent}Future> ${method.name}(` + + return header + fragment + `) async {\n` + } + + methodSignature(indent: string, method: IMethod) { + return this.methodHeaderDeclaration(indent, method, false) + } + + encodePathParams(indent: string, method: IMethod) { + const bump = indent + this.indentStr + let encodings = '' + if (method.pathParams.length > 0) { + for (const param of method.pathParams) { + encodings += `${bump}var path_${param.name} = encodeParam(${param.name});\n` + } + } + return encodings + } + + declareMethod(indent: string, method: IMethod) { + const bump = this.bumper(indent) + return ( + this.methodSignature(indent, method) + + this.encodePathParams(bump, method) + + this.responseHandler(method) + + this.httpCall(bump, method) + + `\n${indent}}` + ) + } + + responseHandler(method: IMethod) { + const type = this.typeMap(method.type) + let returnVerb = '' + let convert = '' + const returnType = + !method.returnType && !method.type.customType ? 'dynamic' : type.name + if (type.name !== 'void') { + returnVerb = 'return' + if (!method.type.customType) { + convert = 'json;' + } else if (method.type.className === 'ArrayType') { + const map = this.typeMap(method.type.elementType!) + convert = `json.map<${map.name}>((i) => ${map.name}.fromResponse(i, contentType)).toList();` + } else { + convert = `${type.name}.fromResponse(json, contentType);` + } + } + return ` + ${returnType} responseHandler(dynamic json, String contentType) { + ${returnVerb} ${convert} + } + ` + } + + httpCall(indent: string, method: IMethod) { + const request = this.useRequest(method) ? 'request.' : '' + const bump = indent + this.indentStr + const args = this.httpArgs(bump, method) + return `${bump}return ${this.it( + method.httpMethod.toLowerCase() + )}(responseHandler, ${this.httpPath(method.endpoint, request)}${ + args ? ', ' + args : '' + });` + } + + httpPath(path: string, prefix?: string) { + prefix = prefix || '' + if (path.indexOf('{') >= 0) + return ( + "'" + path.replace(/{/gi, '$path_' + prefix).replace(/}/gi, '') + "'" + ) + return `'${path}'` + } + + httpArgs(indent: string, method: IMethod) { + const request = this.useRequest(method) ? 'request.' : '' + let result = this.argFill('', this.bodyArg(method, request)) + result = this.argFill( + result, + this.argGroup(indent, method.queryArgs, request) + ) + return result + } + + argFill(current: string, args: string) { + if (!current && args.trim() === this.nullStr) { + return '' + } + return `${args}${current ? this.argDelimiter : ''}${current}` + } + + argGroup(indent: string, args: Arg[], prefix?: string) { + if (!args || args.length === 0) return this.nullStr + const hash: string[] = [] + for (const arg of args) { + const reserved = this.reserve(arg) + if (prefix) { + hash.push(`'${reserved}': ${this.accessor(arg, prefix)}`) + } else { + hash.push(`'${reserved}': ${reserved}`) + } + } + return `\n${indent}{${hash.join(this.argDelimiter)}}` + } + + bodyArg(method: IMethod, request: string) { + let result = this.nullStr + if (method.bodyArg) { + if (method.bodyParams.length > 0) { + const bodyParam = method.bodyParams[0] + if ( + bodyParam.type.className === 'ArrayType' || + bodyParam.type.className === 'IntrinsicType' || + bodyParam.type.className === 'HashType' + ) { + result = `${request}${method.bodyArg}` + } else { + result = `${request}${method.bodyArg} == null ? null : ${request}${method.bodyArg} .toJson()` + } + } else { + result = `${request}${method.bodyArg}` + } + } + return result + } + + accessor(name: string, prefix?: string) { + const reserved = this.reserve(name) + if (!prefix) return reserved + if (reserved === name) return `${prefix}.${name}` + return `${prefix}[${reserved}]` + } +} diff --git a/spec/Looker.3.1.json b/spec/Looker.3.1.json index f24e784df..ff129ddef 100644 --- a/spec/Looker.3.1.json +++ b/spec/Looker.3.1.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "version": "3.1.0", - "x-looker-release-version": "21.20.8", + "x-looker-release-version": "21.21.0", "title": "Looker API 3.1 Reference", "description": "### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### Try It Out!\n\nThis section describes the existing 'api-docs' page available on Looker instances. We recommend using the\n[API Explorer](https://looker.com/docs/r/api/explorer) instead.\n\nThe 'api-docs' page served by the Looker instance includes 'Try It Out!' buttons for each API method. After logging\nin with API3 credentials, you can use the \"Try It Out!\" buttons to call the API directly from the documentation\npage to interactively explore API features and responses.\n\n**NOTE**! With great power comes great responsibility: The \"Try It Out!\" button makes API calls to your live Looker\ninstance. Be especially careful with destructive API operations such as `delete_user` or similar.\nThere is no \"undo\" for API operations. (API Explorer's \"Run It\" feature requires a check mark before running\nAPI operations that can change data.)\n\n\n### In This Release\n\nThe following are a few examples of noteworthy items that have changed between API 3.0 and API 3.1.\nFor more comprehensive coverage of API changes, please see the release notes for your Looker release.\n\n### Examples of new things added in API 3.1 (compared to API 3.0):\n\n* [Dashboard construction](#!/3.1/Dashboard/) APIs\n* [Themes](#!/3.1/Theme/) and [custom color collections](#!/3.1/ColorCollection) APIs\n* Create and run [SQL Runner](#!/3.1/Query/run_sql_query) queries\n* Create and run [merged results](#!/3.1/Query/create_merge_query) queries\n* Create and modify [dashboard filters](#!/3.1/Dashboard/create_dashboard_filter)\n* Create and modify [password requirements](#!/3.1/Auth/password_config)\n\n### Deprecated in API 3.0\n\nThe following functions and properties have been deprecated in API 3.0. They continue to exist and work in API 3.0\nfor the next several Looker releases but they have not been carried forward to API 3.1:\n\n* Dashboard Prefetch functions\n* User access_filter functions\n* User API 1.0 credentials functions\n* Space.is_root and Space.is_user_root properties. Use Space.is_shared_root and Space.is_users_root instead.\n\n### Semantic changes in API 3.1:\n\n* [all_looks()](#!/3.1/Look/all_looks) no longer includes soft-deleted looks, matching [all_dashboards()](#!/3.1/Dashboard/all_dashboards) behavior.\nYou can find soft-deleted looks using [search_looks()](#!/3.1/Look/search_looks) with the `deleted` param set to True.\n* [all_spaces()](#!/3.1/Space/all_spaces) no longer includes duplicate items\n* [search_users()](#!/3.1/User/search_users) no longer accepts Y,y,1,0,N,n for Boolean params, only \"true\" and \"false\".\n* For greater client and network compatibility, [render_task_results](#!/3.1/RenderTask/render_task_results) now returns\nHTTP status **202 Accepted** instead of HTTP status **102 Processing**\n* [all_running_queries()](#!/3.1/Query/all_running_queries) and [kill_query](#!/3.1/Query/kill_query) functions have moved into the [Query](#!/3.1/Query/) function group.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -11,14 +11,20 @@ }, "license": { "name": "EULA", - "url": "https://localhost:10000/eula" + "url": "https://self-signed.looker.com:9999/eula" } }, "basePath": "/api/3.1", - "consumes": ["application/json"], - "produces": ["application/json"], - "host": "localhost:20000", - "schemes": ["https"], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "host": "self-signed.looker.com:19999", + "schemes": [ + "https" + ], "tags": [ { "name": "ApiAuth", @@ -132,7 +138,9 @@ "paths": { "/query_tasks": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_query_task", "summary": "Run Query Async", "description": "### Create an async query task\n\nCreates a query task (job) to run a previously created query asynchronously. Returns a Query Task ID.\n\nUse [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task.\nAfter the query task status reaches \"Complete\", use [query_task_results(query_task_id)](#!/Query/query_task_results) to fetch the results of the query.\n", @@ -285,7 +293,9 @@ }, "/query_tasks/multi_results": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task_multi_results", "summary": "Get Multiple Async Query Results", "description": "### Fetch results of multiple async queries\n\nReturns the results of multiple async queries in one request.\n\nFor Query Tasks that are not completed, the response will include the execution status of the Query Task but will not include query results.\nQuery Tasks whose results have expired will have a status of 'expired'.\nIf the user making the API request does not have sufficient privileges to view a Query Task result, the result will have a status of 'missing'\n", @@ -331,7 +341,9 @@ }, "/query_tasks/{query_task_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task", "summary": "Get Async Query Info", "description": "### Get Query Task details\n\nUse this function to check the status of an async query task. After the status\nreaches \"Complete\", you can call [query_task_results(query_task_id)](#!/Query/query_task_results) to\nretrieve the results of the query.\n\nUse [create_query_task()](#!/Query/create_query_task) to create an async query task.\n", @@ -377,11 +389,16 @@ }, "/query_tasks/{query_task_id}/results": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task_results", "summary": "Get Async Query Results", "description": "### Get Async Query Results\n\nReturns the results of an async query task if the query has completed.\n\nIf the query task is still running or waiting to run, this function returns 204 No Content.\n\nIf the query task ID is invalid or the cached results of the query task have expired, this function returns 404 Not Found.\n\nUse [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task\nCall query_task_results only after the query task status reaches \"Complete\".\n\nYou can also use [query_task_multi_results()](#!/Query/query_task_multi_results) retrieve the\nresults of multiple async query tasks at the same time.\n\n#### SQL Error Handling:\nIf the query fails due to a SQL db error, how this is communicated depends on the result_format you requested in `create_query_task()`.\n\nFor `json_detail` result_format: `query_task_results()` will respond with HTTP status '200 OK' and db SQL error info\nwill be in the `errors` property of the response object. The 'data' property will be empty.\n\nFor all other result formats: `query_task_results()` will respond with HTTP status `400 Bad Request` and some db SQL error info\nwill be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`.\nThese data formats can only carry row data, and error info is not row data.\n", - "produces": ["text", "application/json"], + "produces": [ + "text", + "application/json" + ], "parameters": [ { "name": "query_task_id", @@ -423,7 +440,9 @@ }, "/queries/{query_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query", "summary": "Get Query", "description": "### Get a previously created query by id.\n\nA Looker query object includes the various parameters that define a database query that has been run or\ncould be run in the future. These parameters include: model, view, fields, filters, pivots, etc.\nQuery *results* are not part of the query object.\n\nQuery objects are unique and immutable. Query objects are created automatically in Looker as users explore data.\nLooker does not delete them; they become part of the query history. When asked to create a query for\nany given set of parameters, Looker will first try to find an existing query object with matching\nparameters and will only create a new object when an appropriate object can not be found.\n\nThis 'get' method is used to get the details about a query for a given id. See the other methods here\nto 'create' and 'run' queries.\n\nNote that some fields like 'filter_config' and 'vis_config' etc are specific to how the Looker UI\nbuilds queries and visualizations and are not generally useful for API use. They are not required when\ncreating new queries and can usually just be ignored.\n\n", @@ -470,7 +489,9 @@ }, "/queries/slug/{slug}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_for_slug", "summary": "Get Query for Slug", "description": "### Get the query for a given query slug.\n\nThis returns the query for the 'slug' in a query share URL.\n\nThe 'slug' is a randomly chosen short string that is used as an alternative to the query's id value\nfor use in URLs etc. This method exists as a convenience to help you use the API to 'find' queries that\nhave been created using the Looker UI.\n\nYou can use the Looker explore page to build a query and then choose the 'Share' option to\nshow the share url for the query. Share urls generally look something like 'https://looker.yourcompany/x/vwGSbfc'.\nThe trailing 'vwGSbfc' is the share slug. You can pass that string to this api method to get details about the query.\nThose details include the 'id' that you can use to run the query. Or, you can copy the query body\n(perhaps with your own modification) and use that as the basis to make/run new queries.\n\nThis will also work with slugs from Looker explore urls like\n'https://looker.yourcompany/explore/ecommerce/orders?qid=aogBgL6o3cKK1jN3RoZl5s'. In this case\n'aogBgL6o3cKK1jN3RoZl5s' is the slug.\n", @@ -516,7 +537,9 @@ }, "/queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_query", "summary": "Create Query", "description": "### Create a query.\n\nThis allows you to create a new query that you can later run. Looker queries are immutable once created\nand are not deleted. If you create a query that is exactly like an existing query then the existing query\nwill be returned and no new query will be created. Whether a new query is created or not, you can use\nthe 'id' in the returned query with the 'run' method.\n\nThe query parameters are passed as json in the body of the request.\n\n", @@ -582,11 +605,18 @@ }, "/queries/{query_id}/run/{result_format}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_query", "summary": "Run Query", "description": "### Run a saved query.\n\nThis runs a previously saved query. You can use this on a query that was generated in the Looker UI\nor one that you have explicitly created using the API. You can also use a query 'id' from a saved 'Look'.\n\nThe 'result_format' parameter specifies the desired structure and format of the response.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", - "produces": ["text", "application/json", "image/png", "image/jpeg"], + "produces": [ + "text", + "application/json", + "image/png", + "image/jpeg" + ], "parameters": [ { "name": "query_id", @@ -729,11 +759,18 @@ }, "/queries/run/{result_format}": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_inline_query", "summary": "Run Inline Query", "description": "### Run the query that is specified inline in the posted body.\n\nThis allows running a query as defined in json in the posted body. This combines\nthe two actions of posting & running a query into one step.\n\nHere is an example body in json:\n```\n{\n \"model\":\"thelook\",\n \"view\":\"inventory_items\",\n \"fields\":[\"category.name\",\"inventory_items.days_in_inventory_tier\",\"products.count\"],\n \"filters\":{\"category.name\":\"socks\"},\n \"sorts\":[\"products.count desc 0\"],\n \"limit\":\"500\",\n \"query_timezone\":\"America/Los_Angeles\"\n}\n```\n\nWhen using the Ruby SDK this would be passed as a Ruby hash like:\n```\n{\n :model=>\"thelook\",\n :view=>\"inventory_items\",\n :fields=>\n [\"category.name\",\n \"inventory_items.days_in_inventory_tier\",\n \"products.count\"],\n :filters=>{:\"category.name\"=>\"socks\"},\n :sorts=>[\"products.count desc 0\"],\n :limit=>\"500\",\n :query_timezone=>\"America/Los_Angeles\",\n}\n```\n\nThis will return the result of running the query in the format specified by the 'result_format' parameter.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", - "produces": ["text", "application/json", "image/png", "image/jpeg"], + "produces": [ + "text", + "application/json", + "image/png", + "image/jpeg" + ], "parameters": [ { "name": "result_format", @@ -877,11 +914,18 @@ }, "/queries/models/{model_name}/views/{view_name}/run/{result_format}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_url_encoded_query", "summary": "Run Url Encoded Query", "description": "### Run an URL encoded query.\n\nThis requires the caller to encode the specifiers for the query into the URL query part using\nLooker-specific syntax as explained below.\n\nGenerally, you would want to use one of the methods that takes the parameters as json in the POST body\nfor creating and/or running queries. This method exists for cases where one really needs to encode the\nparameters into the URL of a single 'GET' request. This matches the way that the Looker UI formats\n'explore' URLs etc.\n\nThe parameters here are very similar to the json body formatting except that the filter syntax is\ntricky. Unfortunately, this format makes this method not currently callable via the 'Try it out!' button\nin this documentation page. But, this is callable when creating URLs manually or when using the Looker SDK.\n\nHere is an example inline query URL:\n\n```\nhttps://looker.mycompany.com:19999/api/3.0/queries/models/thelook/views/inventory_items/run/json?fields=category.name,inventory_items.days_in_inventory_tier,products.count&f[category.name]=socks&sorts=products.count+desc+0&limit=500&query_timezone=America/Los_Angeles\n```\n\nWhen invoking this endpoint with the Ruby SDK, pass the query parameter parts as a hash. The hash to match the above would look like:\n\n```ruby\nquery_params =\n{\n :fields => \"category.name,inventory_items.days_in_inventory_tier,products.count\",\n :\"f[category.name]\" => \"socks\",\n :sorts => \"products.count desc 0\",\n :limit => \"500\",\n :query_timezone => \"America/Los_Angeles\"\n}\nresponse = ruby_sdk.run_url_encoded_query('thelook','inventory_items','json', query_params)\n\n```\n\nAgain, it is generally easier to use the variant of this method that passes the full query in the POST body.\nThis method is available for cases where other alternatives won't fit the need.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", - "produces": ["text", "application/json", "image/png", "image/jpeg"], + "produces": [ + "text", + "application/json", + "image/png", + "image/jpeg" + ], "parameters": [ { "name": "model_name", @@ -943,11 +987,15 @@ }, "/login": { "post": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "login", "summary": "Login", "description": "### Present client credentials to obtain an authorization token\n\nLooker API implements the OAuth2 [Resource Owner Password Credentials Grant](https://looker.com/docs/r/api/outh2_resource_owner_pc) pattern.\nThe client credentials required for this login must be obtained by creating an API3 key on a user account\nin the Looker Admin console. The API3 key consists of a public `client_id` and a private `client_secret`.\n\nThe access token returned by `login` must be used in the HTTP Authorization header of subsequent\nAPI requests, like this:\n```\nAuthorization: token 4QDkCyCtZzYgj4C2p2cj3csJH7zqS5RzKs2kTnG4\n```\nReplace \"4QDkCy...\" with the `access_token` value returned by `login`.\nThe word `token` is a string literal and must be included exactly as shown.\n\nThis function can accept `client_id` and `client_secret` parameters as URL query params or as www-form-urlencoded params in the body of the HTTP request. Since there is a small risk that URL parameters may be visible to intermediate nodes on the network route (proxies, routers, etc), passing credentials in the body of the request is considered more secure than URL params.\n\nExample of passing credentials in the HTTP request body:\n````\nPOST HTTP /login\nContent-Type: application/x-www-form-urlencoded\n\nclient_id=CGc9B7v7J48dQSJvxxx&client_secret=nNVS9cSS3xNpSC9JdsBvvvvv\n````\n\n### Best Practice:\nAlways pass credentials in body params. Pass credentials in URL query params **only** when you cannot pass body params due to application, tool, or other limitations.\n\nFor more information and detailed examples of Looker API authorization, see [How to Authenticate to Looker API3](https://github.com/looker/looker-sdk-ruby/blob/master/authentication.md).\n", - "consumes": ["application/x-www-form-urlencoded"], + "consumes": [ + "application/x-www-form-urlencoded" + ], "parameters": [ { "name": "client_id", @@ -990,7 +1038,9 @@ }, "/login/{user_id}": { "post": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "login_user", "summary": "Login user", "description": "### Create an access token that runs as a given user.\n\nThis can only be called by an authenticated admin user. It allows that admin to generate a new\nauthentication token for the user with the given user id. That token can then be used for subsequent\nAPI calls - which are then performed *as* that target user.\n\nThe target user does *not* need to have a pre-existing API client_id/client_secret pair. And, no such\ncredentials are created by this call.\n\nThis allows for building systems where api user authentication for an arbitrary number of users is done\noutside of Looker and funneled through a single 'service account' with admin permissions. Note that a\nnew access token is generated on each call. If target users are going to be making numerous API\ncalls in a short period then it is wise to cache this authentication token rather than call this before\neach of those API calls.\n\nSee 'login' for more detail on the access token and how to use it.\n", @@ -1037,7 +1087,9 @@ }, "/logout": { "delete": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "logout", "summary": "Logout", "description": "### Logout of the API and invalidate the current access token.\n", @@ -1067,7 +1119,9 @@ }, "/backup_configuration": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "backup_configuration", "summary": "Get Backup Configuration", "description": "### WARNING: The Looker internal database backup function has been deprecated.\n", @@ -1096,7 +1150,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_backup_configuration", "summary": "Update Backup Configuration", "description": "### WARNING: The Looker internal database backup function has been deprecated.\n", @@ -1144,7 +1200,9 @@ }, "/cloud_storage": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "cloud_storage_configuration", "summary": "Get Cloud Storage", "description": "Get the current Cloud Storage Configuration.\n", @@ -1172,7 +1230,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_cloud_storage_configuration", "summary": "Update Cloud Storage", "description": "Update the current Cloud Storage Configuration.\n", @@ -1219,7 +1279,9 @@ }, "/color_collections": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "all_color_collections", "summary": "Get all Color Collections", "description": "### Get an array of all existing Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1259,7 +1321,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "create_color_collection", "summary": "Create ColorCollection", "description": "### Create a custom color collection with the specified information\n\nCreates a new custom color collection object, returning the details, including the created id.\n\n**Update** an existing color collection with [Update Color Collection](#!/ColorCollection/update_color_collection)\n\n**Permanently delete** an existing custom color collection with [Delete Color Collection](#!/ColorCollection/delete_color_collection)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1324,7 +1388,9 @@ }, "/color_collections/custom": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collections_custom", "summary": "Get all Custom Color Collections", "description": "### Get an array of all existing **Custom** Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1366,7 +1432,9 @@ }, "/color_collections/standard": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collections_standard", "summary": "Get all Standard Color Collections", "description": "### Get an array of all existing **Standard** Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1408,7 +1476,9 @@ }, "/color_collections/default": { "put": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "set_default_color_collection", "summary": "Set Default Color Collection", "description": "### Set the global default Color Collection by ID\n\nReturns the new specified default Color Collection object.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1457,7 +1527,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "default_color_collection", "summary": "Get Default Color Collection", "description": "### Get the default color collection\n\nUse this to retrieve the default Color Collection.\n\nSet the default color collection with [ColorCollection](#!/ColorCollection/set_default_color_collection)\n", @@ -1487,7 +1559,9 @@ }, "/color_collections/{collection_id}": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collection", "summary": "Get Color Collection by ID", "description": "### Get a Color Collection by ID\n\nUse this to retrieve a specific Color Collection.\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1531,7 +1605,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "update_color_collection", "summary": "Update Custom Color collection", "description": "### Update a custom color collection by id.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1595,7 +1671,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "delete_color_collection", "summary": "Delete ColorCollection", "description": "### Delete a custom color collection by id\n\nThis operation permanently deletes the identified **Custom** color collection.\n\n**Standard** color collections cannot be deleted\n\nBecause multiple color collections can have the same label, they must be deleted by ID, not name.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1649,7 +1727,9 @@ }, "/content_favorite/search": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "search_content_favorites", "summary": "Search Favorite Contents", "description": "### Search Favorite Content\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -1761,7 +1841,9 @@ }, "/content_favorite/{content_favorite_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_favorite", "summary": "Get Favorite Content", "description": "### Get favorite content by its id", @@ -1806,7 +1888,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "delete_content_favorite", "summary": "Delete Favorite Content", "description": "### Delete favorite content", @@ -1852,7 +1936,9 @@ }, "/content_favorite": { "post": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "create_content_favorite", "summary": "Create Favorite Content", "description": "### Create favorite content", @@ -1911,7 +1997,9 @@ }, "/content_metadata": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "all_content_metadatas", "summary": "Get All Content Metadatas", "description": "### Get information about all content metadata in a space.\n", @@ -1961,7 +2049,9 @@ }, "/content_metadata/{content_metadata_id}": { "patch": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "update_content_metadata", "summary": "Update Content Metadata", "description": "### Move a piece of content.\n", @@ -2020,7 +2110,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_metadata", "summary": "Get Content Metadata", "description": "### Get information about an individual content metadata record.\n", @@ -2067,7 +2159,9 @@ }, "/content_metadata_access": { "post": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "create_content_metadata_access", "summary": "Create Content Metadata Access", "description": "### Create content metadata access.\n", @@ -2132,7 +2226,9 @@ "x-looker-rate-limited": true }, "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "all_content_metadata_accesses", "summary": "Get All Content Metadata Accesses", "description": "### All content metadata access records for a content metadata item.\n", @@ -2182,7 +2278,9 @@ }, "/content_metadata_access/{content_metadata_access_id}": { "put": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "update_content_metadata_access", "summary": "Update Content Metadata Access", "description": "### Update type of access for content metadata.\n", @@ -2241,7 +2339,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "delete_content_metadata_access", "summary": "Delete Content Metadata Access", "description": "### Remove content metadata access.\n", @@ -2287,11 +2387,16 @@ }, "/content_thumbnail/{type}/{resource_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_thumbnail", "summary": "Get Content Thumbnail", "description": "### Get an image representing the contents of a dashboard or look.\n\nThe returned thumbnail is an abstract representation of the contents of a dashbord or look and does not\nreflect the actual data displayed in the respective visualizations.\n", - "produces": ["image/svg+xml", "image/png"], + "produces": [ + "image/svg+xml", + "image/png" + ], "parameters": [ { "name": "type", @@ -2364,7 +2469,9 @@ }, "/content_validation": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_validation", "summary": "Validate Content", "description": "### Validate All Content\n\nPerforms validation of all looks and dashboards\nReturns a list of errors found as well as metadata about the content validation run.\n", @@ -2415,7 +2522,9 @@ }, "/content_view/search": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "search_content_views", "summary": "Search Content Views", "description": "### Search Content Views\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -2547,7 +2656,9 @@ }, "/custom_welcome_email": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "custom_welcome_email", "summary": "Get Custom Welcome Email", "description": "### Get the current status and content of custom welcome emails\n", @@ -2575,7 +2686,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_custom_welcome_email", "summary": "Update Custom Welcome Email Content", "description": "Update custom welcome email setting and values. Optionally send a test email with the new content to the currently logged in user.\n", @@ -2635,7 +2748,9 @@ }, "/custom_welcome_email_test": { "put": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_custom_welcome_email_test", "summary": "Send a test welcome email to the currently logged in user with the supplied content ", "description": "Requests to this endpoint will send a welcome email with the custom content provided in the body to the currently logged in user.\n", @@ -2688,7 +2803,9 @@ }, "/dashboards": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "all_dashboards", "summary": "Get All Dashboards", "description": "### Get information about all active dashboards.\n\nReturns an array of **abbreviated dashboard objects**. Dashboards marked as deleted are excluded from this list.\n\nGet the **full details** of a specific dashboard by id with [dashboard()](#!/Dashboard/dashboard)\n\nFind **deleted dashboards** with [search_dashboards()](#!/Dashboard/search_dashboards)\n", @@ -2728,7 +2845,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard", "summary": "Create Dashboard", "description": "### Create a new dashboard\n\nCreates a new dashboard object and returns the details of the newly created dashboard.\n\n`Title`, `user_id`, and `space_id` are all required fields.\n`Space_id` and `user_id` must contain the id of an existing space or user, respectively.\nA dashboard's `title` must be unique within the space in which it resides.\n\nIf you receive a 422 error response when creating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n\nYou can **update** an existing dashboard with [update_dashboard()](#!/Dashboard/update_dashboard)\n\nYou can **permanently delete** an existing dashboard with [delete_dashboard()](#!/Dashboard/delete_dashboard)\n", @@ -2787,7 +2906,9 @@ }, "/dashboards/search": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "search_dashboards", "summary": "Search Dashboards", "description": "### Search Dashboards\n\nReturns an **array of dashboard objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nThe parameters `limit`, and `offset` are recommended for fetching results in page-size chunks.\n\nGet a **single dashboard** by id with [dashboard()](#!/Dashboard/dashboard)\n", @@ -2962,7 +3083,9 @@ }, "/dashboards/{lookml_dashboard_id}/import/{space_id}": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "import_lookml_dashboard", "summary": "Import LookML Dashboard", "description": "### Import a LookML dashboard to a space as a UDD\nCreates a UDD (a dashboard which exists in the Looker database rather than as a LookML file) from the LookML dashboard\nand places it in the space specified. The created UDD will have a lookml_link_id which links to the original LookML dashboard.\n\nTo give the imported dashboard specify a (e.g. title: \"my title\") in the body of your request, otherwise the imported\ndashboard will have the same title as the original LookML dashboard.\n\nFor this operation to succeed the user must have permission to see the LookML dashboard in question, and have permission to\ncreate content in the space the dashboard is being imported to.\n\n**Sync** a linked UDD with [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard)\n**Unlink** a linked UDD by setting lookml_link_id to null with [update_dashboard()](#!/Dashboard/update_dashboard)\n", @@ -3048,7 +3171,9 @@ }, "/dashboards/{lookml_dashboard_id}/sync": { "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "sync_lookml_dashboard", "summary": "Sync LookML Dashboard", "description": "### Update all linked dashboards to match the specified LookML dashboard.\n\nAny UDD (a dashboard which exists in the Looker database rather than as a LookML file) which has a `lookml_link_id`\nproperty value referring to a LookML dashboard's id (model::dashboardname) will be updated so that it matches the current state of the LookML dashboard.\n\nFor this operation to succeed the user must have permission to view the LookML dashboard, and only linked dashboards\nthat the user has permission to update will be synced.\n\nTo **link** or **unlink** a UDD set the `lookml_link_id` property with [update_dashboard()](#!/Dashboard/update_dashboard)\n", @@ -3119,7 +3244,9 @@ }, "/dashboards/{dashboard_id}": { "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard", "summary": "Delete Dashboard", "description": "### Delete the dashboard with the specified id\n\nPermanently **deletes** a dashboard. (The dashboard cannot be recovered after this operation.)\n\n\"Soft\" delete or hide a dashboard by setting its `deleted` status to `True` with [update_dashboard()](#!/Dashboard/update_dashboard).\n\nNote: When a dashboard is deleted in the UI, it is soft deleted. Use this API call to permanently remove it, if desired.\n", @@ -3168,7 +3295,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard", "summary": "Update Dashboard", "description": "### Update a dashboard\n\nYou can use this function to change the string and integer properties of\na dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components\ncannot be modified by this function - use the update functions for the respective\nnested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter)\nto modify nested objects referenced by a dashboard.\n\nIf you receive a 422 error response when updating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n", @@ -3232,7 +3361,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard", "summary": "Get Dashboard", "description": "### Get information about a dashboard\n\nReturns the full details of the identified dashboard object\n\nGet a **summary list** of all active dashboards with [all_dashboards()](#!/Dashboard/all_dashboards)\n\nYou can **Search** for dashboards with [search_dashboards()](#!/Dashboard/search_dashboards)\n", @@ -3278,7 +3409,9 @@ }, "/dashboards/aggregate_table_lookml/{dashboard_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_aggregate_table_lookml", "summary": "Get Aggregate Table LookML for a dashboard", "description": "### Get Aggregate Table LookML for Each Query on a Dahboard\n\nReturns a JSON object that contains the dashboard id and Aggregate Table lookml\n\n", @@ -3317,7 +3450,9 @@ }, "/dashboards/lookml/{dashboard_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_lookml", "summary": "Get lookml of a UDD", "description": "### Get lookml of a UDD\n\nReturns a JSON object that contains the dashboard id and the full lookml\n\n", @@ -3356,7 +3491,9 @@ }, "/dashboard_elements/search": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "search_dashboard_elements", "summary": "Search Dashboard Elements", "description": "### Search Dashboard Elements\n\nReturns an **array of DashboardElement objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -3442,7 +3579,9 @@ }, "/dashboard_elements/{dashboard_element_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_element", "summary": "Get DashboardElement", "description": "### Get information about the dashboard element with a specific id.", @@ -3486,7 +3625,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_element", "summary": "Delete DashboardElement", "description": "### Delete a dashboard element with a specific id.", @@ -3529,7 +3670,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_element", "summary": "Update DashboardElement", "description": "### Update the dashboard element with a specific id.", @@ -3596,7 +3739,9 @@ }, "/dashboards/{dashboard_id}/dashboard_elements": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_elements", "summary": "Get All DashboardElements", "description": "### Get information about all the dashboard elements on a dashboard with a specific id.", @@ -3645,7 +3790,9 @@ }, "/dashboard_elements": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_element", "summary": "Create DashboardElement", "description": "### Create a dashboard element on the dashboard with a specific id.", @@ -3711,7 +3858,9 @@ }, "/dashboard_filters/{dashboard_filter_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_filter", "summary": "Get Dashboard Filter", "description": "### Get information about the dashboard filters with a specific id.", @@ -3755,7 +3904,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_filter", "summary": "Delete Dashboard Filter", "description": "### Delete a dashboard filter with a specific id.", @@ -3798,7 +3949,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_filter", "summary": "Update Dashboard Filter", "description": "### Update the dashboard filter with a specific id.", @@ -3865,7 +4018,9 @@ }, "/dashboards/{dashboard_id}/dashboard_filters": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_filters", "summary": "Get All Dashboard Filters", "description": "### Get information about all the dashboard filters on a dashboard with a specific id.", @@ -3914,7 +4069,9 @@ }, "/dashboard_filters": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_filter", "summary": "Create Dashboard Filter", "description": "### Create a dashboard filter on the dashboard with a specific id.", @@ -3980,7 +4137,9 @@ }, "/dashboard_layout_components/{dashboard_layout_component_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout_component", "summary": "Get DashboardLayoutComponent", "description": "### Get information about the dashboard elements with a specific id.", @@ -4024,7 +4183,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_layout_component", "summary": "Update DashboardLayoutComponent", "description": "### Update the dashboard element with a specific id.", @@ -4091,7 +4252,9 @@ }, "/dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout_dashboard_layout_components", "summary": "Get All DashboardLayoutComponents", "description": "### Get information about all the dashboard layout components for a dashboard layout with a specific id.", @@ -4140,7 +4303,9 @@ }, "/dashboard_layouts/{dashboard_layout_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout", "summary": "Get DashboardLayout", "description": "### Get information about the dashboard layouts with a specific id.", @@ -4184,7 +4349,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_layout", "summary": "Delete DashboardLayout", "description": "### Delete a dashboard layout with a specific id.", @@ -4233,7 +4400,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_layout", "summary": "Update DashboardLayout", "description": "### Update the dashboard layout with a specific id.", @@ -4300,7 +4469,9 @@ }, "/dashboards/{dashboard_id}/dashboard_layouts": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_layouts", "summary": "Get All DashboardLayouts", "description": "### Get information about all the dashboard elements on a dashboard with a specific id.", @@ -4349,7 +4520,9 @@ }, "/dashboard_layouts": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_layout", "summary": "Create DashboardLayout", "description": "### Create a dashboard layout on the dashboard with a specific id.", @@ -4415,7 +4588,9 @@ }, "/data_actions": { "post": { - "tags": ["DataAction"], + "tags": [ + "DataAction" + ], "operationId": "perform_data_action", "summary": "Send a Data Action", "description": "Perform a data action. The data action object can be obtained from query results, and used to perform an arbitrary action.", @@ -4456,7 +4631,9 @@ }, "/data_actions/form": { "post": { - "tags": ["DataAction"], + "tags": [ + "DataAction" + ], "operationId": "fetch_remote_data_action_form", "summary": "Fetch Remote Data Action Form", "description": "For some data actions, the remote server may supply a form requesting further user input. This endpoint takes a data action, asks the remote server to generate a form for it, and returns that form to you for presentation to the user.", @@ -4506,7 +4683,9 @@ }, "/datagroups": { "get": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "all_datagroups", "summary": "Get All Datagroups", "description": "### Get information about all datagroups.\n", @@ -4539,7 +4718,9 @@ }, "/datagroups/{datagroup_id}": { "get": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "datagroup", "summary": "Get Datagroup", "description": "### Get information about a datagroup.\n", @@ -4576,7 +4757,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "update_datagroup", "summary": "Update Datagroup", "description": "### Update a datagroup using the specified params.\n", @@ -4642,7 +4825,9 @@ }, "/connections": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_connections", "summary": "Get All Connections", "description": "### Get information about all connections.\n", @@ -4682,7 +4867,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_connection", "summary": "Create Connection", "description": "### Create a connection using the specified configuration.\n", @@ -4741,7 +4928,9 @@ }, "/connections/{connection_name}": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "connection", "summary": "Get Connection", "description": "### Get information about a connection.\n", @@ -4785,7 +4974,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "update_connection", "summary": "Update Connection", "description": "### Update a connection using the specified configuration.\n", @@ -4843,7 +5034,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_connection", "summary": "Delete Connection", "description": "### Delete a connection.\n", @@ -4888,7 +5081,9 @@ }, "/connections/{connection_name}/connection_override/{override_context}": { "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_connection_override", "summary": "Delete Connection Override", "description": "### Delete a connection override.\n", @@ -4946,7 +5141,9 @@ }, "/connections/{connection_name}/test": { "put": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_connection", "summary": "Test Connection", "description": "### Test an existing connection.\n\nNote that a connection's 'dialect' property has a 'connection_tests' property that lists the\nspecific types of tests that the connection supports.\n\nThis API is rate limited.\n\nUnsupported tests in the request will be ignored.\n", @@ -5012,7 +5209,9 @@ }, "/connections/test": { "put": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_connection_config", "summary": "Test Connection Configuration", "description": "### Test a connection configuration.\n\nNote that a connection's 'dialect' property has a 'connection_tests' property that lists the\nspecific types of tests that the connection supports.\n\nThis API is rate limited.\n\nUnsupported tests in the request will be ignored.\n", @@ -5074,7 +5273,9 @@ }, "/derived_table/graph/model/{model}": { "get": { - "tags": ["DerivedTable"], + "tags": [ + "DerivedTable" + ], "operationId": "graph_derived_tables_for_model", "summary": "Get Derived Table graph for model", "description": "### Discover information about derived tables\n", @@ -5127,7 +5328,9 @@ }, "/derived_table/graph/view/{view}": { "get": { - "tags": ["DerivedTable"], + "tags": [ + "DerivedTable" + ], "operationId": "graph_derived_tables_for_view", "summary": "Get subgraph of derived table and dependencies", "description": "### Get the subgraph representing this derived table and its dependencies.\n", @@ -5180,7 +5383,9 @@ }, "/dialect_info": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_dialect_infos", "summary": "Get All Dialect Infos", "description": "### Get information about all dialects.\n", @@ -5222,7 +5427,9 @@ }, "/digest_emails_enabled": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "digest_emails_enabled", "summary": "Get Digest_emails", "description": "### Retrieve the value for whether or not digest emails is enabled\n", @@ -5250,7 +5457,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_digest_emails_enabled", "summary": "Update Digest_emails", "description": "### Update the setting for enabling/disabling digest emails\n", @@ -5303,7 +5512,9 @@ }, "/digest_email_send": { "post": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "create_digest_email_send", "summary": "Deliver digest email contents", "description": "### Trigger the generation of digest email records and send them to Looker's internal system. This does not send\nany actual emails, it generates records containing content which may be of interest for users who have become inactive.\nEmails will be sent at a later time from Looker's internal system if the Digest Emails feature is enabled in settings.", @@ -5340,7 +5551,9 @@ }, "/embed/sso_url": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_sso_embed_url", "summary": "Create SSO Embed Url", "description": "### Create SSO Embed URL\n\nCreates an SSO embed URL and cryptographically signs it with an embed secret.\nThis signed URL can then be used to instantiate a Looker embed session in a PBL web application.\nDo not make any modifications to this URL - any change may invalidate the signature and\ncause the URL to fail to load a Looker embed session.\n\nA signed SSO embed URL can only be used once. After it has been used to request a page from the\nLooker server, the URL is invalid. Future requests using the same URL will fail. This is to prevent\n'replay attacks'.\n\nThe `target_url` property must be a complete URL of a Looker UI page - scheme, hostname, path and query params.\nTo load a dashboard with id 56 and with a filter of `Date=1 years`, the looker URL would look like `https:/myname.looker.com/dashboards/56?Date=1%20years`.\nThe best way to obtain this target_url is to navigate to the desired Looker page in your web browser,\ncopy the URL shown in the browser address bar and paste it into the `target_url` property as a quoted string value in this API request.\n\nPermissions for the embed user are defined by the groups in which the embed user is a member (group_ids property)\nand the lists of models and permissions assigned to the embed user.\nAt a minimum, you must provide values for either the group_ids property, or both the models and permissions properties.\nThese properties are additive; an embed user can be a member of certain groups AND be granted access to models and permissions.\n\nThe embed user's access is the union of permissions granted by the group_ids, models, and permissions properties.\n\nThis function does not strictly require all group_ids, user attribute names, or model names to exist at the moment the\nSSO embed url is created. Unknown group_id, user attribute names or model names will be passed through to the output URL.\nTo diagnose potential problems with an SSO embed URL, you can copy the signed URL into the Embed URI Validator text box in `/admin/embed`.\n\nThe `secret_id` parameter is optional. If specified, its value must be the id of an active secret defined in the Looker instance.\nif not specified, the URL will be signed using the newest active secret defined in the Looker instance.\n\n#### Security Note\nProtect this signed URL as you would an access token or password credentials - do not write\nit to disk, do not pass it to a third party, and only pass it through a secure HTTPS\nencrypted transport.\n", @@ -5399,7 +5612,9 @@ }, "/projects/{project_id}/git_branches": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_git_branches", "summary": "Get All Git Branches", "description": "### Get All Git Branches\n\nReturns a list of git branches in the project repository\n", @@ -5441,7 +5656,9 @@ }, "/projects/{project_id}/git_branch": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "git_branch", "summary": "Get Active Git Branch", "description": "### Get the Current Git Branch\n\nReturns the git branch currently checked out in the given project repository\n", @@ -5478,7 +5695,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_git_branch", "summary": "Checkout New Git Branch", "description": "### Create and Checkout a Git Branch\n\nCreates and checks out a new branch in the given project repository\nOnly allowed in development mode\n - Call `update_session` to select the 'dev' workspace.\n\nOptionally specify a branch name, tag name or commit SHA as the start point in the ref field.\n If no ref is specified, HEAD of the current branch will be used as the start point for the new branch.\n\n", @@ -5542,7 +5761,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_git_branch", "summary": "Update Project Git Branch", "description": "### Checkout and/or reset --hard an existing Git Branch\n\nOnly allowed in development mode\n - Call `update_session` to select the 'dev' workspace.\n\nCheckout an existing branch if name field is different from the name of the currently checked out branch.\n\nOptionally specify a branch name, tag name or commit SHA to which the branch should be reset.\n **DANGER** hard reset will be force pushed to the remote. Unsaved changes and commits may be permanently lost.\n\n", @@ -5602,7 +5823,9 @@ }, "/projects/{project_id}/git_branch/{branch_name}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "find_git_branch", "summary": "Find a Git Branch", "description": "### Get the specified Git Branch\n\nReturns the git branch specified in branch_name path param if it exists in the given project repository\n", @@ -5646,7 +5869,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "delete_git_branch", "summary": "Delete a Git Branch", "description": "### Delete the specified Git Branch\n\nDelete git branch specified in branch_name path param from local and remote of specified project repository\n", @@ -5698,7 +5923,9 @@ }, "/groups": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_groups", "summary": "Get All Groups", "description": "### Get information about all groups.\n", @@ -5788,7 +6015,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "create_group", "summary": "Create Group", "description": "### Creates a new group (admin only).\n", @@ -5854,7 +6083,9 @@ }, "/groups/search": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "search_groups", "summary": "Search Groups", "description": "### Search groups\n\nReturns all group records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -5962,7 +6193,9 @@ }, "/groups/{group_id}": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "group", "summary": "Get Group", "description": "### Get information about a group.\n", @@ -6007,7 +6240,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "update_group", "summary": "Update Group", "description": "### Updates the a group (admin only).", @@ -6073,7 +6308,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group", "summary": "Delete Group", "description": "### Deletes a group (admin only).\n", @@ -6125,7 +6362,9 @@ }, "/groups/{group_id}/groups": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_group_groups", "summary": "Get All Groups in Group", "description": "### Get information about all the groups in a group\n", @@ -6173,7 +6412,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "add_group_group", "summary": "Add a Group to Group", "description": "### Adds a new group to a group.\n", @@ -6228,7 +6469,9 @@ }, "/groups/{group_id}/users": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_group_users", "summary": "Get All Users in Group", "description": "### Get information about all the users directly included in a group.\n", @@ -6299,7 +6542,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "add_group_user", "summary": "Add a User to Group", "description": "### Adds a new user to a group.\n", @@ -6354,7 +6599,9 @@ }, "/groups/{group_id}/users/{user_id}": { "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group_user", "summary": "Remove a User from Group", "description": "### Removes a user from a group.\n", @@ -6405,7 +6652,9 @@ }, "/groups/{group_id}/groups/{deleting_group_id}": { "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group_from_group", "summary": "Deletes a Group from Group", "description": "### Removes a group from a group.\n", @@ -6456,7 +6705,9 @@ }, "/groups/{group_id}/attribute_values/{user_attribute_id}": { "patch": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "update_user_attribute_group_value", "summary": "Set User Attribute Group Value", "description": "### Set the value of a user attribute for a group.\n\nFor information about how user attribute values are calculated, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values).\n", @@ -6517,7 +6768,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_user_attribute_group_value", "summary": "Delete User Attribute Group Value", "description": "### Remove a user attribute value from a group.\n", @@ -6562,7 +6815,9 @@ }, "/homepages": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "all_homepages", "summary": "Get All Homepages", "description": "### Get information about all homepages.\n", @@ -6603,7 +6858,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "create_homepage", "summary": "Create Homepage", "description": "### Create a new homepage.\n", @@ -6670,7 +6927,9 @@ }, "/homepages/search": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "search_homepages", "summary": "Search Homepages", "description": "### Search Homepages\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -6801,7 +7060,9 @@ }, "/homepages/{homepage_id}": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "homepage", "summary": "Get Homepage", "description": "### Get information about a homepage.\n", @@ -6847,7 +7108,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "update_homepage", "summary": "Update Homepage", "description": "### Update a homepage definition.\n", @@ -6914,7 +7177,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "delete_homepage", "summary": "Delete Homepage", "description": "### Delete a homepage.\n", @@ -6961,7 +7226,9 @@ }, "/homepage_items": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "all_homepage_items", "summary": "Get All Homepage Items", "description": "### Get information about all homepage items.\n", @@ -7016,7 +7283,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "create_homepage_item", "summary": "Create Homepage Item", "description": "### Create a new homepage item.\n", @@ -7083,7 +7352,9 @@ }, "/homepage_items/{homepage_item_id}": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "homepage_item", "summary": "Get Homepage Item", "description": "### Get information about a homepage item.\n", @@ -7129,7 +7400,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "update_homepage_item", "summary": "Update Homepage Item", "description": "### Update a homepage item definition.\n", @@ -7196,7 +7469,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "delete_homepage_item", "summary": "Delete Homepage Item", "description": "### Delete a homepage item.\n", @@ -7243,7 +7518,9 @@ }, "/homepage_sections": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "all_homepage_sections", "summary": "Get All Homepage sections", "description": "### Get information about all homepage sections.\n", @@ -7291,7 +7568,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "create_homepage_section", "summary": "Create Homepage section", "description": "### Create a new homepage section.\n", @@ -7358,7 +7637,9 @@ }, "/homepage_sections/{homepage_section_id}": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "homepage_section", "summary": "Get Homepage section", "description": "### Get information about a homepage section.\n", @@ -7404,7 +7685,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "update_homepage_section", "summary": "Update Homepage section", "description": "### Update a homepage section definition.\n", @@ -7471,7 +7754,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "delete_homepage_section", "summary": "Delete Homepage section", "description": "### Delete a homepage section.\n", @@ -7518,7 +7803,9 @@ }, "/primary_homepage_sections": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "all_primary_homepage_sections", "summary": "Get All Primary homepage sections", "description": "### Get information about the primary homepage's sections.\n", @@ -7560,7 +7847,9 @@ }, "/integration_hubs": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "all_integration_hubs", "summary": "Get All Integration Hubs", "description": "### Get information about all Integration Hubs.\n", @@ -7600,7 +7889,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "create_integration_hub", "summary": "Create Integration Hub", "description": "### Create a new Integration Hub.\n\nThis API is rate limited to prevent it from being used for SSRF attacks\n", @@ -7667,7 +7958,9 @@ }, "/integration_hubs/{integration_hub_id}": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "integration_hub", "summary": "Get Integration Hub", "description": "### Get information about a Integration Hub.\n", @@ -7712,7 +8005,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "update_integration_hub", "summary": "Update Integration Hub", "description": "### Update a Integration Hub definition.\n\nThis API is rate limited to prevent it from being used for SSRF attacks\n", @@ -7779,7 +8074,9 @@ "x-looker-rate-limited": true }, "delete": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "delete_integration_hub", "summary": "Delete Integration Hub", "description": "### Delete a Integration Hub.\n", @@ -7825,7 +8122,9 @@ }, "/integration_hubs/{integration_hub_id}/accept_legal_agreement": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "accept_integration_hub_legal_agreement", "summary": "Accept Integration Hub Legal Agreement", "description": "Accepts the legal agreement for a given integration hub. This only works for integration hubs that have legal_agreement_required set to true and legal_agreement_signed set to false.", @@ -7871,7 +8170,9 @@ }, "/integrations": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "all_integrations", "summary": "Get All Integrations", "description": "### Get information about all Integrations.\n", @@ -7920,7 +8221,9 @@ }, "/integrations/{integration_id}": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "integration", "summary": "Get Integration", "description": "### Get information about a Integration.\n", @@ -7964,7 +8267,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "update_integration", "summary": "Update Integration", "description": "### Update parameters on a Integration.\n", @@ -8031,7 +8336,9 @@ }, "/integrations/{integration_id}/form": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "fetch_integration_form", "summary": "Fetch Remote Integration Form", "description": "Returns the Integration form for presentation to the user.", @@ -8088,7 +8395,9 @@ }, "/integrations/{integration_id}/test": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "test_integration", "summary": "Test integration", "description": "Tests the integration to make sure all the settings are working.", @@ -8133,7 +8442,9 @@ }, "/internal_help_resources_content": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "internal_help_resources_content", "summary": "Get Internal Help Resources Content", "description": "### Set the menu item name and content for internal help resources\n", @@ -8161,7 +8472,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_internal_help_resources_content", "summary": "Update internal help resources content", "description": "Update internal help resources content\n", @@ -8214,7 +8527,9 @@ }, "/internal_help_resources_enabled": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "internal_help_resources", "summary": "Get Internal Help Resources", "description": "### Get and set the options for internal help resources\n", @@ -8244,7 +8559,9 @@ }, "/internal_help_resources": { "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_internal_help_resources", "summary": "Update internal help resources configuration", "description": "Update internal help resources settings\n", @@ -8297,7 +8614,9 @@ }, "/ldap_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "ldap_config", "summary": "Get LDAP Configuration", "description": "### Get the LDAP configuration.\n\nLooker can be optionally configured to authenticate users against an Active Directory or other LDAP directory server.\nLDAP setup requires coordination with an administrator of that directory server.\n\nOnly Looker administrators can read and update the LDAP configuration.\n\nConfiguring LDAP impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single LDAP configuration. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nLDAP is enabled or disabled for Looker using the **enabled** field.\n\nLooker will never return an **auth_password** field. That value can be set, but never retrieved.\n\nSee the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information.\n", @@ -8319,7 +8638,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_ldap_config", "summary": "Update LDAP Configuration", "description": "### Update the LDAP configuration.\n\nConfiguring LDAP impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the LDAP configuration.\n\nLDAP is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any LDAP setting changes be tested using the APIs below before being set globally.\n\nSee the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information.\n", @@ -8366,7 +8687,9 @@ }, "/ldap_config/test_connection": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_connection", "summary": "Test LDAP Connection", "description": "### Test the connection settings for an LDAP configuration.\n\nThis tests that the connection is possible given a connection_host and connection_port.\n\n**connection_host** and **connection_port** are required. **connection_tls** is optional.\n\nExample:\n```json\n{\n \"connection_host\": \"ldap.example.com\",\n \"connection_port\": \"636\",\n \"connection_tls\": true\n}\n```\n\nNo authentication to the LDAP server is attempted.\n\nThe active LDAP settings are not modified.\n", @@ -8413,7 +8736,9 @@ }, "/ldap_config/test_auth": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_auth", "summary": "Test LDAP Auth", "description": "### Test the connection authentication settings for an LDAP configuration.\n\nThis tests that the connection is possible and that a 'server' account to be used by Looker can authenticate to the LDAP server given connection and authentication information.\n\n**connection_host**, **connection_port**, and **auth_username**, are required. **connection_tls** and **auth_password** are optional.\n\nExample:\n```json\n{\n \"connection_host\": \"ldap.example.com\",\n \"connection_port\": \"636\",\n \"connection_tls\": true,\n \"auth_username\": \"cn=looker,dc=example,dc=com\",\n \"auth_password\": \"secret\"\n}\n```\n\nLooker will never return an **auth_password**. If this request omits the **auth_password** field, then the **auth_password** value from the active config (if present) will be used for the test.\n\nThe active LDAP settings are not modified.\n\n", @@ -8460,7 +8785,9 @@ }, "/ldap_config/test_user_info": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_user_info", "summary": "Test LDAP User Info", "description": "### Test the user authentication settings for an LDAP configuration without authenticating the user.\n\nThis test will let you easily test the mapping for user properties and roles for any user without needing to authenticate as that user.\n\nThis test accepts a full LDAP configuration along with a username and attempts to find the full info for the user from the LDAP server without actually authenticating the user. So, user password is not required.The configuration is validated before attempting to contact the server.\n\n**test_ldap_user** is required.\n\nThe active LDAP settings are not modified.\n\n", @@ -8507,7 +8834,9 @@ }, "/ldap_config/test_user_auth": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_user_auth", "summary": "Test LDAP User Auth", "description": "### Test the user authentication settings for an LDAP configuration.\n\nThis test accepts a full LDAP configuration along with a username/password pair and attempts to authenticate the user with the LDAP server. The configuration is validated before attempting the authentication.\n\nLooker will never return an **auth_password**. If this request omits the **auth_password** field, then the **auth_password** value from the active config (if present) will be used for the test.\n\n**test_ldap_user** and **test_ldap_password** are required.\n\nThe active LDAP settings are not modified.\n\n", @@ -8554,7 +8883,9 @@ }, "/legacy_features": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_legacy_features", "summary": "Get All Legacy Features", "description": "### Get all legacy features.\n", @@ -8587,7 +8918,9 @@ }, "/legacy_features/{legacy_feature_id}": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "legacy_feature", "summary": "Get Legacy Feature", "description": "### Get information about the legacy feature with a specific id.\n", @@ -8625,7 +8958,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_legacy_feature", "summary": "Update Legacy Feature", "description": "### Update information about the legacy feature with a specific id.\n", @@ -8686,7 +9021,9 @@ }, "/locales": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_locales", "summary": "Get All Locales", "description": "### Get a list of locales that Looker supports.\n", @@ -8719,7 +9056,9 @@ }, "/looks": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "all_looks", "summary": "Get All Looks", "description": "### Get information about all active Looks\n\nReturns an array of **abbreviated Look objects** describing all the looks that the caller has access to. Soft-deleted Looks are **not** included.\n\nGet the **full details** of a specific look by id with [look(id)](#!/Look/look)\n\nFind **soft-deleted looks** with [search_looks()](#!/Look/search_looks)\n", @@ -8759,7 +9098,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "create_look", "summary": "Create Look", "description": "### Create a Look\n\nTo create a look to display query data, first create the query with [create_query()](#!/Query/create_query)\nthen assign the query's id to the `query_id` property in the call to `create_look()`.\n\nTo place the look into a particular space, assign the space's id to the `space_id` property\nin the call to `create_look()`.\n", @@ -8825,7 +9166,9 @@ }, "/looks/search": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "search_looks", "summary": "Search Looks", "description": "### Search Looks\n\nReturns an **array of Look objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nGet a **single look** by id with [look(id)](#!/Look/look)\n", @@ -8985,7 +9328,9 @@ }, "/looks/{look_id}": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "look", "summary": "Get Look", "description": "### Get a Look.\n\nReturns detailed information about a Look and its associated Query.\n\n", @@ -9030,7 +9375,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "update_look", "summary": "Update Look", "description": "### Modify a Look\n\nUse this function to modify parts of a look. Property values given in a call to `update_look` are\napplied to the existing look, so there's no need to include properties whose values are not changing.\nIt's best to specify only the properties you want to change and leave everything else out\nof your `update_look` call. **Look properties marked 'read-only' will be ignored.**\n\nWhen a user deletes a look in the Looker UI, the look data remains in the database but is\nmarked with a deleted flag (\"soft-deleted\"). Soft-deleted looks can be undeleted (by an admin)\nif the delete was in error.\n\nTo soft-delete a look via the API, use [update_look()](#!/Look/update_look) to change the look's `deleted` property to `true`.\nYou can undelete a look by calling `update_look` to change the look's `deleted` property to `false`.\n\nSoft-deleted looks are excluded from the results of [all_looks()](#!/Look/all_looks) and [search_looks()](#!/Look/search_looks), so they\nessentially disappear from view even though they still reside in the db.\nIn API 3.1 and later, you can pass `deleted: true` as a parameter to [search_looks()](#!/3.1/Look/search_looks) to list soft-deleted looks.\n\nNOTE: [delete_look()](#!/Look/delete_look) performs a \"hard delete\" - the look data is removed from the Looker\ndatabase and destroyed. There is no \"undo\" for `delete_look()`.\n", @@ -9096,7 +9443,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "delete_look", "summary": "Delete Look", "description": "### Permanently Delete a Look\n\nThis operation **permanently** removes a look from the Looker database.\n\nNOTE: There is no \"undo\" for this kind of delete.\n\nFor information about soft-delete (which can be undone) see [update_look()](#!/Look/update_look).\n", @@ -9142,11 +9491,18 @@ }, "/looks/{look_id}/run/{result_format}": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "run_look", "summary": "Run Look", "description": "### Run a Look\n\nRuns a given look's query and returns the results in the requested format.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", - "produces": ["text", "application/json", "image/png", "image/jpeg"], + "produces": [ + "text", + "application/json", + "image/png", + "image/jpeg" + ], "parameters": [ { "name": "look_id", @@ -9289,7 +9645,9 @@ }, "/lookml_models": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "all_lookml_models", "summary": "Get All LookML Models", "description": "### Get information about all lookml models.\n", @@ -9329,7 +9687,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "create_lookml_model", "summary": "Create LookML Model", "description": "### Create a lookml model using the specified configuration.\n", @@ -9388,7 +9748,9 @@ }, "/lookml_models/{lookml_model_name}": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "lookml_model", "summary": "Get LookML Model", "description": "### Get information about a lookml model.\n", @@ -9432,7 +9794,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "update_lookml_model", "summary": "Update LookML Model", "description": "### Update a lookml model using the specified configuration.\n", @@ -9490,7 +9854,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "delete_lookml_model", "summary": "Delete LookML Model", "description": "### Delete a lookml model.\n", @@ -9535,7 +9901,9 @@ }, "/lookml_models/{lookml_model_name}/explores/{explore_name}": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "lookml_model_explore", "summary": "Get LookML Model Explore", "description": "### Get information about a lookml model explore.\n", @@ -9588,7 +9956,9 @@ }, "/merge_queries/{merge_query_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "merge_query", "summary": "Get Merge Query", "description": "### Get Merge Query\n\nReturns a merge query object given its id.\n", @@ -9634,7 +10004,9 @@ }, "/merge_queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_merge_query", "summary": "Create Merge Query", "description": "### Create Merge Query\n\nCreates a new merge query object.\n\nA merge query takes the results of one or more queries and combines (merges) the results\naccording to field mapping definitions. The result is similar to a SQL left outer join.\n\nA merge query can merge results of queries from different SQL databases.\n\nThe order that queries are defined in the source_queries array property is significant. The\nfirst query in the array defines the primary key into which the results of subsequent\nqueries will be merged.\n\nLike model/view query objects, merge queries are immutable and have structural identity - if\nyou make a request to create a new merge query that is identical to an existing merge query,\nthe existing merge query will be returned instead of creating a duplicate. Conversely, any\nchange to the contents of a merge query will produce a new object with a new id.\n", @@ -9700,7 +10072,9 @@ }, "/model_sets/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_model_sets", "summary": "Search Model Sets", "description": "### Search model sets\nReturns all model set records that match the given search criteria.\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -9801,7 +10175,9 @@ }, "/model_sets/{model_set_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "model_set", "summary": "Get Model Set", "description": "### Get information about the model set with a specific id.\n", @@ -9846,7 +10222,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_model_set", "summary": "Delete Model Set", "description": "### Delete the model set with a specific id.\n", @@ -9890,7 +10268,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_model_set", "summary": "Update Model Set", "description": "### Update information about the model set with a specific id.\n", @@ -9951,7 +10331,9 @@ }, "/model_sets": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_model_sets", "summary": "Get All Model Sets", "description": "### Get information about all model sets.\n", @@ -9985,7 +10367,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_model_set", "summary": "Create Model Set", "description": "### Create a model set with the specified information. Model sets are used by Roles.\n", @@ -10038,7 +10422,9 @@ }, "/oidc_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "oidc_config", "summary": "Get OIDC Configuration", "description": "### Get the OIDC configuration.\n\nLooker can be optionally configured to authenticate users against an OpenID Connect (OIDC)\nauthentication server. OIDC setup requires coordination with an administrator of that server.\n\nOnly Looker administrators can read and update the OIDC configuration.\n\nConfiguring OIDC impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single OIDC configuation. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nOIDC is enabled or disabled for Looker using the **enabled** field.\n", @@ -10060,7 +10446,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_oidc_config", "summary": "Update OIDC Configuration", "description": "### Update the OIDC configuration.\n\nConfiguring OIDC impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the OIDC configuration.\n\nOIDC is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any OIDC setting changes be tested using the APIs below before being set globally.\n", @@ -10107,7 +10495,9 @@ }, "/oidc_test_configs/{test_slug}": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "oidc_test_config", "summary": "Get OIDC Test Configuration", "description": "### Get a OIDC test configuration by test_slug.\n", @@ -10138,7 +10528,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_oidc_test_config", "summary": "Delete OIDC Test Configuration", "description": "### Delete a OIDC test configuration.\n", @@ -10177,7 +10569,9 @@ }, "/oidc_test_configs": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_oidc_test_config", "summary": "Create OIDC Test Configuration", "description": "### Create a OIDC test configuration.\n", @@ -10224,7 +10618,9 @@ }, "/password_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "password_config", "summary": "Get Password Config", "description": "### Get password config.\n", @@ -10252,7 +10648,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_password_config", "summary": "Update Password Config", "description": "### Update password config.\n", @@ -10305,7 +10703,9 @@ }, "/password_config/force_password_reset_at_next_login_for_all_users": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "force_password_reset_at_next_login_for_all_users", "summary": "Force password reset", "description": "### Force all credentials_email users to reset their login passwords upon their next login.\n", @@ -10347,7 +10747,9 @@ }, "/permissions": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_permissions", "summary": "Get All Permissions", "description": "### Get all supported permissions.\n", @@ -10380,7 +10782,9 @@ }, "/permission_sets/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_permission_sets", "summary": "Search Permission Sets", "description": "### Search permission sets\nReturns all permission set records that match the given search criteria.\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -10481,7 +10885,9 @@ }, "/permission_sets/{permission_set_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "permission_set", "summary": "Get Permission Set", "description": "### Get information about the permission set with a specific id.\n", @@ -10526,7 +10932,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_permission_set", "summary": "Delete Permission Set", "description": "### Delete the permission set with a specific id.\n", @@ -10576,7 +10984,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_permission_set", "summary": "Update Permission Set", "description": "### Update information about the permission set with a specific id.\n", @@ -10643,7 +11053,9 @@ }, "/permission_sets": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_permission_sets", "summary": "Get All Permission Sets", "description": "### Get information about all permission sets.\n", @@ -10683,7 +11095,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_permission_set", "summary": "Create Permission Set", "description": "### Create a permission set with the specified information. Permission sets are used by Roles.\n", @@ -10742,7 +11156,9 @@ }, "/projects/{project_id}/deploy_ref_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "deploy_ref_to_production", "summary": "Deploy Remote Branch or Ref to Production", "description": "### Deploy a Remote Branch or Ref to Production\n\nGit must have been configured and deploy permission required.\n\nDeploy is a one/two step process\n1. If this is the first deploy of this project, create the production project with git repository.\n2. Pull the branch or ref into the production project.\n\nCan only specify either a branch or a ref.\n\n", @@ -10810,7 +11226,9 @@ }, "/projects/{project_id}/deploy_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "deploy_to_production", "summary": "Deploy To Production", "description": "### Deploy LookML from this Development Mode Project to Production\n\nGit must have been configured, must be in dev mode and deploy permission required\n\nDeploy is a two / three step process:\n\n1. Push commits in current branch of dev mode project to the production branch (origin/master).\n Note a. This step is skipped in read-only projects.\n Note b. If this step is unsuccessful for any reason (e.g. rejected non-fastforward because production branch has\n commits not in current branch), subsequent steps will be skipped.\n2. If this is the first deploy of this project, create the production project with git repository.\n3. Pull the production branch into the production project.\n\n", @@ -10864,7 +11282,9 @@ }, "/projects/{project_id}/reset_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "reset_project_to_production", "summary": "Reset To Production", "description": "### Reset a project to the revision of the project that is in production.\n\n**DANGER** this will delete any changes that have not been pushed to a remote repository.\n", @@ -10918,7 +11338,9 @@ }, "/projects/{project_id}/reset_to_remote": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "reset_project_to_remote", "summary": "Reset To Remote", "description": "### Reset a project development branch to the revision of the project that is on the remote.\n\n**DANGER** this will delete any changes that have not been pushed to a remote repository.\n", @@ -10972,7 +11394,9 @@ }, "/projects": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_projects", "summary": "Get All Projects", "description": "### Get All Projects\n\nReturns all projects visible to the current user\n", @@ -11012,7 +11436,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_project", "summary": "Create Project", "description": "### Create A Project\n\ndev mode required.\n- Call `update_session` to select the 'dev' workspace.\n\n`name` is required.\n`git_remote_url` is not allowed. To configure Git for the newly created project, follow the instructions in `update_project`.\n\n", @@ -11071,7 +11497,9 @@ }, "/projects/{project_id}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project", "summary": "Get Project", "description": "### Get A Project\n\nReturns the project with the given project id\n", @@ -11115,7 +11543,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_project", "summary": "Update Project", "description": "### Update Project Configuration\n\nApply changes to a project's configuration.\n\n\n#### Configuring Git for a Project\n\nTo set up a Looker project with a remote git repository, follow these steps:\n\n1. Call `update_session` to select the 'dev' workspace.\n1. Call `create_git_deploy_key` to create a new deploy key for the project\n1. Copy the deploy key text into the remote git repository's ssh key configuration\n1. Call `update_project` to set project's `git_remote_url` ()and `git_service_name`, if necessary).\n\nWhen you modify a project's `git_remote_url`, Looker connects to the remote repository to fetch\nmetadata. The remote git repository MUST be configured with the Looker-generated deploy\nkey for this project prior to setting the project's `git_remote_url`.\n\nTo set up a Looker project with a git repository residing on the Looker server (a 'bare' git repo):\n\n1. Call `update_session` to select the 'dev' workspace.\n1. Call `update_project` setting `git_remote_url` to null and `git_service_name` to \"bare\".\n\n", @@ -11194,7 +11624,9 @@ }, "/projects/{project_id}/manifest": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "manifest", "summary": "Get Manifest", "description": "### Get A Projects Manifest object\n\nReturns the project with the given project id\n", @@ -11233,11 +11665,15 @@ }, "/projects/{project_id}/git/deploy_key": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_git_deploy_key", "summary": "Create Deploy Key", "description": "### Create Git Deploy Key\n\nCreate a public/private key pair for authenticating ssh git requests from Looker to a remote git repository\nfor a particular Looker project.\n\nReturns the public key of the generated ssh key pair.\n\nCopy this public key to your remote git repository's ssh keys configuration so that the remote git service can\nvalidate and accept git requests from the Looker server.\n", - "produces": ["text/plain"], + "produces": [ + "text/plain" + ], "parameters": [ { "name": "project_id", @@ -11289,11 +11725,15 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "git_deploy_key", "summary": "Git Deploy Key", "description": "### Git Deploy Key\n\nReturns the ssh public key previously created for a project's git repository.\n", - "produces": ["text/plain"], + "produces": [ + "text/plain" + ], "parameters": [ { "name": "project_id", @@ -11329,7 +11769,9 @@ }, "/projects/{project_id}/validate": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "validate_project", "summary": "Validate Project", "description": "### Validate Project\n\nPerforms lint validation of all lookml files in the project.\nReturns a list of errors found, if any.\n\nValidating the content of all the files in a project can be computationally intensive\nfor large projects. For best performance, call `validate_project(project_id)` only\nwhen you really want to recompute project validation. To quickly display the results of\nthe most recent project validation (without recomputing), use `project_validation_results(project_id)`\n", @@ -11385,7 +11827,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_validation_results", "summary": "Cached Project Validation Results", "description": "### Get Cached Project Validation Results\n\nReturns the cached results of a previous project validation calculation, if any.\nReturns http status 204 No Content if no validation results exist.\n\nValidating the content of all the files in a project can be computationally intensive\nfor large projects. Use this API to simply fetch the results of the most recent\nproject validation rather than revalidating the entire project from scratch.\n\nA value of `\"stale\": true` in the response indicates that the project has changed since\nthe cached validation results were computed. The cached validation results may no longer\nreflect the current state of the project.\n", @@ -11434,7 +11878,9 @@ }, "/projects/{project_id}/current_workspace": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_workspace", "summary": "Get Project Workspace", "description": "### Get Project Workspace\n\nReturns information about the state of the project files in the currently selected workspace\n", @@ -11480,7 +11926,9 @@ }, "/projects/{project_id}/files": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_project_files", "summary": "Get All Project Files", "description": "### Get All Project Files\n\nReturns a list of the files in the project\n", @@ -11529,7 +11977,9 @@ }, "/projects/{project_id}/files/file": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_file", "summary": "Get Project File", "description": "### Get Project File Info\n\nReturns information about a file in the project\n", @@ -11582,7 +12032,9 @@ }, "/projects/{project_id}/git_connection_tests": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_git_connection_tests", "summary": "Get All Git Connection Tests", "description": "### Get All Git Connection Tests\n\ndev mode required.\n - Call `update_session` to select the 'dev' workspace.\n\nReturns a list of tests which can be run against a project's (or the dependency project for the provided remote_url) git connection. Call [Run Git Connection Test](#!/Project/run_git_connection_test) to execute each test in sequence.\n\nTests are ordered by increasing specificity. Tests should be run in the order returned because later tests require functionality tested by tests earlier in the test list.\n\nFor example, a late-stage test for write access is meaningless if connecting to the git server (an early test) is failing.\n", @@ -11631,7 +12083,9 @@ }, "/projects/{project_id}/git_connection_tests/{test_id}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "run_git_connection_test", "summary": "Run Git Connection Test", "description": "### Run a git connection test\n\nRun the named test on the git service used by this project (or the dependency project for the provided remote_url) and return the result. This\nis intended to help debug git connections when things do not work properly, to give\nmore helpful information about why a git url is not working with Looker.\n\nTests should be run in the order they are returned by [Get All Git Connection Tests](#!/Project/all_git_connection_tests).\n", @@ -11703,7 +12157,9 @@ }, "/projects/{project_id}/lookml_tests": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_lookml_tests", "summary": "Get All LookML Tests", "description": "### Get All LookML Tests\n\nReturns a list of tests which can be run to validate a project's LookML code and/or the underlying data,\noptionally filtered by the file id.\nCall [Run LookML Test](#!/Project/run_lookml_test) to execute tests.\n", @@ -11752,7 +12208,9 @@ }, "/projects/{project_id}/lookml_tests/run": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "run_lookml_test", "summary": "Run LookML Test", "description": "### Run LookML Tests\n\nRuns all tests in the project, optionally filtered by file, test, and/or model.\n", @@ -11827,7 +12285,9 @@ }, "/projects/{project_id}/tag": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "tag_ref", "summary": "Tag Ref", "description": "### Creates a tag for the most recent commit, or a specific ref is a SHA is provided\n\nThis is an internal-only, undocumented route.\n", @@ -11917,7 +12377,9 @@ }, "/render_tasks/lookml_dashboards/{dashboard_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_lookml_dashboard_render_task", "summary": "Create Lookml Dashboard Render Task", "description": "### Create a new task to render a lookml dashboard to a document or image.\n\n# DEPRECATED: Use [create_dashboard_render_task()](#!/RenderTask/create_dashboard_render_task) in API 4.0+\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -12028,7 +12490,9 @@ }, "/render_tasks/looks/{look_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_look_render_task", "summary": "Create Look Render Task", "description": "### Create a new task to render a look to an image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -12116,7 +12580,9 @@ }, "/render_tasks/queries/{query_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_query_render_task", "summary": "Create Query Render Task", "description": "### Create a new task to render an existing query to an image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -12204,7 +12670,9 @@ }, "/render_tasks/dashboards/{dashboard_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_dashboard_render_task", "summary": "Create Dashboard Render Task", "description": "### Create a new task to render a dashboard to a document or image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -12315,7 +12783,9 @@ }, "/render_tasks/{render_task_id}": { "get": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "render_task", "summary": "Get Render Task", "description": "### Get information about a render task.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -12361,11 +12831,17 @@ }, "/render_tasks/{render_task_id}/results": { "get": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "render_task_results", "summary": "Render Task Results", "description": "### Get the document or image produced by a completed render task.\n\nNote that the PDF or image result will be a binary blob in the HTTP response, as indicated by the\nContent-Type in the response headers. This may require specialized (or at least different) handling than text\nresponses such as JSON. You may need to tell your HTTP client that the response is binary so that it does not\nattempt to parse the binary data as text.\n\nIf the render task exists but has not finished rendering the results, the response HTTP status will be\n**202 Accepted**, the response body will be empty, and the response will have a Retry-After header indicating\nthat the caller should repeat the request at a later time.\n\nReturns 404 if the render task cannot be found, if the cached result has expired, or if the caller\ndoes not have permission to view the results.\n\nFor detailed information about the status of the render task, use [Render Task](#!/RenderTask/render_task).\nPolling loops waiting for completion of a render task would be better served by polling **render_task(id)** until\nthe task status reaches completion (or error) instead of polling **render_task_results(id)** alone.\n", - "produces": ["image/jpeg", "image/png", "application/pdf"], + "produces": [ + "image/jpeg", + "image/png", + "application/pdf" + ], "parameters": [ { "name": "render_task_id", @@ -12404,7 +12880,9 @@ }, "/projects/{root_project_id}/credential/{credential_id}": { "put": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_repository_credential", "summary": "Create Repository Credential", "description": "### Configure Repository Credential for a remote dependency\n\nAdmin required.\n\n`root_project_id` is required.\n`credential_id` is required.\n\n", @@ -12475,7 +12953,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "delete_repository_credential", "summary": "Delete Repository Credential", "description": "### Repository Credential for a remote dependency\n\nAdmin required.\n\n`root_project_id` is required.\n`credential_id` is required.\n", @@ -12527,7 +13007,9 @@ }, "/projects/{root_project_id}/credentials": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "get_all_repository_credentials", "summary": "Get All Repository Credentials", "description": "### Get all Repository Credentials for a project\n\n`root_project_id` is required.\n", @@ -12569,7 +13051,9 @@ }, "/roles": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_roles", "summary": "Get All Roles", "description": "### Get information about all roles.\n", @@ -12621,7 +13105,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_role", "summary": "Create Role", "description": "### Create a role with the specified information.\n", @@ -12680,7 +13166,9 @@ }, "/roles/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_roles", "summary": "Search Roles", "description": "### Search roles\n\nReturns all role records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -12774,7 +13262,9 @@ }, "/roles/{role_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role", "summary": "Get Role", "description": "### Get information about the role with a specific id.\n", @@ -12812,7 +13302,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_role", "summary": "Delete Role", "description": "### Delete the role with a specific id.\n", @@ -12862,7 +13354,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_role", "summary": "Update Role", "description": "### Update information about the role with a specific id.\n", @@ -12929,7 +13423,9 @@ }, "/roles/{role_id}/groups": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role_groups", "summary": "Get Role Groups", "description": "### Get information about all the groups with the role that has a specific id.\n", @@ -12977,7 +13473,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "set_role_groups", "summary": "Update Role Groups", "description": "### Set all groups for a role, removing all existing group associations from that role.\n", @@ -13045,7 +13543,9 @@ }, "/roles/{role_id}/users": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role_users", "summary": "Get Role Users", "description": "### Get information about all the users with the role that has a specific id.\n", @@ -13100,7 +13600,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "set_role_users", "summary": "Update Role Users", "description": "### Set all the users of the role with a specific id.\n", @@ -13180,7 +13682,9 @@ }, "/running_queries": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "all_running_queries", "summary": "Get All Running Queries", "description": "Get information about all running queries.\n", @@ -13207,7 +13711,9 @@ }, "/running_queries/{query_task_id}": { "delete": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "kill_query", "summary": "Kill Running Query", "description": "Kill a query with a specific query_task_id.\n", @@ -13252,7 +13758,9 @@ }, "/saml_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "saml_config", "summary": "Get SAML Configuration", "description": "### Get the SAML configuration.\n\nLooker can be optionally configured to authenticate users against a SAML authentication server.\nSAML setup requires coordination with an administrator of that server.\n\nOnly Looker administrators can read and update the SAML configuration.\n\nConfiguring SAML impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single SAML configuation. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nSAML is enabled or disabled for Looker using the **enabled** field.\n", @@ -13274,7 +13782,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_saml_config", "summary": "Update SAML Configuration", "description": "### Update the SAML configuration.\n\nConfiguring SAML impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the SAML configuration.\n\nSAML is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any SAML setting changes be tested using the APIs below before being set globally.\n", @@ -13321,7 +13831,9 @@ }, "/saml_test_configs/{test_slug}": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "saml_test_config", "summary": "Get SAML Test Configuration", "description": "### Get a SAML test configuration by test_slug.\n", @@ -13352,7 +13864,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_saml_test_config", "summary": "Delete SAML Test Configuration", "description": "### Delete a SAML test configuration.\n", @@ -13391,7 +13905,9 @@ }, "/saml_test_configs": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_saml_test_config", "summary": "Create SAML Test Configuration", "description": "### Create a SAML test configuration.\n", @@ -13438,11 +13954,15 @@ }, "/parse_saml_idp_metadata": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "parse_saml_idp_metadata", "summary": "Parse SAML IdP XML", "description": "### Parse the given xml as a SAML IdP metadata document and return the result.\n", - "consumes": ["text/plain"], + "consumes": [ + "text/plain" + ], "parameters": [ { "name": "body", @@ -13480,11 +14000,15 @@ }, "/fetch_and_parse_saml_idp_metadata": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "fetch_and_parse_saml_idp_metadata", "summary": "Parse SAML IdP Url", "description": "### Fetch the given url and parse it as a SAML IdP metadata document and return the result.\nNote that this requires that the url be public or at least at a location where the Looker instance\ncan fetch it without requiring any special authentication.\n", - "consumes": ["text/plain"], + "consumes": [ + "text/plain" + ], "parameters": [ { "name": "body", @@ -13522,7 +14046,9 @@ }, "/scheduled_plans/space/{space_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_space", "summary": "Scheduled Plans for Space", "description": "### Get Scheduled Plans for a Space\n\nReturns scheduled plans owned by the caller for a given space id.\n", @@ -13572,7 +14098,9 @@ }, "/scheduled_plans/{scheduled_plan_id}": { "delete": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "delete_scheduled_plan", "summary": "Delete Scheduled Plan", "description": "### Delete a Scheduled Plan\n\nNormal users can only delete their own scheduled plans.\nAdmins can delete other users' scheduled plans.\nThis delete cannot be undone.\n", @@ -13616,7 +14144,9 @@ "x-looker-activity-type": "db_query" }, "patch": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "update_scheduled_plan", "summary": "Update Scheduled Plan", "description": "### Update a Scheduled Plan\n\nAdmins can update other users' Scheduled Plans.\n\nNote: Any scheduled plan destinations specified in an update will **replace** all scheduled plan destinations\ncurrently defined for the scheduled plan.\n\nFor Example: If a scheduled plan has destinations A, B, and C, and you call update on this scheduled plan\nspecifying only B in the destinations, then destinations A and C will be deleted by the update.\n\nUpdating a scheduled plan to assign null or an empty array to the scheduled_plan_destinations property is an error, as a scheduled plan must always have at least one destination.\n\nIf you omit the scheduled_plan_destinations property from the object passed to update, then the destinations\ndefined on the original scheduled plan will remain unchanged.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -13675,7 +14205,9 @@ "x-looker-activity-type": "db_query" }, "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan", "summary": "Get Scheduled Plan", "description": "### Get Information About a Scheduled Plan\n\nAdmins can fetch information about other users' Scheduled Plans.\n", @@ -13722,7 +14254,9 @@ }, "/scheduled_plans": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "create_scheduled_plan", "summary": "Create Scheduled Plan", "description": "### Create a Scheduled Plan\n\nCreate a scheduled plan to render a Look or Dashboard on a recurring schedule.\n\nTo create a scheduled plan, you MUST provide values for the following fields:\n`name`\nand\n`look_id`, `dashboard_id`, `lookml_dashboard_id`, or `query_id`\nand\n`cron_tab` or `datagroup`\nand\nat least one scheduled_plan_destination\n\nA scheduled plan MUST have at least one scheduled_plan_destination defined.\n\nWhen `look_id` is set, `require_no_results`, `require_results`, and `require_change` are all required.\n\nIf `create_scheduled_plan` fails with a 422 error, be sure to look at the error messages in the response which will explain exactly what fields are missing or values that are incompatible.\n\nThe queries that provide the data for the look or dashboard are run in the context of user account that owns the scheduled plan.\n\nWhen `run_as_recipient` is `false` or not specified, the queries that provide the data for the\nlook or dashboard are run in the context of user account that owns the scheduled plan.\n\nWhen `run_as_recipient` is `true` and all the email recipients are Looker user accounts, the\nqueries are run in the context of each recipient, so different recipients may see different\ndata from the same scheduled render of a look or dashboard. For more details, see [Run As Recipient](https://looker.com/docs/r/admin/run-as-recipient).\n\nAdmins can create and modify scheduled plans on behalf of other users by specifying a user id.\nNon-admin users may not create or modify scheduled plans by or for other users.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -13779,7 +14313,9 @@ "x-looker-activity-type": "db_query" }, "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "all_scheduled_plans", "summary": "Get All Scheduled Plans", "description": "### List All Scheduled Plans\n\nReturns all scheduled plans which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -13842,7 +14378,9 @@ }, "/scheduled_plans/run_once": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan_run_once", "summary": "Run Scheduled Plan Once", "description": "### Run a Scheduled Plan Immediately\n\nCreate a scheduled plan that runs only once, and immediately.\n\nThis can be useful for testing a Scheduled Plan before committing to a production schedule.\n\nAdmins can create scheduled plans on behalf of other users by specifying a user id.\n\nThis API is rate limited to prevent it from being used for relay spam or DoS attacks\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -13902,7 +14440,9 @@ }, "/scheduled_plans/look/{look_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_look", "summary": "Scheduled Plans for Look", "description": "### Get Scheduled Plans for a Look\n\nReturns all scheduled plans for a look which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -13967,7 +14507,9 @@ }, "/scheduled_plans/dashboard/{dashboard_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_dashboard", "summary": "Scheduled Plans for Dashboard", "description": "### Get Scheduled Plans for a Dashboard\n\nReturns all scheduled plans for a dashboard which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -14032,7 +14574,9 @@ }, "/scheduled_plans/lookml_dashboard/{lookml_dashboard_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_lookml_dashboard", "summary": "Scheduled Plans for LookML Dashboard", "description": "### Get Scheduled Plans for a LookML Dashboard\n\nReturns all scheduled plans for a LookML Dashboard which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -14096,7 +14640,9 @@ }, "/scheduled_plans/{scheduled_plan_id}/run_once": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan_run_once_by_id", "summary": "Run Scheduled Plan Once by Id", "description": "### Run a Scheduled Plan By Id Immediately\nThis function creates a run-once schedule plan based on an existing scheduled plan,\napplies modifications (if any) to the new scheduled plan, and runs the new schedule plan immediately.\nThis can be useful for testing modifications to an existing scheduled plan before committing to a production schedule.\n\nThis function internally performs the following operations:\n\n1. Copies the properties of the existing scheduled plan into a new scheduled plan\n2. Copies any properties passed in the JSON body of this request into the new scheduled plan (replacing the original values)\n3. Creates the new scheduled plan\n4. Runs the new scheduled plan\n\nThe original scheduled plan is not modified by this operation.\nAdmins can create, modify, and run scheduled plans on behalf of other users by specifying a user id.\nNon-admins can only create, modify, and run their own scheduled plans.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n\nThis API is rate limited to prevent it from being used for relay spam or DoS attacks\n\n", @@ -14164,7 +14710,9 @@ }, "/session_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "session_config", "summary": "Get Session Config", "description": "### Get session config.\n", @@ -14192,7 +14740,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_session_config", "summary": "Update Session Config", "description": "### Update session config.\n", @@ -14245,7 +14795,9 @@ }, "/session": { "get": { - "tags": ["Session"], + "tags": [ + "Session" + ], "operationId": "session", "summary": "Get Session", "description": "### Get API Session\n\nReturns information about the current API session, such as which workspace is selected for the session.\n", @@ -14273,7 +14825,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Session"], + "tags": [ + "Session" + ], "operationId": "update_session", "summary": "Update Session", "description": "### Update API Session\n\n#### API Session Workspace\n\nYou can use this endpoint to change the active workspace for the current API session.\n\nOnly one workspace can be active in a session. The active workspace can be changed\nany number of times in a session.\n\nThe default workspace for API sessions is the \"production\" workspace.\n\nAll Looker APIs that use projects or lookml models (such as running queries) will\nuse the version of project and model files defined by this workspace for the lifetime of the\ncurrent API session or until the session workspace is changed again.\n\nAn API session has the same lifetime as the access_token used to authenticate API requests. Each successful\nAPI login generates a new access_token and a new API session.\n\nIf your Looker API client application needs to work in a dev workspace across multiple\nAPI sessions, be sure to select the dev workspace after each login.\n", @@ -14326,7 +14880,9 @@ }, "/spaces/search": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "search_spaces", "summary": "Search Spaces", "description": "### Search Spaces\n\n Returns an **array of space objects** that match the given search criteria.\n\n If multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\n The parameters `limit`, and `offset` are recommended for fetching results in page-size chunks.\n\n Get a **single space** by id with [Space](#!/Space/space)\n", @@ -14451,7 +15007,9 @@ }, "/spaces/{space_id}": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space", "summary": "Get Space", "description": "### Get information about the space with a specific id.", @@ -14496,7 +15054,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "delete_space", "summary": "Delete Space", "description": "### Delete the space with a specific id including any children spaces.\n**DANGER** this will delete all looks and dashboards in the space.\n", @@ -14540,7 +15100,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "update_space", "summary": "Update Space", "description": "### Update the space with a specific id.", @@ -14601,10 +15163,12 @@ }, "/spaces": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "all_spaces", "summary": "Get All Spaces", - "description": "### Get information about all spaces.\n\nIn API 3.x, this will not return empty personal spaces, unless they belong to the calling user.\nIn API 4.0+, all personal spaces will be returned.\n\n", + "description": "### Get information about all spaces.\n\nIn API 3.x, this will not return empty personal spaces, unless they belong to the calling user,\nor if they contain soft-deleted content.\n\nIn API 4.0+, all personal spaces will be returned.\n\n", "parameters": [ { "name": "fields", @@ -14642,7 +15206,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "create_space", "summary": "Create Space", "description": "### Create a space with specified information.\n\nCaller must have permission to edit the parent space and to create spaces, otherwise the request\nreturns 404 Not Found.\n", @@ -14702,7 +15268,9 @@ }, "/spaces/{space_id}/children": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_children", "summary": "Get Space Children", "description": "### Get the children of a space.", @@ -14775,7 +15343,9 @@ }, "/spaces/{space_id}/children/search": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_children_search", "summary": "Search Space Children", "description": "### Search the children of a space", @@ -14839,7 +15409,9 @@ }, "/spaces/{space_id}/parent": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_parent", "summary": "Get Space Parent", "description": "### Get the parent of a space", @@ -14886,7 +15458,9 @@ }, "/spaces/{space_id}/ancestors": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_ancestors", "summary": "Get Space Ancestors", "description": "### Get the ancestors of a space", @@ -14936,7 +15510,9 @@ }, "/spaces/{space_id}/looks": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_looks", "summary": "Get Space Looks", "description": "### Get all looks in a space.\nIn API 3.x, this will return all looks in a space, including looks in the trash.\nIn API 4.0+, all looks in a space will be returned, excluding looks in the trash.\n", @@ -14986,7 +15562,9 @@ }, "/spaces/{space_id}/dashboards": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_dashboards", "summary": "Get Space Dashboards", "description": "### Get the dashboards in a space", @@ -15036,7 +15614,9 @@ }, "/folders/search": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "search_folders", "summary": "Search Folders", "description": "Search for folders by creator id, parent id, name, etc", @@ -15160,7 +15740,9 @@ }, "/folders/{folder_id}": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder", "summary": "Get Folder", "description": "### Get information about the folder with a specific id.", @@ -15204,7 +15786,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "delete_folder", "summary": "Delete Folder", "description": "### Delete the folder with a specific id including any children folders.\n**DANGER** this will delete all looks and dashboards in the folder.\n", @@ -15247,7 +15831,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "update_folder", "summary": "Update Folder", "description": "### Update the folder with a specific id.", @@ -15307,10 +15893,12 @@ }, "/folders": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "all_folders", "summary": "Get All Folders", - "description": "### Get information about all folders.\n\nIn API 3.x, this will not return empty personal folders, unless they belong to the calling user.\nIn API 4.0+, all personal folders will be returned.\n\n", + "description": "### Get information about all folders.\n\nIn API 3.x, this will not return empty personal folders, unless they belong to the calling user,\nor if they contain soft-deleted content.\n\nIn API 4.0+, all personal folders will be returned.\n\n", "parameters": [ { "name": "fields", @@ -15347,7 +15935,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "create_folder", "summary": "Create Folder", "description": "### Create a folder with specified information.\n\nCaller must have permission to edit the parent folder and to create folders, otherwise the request\nreturns 404 Not Found.\n", @@ -15406,7 +15996,9 @@ }, "/folders/{folder_id}/children": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_children", "summary": "Get Folder Children", "description": "### Get the children of a folder.", @@ -15478,7 +16070,9 @@ }, "/folders/{folder_id}/children/search": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_children_search", "summary": "Search Folder Children", "description": "### Search the children of a folder", @@ -15541,7 +16135,9 @@ }, "/folders/{folder_id}/parent": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_parent", "summary": "Get Folder Parent", "description": "### Get the parent of a folder", @@ -15587,7 +16183,9 @@ }, "/folders/{folder_id}/ancestors": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_ancestors", "summary": "Get Folder Ancestors", "description": "### Get the ancestors of a folder", @@ -15636,7 +16234,9 @@ }, "/folders/{folder_id}/looks": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_looks", "summary": "Get Folder Looks", "description": "### Get all looks in a folder.\nIn API 3.x, this will return all looks in a folder, including looks in the trash.\nIn API 4.0+, all looks in a folder will be returned, excluding looks in the trash.\n", @@ -15685,7 +16285,9 @@ }, "/folders/{folder_id}/dashboards": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_dashboards", "summary": "Get Folder Dashboards", "description": "### Get the dashboards in a folder", @@ -15734,7 +16336,9 @@ }, "/sql_queries/{slug}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "sql_query", "summary": "Get SQL Runner Query", "description": "Get a SQL Runner query.", @@ -15773,7 +16377,9 @@ }, "/sql_queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_sql_query", "summary": "Create SQL Runner Query", "description": "### Create a SQL Runner Query\n\nEither the `connection_name` or `model_name` parameter MUST be provided.\n", @@ -15832,11 +16438,18 @@ }, "/sql_queries/{slug}/run/{result_format}": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_sql_query", "summary": "Run SQL Runner Query", "description": "Execute a SQL Runner query in a given result_format.", - "produces": ["text", "application/json", "image/png", "image/jpeg"], + "produces": [ + "text", + "application/json", + "image/png", + "image/jpeg" + ], "parameters": [ { "name": "slug", @@ -15898,7 +16511,9 @@ }, "/themes": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "all_themes", "summary": "Get All Themes", "description": "### Get an array of all existing themes\n\nGet a **single theme** by id with [Theme](#!/Theme/theme)\n\nThis method returns an array of all existing themes. The active time for the theme is not considered.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -15938,7 +16553,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "create_theme", "summary": "Create Theme", "description": "### Create a theme\n\nCreates a new theme object, returning the theme details, including the created id.\n\nIf `settings` are not specified, the default theme settings will be copied into the new theme.\n\nThe theme `name` can only contain alphanumeric characters or underscores. Theme names should not contain any confidential information, such as customer names.\n\n**Update** an existing theme with [Update Theme](#!/Theme/update_theme)\n\n**Permanently delete** an existing theme with [Delete Theme](#!/Theme/delete_theme)\n\nFor more information, see [Creating and Applying Themes](https://looker.com/docs/r/admin/themes).\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -15997,7 +16614,9 @@ }, "/themes/search": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "search_themes", "summary": "Search Themes", "description": "### Search all themes for matching criteria.\n\nReturns an **array of theme objects** that match the specified search criteria.\n\n| Search Parameters | Description\n| :-------------------: | :------ |\n| `begin_at` only | Find themes active at or after `begin_at`\n| `end_at` only | Find themes active at or before `end_at`\n| both set | Find themes with an active inclusive period between `begin_at` and `end_at`\n\nNote: Range matching requires boolean AND logic.\nWhen using `begin_at` and `end_at` together, do not use `filter_or`=TRUE\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nGet a **single theme** by id with [Theme](#!/Theme/theme)\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -16100,7 +16719,9 @@ }, "/themes/default": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "default_theme", "summary": "Get Default Theme", "description": "### Get the default theme\n\nReturns the active theme object set as the default.\n\nThe **default** theme name can be set in the UI on the Admin|Theme UI page\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\" If specified, it returns the default theme at the time indicated.\n", @@ -16138,7 +16759,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "set_default_theme", "summary": "Set Default Theme", "description": "### Set the global default theme by theme name\n\nOnly Admin users can call this function.\n\nOnly an active theme with no expiration (`end_at` not set) can be assigned as the default theme. As long as a theme has an active record with no expiration, it can be set as the default.\n\n[Create Theme](#!/Theme/create) has detailed information on rules for default and active themes\n\nReturns the new specified default theme object.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -16189,7 +16812,9 @@ }, "/themes/active": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "active_themes", "summary": "Get Active Themes", "description": "### Get active themes\n\nReturns an array of active themes.\n\nIf the `name` parameter is specified, it will return an array with one theme if it's active and found.\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\"\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n\n", @@ -16246,7 +16871,9 @@ }, "/themes/theme_or_default": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "theme_or_default", "summary": "Get Theme or Default", "description": "### Get the named theme if it's active. Otherwise, return the default theme\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\"\nNote: API users with `show` ability can call this function\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -16293,7 +16920,9 @@ }, "/themes/validate": { "post": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "validate_theme", "summary": "Validate Theme", "description": "### Validate a theme with the specified information\n\nValidates all values set for the theme, returning any errors encountered, or 200 OK if valid\n\nSee [Create Theme](#!/Theme/create_theme) for constraints\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -16358,7 +16987,9 @@ }, "/themes/{theme_id}": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "theme", "summary": "Get Theme", "description": "### Get a theme by ID\n\nUse this to retrieve a specific theme, whether or not it's currently active.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -16402,7 +17033,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "update_theme", "summary": "Update Theme", "description": "### Update the theme by id.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -16460,7 +17093,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "delete_theme", "summary": "Delete Theme", "description": "### Delete a specific theme by id\n\nThis operation permanently deletes the identified theme from the database.\n\nBecause multiple themes can have the same name (with different activation time spans) themes can only be deleted by ID.\n\nAll IDs associated with a theme name can be retrieved by searching for the theme name with [Theme Search](#!/Theme/search).\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -16505,7 +17140,9 @@ }, "/timezones": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_timezones", "summary": "Get All Timezones", "description": "### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks).\n", @@ -16538,7 +17175,9 @@ }, "/user_attributes": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "all_user_attributes", "summary": "Get All User Attributes", "description": "### Get information about all user attributes.\n", @@ -16585,7 +17224,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "create_user_attribute", "summary": "Create User Attribute", "description": "### Create a new user attribute\n\nPermission information for a user attribute is conveyed through the `can` and `user_can_edit` fields.\nThe `user_can_edit` field indicates whether an attribute is user-editable _anywhere_ in the application.\nThe `can` field gives more granular access information, with the `set_value` child field indicating whether\nan attribute's value can be set by [Setting the User Attribute User Value](#!/User/set_user_attribute_user_value).\n\nNote: `name` and `label` fields must be unique across all user attributes in the Looker instance.\nAttempting to create a new user attribute with a name or label that duplicates an existing\nuser attribute will fail with a 422 error.\n", @@ -16651,7 +17292,9 @@ }, "/user_attributes/{user_attribute_id}": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "user_attribute", "summary": "Get User Attribute", "description": "### Get information about a user attribute.\n", @@ -16696,7 +17339,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "update_user_attribute", "summary": "Update User Attribute", "description": "### Update a user attribute definition.\n", @@ -16762,7 +17407,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "delete_user_attribute", "summary": "Delete User Attribute", "description": "### Delete a user attribute (admin only).\n", @@ -16808,7 +17455,9 @@ }, "/user_attributes/{user_attribute_id}/group_values": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "all_user_attribute_group_values", "summary": "Get User Attribute Group Values", "description": "### Returns all values of a user attribute defined by user groups, in precedence order.\n\nA user may be a member of multiple groups which define different values for a given user attribute.\nThe order of group-values in the response determines precedence for selecting which group-value applies\nto a given user. For more information, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values).\n\nResults will only include groups that the caller's user account has permission to see.\n", @@ -16856,7 +17505,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "set_user_attribute_group_values", "summary": "Set User Attribute Group Values", "description": "### Define values for a user attribute across a set of groups, in priority order.\n\nThis function defines all values for a user attribute defined by user groups. This is a global setting, potentially affecting\nall users in the system. This function replaces any existing group value definitions for the indicated user attribute.\n\nThe value of a user attribute for a given user is determined by searching the following locations, in this order:\n\n1. the user's account settings\n2. the groups that the user is a member of\n3. the default value of the user attribute, if any\n\nThe user may be a member of multiple groups which define different values for that user attribute. The order of items in the group_values parameter\ndetermines which group takes priority for that user. Lowest array index wins.\n\nAn alternate method to indicate the selection precedence of group-values is to assign numbers to the 'rank' property of each\ngroup-value object in the array. Lowest 'rank' value wins. If you use this technique, you must assign a\nrank value to every group-value object in the array.\n\n To set a user attribute value for a single user, see [Set User Attribute User Value](#!/User/set_user_attribute_user_value).\nTo set a user attribute value for all members of a group, see [Set User Attribute Group Value](#!/Group/update_user_attribute_group_value).\n", @@ -16929,7 +17580,9 @@ }, "/user_login_lockouts": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "all_user_login_lockouts", "summary": "Get All User Login Lockouts", "description": "### Get currently locked-out users.\n", @@ -16971,7 +17624,9 @@ }, "/user_login_lockouts/search": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "search_user_login_lockouts", "summary": "Search User Login Lockouts", "description": "### Search currently locked-out users.\n", @@ -17071,7 +17726,9 @@ }, "/user_login_lockout/{key}": { "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_user_login_lockout", "summary": "Delete User Login Lockout", "description": "### Removes login lockout for the associated user.\n", @@ -17116,7 +17773,9 @@ }, "/user": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "me", "summary": "Get Current User", "description": "### Get information about the current user; i.e. the user account currently calling the API.\n", @@ -17149,7 +17808,9 @@ }, "/users": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_users", "summary": "Get All Users", "description": "### Get information about all users.\n", @@ -17224,7 +17885,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user", "summary": "Create User", "description": "### Create a user with the specified information.\n", @@ -17284,7 +17947,9 @@ }, "/users/search": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "search_users", "summary": "Search Users", "description": "### Search users\n\nReturns all* user records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\n(*) Results are always filtered to the level of information the caller is permitted to view.\nLooker admins can see all user details; normal users in an open system can see\nnames of other users but no details; normal users in a closed system can only see\nnames of other users who are members of the same group as the user.\n\n", @@ -17422,7 +18087,9 @@ }, "/users/search/names/{pattern}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "search_users_names", "summary": "Search User Names", "description": "### Search for user accounts by name\n\nReturns all user accounts where `first_name` OR `last_name` OR `email` field values match a pattern.\nThe pattern can contain `%` and `_` wildcards as in SQL LIKE expressions.\n\nAny additional search params will be combined into a logical AND expression.\n", @@ -17537,7 +18204,9 @@ }, "/users/{user_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user", "summary": "Get User by Id", "description": "### Get information about the user with a specific id.\n\nIf the caller is an admin or the caller is the user being specified, then full user information will\nbe returned. Otherwise, a minimal 'public' variant of the user information will be returned. This contains\nThe user name and avatar url, but no sensitive information.\n", @@ -17582,7 +18251,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "update_user", "summary": "Update User", "description": "### Update information about the user with a specific id.\n", @@ -17642,7 +18313,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user", "summary": "Delete User", "description": "### Delete the user with a specific id.\n\n**DANGER** this will delete the user and all looks and other information owned by the user.\n", @@ -17688,7 +18361,9 @@ }, "/users/credential/{credential_type}/{credential_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_for_credential", "summary": "Get User by Credential Id", "description": "### Get information about the user with a credential of given type with specific id.\n\nThis is used to do things like find users by their embed external_user_id. Or, find the user with\na given api3 client_id, etc. The 'credential_type' matches the 'type' name of the various credential\ntypes. It must be one of the values listed in the table below. The 'credential_id' is your unique Id\nfor the user and is specific to each type of credential.\n\nAn example using the Ruby sdk might look like:\n\n`sdk.user_for_credential('embed', 'customer-4959425')`\n\nThis table shows the supported 'Credential Type' strings. The right column is for reference; it shows\nwhich field in the given credential type is actually searched when finding a user with the supplied\n'credential_id'.\n\n| Credential Types | Id Field Matched |\n| ---------------- | ---------------- |\n| email | email |\n| google | google_user_id |\n| saml | saml_user_id |\n| oidc | oidc_user_id |\n| ldap | ldap_id |\n| api | token |\n| api3 | client_id |\n| embed | external_user_id |\n| looker_openid | email |\n\n**NOTE**: The 'api' credential type was only used with the legacy Looker query API and is no longer supported. The credential type for API you are currently looking at is 'api3'.\n\n", @@ -17741,7 +18416,9 @@ }, "/users/{user_id}/credentials_email": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_email", "summary": "Get Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -17786,7 +18463,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_email", "summary": "Create Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -17858,7 +18537,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "update_user_credentials_email", "summary": "Update Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -17924,7 +18605,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_email", "summary": "Delete Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -17970,7 +18653,9 @@ }, "/users/{user_id}/credentials_totp": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_totp", "summary": "Get Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -18015,7 +18700,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_totp", "summary": "Create Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -18087,7 +18774,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_totp", "summary": "Delete Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -18133,7 +18822,9 @@ }, "/users/{user_id}/credentials_ldap": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_ldap", "summary": "Get LDAP Credential", "description": "### LDAP login information for the specified user.", @@ -18178,7 +18869,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_ldap", "summary": "Delete LDAP Credential", "description": "### LDAP login information for the specified user.", @@ -18224,7 +18917,9 @@ }, "/users/{user_id}/credentials_google": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_google", "summary": "Get Google Auth Credential", "description": "### Google authentication login information for the specified user.", @@ -18269,7 +18964,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_google", "summary": "Delete Google Auth Credential", "description": "### Google authentication login information for the specified user.", @@ -18315,7 +19012,9 @@ }, "/users/{user_id}/credentials_saml": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_saml", "summary": "Get Saml Auth Credential", "description": "### Saml authentication login information for the specified user.", @@ -18360,7 +19059,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_saml", "summary": "Delete Saml Auth Credential", "description": "### Saml authentication login information for the specified user.", @@ -18406,7 +19107,9 @@ }, "/users/{user_id}/credentials_oidc": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_oidc", "summary": "Get OIDC Auth Credential", "description": "### OpenID Connect (OIDC) authentication login information for the specified user.", @@ -18451,7 +19154,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_oidc", "summary": "Delete OIDC Auth Credential", "description": "### OpenID Connect (OIDC) authentication login information for the specified user.", @@ -18497,7 +19202,9 @@ }, "/users/{user_id}/credentials_api3/{credentials_api3_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_api3", "summary": "Get API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -18550,7 +19257,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_api3", "summary": "Delete API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -18604,7 +19313,9 @@ }, "/users/{user_id}/credentials_api3": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_credentials_api3s", "summary": "Get All API 3 Credentials", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -18652,7 +19363,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_api3", "summary": "Create API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -18726,7 +19439,9 @@ }, "/users/{user_id}/credentials_embed/{credentials_embed_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_embed", "summary": "Get Embedding Credential", "description": "### Embed login information for the specified user.", @@ -18779,7 +19494,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_embed", "summary": "Delete Embedding Credential", "description": "### Embed login information for the specified user.", @@ -18833,7 +19550,9 @@ }, "/users/{user_id}/credentials_embed": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_credentials_embeds", "summary": "Get All Embedding Credentials", "description": "### Embed login information for the specified user.", @@ -18883,7 +19602,9 @@ }, "/users/{user_id}/credentials_looker_openid": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_looker_openid", "summary": "Get Looker OpenId Credential", "description": "### Looker Openid login information for the specified user. Used by Looker Analysts.", @@ -18928,7 +19649,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_looker_openid", "summary": "Delete Looker OpenId Credential", "description": "### Looker Openid login information for the specified user. Used by Looker Analysts.", @@ -18974,7 +19697,9 @@ }, "/users/{user_id}/sessions/{session_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_session", "summary": "Get Web Login Session", "description": "### Web login session for the specified user.", @@ -19027,7 +19752,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_session", "summary": "Delete Web Login Session", "description": "### Web login session for the specified user.", @@ -19081,7 +19808,9 @@ }, "/users/{user_id}/sessions": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_sessions", "summary": "Get All Web Login Sessions", "description": "### Web login session for the specified user.", @@ -19131,7 +19860,9 @@ }, "/users/{user_id}/credentials_email/password_reset": { "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_email_password_reset", "summary": "Create Password Reset Token", "description": "### Create a password reset token.\nThis will create a cryptographically secure random password reset token for the user.\nIf the user already has a password reset token then this invalidates the old token and creates a new one.\nThe token is expressed as the 'password_reset_url' of the user's email/password credential object.\nThis takes an optional 'expires' param to indicate if the new token should be an expiring token.\nTokens that expire are typically used for self-service password resets for existing users.\nInvitation emails for new users typically are not set to expire.\nThe expire period is always 60 minutes when expires is enabled.\nThis method can be called with an empty body.\n", @@ -19185,7 +19916,9 @@ }, "/users/{user_id}/roles": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_roles", "summary": "Get User Roles", "description": "### Get information about roles of a given user\n", @@ -19240,7 +19973,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "set_user_roles", "summary": "Set User Roles", "description": "### Set roles of the user with a specific id.\n", @@ -19303,7 +20038,9 @@ }, "/users/{user_id}/attribute_values": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_attribute_user_values", "summary": "Get User Attribute Values", "description": "### Get user attribute values for a given user.\n\nReturns the values of specified user attributes (or all user attributes) for a certain user.\n\nA value for each user attribute is searched for in the following locations, in this order:\n\n1. in the user's account information\n1. in groups that the user is a member of\n1. the default value of the user attribute\n\nIf more than one group has a value defined for a user attribute, the group with the lowest rank wins.\n\nThe response will only include user attributes for which values were found. Use `include_unset=true` to include\nempty records for user attributes with no value.\n\nThe value of all hidden user attributes will be blank.\n", @@ -19373,7 +20110,9 @@ }, "/users/{user_id}/attribute_values/{user_attribute_id}": { "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "set_user_attribute_user_value", "summary": "Set User Attribute User Value", "description": "### Store a custom value for a user attribute in a user's account settings.\n\nPer-user user attribute values take precedence over group or default values.\n", @@ -19434,7 +20173,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_attribute_user_value", "summary": "Delete User Attribute User Value", "description": "### Delete a user attribute value from a user's account settings.\n\nAfter the user attribute value is deleted from the user's account settings, subsequent requests\nfor the user attribute value for this user will draw from the user's groups or the default\nvalue of the user attribute. See [Get User Attribute Values](#!/User/user_attribute_user_values) for more\ninformation about how user attribute values are resolved.\n", @@ -19479,11 +20220,15 @@ }, "/vector_thumbnail/{type}/{resource_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "vector_thumbnail", "summary": "Get Vector Thumbnail", "description": "### Get a vector image representing the contents of a dashboard or look.\n\n# DEPRECATED: Use [content_thumbnail()](#!/Content/content_thumbnail)\n\nThe returned thumbnail is an abstract representation of the contents of a dashbord or look and does not\nreflect the actual data displayed in the respective visualizations.\n", - "produces": ["image/svg+xml"], + "produces": [ + "image/svg+xml" + ], "parameters": [ { "name": "type", @@ -19534,7 +20279,9 @@ }, "/versions": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "versions", "summary": "Get ApiVersion", "description": "### Get information about all API versions supported by this Looker instance.\n", @@ -19573,7 +20320,9 @@ }, "/whitelabel_configuration": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "whitelabel_configuration", "summary": "Get Whitelabel configuration", "description": "### This feature is enabled only by special license.\n### Gets the whitelabel configuration, which includes hiding documentation links, custom favicon uploading, etc.\n", @@ -19610,7 +20359,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_whitelabel_configuration", "summary": "Update Whitelabel configuration", "description": "### Update the whitelabel configuration\n", @@ -19663,7 +20414,9 @@ }, "/workspaces": { "get": { - "tags": ["Workspace"], + "tags": [ + "Workspace" + ], "operationId": "all_workspaces", "summary": "Get All Workspaces", "description": "### Get All Workspaces\n\nReturns all workspaces available to the calling user.\n", @@ -19696,7 +20449,9 @@ }, "/workspaces/{workspace_id}": { "get": { - "tags": ["Workspace"], + "tags": [ + "Workspace" + ], "operationId": "workspace", "summary": "Get Workspace", "description": "### Get A Workspace\n\nReturns information about a workspace such as the git status and selected branches\nof all projects available to the caller's user account.\n\nA workspace defines which versions of project files will be used to evaluate expressions\nand operations that use model definitions - operations such as running queries or rendering dashboards.\nEach project has its own git repository, and each project in a workspace may be configured to reference\nparticular branch or revision within their respective repositories.\n\nThere are two predefined workspaces available: \"production\" and \"dev\".\n\nThe production workspace is shared across all Looker users. Models in the production workspace are read-only.\nChanging files in production is accomplished by modifying files in a git branch and using Pull Requests\nto merge the changes from the dev branch into the production branch, and then telling\nLooker to sync with production.\n\nThe dev workspace is local to each Looker user. Changes made to project/model files in the dev workspace only affect\nthat user, and only when the dev workspace is selected as the active workspace for the API session.\n(See set_session_workspace()).\n\nThe dev workspace is NOT unique to an API session. Two applications accessing the Looker API using\nthe same user account will see the same files in the dev workspace. To avoid collisions between\nAPI clients it's best to have each client login with API3 credentials for a different user account.\n\nChanges made to files in a dev workspace are persistent across API sessions. It's a good\nidea to commit any changes you've made to the git repository, but not strictly required. Your modified files\nreside in a special user-specific directory on the Looker server and will still be there when you login in again\nlater and use update_session(workspace_id: \"dev\") to select the dev workspace for the new API session.\n", @@ -19752,7 +20507,10 @@ } }, "x-looker-status": "stable", - "required": ["message", "documentation_url"] + "required": [ + "message", + "documentation_url" + ] }, "DashboardBase": { "properties": { @@ -19973,7 +20731,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "CreateSpace": { "properties": { @@ -19989,7 +20749,10 @@ } }, "x-looker-status": "stable", - "required": ["name", "parent_id"] + "required": [ + "name", + "parent_id" + ] }, "UpdateSpace": { "properties": { @@ -20129,7 +20892,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "Homepage": { "properties": { @@ -20513,7 +21278,10 @@ } }, "x-looker-status": "stable", - "required": ["message", "documentation_url"] + "required": [ + "message", + "documentation_url" + ] }, "ValidationErrorDetail": { "properties": { @@ -20544,7 +21312,9 @@ } }, "x-looker-status": "stable", - "required": ["documentation_url"] + "required": [ + "documentation_url" + ] }, "AccessToken": { "properties": { @@ -20834,7 +21604,10 @@ "permission_type": { "type": "string", "readOnly": true, - "x-looker-values": ["view", "edit"], + "x-looker-values": [ + "view", + "edit" + ], "description": "Type of permission: \"view\" or \"edit\" Valid values are: \"view\", \"edit\".", "x-looker-nullable": true }, @@ -21076,7 +21849,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "ContentValidationFolder": { "properties": { @@ -21093,7 +21868,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "ContentValidationLook": { "properties": { @@ -22499,7 +23276,12 @@ } }, "x-looker-status": "stable", - "required": ["dashboard_id", "name", "title", "type"] + "required": [ + "dashboard_id", + "name", + "title", + "type" + ] }, "DashboardLayoutComponent": { "properties": { @@ -23930,7 +24712,9 @@ } }, "x-looker-status": "stable", - "required": ["target_url"] + "required": [ + "target_url" + ] }, "EmbedUrlResponse": { "properties": { @@ -24048,7 +24832,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "CreateFolder": { "properties": { @@ -24064,7 +24850,10 @@ } }, "x-looker-status": "stable", - "required": ["name", "parent_id"] + "required": [ + "name", + "parent_id" + ] }, "UpdateFolder": { "properties": { @@ -24204,7 +24993,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "GitBranch": { "properties": { @@ -24690,7 +25481,11 @@ "type": "string" }, "readOnly": true, - "x-looker-values": ["cell", "query", "dashboard"], + "x-looker-values": [ + "cell", + "query", + "dashboard" + ], "description": "A list of action types the integration supports. Valid values are: \"cell\", \"query\", \"dashboard\".", "x-looker-nullable": false }, @@ -24700,7 +25495,10 @@ "type": "string" }, "readOnly": true, - "x-looker-values": ["formatted", "unformatted"], + "x-looker-values": [ + "formatted", + "unformatted" + ], "description": "A list of formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: \"formatted\", \"unformatted\".", "x-looker-nullable": false }, @@ -24710,7 +25508,10 @@ "type": "string" }, "readOnly": true, - "x-looker-values": ["apply", "noapply"], + "x-looker-values": [ + "apply", + "noapply" + ], "description": "A list of visualization formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: \"apply\", \"noapply\".", "x-looker-nullable": false }, @@ -24720,7 +25521,10 @@ "type": "string" }, "readOnly": true, - "x-looker-values": ["push", "url"], + "x-looker-values": [ + "push", + "url" + ], "description": "A list of all the download mechanisms the integration supports. The order of values is not significant: Looker will select the most appropriate supported download mechanism for a given query. The integration must ensure it can handle any of the mechanisms it claims to support. If unspecified, this defaults to all download setting values. Valid values are: \"push\", \"url\".", "x-looker-nullable": false }, @@ -26825,7 +27629,10 @@ "align": { "type": "string", "readOnly": true, - "x-looker-values": ["left", "right"], + "x-looker-values": [ + "left", + "right" + ], "description": "The appropriate horizontal text alignment the values of this field should be displayed in. Valid values are: \"left\", \"right\".", "x-looker-nullable": false }, @@ -26838,7 +27645,12 @@ "category": { "type": "string", "readOnly": true, - "x-looker-values": ["parameter", "filter", "measure", "dimension"], + "x-looker-values": [ + "parameter", + "filter", + "measure", + "dimension" + ], "description": "Field category Valid values are: \"parameter\", \"filter\", \"measure\", \"dimension\".", "x-looker-nullable": true }, @@ -26890,7 +27702,10 @@ "fill_style": { "type": "string", "readOnly": true, - "x-looker-values": ["enumeration", "range"], + "x-looker-values": [ + "enumeration", + "range" + ], "description": "The style of dimension fill that is possible for this field. Null if no dimension fill is possible. Valid values are: \"enumeration\", \"range\".", "x-looker-nullable": true }, @@ -27311,7 +28126,10 @@ "format": { "type": "string", "readOnly": true, - "x-looker-values": ["topojson", "vector_tile_region"], + "x-looker-values": [ + "topojson", + "vector_tile_region" + ], "description": "Specifies the data format of the region information. Valid values are: \"topojson\", \"vector_tile_region\".", "x-looker-nullable": false }, @@ -28438,7 +29256,12 @@ }, "pull_request_mode": { "type": "string", - "x-looker-values": ["off", "links", "recommended", "required"], + "x-looker-values": [ + "off", + "links", + "recommended", + "required" + ], "description": "The git pull request policy for this project. Valid values are: \"off\", \"links\", \"recommended\", \"required\".", "x-looker-nullable": false }, @@ -28882,7 +29705,10 @@ } }, "x-looker-status": "stable", - "required": ["model", "view"] + "required": [ + "model", + "view" + ] }, "CreateQueryTask": { "properties": { @@ -28941,7 +29767,10 @@ } }, "x-looker-status": "stable", - "required": ["query_id", "result_format"] + "required": [ + "query_id", + "result_format" + ] }, "QueryTask": { "properties": { @@ -31654,4 +32483,4 @@ "x-looker-status": "stable" } } -} +} \ No newline at end of file diff --git a/spec/Looker.3.1.oas.json b/spec/Looker.3.1.oas.json index be9cec618..5d2d82c36 100644 --- a/spec/Looker.3.1.oas.json +++ b/spec/Looker.3.1.oas.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "version": "3.1.0", - "x-looker-release-version": "21.20.8", + "x-looker-release-version": "21.21.0", "title": "Looker API 3.1 Reference", "description": "### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### Try It Out!\n\nThis section describes the existing 'api-docs' page available on Looker instances. We recommend using the\n[API Explorer](https://looker.com/docs/r/api/explorer) instead.\n\nThe 'api-docs' page served by the Looker instance includes 'Try It Out!' buttons for each API method. After logging\nin with API3 credentials, you can use the \"Try It Out!\" buttons to call the API directly from the documentation\npage to interactively explore API features and responses.\n\n**NOTE**! With great power comes great responsibility: The \"Try It Out!\" button makes API calls to your live Looker\ninstance. Be especially careful with destructive API operations such as `delete_user` or similar.\nThere is no \"undo\" for API operations. (API Explorer's \"Run It\" feature requires a check mark before running\nAPI operations that can change data.)\n\n\n### In This Release\n\nThe following are a few examples of noteworthy items that have changed between API 3.0 and API 3.1.\nFor more comprehensive coverage of API changes, please see the release notes for your Looker release.\n\n### Examples of new things added in API 3.1 (compared to API 3.0):\n\n* [Dashboard construction](#!/3.1/Dashboard/) APIs\n* [Themes](#!/3.1/Theme/) and [custom color collections](#!/3.1/ColorCollection) APIs\n* Create and run [SQL Runner](#!/3.1/Query/run_sql_query) queries\n* Create and run [merged results](#!/3.1/Query/create_merge_query) queries\n* Create and modify [dashboard filters](#!/3.1/Dashboard/create_dashboard_filter)\n* Create and modify [password requirements](#!/3.1/Auth/password_config)\n\n### Deprecated in API 3.0\n\nThe following functions and properties have been deprecated in API 3.0. They continue to exist and work in API 3.0\nfor the next several Looker releases but they have not been carried forward to API 3.1:\n\n* Dashboard Prefetch functions\n* User access_filter functions\n* User API 1.0 credentials functions\n* Space.is_root and Space.is_user_root properties. Use Space.is_shared_root and Space.is_users_root instead.\n\n### Semantic changes in API 3.1:\n\n* [all_looks()](#!/3.1/Look/all_looks) no longer includes soft-deleted looks, matching [all_dashboards()](#!/3.1/Dashboard/all_dashboards) behavior.\nYou can find soft-deleted looks using [search_looks()](#!/3.1/Look/search_looks) with the `deleted` param set to True.\n* [all_spaces()](#!/3.1/Space/all_spaces) no longer includes duplicate items\n* [search_users()](#!/3.1/User/search_users) no longer accepts Y,y,1,0,N,n for Boolean params, only \"true\" and \"false\".\n* For greater client and network compatibility, [render_task_results](#!/3.1/RenderTask/render_task_results) now returns\nHTTP status **202 Accepted** instead of HTTP status **102 Processing**\n* [all_running_queries()](#!/3.1/Query/all_running_queries) and [kill_query](#!/3.1/Query/kill_query) functions have moved into the [Query](#!/3.1/Query/) function group.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -11,7 +11,7 @@ }, "license": { "name": "EULA", - "url": "https://localhost:10000/eula" + "url": "https://self-signed.looker.com:9999/eula" } }, "tags": [ @@ -127,7 +127,9 @@ "paths": { "/query_tasks": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_query_task", "summary": "Run Query Async", "description": "### Create an async query task\n\nCreates a query task (job) to run a previously created query asynchronously. Returns a Query Task ID.\n\nUse [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task.\nAfter the query task status reaches \"Complete\", use [query_task_results(query_task_id)](#!/Query/query_task_results) to fetch the results of the query.\n", @@ -332,7 +334,9 @@ }, "/query_tasks/multi_results": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task_multi_results", "summary": "Get Multiple Async Query Results", "description": "### Fetch results of multiple async queries\n\nReturns the results of multiple async queries in one request.\n\nFor Query Tasks that are not completed, the response will include the execution status of the Query Task but will not include query results.\nQuery Tasks whose results have expired will have a status of 'expired'.\nIf the user making the API request does not have sufficient privileges to view a Query Task result, the result will have a status of 'missing'\n", @@ -393,7 +397,9 @@ }, "/query_tasks/{query_task_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task", "summary": "Get Async Query Info", "description": "### Get Query Task details\n\nUse this function to check the status of an async query task. After the status\nreaches \"Complete\", you can call [query_task_results(query_task_id)](#!/Query/query_task_results) to\nretrieve the results of the query.\n\nUse [create_query_task()](#!/Query/create_query_task) to create an async query task.\n", @@ -455,7 +461,9 @@ }, "/query_tasks/{query_task_id}/results": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task_results", "summary": "Get Async Query Results", "description": "### Get Async Query Results\n\nReturns the results of an async query task if the query has completed.\n\nIf the query task is still running or waiting to run, this function returns 204 No Content.\n\nIf the query task ID is invalid or the cached results of the query task have expired, this function returns 404 Not Found.\n\nUse [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task\nCall query_task_results only after the query task status reaches \"Complete\".\n\nYou can also use [query_task_multi_results()](#!/Query/query_task_multi_results) retrieve the\nresults of multiple async query tasks at the same time.\n\n#### SQL Error Handling:\nIf the query fails due to a SQL db error, how this is communicated depends on the result_format you requested in `create_query_task()`.\n\nFor `json_detail` result_format: `query_task_results()` will respond with HTTP status '200 OK' and db SQL error info\nwill be in the `errors` property of the response object. The 'data' property will be empty.\n\nFor all other result formats: `query_task_results()` will respond with HTTP status `400 Bad Request` and some db SQL error info\nwill be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`.\nThese data formats can only carry row data, and error info is not row data.\n", @@ -538,7 +546,9 @@ }, "/queries/{query_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query", "summary": "Get Query", "description": "### Get a previously created query by id.\n\nA Looker query object includes the various parameters that define a database query that has been run or\ncould be run in the future. These parameters include: model, view, fields, filters, pivots, etc.\nQuery *results* are not part of the query object.\n\nQuery objects are unique and immutable. Query objects are created automatically in Looker as users explore data.\nLooker does not delete them; they become part of the query history. When asked to create a query for\nany given set of parameters, Looker will first try to find an existing query object with matching\nparameters and will only create a new object when an appropriate object can not be found.\n\nThis 'get' method is used to get the details about a query for a given id. See the other methods here\nto 'create' and 'run' queries.\n\nNote that some fields like 'filter_config' and 'vis_config' etc are specific to how the Looker UI\nbuilds queries and visualizations and are not generally useful for API use. They are not required when\ncreating new queries and can usually just be ignored.\n\n", @@ -601,7 +611,9 @@ }, "/queries/slug/{slug}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_for_slug", "summary": "Get Query for Slug", "description": "### Get the query for a given query slug.\n\nThis returns the query for the 'slug' in a query share URL.\n\nThe 'slug' is a randomly chosen short string that is used as an alternative to the query's id value\nfor use in URLs etc. This method exists as a convenience to help you use the API to 'find' queries that\nhave been created using the Looker UI.\n\nYou can use the Looker explore page to build a query and then choose the 'Share' option to\nshow the share url for the query. Share urls generally look something like 'https://looker.yourcompany/x/vwGSbfc'.\nThe trailing 'vwGSbfc' is the share slug. You can pass that string to this api method to get details about the query.\nThose details include the 'id' that you can use to run the query. Or, you can copy the query body\n(perhaps with your own modification) and use that as the basis to make/run new queries.\n\nThis will also work with slugs from Looker explore urls like\n'https://looker.yourcompany/explore/ecommerce/orders?qid=aogBgL6o3cKK1jN3RoZl5s'. In this case\n'aogBgL6o3cKK1jN3RoZl5s' is the slug.\n", @@ -663,7 +675,9 @@ }, "/queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_query", "summary": "Create Query", "description": "### Create a query.\n\nThis allows you to create a new query that you can later run. Looker queries are immutable once created\nand are not deleted. If you create a query that is exactly like an existing query then the existing query\nwill be returned and no new query will be created. Whether a new query is created or not, you can use\nthe 'id' in the returned query with the 'run' method.\n\nThe query parameters are passed as json in the body of the request.\n\n", @@ -757,7 +771,9 @@ }, "/queries/{query_id}/run/{result_format}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_query", "summary": "Run Query", "description": "### Run a saved query.\n\nThis runs a previously saved query. You can use this on a query that was generated in the Looker UI\nor one that you have explicitly created using the API. You can also use a query 'id' from a saved 'Look'.\n\nThe 'result_format' parameter specifies the desired structure and format of the response.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", @@ -1026,7 +1042,9 @@ }, "/queries/run/{result_format}": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_inline_query", "summary": "Run Inline Query", "description": "### Run the query that is specified inline in the posted body.\n\nThis allows running a query as defined in json in the posted body. This combines\nthe two actions of posting & running a query into one step.\n\nHere is an example body in json:\n```\n{\n \"model\":\"thelook\",\n \"view\":\"inventory_items\",\n \"fields\":[\"category.name\",\"inventory_items.days_in_inventory_tier\",\"products.count\"],\n \"filters\":{\"category.name\":\"socks\"},\n \"sorts\":[\"products.count desc 0\"],\n \"limit\":\"500\",\n \"query_timezone\":\"America/Los_Angeles\"\n}\n```\n\nWhen using the Ruby SDK this would be passed as a Ruby hash like:\n```\n{\n :model=>\"thelook\",\n :view=>\"inventory_items\",\n :fields=>\n [\"category.name\",\n \"inventory_items.days_in_inventory_tier\",\n \"products.count\"],\n :filters=>{:\"category.name\"=>\"socks\"},\n :sorts=>[\"products.count desc 0\"],\n :limit=>\"500\",\n :query_timezone=>\"America/Los_Angeles\",\n}\n```\n\nThis will return the result of running the query in the format specified by the 'result_format' parameter.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", @@ -1296,7 +1314,9 @@ }, "/queries/models/{model_name}/views/{view_name}/run/{result_format}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_url_encoded_query", "summary": "Run Url Encoded Query", "description": "### Run an URL encoded query.\n\nThis requires the caller to encode the specifiers for the query into the URL query part using\nLooker-specific syntax as explained below.\n\nGenerally, you would want to use one of the methods that takes the parameters as json in the POST body\nfor creating and/or running queries. This method exists for cases where one really needs to encode the\nparameters into the URL of a single 'GET' request. This matches the way that the Looker UI formats\n'explore' URLs etc.\n\nThe parameters here are very similar to the json body formatting except that the filter syntax is\ntricky. Unfortunately, this format makes this method not currently callable via the 'Try it out!' button\nin this documentation page. But, this is callable when creating URLs manually or when using the Looker SDK.\n\nHere is an example inline query URL:\n\n```\nhttps://looker.mycompany.com:19999/api/3.0/queries/models/thelook/views/inventory_items/run/json?fields=category.name,inventory_items.days_in_inventory_tier,products.count&f[category.name]=socks&sorts=products.count+desc+0&limit=500&query_timezone=America/Los_Angeles\n```\n\nWhen invoking this endpoint with the Ruby SDK, pass the query parameter parts as a hash. The hash to match the above would look like:\n\n```ruby\nquery_params =\n{\n :fields => \"category.name,inventory_items.days_in_inventory_tier,products.count\",\n :\"f[category.name]\" => \"socks\",\n :sorts => \"products.count desc 0\",\n :limit => \"500\",\n :query_timezone => \"America/Los_Angeles\"\n}\nresponse = ruby_sdk.run_url_encoded_query('thelook','inventory_items','json', query_params)\n\n```\n\nAgain, it is generally easier to use the variant of this method that passes the full query in the POST body.\nThis method is available for cases where other alternatives won't fit the need.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", @@ -1462,7 +1482,9 @@ }, "/login": { "post": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "login", "summary": "Login", "description": "### Present client credentials to obtain an authorization token\n\nLooker API implements the OAuth2 [Resource Owner Password Credentials Grant](https://looker.com/docs/r/api/outh2_resource_owner_pc) pattern.\nThe client credentials required for this login must be obtained by creating an API3 key on a user account\nin the Looker Admin console. The API3 key consists of a public `client_id` and a private `client_secret`.\n\nThe access token returned by `login` must be used in the HTTP Authorization header of subsequent\nAPI requests, like this:\n```\nAuthorization: token 4QDkCyCtZzYgj4C2p2cj3csJH7zqS5RzKs2kTnG4\n```\nReplace \"4QDkCy...\" with the `access_token` value returned by `login`.\nThe word `token` is a string literal and must be included exactly as shown.\n\nThis function can accept `client_id` and `client_secret` parameters as URL query params or as www-form-urlencoded params in the body of the HTTP request. Since there is a small risk that URL parameters may be visible to intermediate nodes on the network route (proxies, routers, etc), passing credentials in the body of the request is considered more secure than URL params.\n\nExample of passing credentials in the HTTP request body:\n````\nPOST HTTP /login\nContent-Type: application/x-www-form-urlencoded\n\nclient_id=CGc9B7v7J48dQSJvxxx&client_secret=nNVS9cSS3xNpSC9JdsBvvvvv\n````\n\n### Best Practice:\nAlways pass credentials in body params. Pass credentials in URL query params **only** when you cannot pass body params due to application, tool, or other limitations.\n\nFor more information and detailed examples of Looker API authorization, see [How to Authenticate to Looker API3](https://github.com/looker/looker-sdk-ruby/blob/master/authentication.md).\n", @@ -1524,7 +1546,9 @@ }, "/login/{user_id}": { "post": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "login_user", "summary": "Login user", "description": "### Create an access token that runs as a given user.\n\nThis can only be called by an authenticated admin user. It allows that admin to generate a new\nauthentication token for the user with the given user id. That token can then be used for subsequent\nAPI calls - which are then performed *as* that target user.\n\nThe target user does *not* need to have a pre-existing API client_id/client_secret pair. And, no such\ncredentials are created by this call.\n\nThis allows for building systems where api user authentication for an arbitrary number of users is done\noutside of Looker and funneled through a single 'service account' with admin permissions. Note that a\nnew access token is generated on each call. If target users are going to be making numerous API\ncalls in a short period then it is wise to cache this authentication token rather than call this before\neach of those API calls.\n\nSee 'login' for more detail on the access token and how to use it.\n", @@ -1587,7 +1611,9 @@ }, "/logout": { "delete": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "logout", "summary": "Logout", "description": "### Logout of the API and invalidate the current access token.\n", @@ -1629,7 +1655,9 @@ }, "/backup_configuration": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "backup_configuration", "summary": "Get Backup Configuration", "description": "### WARNING: The Looker internal database backup function has been deprecated.\n", @@ -1670,7 +1698,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_backup_configuration", "summary": "Update Backup Configuration", "description": "### WARNING: The Looker internal database backup function has been deprecated.\n", @@ -1734,7 +1764,9 @@ }, "/cloud_storage": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "cloud_storage_configuration", "summary": "Get Cloud Storage", "description": "Get the current Cloud Storage Configuration.\n", @@ -1774,7 +1806,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_cloud_storage_configuration", "summary": "Update Cloud Storage", "description": "Update the current Cloud Storage Configuration.\n", @@ -1837,7 +1871,9 @@ }, "/color_collections": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "all_color_collections", "summary": "Get all Color Collections", "description": "### Get an array of all existing Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1891,7 +1927,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "create_color_collection", "summary": "Create ColorCollection", "description": "### Create a custom color collection with the specified information\n\nCreates a new custom color collection object, returning the details, including the created id.\n\n**Update** an existing color collection with [Update Color Collection](#!/ColorCollection/update_color_collection)\n\n**Permanently delete** an existing custom color collection with [Delete Color Collection](#!/ColorCollection/delete_color_collection)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1984,7 +2022,9 @@ }, "/color_collections/custom": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collections_custom", "summary": "Get all Custom Color Collections", "description": "### Get an array of all existing **Custom** Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2040,7 +2080,9 @@ }, "/color_collections/standard": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collections_standard", "summary": "Get all Standard Color Collections", "description": "### Get an array of all existing **Standard** Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2096,7 +2138,9 @@ }, "/color_collections/default": { "put": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "set_default_color_collection", "summary": "Set Default Color Collection", "description": "### Set the global default Color Collection by ID\n\nReturns the new specified default Color Collection object.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2167,7 +2211,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "default_color_collection", "summary": "Get Default Color Collection", "description": "### Get the default color collection\n\nUse this to retrieve the default Color Collection.\n\nSet the default color collection with [ColorCollection](#!/ColorCollection/set_default_color_collection)\n", @@ -2209,7 +2255,9 @@ }, "/color_collections/{collection_id}": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collection", "summary": "Get Color Collection by ID", "description": "### Get a Color Collection by ID\n\nUse this to retrieve a specific Color Collection.\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2269,7 +2317,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "update_color_collection", "summary": "Update Custom Color collection", "description": "### Update a custom color collection by id.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2361,7 +2411,9 @@ } }, "delete": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "delete_color_collection", "summary": "Delete ColorCollection", "description": "### Delete a custom color collection by id\n\nThis operation permanently deletes the identified **Custom** color collection.\n\n**Standard** color collections cannot be deleted\n\nBecause multiple color collections can have the same label, they must be deleted by ID, not name.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2437,7 +2489,9 @@ }, "/content_favorite/search": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "search_content_favorites", "summary": "Search Favorite Contents", "description": "### Search Favorite Content\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -2581,7 +2635,9 @@ }, "/content_favorite/{content_favorite_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_favorite", "summary": "Get Favorite Content", "description": "### Get favorite content by its id", @@ -2642,7 +2698,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "delete_content_favorite", "summary": "Delete Favorite Content", "description": "### Delete favorite content", @@ -2706,7 +2764,9 @@ }, "/content_favorite": { "post": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "create_content_favorite", "summary": "Create Favorite Content", "description": "### Create favorite content", @@ -2789,7 +2849,9 @@ }, "/content_metadata": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "all_content_metadatas", "summary": "Get All Content Metadatas", "description": "### Get information about all content metadata in a space.\n", @@ -2855,7 +2917,9 @@ }, "/content_metadata/{content_metadata_id}": { "patch": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "update_content_metadata", "summary": "Update Content Metadata", "description": "### Move a piece of content.\n", @@ -2938,7 +3002,9 @@ } }, "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_metadata", "summary": "Get Content Metadata", "description": "### Get information about an individual content metadata record.\n", @@ -3001,7 +3067,9 @@ }, "/content_metadata_access": { "post": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "create_content_metadata_access", "summary": "Create Content Metadata Access", "description": "### Create content metadata access.\n", @@ -3094,7 +3162,9 @@ } }, "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "all_content_metadata_accesses", "summary": "Get All Content Metadata Accesses", "description": "### All content metadata access records for a content metadata item.\n", @@ -3160,7 +3230,9 @@ }, "/content_metadata_access/{content_metadata_access_id}": { "put": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "update_content_metadata_access", "summary": "Update Content Metadata Access", "description": "### Update type of access for content metadata.\n", @@ -3243,7 +3315,9 @@ } }, "delete": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "delete_content_metadata_access", "summary": "Delete Content Metadata Access", "description": "### Remove content metadata access.\n", @@ -3307,7 +3381,9 @@ }, "/content_thumbnail/{type}/{resource_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_thumbnail", "summary": "Get Content Thumbnail", "description": "### Get an image representing the contents of a dashboard or look.\n\nThe returned thumbnail is an abstract representation of the contents of a dashbord or look and does not\nreflect the actual data displayed in the respective visualizations.\n", @@ -3422,7 +3498,9 @@ }, "/content_validation": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_validation", "summary": "Validate Content", "description": "### Validate All Content\n\nPerforms validation of all looks and dashboards\nReturns a list of errors found as well as metadata about the content validation run.\n", @@ -3495,7 +3573,9 @@ }, "/content_view/search": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "search_content_views", "summary": "Search Content Views", "description": "### Search Content Views\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -3665,7 +3745,9 @@ }, "/custom_welcome_email": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "custom_welcome_email", "summary": "Get Custom Welcome Email", "description": "### Get the current status and content of custom welcome emails\n", @@ -3705,7 +3787,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_custom_welcome_email", "summary": "Update Custom Welcome Email Content", "description": "Update custom welcome email setting and values. Optionally send a test email with the new content to the currently logged in user.\n", @@ -3789,7 +3873,9 @@ }, "/custom_welcome_email_test": { "put": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_custom_welcome_email_test", "summary": "Send a test welcome email to the currently logged in user with the supplied content ", "description": "Requests to this endpoint will send a welcome email with the custom content provided in the body to the currently logged in user.\n", @@ -3862,7 +3948,9 @@ }, "/dashboards": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "all_dashboards", "summary": "Get All Dashboards", "description": "### Get information about all active dashboards.\n\nReturns an array of **abbreviated dashboard objects**. Dashboards marked as deleted are excluded from this list.\n\nGet the **full details** of a specific dashboard by id with [dashboard()](#!/Dashboard/dashboard)\n\nFind **deleted dashboards** with [search_dashboards()](#!/Dashboard/search_dashboards)\n", @@ -3916,7 +4004,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard", "summary": "Create Dashboard", "description": "### Create a new dashboard\n\nCreates a new dashboard object and returns the details of the newly created dashboard.\n\n`Title`, `user_id`, and `space_id` are all required fields.\n`Space_id` and `user_id` must contain the id of an existing space or user, respectively.\nA dashboard's `title` must be unique within the space in which it resides.\n\nIf you receive a 422 error response when creating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n\nYou can **update** an existing dashboard with [update_dashboard()](#!/Dashboard/update_dashboard)\n\nYou can **permanently delete** an existing dashboard with [delete_dashboard()](#!/Dashboard/delete_dashboard)\n", @@ -3999,7 +4089,9 @@ }, "/dashboards/search": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "search_dashboards", "summary": "Search Dashboards", "description": "### Search Dashboards\n\nReturns an **array of dashboard objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nThe parameters `limit`, and `offset` are recommended for fetching results in page-size chunks.\n\nGet a **single dashboard** by id with [dashboard()](#!/Dashboard/dashboard)\n", @@ -4224,7 +4316,9 @@ }, "/dashboards/{lookml_dashboard_id}/import/{space_id}": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "import_lookml_dashboard", "summary": "Import LookML Dashboard", "description": "### Import a LookML dashboard to a space as a UDD\nCreates a UDD (a dashboard which exists in the Looker database rather than as a LookML file) from the LookML dashboard\nand places it in the space specified. The created UDD will have a lookml_link_id which links to the original LookML dashboard.\n\nTo give the imported dashboard specify a (e.g. title: \"my title\") in the body of your request, otherwise the imported\ndashboard will have the same title as the original LookML dashboard.\n\nFor this operation to succeed the user must have permission to see the LookML dashboard in question, and have permission to\ncreate content in the space the dashboard is being imported to.\n\n**Sync** a linked UDD with [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard)\n**Unlink** a linked UDD by setting lookml_link_id to null with [update_dashboard()](#!/Dashboard/update_dashboard)\n", @@ -4346,7 +4440,9 @@ }, "/dashboards/{lookml_dashboard_id}/sync": { "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "sync_lookml_dashboard", "summary": "Sync LookML Dashboard", "description": "### Update all linked dashboards to match the specified LookML dashboard.\n\nAny UDD (a dashboard which exists in the Looker database rather than as a LookML file) which has a `lookml_link_id`\nproperty value referring to a LookML dashboard's id (model::dashboardname) will be updated so that it matches the current state of the LookML dashboard.\n\nFor this operation to succeed the user must have permission to view the LookML dashboard, and only linked dashboards\nthat the user has permission to update will be synced.\n\nTo **link** or **unlink** a UDD set the `lookml_link_id` property with [update_dashboard()](#!/Dashboard/update_dashboard)\n", @@ -4443,7 +4539,9 @@ }, "/dashboards/{dashboard_id}": { "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard", "summary": "Delete Dashboard", "description": "### Delete the dashboard with the specified id\n\nPermanently **deletes** a dashboard. (The dashboard cannot be recovered after this operation.)\n\n\"Soft\" delete or hide a dashboard by setting its `deleted` status to `True` with [update_dashboard()](#!/Dashboard/update_dashboard).\n\nNote: When a dashboard is deleted in the UI, it is soft deleted. Use this API call to permanently remove it, if desired.\n", @@ -4514,7 +4612,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard", "summary": "Update Dashboard", "description": "### Update a dashboard\n\nYou can use this function to change the string and integer properties of\na dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components\ncannot be modified by this function - use the update functions for the respective\nnested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter)\nto modify nested objects referenced by a dashboard.\n\nIf you receive a 422 error response when updating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n", @@ -4606,7 +4706,9 @@ } }, "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard", "summary": "Get Dashboard", "description": "### Get information about a dashboard\n\nReturns the full details of the identified dashboard object\n\nGet a **summary list** of all active dashboards with [all_dashboards()](#!/Dashboard/all_dashboards)\n\nYou can **Search** for dashboards with [search_dashboards()](#!/Dashboard/search_dashboards)\n", @@ -4668,7 +4770,9 @@ }, "/dashboards/aggregate_table_lookml/{dashboard_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_aggregate_table_lookml", "summary": "Get Aggregate Table LookML for a dashboard", "description": "### Get Aggregate Table LookML for Each Query on a Dahboard\n\nReturns a JSON object that contains the dashboard id and Aggregate Table lookml\n\n", @@ -4721,7 +4825,9 @@ }, "/dashboards/lookml/{dashboard_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_lookml", "summary": "Get lookml of a UDD", "description": "### Get lookml of a UDD\n\nReturns a JSON object that contains the dashboard id and the full lookml\n\n", @@ -4774,7 +4880,9 @@ }, "/dashboard_elements/search": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "search_dashboard_elements", "summary": "Search Dashboard Elements", "description": "### Search Dashboard Elements\n\nReturns an **array of DashboardElement objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -4886,7 +4994,9 @@ }, "/dashboard_elements/{dashboard_element_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_element", "summary": "Get DashboardElement", "description": "### Get information about the dashboard element with a specific id.", @@ -4946,7 +5056,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_element", "summary": "Delete DashboardElement", "description": "### Delete a dashboard element with a specific id.", @@ -5007,7 +5119,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_element", "summary": "Update DashboardElement", "description": "### Update the dashboard element with a specific id.", @@ -5100,7 +5214,9 @@ }, "/dashboards/{dashboard_id}/dashboard_elements": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_elements", "summary": "Get All DashboardElements", "description": "### Get information about all the dashboard elements on a dashboard with a specific id.", @@ -5165,7 +5281,9 @@ }, "/dashboard_elements": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_element", "summary": "Create DashboardElement", "description": "### Create a dashboard element on the dashboard with a specific id.", @@ -5259,7 +5377,9 @@ }, "/dashboard_filters/{dashboard_filter_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_filter", "summary": "Get Dashboard Filter", "description": "### Get information about the dashboard filters with a specific id.", @@ -5319,7 +5439,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_filter", "summary": "Delete Dashboard Filter", "description": "### Delete a dashboard filter with a specific id.", @@ -5380,7 +5502,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_filter", "summary": "Update Dashboard Filter", "description": "### Update the dashboard filter with a specific id.", @@ -5473,7 +5597,9 @@ }, "/dashboards/{dashboard_id}/dashboard_filters": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_filters", "summary": "Get All Dashboard Filters", "description": "### Get information about all the dashboard filters on a dashboard with a specific id.", @@ -5538,7 +5664,9 @@ }, "/dashboard_filters": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_filter", "summary": "Create Dashboard Filter", "description": "### Create a dashboard filter on the dashboard with a specific id.", @@ -5632,7 +5760,9 @@ }, "/dashboard_layout_components/{dashboard_layout_component_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout_component", "summary": "Get DashboardLayoutComponent", "description": "### Get information about the dashboard elements with a specific id.", @@ -5692,7 +5822,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_layout_component", "summary": "Update DashboardLayoutComponent", "description": "### Update the dashboard element with a specific id.", @@ -5785,7 +5917,9 @@ }, "/dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout_dashboard_layout_components", "summary": "Get All DashboardLayoutComponents", "description": "### Get information about all the dashboard layout components for a dashboard layout with a specific id.", @@ -5850,7 +5984,9 @@ }, "/dashboard_layouts/{dashboard_layout_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout", "summary": "Get DashboardLayout", "description": "### Get information about the dashboard layouts with a specific id.", @@ -5910,7 +6046,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_layout", "summary": "Delete DashboardLayout", "description": "### Delete a dashboard layout with a specific id.", @@ -5981,7 +6119,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_layout", "summary": "Update DashboardLayout", "description": "### Update the dashboard layout with a specific id.", @@ -6074,7 +6214,9 @@ }, "/dashboards/{dashboard_id}/dashboard_layouts": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_layouts", "summary": "Get All DashboardLayouts", "description": "### Get information about all the dashboard elements on a dashboard with a specific id.", @@ -6139,7 +6281,9 @@ }, "/dashboard_layouts": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_layout", "summary": "Create DashboardLayout", "description": "### Create a dashboard layout on the dashboard with a specific id.", @@ -6233,7 +6377,9 @@ }, "/data_actions": { "post": { - "tags": ["DataAction"], + "tags": [ + "DataAction" + ], "operationId": "perform_data_action", "summary": "Send a Data Action", "description": "Perform a data action. The data action object can be obtained from query results, and used to perform an arbitrary action.", @@ -6286,7 +6432,9 @@ }, "/data_actions/form": { "post": { - "tags": ["DataAction"], + "tags": [ + "DataAction" + ], "operationId": "fetch_remote_data_action_form", "summary": "Fetch Remote Data Action Form", "description": "For some data actions, the remote server may supply a form requesting further user input. This endpoint takes a data action, asks the remote server to generate a form for it, and returns that form to you for presentation to the user.", @@ -6352,7 +6500,9 @@ }, "/datagroups": { "get": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "all_datagroups", "summary": "Get All Datagroups", "description": "### Get information about all datagroups.\n", @@ -6397,7 +6547,9 @@ }, "/datagroups/{datagroup_id}": { "get": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "datagroup", "summary": "Get Datagroup", "description": "### Get information about a datagroup.\n", @@ -6448,7 +6600,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "update_datagroup", "summary": "Update Datagroup", "description": "### Update a datagroup using the specified params.\n", @@ -6542,7 +6696,9 @@ }, "/connections": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_connections", "summary": "Get All Connections", "description": "### Get information about all connections.\n", @@ -6596,7 +6752,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_connection", "summary": "Create Connection", "description": "### Create a connection using the specified configuration.\n", @@ -6679,7 +6837,9 @@ }, "/connections/{connection_name}": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "connection", "summary": "Get Connection", "description": "### Get information about a connection.\n", @@ -6739,7 +6899,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "update_connection", "summary": "Update Connection", "description": "### Update a connection using the specified configuration.\n", @@ -6821,7 +6983,9 @@ } }, "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_connection", "summary": "Delete Connection", "description": "### Delete a connection.\n", @@ -6884,7 +7048,9 @@ }, "/connections/{connection_name}/connection_override/{override_context}": { "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_connection_override", "summary": "Delete Connection Override", "description": "### Delete a connection override.\n", @@ -6966,7 +7132,9 @@ }, "/connections/{connection_name}/test": { "put": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_connection", "summary": "Test Connection", "description": "### Test an existing connection.\n\nNote that a connection's 'dialect' property has a 'connection_tests' property that lists the\nspecific types of tests that the connection supports.\n\nThis API is rate limited.\n\nUnsupported tests in the request will be ignored.\n", @@ -7057,7 +7225,9 @@ }, "/connections/test": { "put": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_connection_config", "summary": "Test Connection Configuration", "description": "### Test a connection configuration.\n\nNote that a connection's 'dialect' property has a 'connection_tests' property that lists the\nspecific types of tests that the connection supports.\n\nThis API is rate limited.\n\nUnsupported tests in the request will be ignored.\n", @@ -7140,7 +7310,9 @@ }, "/derived_table/graph/model/{model}": { "get": { - "tags": ["DerivedTable"], + "tags": [ + "DerivedTable" + ], "operationId": "graph_derived_tables_for_model", "summary": "Get Derived Table graph for model", "description": "### Discover information about derived tables\n", @@ -7211,7 +7383,9 @@ }, "/derived_table/graph/view/{view}": { "get": { - "tags": ["DerivedTable"], + "tags": [ + "DerivedTable" + ], "operationId": "graph_derived_tables_for_view", "summary": "Get subgraph of derived table and dependencies", "description": "### Get the subgraph representing this derived table and its dependencies.\n", @@ -7282,7 +7456,9 @@ }, "/dialect_info": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_dialect_infos", "summary": "Get All Dialect Infos", "description": "### Get information about all dialects.\n", @@ -7338,7 +7514,9 @@ }, "/digest_emails_enabled": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "digest_emails_enabled", "summary": "Get Digest_emails", "description": "### Retrieve the value for whether or not digest emails is enabled\n", @@ -7378,7 +7556,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_digest_emails_enabled", "summary": "Update Digest_emails", "description": "### Update the setting for enabling/disabling digest emails\n", @@ -7451,7 +7631,9 @@ }, "/digest_email_send": { "post": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "create_digest_email_send", "summary": "Deliver digest email contents", "description": "### Trigger the generation of digest email records and send them to Looker's internal system. This does not send\nany actual emails, it generates records containing content which may be of interest for users who have become inactive.\nEmails will be sent at a later time from Looker's internal system if the Digest Emails feature is enabled in settings.", @@ -7504,7 +7686,9 @@ }, "/embed/sso_url": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_sso_embed_url", "summary": "Create SSO Embed Url", "description": "### Create SSO Embed URL\n\nCreates an SSO embed URL and cryptographically signs it with an embed secret.\nThis signed URL can then be used to instantiate a Looker embed session in a PBL web application.\nDo not make any modifications to this URL - any change may invalidate the signature and\ncause the URL to fail to load a Looker embed session.\n\nA signed SSO embed URL can only be used once. After it has been used to request a page from the\nLooker server, the URL is invalid. Future requests using the same URL will fail. This is to prevent\n'replay attacks'.\n\nThe `target_url` property must be a complete URL of a Looker UI page - scheme, hostname, path and query params.\nTo load a dashboard with id 56 and with a filter of `Date=1 years`, the looker URL would look like `https:/myname.looker.com/dashboards/56?Date=1%20years`.\nThe best way to obtain this target_url is to navigate to the desired Looker page in your web browser,\ncopy the URL shown in the browser address bar and paste it into the `target_url` property as a quoted string value in this API request.\n\nPermissions for the embed user are defined by the groups in which the embed user is a member (group_ids property)\nand the lists of models and permissions assigned to the embed user.\nAt a minimum, you must provide values for either the group_ids property, or both the models and permissions properties.\nThese properties are additive; an embed user can be a member of certain groups AND be granted access to models and permissions.\n\nThe embed user's access is the union of permissions granted by the group_ids, models, and permissions properties.\n\nThis function does not strictly require all group_ids, user attribute names, or model names to exist at the moment the\nSSO embed url is created. Unknown group_id, user attribute names or model names will be passed through to the output URL.\nTo diagnose potential problems with an SSO embed URL, you can copy the signed URL into the Embed URI Validator text box in `/admin/embed`.\n\nThe `secret_id` parameter is optional. If specified, its value must be the id of an active secret defined in the Looker instance.\nif not specified, the URL will be signed using the newest active secret defined in the Looker instance.\n\n#### Security Note\nProtect this signed URL as you would an access token or password credentials - do not write\nit to disk, do not pass it to a third party, and only pass it through a secure HTTPS\nencrypted transport.\n", @@ -7587,7 +7771,9 @@ }, "/projects/{project_id}/git_branches": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_git_branches", "summary": "Get All Git Branches", "description": "### Get All Git Branches\n\nReturns a list of git branches in the project repository\n", @@ -7643,7 +7829,9 @@ }, "/projects/{project_id}/git_branch": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "git_branch", "summary": "Get Active Git Branch", "description": "### Get the Current Git Branch\n\nReturns the git branch currently checked out in the given project repository\n", @@ -7694,7 +7882,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_git_branch", "summary": "Checkout New Git Branch", "description": "### Create and Checkout a Git Branch\n\nCreates and checks out a new branch in the given project repository\nOnly allowed in development mode\n - Call `update_session` to select the 'dev' workspace.\n\nOptionally specify a branch name, tag name or commit SHA as the start point in the ref field.\n If no ref is specified, HEAD of the current branch will be used as the start point for the new branch.\n\n", @@ -7786,7 +7976,9 @@ } }, "put": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_git_branch", "summary": "Update Project Git Branch", "description": "### Checkout and/or reset --hard an existing Git Branch\n\nOnly allowed in development mode\n - Call `update_session` to select the 'dev' workspace.\n\nCheckout an existing branch if name field is different from the name of the currently checked out branch.\n\nOptionally specify a branch name, tag name or commit SHA to which the branch should be reset.\n **DANGER** hard reset will be force pushed to the remote. Unsaved changes and commits may be permanently lost.\n\n", @@ -7870,7 +8062,9 @@ }, "/projects/{project_id}/git_branch/{branch_name}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "find_git_branch", "summary": "Find a Git Branch", "description": "### Get the specified Git Branch\n\nReturns the git branch specified in branch_name path param if it exists in the given project repository\n", @@ -7930,7 +8124,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "delete_git_branch", "summary": "Delete a Git Branch", "description": "### Delete the specified Git Branch\n\nDelete git branch specified in branch_name path param from local and remote of specified project repository\n", @@ -8002,7 +8198,9 @@ }, "/groups": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_groups", "summary": "Get All Groups", "description": "### Get information about all groups.\n", @@ -8119,7 +8317,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "create_group", "summary": "Create Group", "description": "### Creates a new group (admin only).\n", @@ -8213,7 +8413,9 @@ }, "/groups/search": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "search_groups", "summary": "Search Groups", "description": "### Search groups\n\nReturns all group records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -8353,7 +8555,9 @@ }, "/groups/{group_id}": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "group", "summary": "Get Group", "description": "### Get information about a group.\n", @@ -8414,7 +8618,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "update_group", "summary": "Update Group", "description": "### Updates the a group (admin only).", @@ -8506,7 +8712,9 @@ } }, "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group", "summary": "Delete Group", "description": "### Deletes a group (admin only).\n", @@ -8580,7 +8788,9 @@ }, "/groups/{group_id}/groups": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_group_groups", "summary": "Get All Groups in Group", "description": "### Get information about all the groups in a group\n", @@ -8644,7 +8854,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "add_group_group", "summary": "Add a Group to Group", "description": "### Adds a new group to a group.\n", @@ -8719,7 +8931,9 @@ }, "/groups/{group_id}/users": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_group_users", "summary": "Get All Users in Group", "description": "### Get information about all the users directly included in a group.\n", @@ -8812,7 +9026,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "add_group_user", "summary": "Add a User to Group", "description": "### Adds a new user to a group.\n", @@ -8887,7 +9103,9 @@ }, "/groups/{group_id}/users/{user_id}": { "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group_user", "summary": "Remove a User from Group", "description": "### Removes a user from a group.\n", @@ -8954,7 +9172,9 @@ }, "/groups/{group_id}/groups/{deleting_group_id}": { "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group_from_group", "summary": "Deletes a Group from Group", "description": "### Removes a group from a group.\n", @@ -9021,7 +9241,9 @@ }, "/groups/{group_id}/attribute_values/{user_attribute_id}": { "patch": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "update_user_attribute_group_value", "summary": "Set User Attribute Group Value", "description": "### Set the value of a user attribute for a group.\n\nFor information about how user attribute values are calculated, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values).\n", @@ -9104,7 +9326,9 @@ } }, "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_user_attribute_group_value", "summary": "Delete User Attribute Group Value", "description": "### Remove a user attribute value from a group.\n", @@ -9161,7 +9385,9 @@ }, "/homepages": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "all_homepages", "summary": "Get All Homepages", "description": "### Get information about all homepages.\n", @@ -9216,7 +9442,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "create_homepage", "summary": "Create Homepage", "description": "### Create a new homepage.\n", @@ -9311,7 +9539,9 @@ }, "/homepages/search": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "search_homepages", "summary": "Search Homepages", "description": "### Search Homepages\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -9480,7 +9710,9 @@ }, "/homepages/{homepage_id}": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "homepage", "summary": "Get Homepage", "description": "### Get information about a homepage.\n", @@ -9542,7 +9774,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "update_homepage", "summary": "Update Homepage", "description": "### Update a homepage definition.\n", @@ -9635,7 +9869,9 @@ } }, "delete": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "delete_homepage", "summary": "Delete Homepage", "description": "### Delete a homepage.\n", @@ -9700,7 +9936,9 @@ }, "/homepage_items": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "all_homepage_items", "summary": "Get All Homepage Items", "description": "### Get information about all homepage items.\n", @@ -9773,7 +10011,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "create_homepage_item", "summary": "Create Homepage Item", "description": "### Create a new homepage item.\n", @@ -9868,7 +10108,9 @@ }, "/homepage_items/{homepage_item_id}": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "homepage_item", "summary": "Get Homepage Item", "description": "### Get information about a homepage item.\n", @@ -9930,7 +10172,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "update_homepage_item", "summary": "Update Homepage Item", "description": "### Update a homepage item definition.\n", @@ -10023,7 +10267,9 @@ } }, "delete": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "delete_homepage_item", "summary": "Delete Homepage Item", "description": "### Delete a homepage item.\n", @@ -10088,7 +10334,9 @@ }, "/homepage_sections": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "all_homepage_sections", "summary": "Get All Homepage sections", "description": "### Get information about all homepage sections.\n", @@ -10152,7 +10400,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "create_homepage_section", "summary": "Create Homepage section", "description": "### Create a new homepage section.\n", @@ -10247,7 +10497,9 @@ }, "/homepage_sections/{homepage_section_id}": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "homepage_section", "summary": "Get Homepage section", "description": "### Get information about a homepage section.\n", @@ -10309,7 +10561,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "update_homepage_section", "summary": "Update Homepage section", "description": "### Update a homepage section definition.\n", @@ -10402,7 +10656,9 @@ } }, "delete": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "delete_homepage_section", "summary": "Delete Homepage section", "description": "### Delete a homepage section.\n", @@ -10467,7 +10723,9 @@ }, "/primary_homepage_sections": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "all_primary_homepage_sections", "summary": "Get All Primary homepage sections", "description": "### Get information about the primary homepage's sections.\n", @@ -10523,7 +10781,9 @@ }, "/integration_hubs": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "all_integration_hubs", "summary": "Get All Integration Hubs", "description": "### Get information about all Integration Hubs.\n", @@ -10577,7 +10837,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "create_integration_hub", "summary": "Create Integration Hub", "description": "### Create a new Integration Hub.\n\nThis API is rate limited to prevent it from being used for SSRF attacks\n", @@ -10672,7 +10934,9 @@ }, "/integration_hubs/{integration_hub_id}": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "integration_hub", "summary": "Get Integration Hub", "description": "### Get information about a Integration Hub.\n", @@ -10733,7 +10997,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "update_integration_hub", "summary": "Update Integration Hub", "description": "### Update a Integration Hub definition.\n\nThis API is rate limited to prevent it from being used for SSRF attacks\n", @@ -10826,7 +11092,9 @@ } }, "delete": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "delete_integration_hub", "summary": "Delete Integration Hub", "description": "### Delete a Integration Hub.\n", @@ -10890,7 +11158,9 @@ }, "/integration_hubs/{integration_hub_id}/accept_legal_agreement": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "accept_integration_hub_legal_agreement", "summary": "Accept Integration Hub Legal Agreement", "description": "Accepts the legal agreement for a given integration hub. This only works for integration hubs that have legal_agreement_required set to true and legal_agreement_signed set to false.", @@ -10954,7 +11224,9 @@ }, "/integrations": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "all_integrations", "summary": "Get All Integrations", "description": "### Get information about all Integrations.\n", @@ -11019,7 +11291,9 @@ }, "/integrations/{integration_id}": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "integration", "summary": "Get Integration", "description": "### Get information about a Integration.\n", @@ -11079,7 +11353,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "update_integration", "summary": "Update Integration", "description": "### Update parameters on a Integration.\n", @@ -11172,7 +11448,9 @@ }, "/integrations/{integration_id}/form": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "fetch_integration_form", "summary": "Fetch Remote Integration Form", "description": "Returns the Integration form for presentation to the user.", @@ -11249,7 +11527,9 @@ }, "/integrations/{integration_id}/test": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "test_integration", "summary": "Test integration", "description": "Tests the integration to make sure all the settings are working.", @@ -11312,7 +11592,9 @@ }, "/internal_help_resources_content": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "internal_help_resources_content", "summary": "Get Internal Help Resources Content", "description": "### Set the menu item name and content for internal help resources\n", @@ -11352,7 +11634,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_internal_help_resources_content", "summary": "Update internal help resources content", "description": "Update internal help resources content\n", @@ -11425,7 +11709,9 @@ }, "/internal_help_resources_enabled": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "internal_help_resources", "summary": "Get Internal Help Resources", "description": "### Get and set the options for internal help resources\n", @@ -11467,7 +11753,9 @@ }, "/internal_help_resources": { "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_internal_help_resources", "summary": "Update internal help resources configuration", "description": "Update internal help resources settings\n", @@ -11540,7 +11828,9 @@ }, "/ldap_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "ldap_config", "summary": "Get LDAP Configuration", "description": "### Get the LDAP configuration.\n\nLooker can be optionally configured to authenticate users against an Active Directory or other LDAP directory server.\nLDAP setup requires coordination with an administrator of that directory server.\n\nOnly Looker administrators can read and update the LDAP configuration.\n\nConfiguring LDAP impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single LDAP configuration. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nLDAP is enabled or disabled for Looker using the **enabled** field.\n\nLooker will never return an **auth_password** field. That value can be set, but never retrieved.\n\nSee the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information.\n", @@ -11570,7 +11860,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_ldap_config", "summary": "Update LDAP Configuration", "description": "### Update the LDAP configuration.\n\nConfiguring LDAP impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the LDAP configuration.\n\nLDAP is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any LDAP setting changes be tested using the APIs below before being set globally.\n\nSee the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information.\n", @@ -11633,7 +11925,9 @@ }, "/ldap_config/test_connection": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_connection", "summary": "Test LDAP Connection", "description": "### Test the connection settings for an LDAP configuration.\n\nThis tests that the connection is possible given a connection_host and connection_port.\n\n**connection_host** and **connection_port** are required. **connection_tls** is optional.\n\nExample:\n```json\n{\n \"connection_host\": \"ldap.example.com\",\n \"connection_port\": \"636\",\n \"connection_tls\": true\n}\n```\n\nNo authentication to the LDAP server is attempted.\n\nThe active LDAP settings are not modified.\n", @@ -11696,7 +11990,9 @@ }, "/ldap_config/test_auth": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_auth", "summary": "Test LDAP Auth", "description": "### Test the connection authentication settings for an LDAP configuration.\n\nThis tests that the connection is possible and that a 'server' account to be used by Looker can authenticate to the LDAP server given connection and authentication information.\n\n**connection_host**, **connection_port**, and **auth_username**, are required. **connection_tls** and **auth_password** are optional.\n\nExample:\n```json\n{\n \"connection_host\": \"ldap.example.com\",\n \"connection_port\": \"636\",\n \"connection_tls\": true,\n \"auth_username\": \"cn=looker,dc=example,dc=com\",\n \"auth_password\": \"secret\"\n}\n```\n\nLooker will never return an **auth_password**. If this request omits the **auth_password** field, then the **auth_password** value from the active config (if present) will be used for the test.\n\nThe active LDAP settings are not modified.\n\n", @@ -11759,7 +12055,9 @@ }, "/ldap_config/test_user_info": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_user_info", "summary": "Test LDAP User Info", "description": "### Test the user authentication settings for an LDAP configuration without authenticating the user.\n\nThis test will let you easily test the mapping for user properties and roles for any user without needing to authenticate as that user.\n\nThis test accepts a full LDAP configuration along with a username and attempts to find the full info for the user from the LDAP server without actually authenticating the user. So, user password is not required.The configuration is validated before attempting to contact the server.\n\n**test_ldap_user** is required.\n\nThe active LDAP settings are not modified.\n\n", @@ -11822,7 +12120,9 @@ }, "/ldap_config/test_user_auth": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_user_auth", "summary": "Test LDAP User Auth", "description": "### Test the user authentication settings for an LDAP configuration.\n\nThis test accepts a full LDAP configuration along with a username/password pair and attempts to authenticate the user with the LDAP server. The configuration is validated before attempting the authentication.\n\nLooker will never return an **auth_password**. If this request omits the **auth_password** field, then the **auth_password** value from the active config (if present) will be used for the test.\n\n**test_ldap_user** and **test_ldap_password** are required.\n\nThe active LDAP settings are not modified.\n\n", @@ -11885,7 +12185,9 @@ }, "/legacy_features": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_legacy_features", "summary": "Get All Legacy Features", "description": "### Get all legacy features.\n", @@ -11930,7 +12232,9 @@ }, "/legacy_features/{legacy_feature_id}": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "legacy_feature", "summary": "Get Legacy Feature", "description": "### Get information about the legacy feature with a specific id.\n", @@ -11982,7 +12286,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_legacy_feature", "summary": "Update Legacy Feature", "description": "### Update information about the legacy feature with a specific id.\n", @@ -12067,7 +12373,9 @@ }, "/locales": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_locales", "summary": "Get All Locales", "description": "### Get a list of locales that Looker supports.\n", @@ -12112,7 +12420,9 @@ }, "/looks": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "all_looks", "summary": "Get All Looks", "description": "### Get information about all active Looks\n\nReturns an array of **abbreviated Look objects** describing all the looks that the caller has access to. Soft-deleted Looks are **not** included.\n\nGet the **full details** of a specific look by id with [look(id)](#!/Look/look)\n\nFind **soft-deleted looks** with [search_looks()](#!/Look/search_looks)\n", @@ -12166,7 +12476,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "create_look", "summary": "Create Look", "description": "### Create a Look\n\nTo create a look to display query data, first create the query with [create_query()](#!/Query/create_query)\nthen assign the query's id to the `query_id` property in the call to `create_look()`.\n\nTo place the look into a particular space, assign the space's id to the `space_id` property\nin the call to `create_look()`.\n", @@ -12260,7 +12572,9 @@ }, "/looks/search": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "search_looks", "summary": "Search Looks", "description": "### Search Looks\n\nReturns an **array of Look objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nGet a **single look** by id with [look(id)](#!/Look/look)\n", @@ -12466,7 +12780,9 @@ }, "/looks/{look_id}": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "look", "summary": "Get Look", "description": "### Get a Look.\n\nReturns detailed information about a Look and its associated Query.\n\n", @@ -12527,7 +12843,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "update_look", "summary": "Update Look", "description": "### Modify a Look\n\nUse this function to modify parts of a look. Property values given in a call to `update_look` are\napplied to the existing look, so there's no need to include properties whose values are not changing.\nIt's best to specify only the properties you want to change and leave everything else out\nof your `update_look` call. **Look properties marked 'read-only' will be ignored.**\n\nWhen a user deletes a look in the Looker UI, the look data remains in the database but is\nmarked with a deleted flag (\"soft-deleted\"). Soft-deleted looks can be undeleted (by an admin)\nif the delete was in error.\n\nTo soft-delete a look via the API, use [update_look()](#!/Look/update_look) to change the look's `deleted` property to `true`.\nYou can undelete a look by calling `update_look` to change the look's `deleted` property to `false`.\n\nSoft-deleted looks are excluded from the results of [all_looks()](#!/Look/all_looks) and [search_looks()](#!/Look/search_looks), so they\nessentially disappear from view even though they still reside in the db.\nIn API 3.1 and later, you can pass `deleted: true` as a parameter to [search_looks()](#!/3.1/Look/search_looks) to list soft-deleted looks.\n\nNOTE: [delete_look()](#!/Look/delete_look) performs a \"hard delete\" - the look data is removed from the Looker\ndatabase and destroyed. There is no \"undo\" for `delete_look()`.\n", @@ -12619,7 +12937,9 @@ } }, "delete": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "delete_look", "summary": "Delete Look", "description": "### Permanently Delete a Look\n\nThis operation **permanently** removes a look from the Looker database.\n\nNOTE: There is no \"undo\" for this kind of delete.\n\nFor information about soft-delete (which can be undone) see [update_look()](#!/Look/update_look).\n", @@ -12683,7 +13003,9 @@ }, "/looks/{look_id}/run/{result_format}": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "run_look", "summary": "Run Look", "description": "### Run a Look\n\nRuns a given look's query and returns the results in the requested format.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", @@ -12952,7 +13274,9 @@ }, "/lookml_models": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "all_lookml_models", "summary": "Get All LookML Models", "description": "### Get information about all lookml models.\n", @@ -13006,7 +13330,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "create_lookml_model", "summary": "Create LookML Model", "description": "### Create a lookml model using the specified configuration.\n", @@ -13089,7 +13415,9 @@ }, "/lookml_models/{lookml_model_name}": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "lookml_model", "summary": "Get LookML Model", "description": "### Get information about a lookml model.\n", @@ -13149,7 +13477,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "update_lookml_model", "summary": "Update LookML Model", "description": "### Update a lookml model using the specified configuration.\n", @@ -13231,7 +13561,9 @@ } }, "delete": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "delete_lookml_model", "summary": "Delete LookML Model", "description": "### Delete a lookml model.\n", @@ -13294,7 +13626,9 @@ }, "/lookml_models/{lookml_model_name}/explores/{explore_name}": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "lookml_model_explore", "summary": "Get LookML Model Explore", "description": "### Get information about a lookml model explore.\n", @@ -13365,7 +13699,9 @@ }, "/merge_queries/{merge_query_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "merge_query", "summary": "Get Merge Query", "description": "### Get Merge Query\n\nReturns a merge query object given its id.\n", @@ -13427,7 +13763,9 @@ }, "/merge_queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_merge_query", "summary": "Create Merge Query", "description": "### Create Merge Query\n\nCreates a new merge query object.\n\nA merge query takes the results of one or more queries and combines (merges) the results\naccording to field mapping definitions. The result is similar to a SQL left outer join.\n\nA merge query can merge results of queries from different SQL databases.\n\nThe order that queries are defined in the source_queries array property is significant. The\nfirst query in the array defines the primary key into which the results of subsequent\nqueries will be merged.\n\nLike model/view query objects, merge queries are immutable and have structural identity - if\nyou make a request to create a new merge query that is identical to an existing merge query,\nthe existing merge query will be returned instead of creating a duplicate. Conversely, any\nchange to the contents of a merge query will produce a new object with a new id.\n", @@ -13521,7 +13859,9 @@ }, "/model_sets/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_model_sets", "summary": "Search Model Sets", "description": "### Search model sets\nReturns all model set records that match the given search criteria.\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -13652,7 +13992,9 @@ }, "/model_sets/{model_set_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "model_set", "summary": "Get Model Set", "description": "### Get information about the model set with a specific id.\n", @@ -13713,7 +14055,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_model_set", "summary": "Delete Model Set", "description": "### Delete the model set with a specific id.\n", @@ -13775,7 +14119,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_model_set", "summary": "Update Model Set", "description": "### Update information about the model set with a specific id.\n", @@ -13860,7 +14206,9 @@ }, "/model_sets": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_model_sets", "summary": "Get All Model Sets", "description": "### Get information about all model sets.\n", @@ -13904,7 +14252,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_model_set", "summary": "Create Model Set", "description": "### Create a model set with the specified information. Model sets are used by Roles.\n", @@ -13977,7 +14327,9 @@ }, "/oidc_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "oidc_config", "summary": "Get OIDC Configuration", "description": "### Get the OIDC configuration.\n\nLooker can be optionally configured to authenticate users against an OpenID Connect (OIDC)\nauthentication server. OIDC setup requires coordination with an administrator of that server.\n\nOnly Looker administrators can read and update the OIDC configuration.\n\nConfiguring OIDC impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single OIDC configuation. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nOIDC is enabled or disabled for Looker using the **enabled** field.\n", @@ -14007,7 +14359,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_oidc_config", "summary": "Update OIDC Configuration", "description": "### Update the OIDC configuration.\n\nConfiguring OIDC impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the OIDC configuration.\n\nOIDC is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any OIDC setting changes be tested using the APIs below before being set globally.\n", @@ -14070,7 +14424,9 @@ }, "/oidc_test_configs/{test_slug}": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "oidc_test_config", "summary": "Get OIDC Test Configuration", "description": "### Get a OIDC test configuration by test_slug.\n", @@ -14111,7 +14467,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_oidc_test_config", "summary": "Delete OIDC Test Configuration", "description": "### Delete a OIDC test configuration.\n", @@ -14164,7 +14522,9 @@ }, "/oidc_test_configs": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_oidc_test_config", "summary": "Create OIDC Test Configuration", "description": "### Create a OIDC test configuration.\n", @@ -14227,7 +14587,9 @@ }, "/password_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "password_config", "summary": "Get Password Config", "description": "### Get password config.\n", @@ -14267,7 +14629,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_password_config", "summary": "Update Password Config", "description": "### Update password config.\n", @@ -14340,7 +14704,9 @@ }, "/password_config/force_password_reset_at_next_login_for_all_users": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "force_password_reset_at_next_login_for_all_users", "summary": "Force password reset", "description": "### Force all credentials_email users to reset their login passwords upon their next login.\n", @@ -14402,7 +14768,9 @@ }, "/permissions": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_permissions", "summary": "Get All Permissions", "description": "### Get all supported permissions.\n", @@ -14447,7 +14815,9 @@ }, "/permission_sets/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_permission_sets", "summary": "Search Permission Sets", "description": "### Search permission sets\nReturns all permission set records that match the given search criteria.\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -14578,7 +14948,9 @@ }, "/permission_sets/{permission_set_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "permission_set", "summary": "Get Permission Set", "description": "### Get information about the permission set with a specific id.\n", @@ -14639,7 +15011,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_permission_set", "summary": "Delete Permission Set", "description": "### Delete the permission set with a specific id.\n", @@ -14711,7 +15085,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_permission_set", "summary": "Update Permission Set", "description": "### Update information about the permission set with a specific id.\n", @@ -14806,7 +15182,9 @@ }, "/permission_sets": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_permission_sets", "summary": "Get All Permission Sets", "description": "### Get information about all permission sets.\n", @@ -14860,7 +15238,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_permission_set", "summary": "Create Permission Set", "description": "### Create a permission set with the specified information. Permission sets are used by Roles.\n", @@ -14943,7 +15323,9 @@ }, "/projects/{project_id}/deploy_ref_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "deploy_ref_to_production", "summary": "Deploy Remote Branch or Ref to Production", "description": "### Deploy a Remote Branch or Ref to Production\n\nGit must have been configured and deploy permission required.\n\nDeploy is a one/two step process\n1. If this is the first deploy of this project, create the production project with git repository.\n2. Pull the branch or ref into the production project.\n\nCan only specify either a branch or a ref.\n\n", @@ -15037,7 +15419,9 @@ }, "/projects/{project_id}/deploy_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "deploy_to_production", "summary": "Deploy To Production", "description": "### Deploy LookML from this Development Mode Project to Production\n\nGit must have been configured, must be in dev mode and deploy permission required\n\nDeploy is a two / three step process:\n\n1. Push commits in current branch of dev mode project to the production branch (origin/master).\n Note a. This step is skipped in read-only projects.\n Note b. If this step is unsuccessful for any reason (e.g. rejected non-fastforward because production branch has\n commits not in current branch), subsequent steps will be skipped.\n2. If this is the first deploy of this project, create the production project with git repository.\n3. Pull the production branch into the production project.\n\n", @@ -15113,7 +15497,9 @@ }, "/projects/{project_id}/reset_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "reset_project_to_production", "summary": "Reset To Production", "description": "### Reset a project to the revision of the project that is in production.\n\n**DANGER** this will delete any changes that have not been pushed to a remote repository.\n", @@ -15189,7 +15575,9 @@ }, "/projects/{project_id}/reset_to_remote": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "reset_project_to_remote", "summary": "Reset To Remote", "description": "### Reset a project development branch to the revision of the project that is on the remote.\n\n**DANGER** this will delete any changes that have not been pushed to a remote repository.\n", @@ -15265,7 +15653,9 @@ }, "/projects": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_projects", "summary": "Get All Projects", "description": "### Get All Projects\n\nReturns all projects visible to the current user\n", @@ -15319,7 +15709,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_project", "summary": "Create Project", "description": "### Create A Project\n\ndev mode required.\n- Call `update_session` to select the 'dev' workspace.\n\n`name` is required.\n`git_remote_url` is not allowed. To configure Git for the newly created project, follow the instructions in `update_project`.\n\n", @@ -15402,7 +15794,9 @@ }, "/projects/{project_id}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project", "summary": "Get Project", "description": "### Get A Project\n\nReturns the project with the given project id\n", @@ -15462,7 +15856,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_project", "summary": "Update Project", "description": "### Update Project Configuration\n\nApply changes to a project's configuration.\n\n\n#### Configuring Git for a Project\n\nTo set up a Looker project with a remote git repository, follow these steps:\n\n1. Call `update_session` to select the 'dev' workspace.\n1. Call `create_git_deploy_key` to create a new deploy key for the project\n1. Copy the deploy key text into the remote git repository's ssh key configuration\n1. Call `update_project` to set project's `git_remote_url` ()and `git_service_name`, if necessary).\n\nWhen you modify a project's `git_remote_url`, Looker connects to the remote repository to fetch\nmetadata. The remote git repository MUST be configured with the Looker-generated deploy\nkey for this project prior to setting the project's `git_remote_url`.\n\nTo set up a Looker project with a git repository residing on the Looker server (a 'bare' git repo):\n\n1. Call `update_session` to select the 'dev' workspace.\n1. Call `update_project` setting `git_remote_url` to null and `git_service_name` to \"bare\".\n\n", @@ -15575,7 +15971,9 @@ }, "/projects/{project_id}/manifest": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "manifest", "summary": "Get Manifest", "description": "### Get A Projects Manifest object\n\nReturns the project with the given project id\n", @@ -15628,7 +16026,9 @@ }, "/projects/{project_id}/git/deploy_key": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_git_deploy_key", "summary": "Create Deploy Key", "description": "### Create Git Deploy Key\n\nCreate a public/private key pair for authenticating ssh git requests from Looker to a remote git repository\nfor a particular Looker project.\n\nReturns the public key of the generated ssh key pair.\n\nCopy this public key to your remote git repository's ssh keys configuration so that the remote git service can\nvalidate and accept git requests from the Looker server.\n", @@ -15709,7 +16109,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "git_deploy_key", "summary": "Git Deploy Key", "description": "### Git Deploy Key\n\nReturns the ssh public key previously created for a project's git repository.\n", @@ -15762,7 +16164,9 @@ }, "/projects/{project_id}/validate": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "validate_project", "summary": "Validate Project", "description": "### Validate Project\n\nPerforms lint validation of all lookml files in the project.\nReturns a list of errors found, if any.\n\nValidating the content of all the files in a project can be computationally intensive\nfor large projects. For best performance, call `validate_project(project_id)` only\nwhen you really want to recompute project validation. To quickly display the results of\nthe most recent project validation (without recomputing), use `project_validation_results(project_id)`\n", @@ -15842,7 +16246,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_validation_results", "summary": "Cached Project Validation Results", "description": "### Get Cached Project Validation Results\n\nReturns the cached results of a previous project validation calculation, if any.\nReturns http status 204 No Content if no validation results exist.\n\nValidating the content of all the files in a project can be computationally intensive\nfor large projects. Use this API to simply fetch the results of the most recent\nproject validation rather than revalidating the entire project from scratch.\n\nA value of `\"stale\": true` in the response indicates that the project has changed since\nthe cached validation results were computed. The cached validation results may no longer\nreflect the current state of the project.\n", @@ -15907,7 +16313,9 @@ }, "/projects/{project_id}/current_workspace": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_workspace", "summary": "Get Project Workspace", "description": "### Get Project Workspace\n\nReturns information about the state of the project files in the currently selected workspace\n", @@ -15969,7 +16377,9 @@ }, "/projects/{project_id}/files": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_project_files", "summary": "Get All Project Files", "description": "### Get All Project Files\n\nReturns a list of the files in the project\n", @@ -16034,7 +16444,9 @@ }, "/projects/{project_id}/files/file": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_file", "summary": "Get Project File", "description": "### Get Project File Info\n\nReturns information about a file in the project\n", @@ -16105,7 +16517,9 @@ }, "/projects/{project_id}/git_connection_tests": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_git_connection_tests", "summary": "Get All Git Connection Tests", "description": "### Get All Git Connection Tests\n\ndev mode required.\n - Call `update_session` to select the 'dev' workspace.\n\nReturns a list of tests which can be run against a project's (or the dependency project for the provided remote_url) git connection. Call [Run Git Connection Test](#!/Project/run_git_connection_test) to execute each test in sequence.\n\nTests are ordered by increasing specificity. Tests should be run in the order returned because later tests require functionality tested by tests earlier in the test list.\n\nFor example, a late-stage test for write access is meaningless if connecting to the git server (an early test) is failing.\n", @@ -16170,7 +16584,9 @@ }, "/projects/{project_id}/git_connection_tests/{test_id}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "run_git_connection_test", "summary": "Run Git Connection Test", "description": "### Run a git connection test\n\nRun the named test on the git service used by this project (or the dependency project for the provided remote_url) and return the result. This\nis intended to help debug git connections when things do not work properly, to give\nmore helpful information about why a git url is not working with Looker.\n\nTests should be run in the order they are returned by [Get All Git Connection Tests](#!/Project/all_git_connection_tests).\n", @@ -16270,7 +16686,9 @@ }, "/projects/{project_id}/lookml_tests": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_lookml_tests", "summary": "Get All LookML Tests", "description": "### Get All LookML Tests\n\nReturns a list of tests which can be run to validate a project's LookML code and/or the underlying data,\noptionally filtered by the file id.\nCall [Run LookML Test](#!/Project/run_lookml_test) to execute tests.\n", @@ -16335,7 +16753,9 @@ }, "/projects/{project_id}/lookml_tests/run": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "run_lookml_test", "summary": "Run LookML Test", "description": "### Run LookML Tests\n\nRuns all tests in the project, optionally filtered by file, test, and/or model.\n", @@ -16438,7 +16858,9 @@ }, "/projects/{project_id}/tag": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "tag_ref", "summary": "Tag Ref", "description": "### Creates a tag for the most recent commit, or a specific ref is a SHA is provided\n\nThis is an internal-only, undocumented route.\n", @@ -16562,7 +16984,9 @@ }, "/render_tasks/lookml_dashboards/{dashboard_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_lookml_dashboard_render_task", "summary": "Create Lookml Dashboard Render Task", "description": "### Create a new task to render a lookml dashboard to a document or image.\n\n# DEPRECATED: Use [create_dashboard_render_task()](#!/RenderTask/create_dashboard_render_task) in API 4.0+\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -16713,7 +17137,9 @@ }, "/render_tasks/looks/{look_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_look_render_task", "summary": "Create Look Render Task", "description": "### Create a new task to render a look to an image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -16835,7 +17261,9 @@ }, "/render_tasks/queries/{query_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_query_render_task", "summary": "Create Query Render Task", "description": "### Create a new task to render an existing query to an image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -16957,7 +17385,9 @@ }, "/render_tasks/dashboards/{dashboard_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_dashboard_render_task", "summary": "Create Dashboard Render Task", "description": "### Create a new task to render a dashboard to a document or image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -17108,7 +17538,9 @@ }, "/render_tasks/{render_task_id}": { "get": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "render_task", "summary": "Get Render Task", "description": "### Get information about a render task.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -17170,7 +17602,9 @@ }, "/render_tasks/{render_task_id}/results": { "get": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "render_task_results", "summary": "Render Task Results", "description": "### Get the document or image produced by a completed render task.\n\nNote that the PDF or image result will be a binary blob in the HTTP response, as indicated by the\nContent-Type in the response headers. This may require specialized (or at least different) handling than text\nresponses such as JSON. You may need to tell your HTTP client that the response is binary so that it does not\nattempt to parse the binary data as text.\n\nIf the render task exists but has not finished rendering the results, the response HTTP status will be\n**202 Accepted**, the response body will be empty, and the response will have a Retry-After header indicating\nthat the caller should repeat the request at a later time.\n\nReturns 404 if the render task cannot be found, if the cached result has expired, or if the caller\ndoes not have permission to view the results.\n\nFor detailed information about the status of the render task, use [Render Task](#!/RenderTask/render_task).\nPolling loops waiting for completion of a render task would be better served by polling **render_task(id)** until\nthe task status reaches completion (or error) instead of polling **render_task_results(id)** alone.\n", @@ -17256,7 +17690,9 @@ }, "/projects/{root_project_id}/credential/{credential_id}": { "put": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_repository_credential", "summary": "Create Repository Credential", "description": "### Configure Repository Credential for a remote dependency\n\nAdmin required.\n\n`root_project_id` is required.\n`credential_id` is required.\n\n", @@ -17357,7 +17793,9 @@ } }, "delete": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "delete_repository_credential", "summary": "Delete Repository Credential", "description": "### Repository Credential for a remote dependency\n\nAdmin required.\n\n`root_project_id` is required.\n`credential_id` is required.\n", @@ -17429,7 +17867,9 @@ }, "/projects/{root_project_id}/credentials": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "get_all_repository_credentials", "summary": "Get All Repository Credentials", "description": "### Get all Repository Credentials for a project\n\n`root_project_id` is required.\n", @@ -17485,7 +17925,9 @@ }, "/roles": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_roles", "summary": "Get All Roles", "description": "### Get information about all roles.\n", @@ -17554,7 +17996,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_role", "summary": "Create Role", "description": "### Create a role with the specified information.\n", @@ -17637,7 +18081,9 @@ }, "/roles/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_roles", "summary": "Search Roles", "description": "### Search roles\n\nReturns all role records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -17759,7 +18205,9 @@ }, "/roles/{role_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role", "summary": "Get Role", "description": "### Get information about the role with a specific id.\n", @@ -17811,7 +18259,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_role", "summary": "Delete Role", "description": "### Delete the role with a specific id.\n", @@ -17883,7 +18333,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_role", "summary": "Update Role", "description": "### Update information about the role with a specific id.\n", @@ -17978,7 +18430,9 @@ }, "/roles/{role_id}/groups": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role_groups", "summary": "Get Role Groups", "description": "### Get information about all the groups with the role that has a specific id.\n", @@ -18042,7 +18496,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "set_role_groups", "summary": "Update Role Groups", "description": "### Set all groups for a role, removing all existing group associations from that role.\n", @@ -18134,7 +18590,9 @@ }, "/roles/{role_id}/users": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role_users", "summary": "Get Role Users", "description": "### Get information about all the users with the role that has a specific id.\n", @@ -18207,7 +18665,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "set_role_users", "summary": "Update Role Users", "description": "### Set all the users of the role with a specific id.\n", @@ -18319,7 +18779,9 @@ }, "/running_queries": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "all_running_queries", "summary": "Get All Running Queries", "description": "Get information about all running queries.\n", @@ -18354,7 +18816,9 @@ }, "/running_queries/{query_task_id}": { "delete": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "kill_query", "summary": "Kill Running Query", "description": "Kill a query with a specific query_task_id.\n", @@ -18417,7 +18881,9 @@ }, "/saml_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "saml_config", "summary": "Get SAML Configuration", "description": "### Get the SAML configuration.\n\nLooker can be optionally configured to authenticate users against a SAML authentication server.\nSAML setup requires coordination with an administrator of that server.\n\nOnly Looker administrators can read and update the SAML configuration.\n\nConfiguring SAML impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single SAML configuation. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nSAML is enabled or disabled for Looker using the **enabled** field.\n", @@ -18447,7 +18913,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_saml_config", "summary": "Update SAML Configuration", "description": "### Update the SAML configuration.\n\nConfiguring SAML impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the SAML configuration.\n\nSAML is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any SAML setting changes be tested using the APIs below before being set globally.\n", @@ -18510,7 +18978,9 @@ }, "/saml_test_configs/{test_slug}": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "saml_test_config", "summary": "Get SAML Test Configuration", "description": "### Get a SAML test configuration by test_slug.\n", @@ -18551,7 +19021,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_saml_test_config", "summary": "Delete SAML Test Configuration", "description": "### Delete a SAML test configuration.\n", @@ -18604,7 +19076,9 @@ }, "/saml_test_configs": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_saml_test_config", "summary": "Create SAML Test Configuration", "description": "### Create a SAML test configuration.\n", @@ -18667,7 +19141,9 @@ }, "/parse_saml_idp_metadata": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "parse_saml_idp_metadata", "summary": "Parse SAML IdP XML", "description": "### Parse the given xml as a SAML IdP metadata document and return the result.\n", @@ -18720,7 +19196,9 @@ }, "/fetch_and_parse_saml_idp_metadata": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "fetch_and_parse_saml_idp_metadata", "summary": "Parse SAML IdP Url", "description": "### Fetch the given url and parse it as a SAML IdP metadata document and return the result.\nNote that this requires that the url be public or at least at a location where the Looker instance\ncan fetch it without requiring any special authentication.\n", @@ -18773,7 +19251,9 @@ }, "/scheduled_plans/space/{space_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_space", "summary": "Scheduled Plans for Space", "description": "### Get Scheduled Plans for a Space\n\nReturns scheduled plans owned by the caller for a given space id.\n", @@ -18839,7 +19319,9 @@ }, "/scheduled_plans/{scheduled_plan_id}": { "delete": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "delete_scheduled_plan", "summary": "Delete Scheduled Plan", "description": "### Delete a Scheduled Plan\n\nNormal users can only delete their own scheduled plans.\nAdmins can delete other users' scheduled plans.\nThis delete cannot be undone.\n", @@ -18901,7 +19383,9 @@ "x-looker-activity-type": "db_query" }, "patch": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "update_scheduled_plan", "summary": "Update Scheduled Plan", "description": "### Update a Scheduled Plan\n\nAdmins can update other users' Scheduled Plans.\n\nNote: Any scheduled plan destinations specified in an update will **replace** all scheduled plan destinations\ncurrently defined for the scheduled plan.\n\nFor Example: If a scheduled plan has destinations A, B, and C, and you call update on this scheduled plan\nspecifying only B in the destinations, then destinations A and C will be deleted by the update.\n\nUpdating a scheduled plan to assign null or an empty array to the scheduled_plan_destinations property is an error, as a scheduled plan must always have at least one destination.\n\nIf you omit the scheduled_plan_destinations property from the object passed to update, then the destinations\ndefined on the original scheduled plan will remain unchanged.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -18984,7 +19468,9 @@ } }, "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan", "summary": "Get Scheduled Plan", "description": "### Get Information About a Scheduled Plan\n\nAdmins can fetch information about other users' Scheduled Plans.\n", @@ -19047,7 +19533,9 @@ }, "/scheduled_plans": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "create_scheduled_plan", "summary": "Create Scheduled Plan", "description": "### Create a Scheduled Plan\n\nCreate a scheduled plan to render a Look or Dashboard on a recurring schedule.\n\nTo create a scheduled plan, you MUST provide values for the following fields:\n`name`\nand\n`look_id`, `dashboard_id`, `lookml_dashboard_id`, or `query_id`\nand\n`cron_tab` or `datagroup`\nand\nat least one scheduled_plan_destination\n\nA scheduled plan MUST have at least one scheduled_plan_destination defined.\n\nWhen `look_id` is set, `require_no_results`, `require_results`, and `require_change` are all required.\n\nIf `create_scheduled_plan` fails with a 422 error, be sure to look at the error messages in the response which will explain exactly what fields are missing or values that are incompatible.\n\nThe queries that provide the data for the look or dashboard are run in the context of user account that owns the scheduled plan.\n\nWhen `run_as_recipient` is `false` or not specified, the queries that provide the data for the\nlook or dashboard are run in the context of user account that owns the scheduled plan.\n\nWhen `run_as_recipient` is `true` and all the email recipients are Looker user accounts, the\nqueries are run in the context of each recipient, so different recipients may see different\ndata from the same scheduled render of a look or dashboard. For more details, see [Run As Recipient](https://looker.com/docs/r/admin/run-as-recipient).\n\nAdmins can create and modify scheduled plans on behalf of other users by specifying a user id.\nNon-admin users may not create or modify scheduled plans by or for other users.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -19128,7 +19616,9 @@ } }, "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "all_scheduled_plans", "summary": "Get All Scheduled Plans", "description": "### List All Scheduled Plans\n\nReturns all scheduled plans which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -19213,7 +19703,9 @@ }, "/scheduled_plans/run_once": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan_run_once", "summary": "Run Scheduled Plan Once", "description": "### Run a Scheduled Plan Immediately\n\nCreate a scheduled plan that runs only once, and immediately.\n\nThis can be useful for testing a Scheduled Plan before committing to a production schedule.\n\nAdmins can create scheduled plans on behalf of other users by specifying a user id.\n\nThis API is rate limited to prevent it from being used for relay spam or DoS attacks\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -19297,7 +19789,9 @@ }, "/scheduled_plans/look/{look_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_look", "summary": "Scheduled Plans for Look", "description": "### Get Scheduled Plans for a Look\n\nReturns all scheduled plans for a look which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -19382,7 +19876,9 @@ }, "/scheduled_plans/dashboard/{dashboard_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_dashboard", "summary": "Scheduled Plans for Dashboard", "description": "### Get Scheduled Plans for a Dashboard\n\nReturns all scheduled plans for a dashboard which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -19467,7 +19963,9 @@ }, "/scheduled_plans/lookml_dashboard/{lookml_dashboard_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_lookml_dashboard", "summary": "Scheduled Plans for LookML Dashboard", "description": "### Get Scheduled Plans for a LookML Dashboard\n\nReturns all scheduled plans for a LookML Dashboard which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -19551,7 +20049,9 @@ }, "/scheduled_plans/{scheduled_plan_id}/run_once": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan_run_once_by_id", "summary": "Run Scheduled Plan Once by Id", "description": "### Run a Scheduled Plan By Id Immediately\nThis function creates a run-once schedule plan based on an existing scheduled plan,\napplies modifications (if any) to the new scheduled plan, and runs the new schedule plan immediately.\nThis can be useful for testing modifications to an existing scheduled plan before committing to a production schedule.\n\nThis function internally performs the following operations:\n\n1. Copies the properties of the existing scheduled plan into a new scheduled plan\n2. Copies any properties passed in the JSON body of this request into the new scheduled plan (replacing the original values)\n3. Creates the new scheduled plan\n4. Runs the new scheduled plan\n\nThe original scheduled plan is not modified by this operation.\nAdmins can create, modify, and run scheduled plans on behalf of other users by specifying a user id.\nNon-admins can only create, modify, and run their own scheduled plans.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n\nThis API is rate limited to prevent it from being used for relay spam or DoS attacks\n\n", @@ -19647,7 +20147,9 @@ }, "/session_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "session_config", "summary": "Get Session Config", "description": "### Get session config.\n", @@ -19687,7 +20189,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_session_config", "summary": "Update Session Config", "description": "### Update session config.\n", @@ -19760,7 +20264,9 @@ }, "/session": { "get": { - "tags": ["Session"], + "tags": [ + "Session" + ], "operationId": "session", "summary": "Get Session", "description": "### Get API Session\n\nReturns information about the current API session, such as which workspace is selected for the session.\n", @@ -19800,7 +20306,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Session"], + "tags": [ + "Session" + ], "operationId": "update_session", "summary": "Update Session", "description": "### Update API Session\n\n#### API Session Workspace\n\nYou can use this endpoint to change the active workspace for the current API session.\n\nOnly one workspace can be active in a session. The active workspace can be changed\nany number of times in a session.\n\nThe default workspace for API sessions is the \"production\" workspace.\n\nAll Looker APIs that use projects or lookml models (such as running queries) will\nuse the version of project and model files defined by this workspace for the lifetime of the\ncurrent API session or until the session workspace is changed again.\n\nAn API session has the same lifetime as the access_token used to authenticate API requests. Each successful\nAPI login generates a new access_token and a new API session.\n\nIf your Looker API client application needs to work in a dev workspace across multiple\nAPI sessions, be sure to select the dev workspace after each login.\n", @@ -19873,7 +20381,9 @@ }, "/spaces/search": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "search_spaces", "summary": "Search Spaces", "description": "### Search Spaces\n\n Returns an **array of space objects** that match the given search criteria.\n\n If multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\n The parameters `limit`, and `offset` are recommended for fetching results in page-size chunks.\n\n Get a **single space** by id with [Space](#!/Space/space)\n", @@ -20034,7 +20544,9 @@ }, "/spaces/{space_id}": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space", "summary": "Get Space", "description": "### Get information about the space with a specific id.", @@ -20095,7 +20607,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "delete_space", "summary": "Delete Space", "description": "### Delete the space with a specific id including any children spaces.\n**DANGER** this will delete all looks and dashboards in the space.\n", @@ -20157,7 +20671,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "update_space", "summary": "Update Space", "description": "### Update the space with a specific id.", @@ -20242,10 +20758,12 @@ }, "/spaces": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "all_spaces", "summary": "Get All Spaces", - "description": "### Get information about all spaces.\n\nIn API 3.x, this will not return empty personal spaces, unless they belong to the calling user.\nIn API 4.0+, all personal spaces will be returned.\n\n", + "description": "### Get information about all spaces.\n\nIn API 3.x, this will not return empty personal spaces, unless they belong to the calling user,\nor if they contain soft-deleted content.\n\nIn API 4.0+, all personal spaces will be returned.\n\n", "parameters": [ { "name": "fields", @@ -20297,7 +20815,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "create_space", "summary": "Create Space", "description": "### Create a space with specified information.\n\nCaller must have permission to edit the parent space and to create spaces, otherwise the request\nreturns 404 Not Found.\n", @@ -20381,7 +20901,9 @@ }, "/spaces/{space_id}/children": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_children", "summary": "Get Space Children", "description": "### Get the children of a space.", @@ -20476,7 +20998,9 @@ }, "/spaces/{space_id}/children/search": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_children_search", "summary": "Search Space Children", "description": "### Search the children of a space", @@ -20560,7 +21084,9 @@ }, "/spaces/{space_id}/parent": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_parent", "summary": "Get Space Parent", "description": "### Get the parent of a space", @@ -20623,7 +21149,9 @@ }, "/spaces/{space_id}/ancestors": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_ancestors", "summary": "Get Space Ancestors", "description": "### Get the ancestors of a space", @@ -20689,7 +21217,9 @@ }, "/spaces/{space_id}/looks": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_looks", "summary": "Get Space Looks", "description": "### Get all looks in a space.\nIn API 3.x, this will return all looks in a space, including looks in the trash.\nIn API 4.0+, all looks in a space will be returned, excluding looks in the trash.\n", @@ -20755,7 +21285,9 @@ }, "/spaces/{space_id}/dashboards": { "get": { - "tags": ["Space"], + "tags": [ + "Space" + ], "operationId": "space_dashboards", "summary": "Get Space Dashboards", "description": "### Get the dashboards in a space", @@ -20821,7 +21353,9 @@ }, "/folders/search": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "search_folders", "summary": "Search Folders", "description": "Search for folders by creator id, parent id, name, etc", @@ -20981,7 +21515,9 @@ }, "/folders/{folder_id}": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder", "summary": "Get Folder", "description": "### Get information about the folder with a specific id.", @@ -21041,7 +21577,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "delete_folder", "summary": "Delete Folder", "description": "### Delete the folder with a specific id including any children folders.\n**DANGER** this will delete all looks and dashboards in the folder.\n", @@ -21102,7 +21640,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "update_folder", "summary": "Update Folder", "description": "### Update the folder with a specific id.", @@ -21186,10 +21726,12 @@ }, "/folders": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "all_folders", "summary": "Get All Folders", - "description": "### Get information about all folders.\n\nIn API 3.x, this will not return empty personal folders, unless they belong to the calling user.\nIn API 4.0+, all personal folders will be returned.\n\n", + "description": "### Get information about all folders.\n\nIn API 3.x, this will not return empty personal folders, unless they belong to the calling user,\nor if they contain soft-deleted content.\n\nIn API 4.0+, all personal folders will be returned.\n\n", "parameters": [ { "name": "fields", @@ -21240,7 +21782,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "create_folder", "summary": "Create Folder", "description": "### Create a folder with specified information.\n\nCaller must have permission to edit the parent folder and to create folders, otherwise the request\nreturns 404 Not Found.\n", @@ -21323,7 +21867,9 @@ }, "/folders/{folder_id}/children": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_children", "summary": "Get Folder Children", "description": "### Get the children of a folder.", @@ -21417,7 +21963,9 @@ }, "/folders/{folder_id}/children/search": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_children_search", "summary": "Search Folder Children", "description": "### Search the children of a folder", @@ -21500,7 +22048,9 @@ }, "/folders/{folder_id}/parent": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_parent", "summary": "Get Folder Parent", "description": "### Get the parent of a folder", @@ -21562,7 +22112,9 @@ }, "/folders/{folder_id}/ancestors": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_ancestors", "summary": "Get Folder Ancestors", "description": "### Get the ancestors of a folder", @@ -21627,7 +22179,9 @@ }, "/folders/{folder_id}/looks": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_looks", "summary": "Get Folder Looks", "description": "### Get all looks in a folder.\nIn API 3.x, this will return all looks in a folder, including looks in the trash.\nIn API 4.0+, all looks in a folder will be returned, excluding looks in the trash.\n", @@ -21692,7 +22246,9 @@ }, "/folders/{folder_id}/dashboards": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_dashboards", "summary": "Get Folder Dashboards", "description": "### Get the dashboards in a folder", @@ -21757,7 +22313,9 @@ }, "/sql_queries/{slug}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "sql_query", "summary": "Get SQL Runner Query", "description": "Get a SQL Runner query.", @@ -21810,7 +22368,9 @@ }, "/sql_queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_sql_query", "summary": "Create SQL Runner Query", "description": "### Create a SQL Runner Query\n\nEither the `connection_name` or `model_name` parameter MUST be provided.\n", @@ -21893,7 +22453,9 @@ }, "/sql_queries/{slug}/run/{result_format}": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_sql_query", "summary": "Run SQL Runner Query", "description": "Execute a SQL Runner query in a given result_format.", @@ -22059,7 +22621,9 @@ }, "/themes": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "all_themes", "summary": "Get All Themes", "description": "### Get an array of all existing themes\n\nGet a **single theme** by id with [Theme](#!/Theme/theme)\n\nThis method returns an array of all existing themes. The active time for the theme is not considered.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -22113,7 +22677,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "create_theme", "summary": "Create Theme", "description": "### Create a theme\n\nCreates a new theme object, returning the theme details, including the created id.\n\nIf `settings` are not specified, the default theme settings will be copied into the new theme.\n\nThe theme `name` can only contain alphanumeric characters or underscores. Theme names should not contain any confidential information, such as customer names.\n\n**Update** an existing theme with [Update Theme](#!/Theme/update_theme)\n\n**Permanently delete** an existing theme with [Delete Theme](#!/Theme/delete_theme)\n\nFor more information, see [Creating and Applying Themes](https://looker.com/docs/r/admin/themes).\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -22196,7 +22762,9 @@ }, "/themes/search": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "search_themes", "summary": "Search Themes", "description": "### Search all themes for matching criteria.\n\nReturns an **array of theme objects** that match the specified search criteria.\n\n| Search Parameters | Description\n| :-------------------: | :------ |\n| `begin_at` only | Find themes active at or after `begin_at`\n| `end_at` only | Find themes active at or before `end_at`\n| both set | Find themes with an active inclusive period between `begin_at` and `end_at`\n\nNote: Range matching requires boolean AND logic.\nWhen using `begin_at` and `end_at` together, do not use `filter_or`=TRUE\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nGet a **single theme** by id with [Theme](#!/Theme/theme)\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -22329,7 +22897,9 @@ }, "/themes/default": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "default_theme", "summary": "Get Default Theme", "description": "### Get the default theme\n\nReturns the active theme object set as the default.\n\nThe **default** theme name can be set in the UI on the Admin|Theme UI page\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\" If specified, it returns the default theme at the time indicated.\n", @@ -22381,7 +22951,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "set_default_theme", "summary": "Set Default Theme", "description": "### Set the global default theme by theme name\n\nOnly Admin users can call this function.\n\nOnly an active theme with no expiration (`end_at` not set) can be assigned as the default theme. As long as a theme has an active record with no expiration, it can be set as the default.\n\n[Create Theme](#!/Theme/create) has detailed information on rules for default and active themes\n\nReturns the new specified default theme object.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -22454,7 +23026,9 @@ }, "/themes/active": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "active_themes", "summary": "Get Active Themes", "description": "### Get active themes\n\nReturns an array of active themes.\n\nIf the `name` parameter is specified, it will return an array with one theme if it's active and found.\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\"\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n\n", @@ -22529,7 +23103,9 @@ }, "/themes/theme_or_default": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "theme_or_default", "summary": "Get Theme or Default", "description": "### Get the named theme if it's active. Otherwise, return the default theme\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\"\nNote: API users with `show` ability can call this function\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -22592,7 +23168,9 @@ }, "/themes/validate": { "post": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "validate_theme", "summary": "Validate Theme", "description": "### Validate a theme with the specified information\n\nValidates all values set for the theme, returning any errors encountered, or 200 OK if valid\n\nSee [Create Theme](#!/Theme/create_theme) for constraints\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -22685,7 +23263,9 @@ }, "/themes/{theme_id}": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "theme", "summary": "Get Theme", "description": "### Get a theme by ID\n\nUse this to retrieve a specific theme, whether or not it's currently active.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -22745,7 +23325,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "update_theme", "summary": "Update Theme", "description": "### Update the theme by id.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -22827,7 +23409,9 @@ } }, "delete": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "delete_theme", "summary": "Delete Theme", "description": "### Delete a specific theme by id\n\nThis operation permanently deletes the identified theme from the database.\n\nBecause multiple themes can have the same name (with different activation time spans) themes can only be deleted by ID.\n\nAll IDs associated with a theme name can be retrieved by searching for the theme name with [Theme Search](#!/Theme/search).\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -22890,7 +23474,9 @@ }, "/timezones": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_timezones", "summary": "Get All Timezones", "description": "### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks).\n", @@ -22935,7 +23521,9 @@ }, "/user_attributes": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "all_user_attributes", "summary": "Get All User Attributes", "description": "### Get information about all user attributes.\n", @@ -22998,7 +23586,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "create_user_attribute", "summary": "Create User Attribute", "description": "### Create a new user attribute\n\nPermission information for a user attribute is conveyed through the `can` and `user_can_edit` fields.\nThe `user_can_edit` field indicates whether an attribute is user-editable _anywhere_ in the application.\nThe `can` field gives more granular access information, with the `set_value` child field indicating whether\nan attribute's value can be set by [Setting the User Attribute User Value](#!/User/set_user_attribute_user_value).\n\nNote: `name` and `label` fields must be unique across all user attributes in the Looker instance.\nAttempting to create a new user attribute with a name or label that duplicates an existing\nuser attribute will fail with a 422 error.\n", @@ -23092,7 +23682,9 @@ }, "/user_attributes/{user_attribute_id}": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "user_attribute", "summary": "Get User Attribute", "description": "### Get information about a user attribute.\n", @@ -23153,7 +23745,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "update_user_attribute", "summary": "Update User Attribute", "description": "### Update a user attribute definition.\n", @@ -23245,7 +23839,9 @@ } }, "delete": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "delete_user_attribute", "summary": "Delete User Attribute", "description": "### Delete a user attribute (admin only).\n", @@ -23309,7 +23905,9 @@ }, "/user_attributes/{user_attribute_id}/group_values": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "all_user_attribute_group_values", "summary": "Get User Attribute Group Values", "description": "### Returns all values of a user attribute defined by user groups, in precedence order.\n\nA user may be a member of multiple groups which define different values for a given user attribute.\nThe order of group-values in the response determines precedence for selecting which group-value applies\nto a given user. For more information, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values).\n\nResults will only include groups that the caller's user account has permission to see.\n", @@ -23373,7 +23971,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "set_user_attribute_group_values", "summary": "Set User Attribute Group Values", "description": "### Define values for a user attribute across a set of groups, in priority order.\n\nThis function defines all values for a user attribute defined by user groups. This is a global setting, potentially affecting\nall users in the system. This function replaces any existing group value definitions for the indicated user attribute.\n\nThe value of a user attribute for a given user is determined by searching the following locations, in this order:\n\n1. the user's account settings\n2. the groups that the user is a member of\n3. the default value of the user attribute, if any\n\nThe user may be a member of multiple groups which define different values for that user attribute. The order of items in the group_values parameter\ndetermines which group takes priority for that user. Lowest array index wins.\n\nAn alternate method to indicate the selection precedence of group-values is to assign numbers to the 'rank' property of each\ngroup-value object in the array. Lowest 'rank' value wins. If you use this technique, you must assign a\nrank value to every group-value object in the array.\n\n To set a user attribute value for a single user, see [Set User Attribute User Value](#!/User/set_user_attribute_user_value).\nTo set a user attribute value for all members of a group, see [Set User Attribute Group Value](#!/Group/update_user_attribute_group_value).\n", @@ -23474,7 +24074,9 @@ }, "/user_login_lockouts": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "all_user_login_lockouts", "summary": "Get All User Login Lockouts", "description": "### Get currently locked-out users.\n", @@ -23530,7 +24132,9 @@ }, "/user_login_lockouts/search": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "search_user_login_lockouts", "summary": "Search User Login Lockouts", "description": "### Search currently locked-out users.\n", @@ -23660,7 +24264,9 @@ }, "/user_login_lockout/{key}": { "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_user_login_lockout", "summary": "Delete User Login Lockout", "description": "### Removes login lockout for the associated user.\n", @@ -23723,7 +24329,9 @@ }, "/user": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "me", "summary": "Get Current User", "description": "### Get information about the current user; i.e. the user account currently calling the API.\n", @@ -23766,7 +24374,9 @@ }, "/users": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_users", "summary": "Get All Users", "description": "### Get information about all users.\n", @@ -23864,7 +24474,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user", "summary": "Create User", "description": "### Create a user with the specified information.\n", @@ -23948,7 +24560,9 @@ }, "/users/search": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "search_users", "summary": "Search Users", "description": "### Search users\n\nReturns all* user records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\n(*) Results are always filtered to the level of information the caller is permitted to view.\nLooker admins can see all user details; normal users in an open system can see\nnames of other users but no details; normal users in a closed system can only see\nnames of other users who are members of the same group as the user.\n\n", @@ -24126,7 +24740,9 @@ }, "/users/search/names/{pattern}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "search_users_names", "summary": "Search User Names", "description": "### Search for user accounts by name\n\nReturns all user accounts where `first_name` OR `last_name` OR `email` field values match a pattern.\nThe pattern can contain `%` and `_` wildcards as in SQL LIKE expressions.\n\nAny additional search params will be combined into a logical AND expression.\n", @@ -24275,7 +24891,9 @@ }, "/users/{user_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user", "summary": "Get User by Id", "description": "### Get information about the user with a specific id.\n\nIf the caller is an admin or the caller is the user being specified, then full user information will\nbe returned. Otherwise, a minimal 'public' variant of the user information will be returned. This contains\nThe user name and avatar url, but no sensitive information.\n", @@ -24336,7 +24954,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "update_user", "summary": "Update User", "description": "### Update information about the user with a specific id.\n", @@ -24418,7 +25038,9 @@ } }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user", "summary": "Delete User", "description": "### Delete the user with a specific id.\n\n**DANGER** this will delete the user and all looks and other information owned by the user.\n", @@ -24482,7 +25104,9 @@ }, "/users/credential/{credential_type}/{credential_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_for_credential", "summary": "Get User by Credential Id", "description": "### Get information about the user with a credential of given type with specific id.\n\nThis is used to do things like find users by their embed external_user_id. Or, find the user with\na given api3 client_id, etc. The 'credential_type' matches the 'type' name of the various credential\ntypes. It must be one of the values listed in the table below. The 'credential_id' is your unique Id\nfor the user and is specific to each type of credential.\n\nAn example using the Ruby sdk might look like:\n\n`sdk.user_for_credential('embed', 'customer-4959425')`\n\nThis table shows the supported 'Credential Type' strings. The right column is for reference; it shows\nwhich field in the given credential type is actually searched when finding a user with the supplied\n'credential_id'.\n\n| Credential Types | Id Field Matched |\n| ---------------- | ---------------- |\n| email | email |\n| google | google_user_id |\n| saml | saml_user_id |\n| oidc | oidc_user_id |\n| ldap | ldap_id |\n| api | token |\n| api3 | client_id |\n| embed | external_user_id |\n| looker_openid | email |\n\n**NOTE**: The 'api' credential type was only used with the legacy Looker query API and is no longer supported. The credential type for API you are currently looking at is 'api3'.\n\n", @@ -24553,7 +25177,9 @@ }, "/users/{user_id}/credentials_email": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_email", "summary": "Get Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -24614,7 +25240,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_email", "summary": "Create Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -24716,7 +25344,9 @@ } }, "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "update_user_credentials_email", "summary": "Update Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -24808,7 +25438,9 @@ } }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_email", "summary": "Delete Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -24872,7 +25504,9 @@ }, "/users/{user_id}/credentials_totp": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_totp", "summary": "Get Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -24933,7 +25567,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_totp", "summary": "Create Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -25035,7 +25671,9 @@ } }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_totp", "summary": "Delete Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -25099,7 +25737,9 @@ }, "/users/{user_id}/credentials_ldap": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_ldap", "summary": "Get LDAP Credential", "description": "### LDAP login information for the specified user.", @@ -25160,7 +25800,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_ldap", "summary": "Delete LDAP Credential", "description": "### LDAP login information for the specified user.", @@ -25224,7 +25866,9 @@ }, "/users/{user_id}/credentials_google": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_google", "summary": "Get Google Auth Credential", "description": "### Google authentication login information for the specified user.", @@ -25285,7 +25929,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_google", "summary": "Delete Google Auth Credential", "description": "### Google authentication login information for the specified user.", @@ -25349,7 +25995,9 @@ }, "/users/{user_id}/credentials_saml": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_saml", "summary": "Get Saml Auth Credential", "description": "### Saml authentication login information for the specified user.", @@ -25410,7 +26058,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_saml", "summary": "Delete Saml Auth Credential", "description": "### Saml authentication login information for the specified user.", @@ -25474,7 +26124,9 @@ }, "/users/{user_id}/credentials_oidc": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_oidc", "summary": "Get OIDC Auth Credential", "description": "### OpenID Connect (OIDC) authentication login information for the specified user.", @@ -25535,7 +26187,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_oidc", "summary": "Delete OIDC Auth Credential", "description": "### OpenID Connect (OIDC) authentication login information for the specified user.", @@ -25599,7 +26253,9 @@ }, "/users/{user_id}/credentials_api3/{credentials_api3_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_api3", "summary": "Get API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -25670,7 +26326,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_api3", "summary": "Delete API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -25744,7 +26402,9 @@ }, "/users/{user_id}/credentials_api3": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_credentials_api3s", "summary": "Get All API 3 Credentials", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -25808,7 +26468,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_api3", "summary": "Create API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -25912,7 +26574,9 @@ }, "/users/{user_id}/credentials_embed/{credentials_embed_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_embed", "summary": "Get Embedding Credential", "description": "### Embed login information for the specified user.", @@ -25983,7 +26647,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_embed", "summary": "Delete Embedding Credential", "description": "### Embed login information for the specified user.", @@ -26057,7 +26723,9 @@ }, "/users/{user_id}/credentials_embed": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_credentials_embeds", "summary": "Get All Embedding Credentials", "description": "### Embed login information for the specified user.", @@ -26123,7 +26791,9 @@ }, "/users/{user_id}/credentials_looker_openid": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_looker_openid", "summary": "Get Looker OpenId Credential", "description": "### Looker Openid login information for the specified user. Used by Looker Analysts.", @@ -26184,7 +26854,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_looker_openid", "summary": "Delete Looker OpenId Credential", "description": "### Looker Openid login information for the specified user. Used by Looker Analysts.", @@ -26248,7 +26920,9 @@ }, "/users/{user_id}/sessions/{session_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_session", "summary": "Get Web Login Session", "description": "### Web login session for the specified user.", @@ -26319,7 +26993,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_session", "summary": "Delete Web Login Session", "description": "### Web login session for the specified user.", @@ -26393,7 +27069,9 @@ }, "/users/{user_id}/sessions": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_sessions", "summary": "Get All Web Login Sessions", "description": "### Web login session for the specified user.", @@ -26459,7 +27137,9 @@ }, "/users/{user_id}/credentials_email/password_reset": { "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_email_password_reset", "summary": "Create Password Reset Token", "description": "### Create a password reset token.\nThis will create a cryptographically secure random password reset token for the user.\nIf the user already has a password reset token then this invalidates the old token and creates a new one.\nThe token is expressed as the 'password_reset_url' of the user's email/password credential object.\nThis takes an optional 'expires' param to indicate if the new token should be an expiring token.\nTokens that expire are typically used for self-service password resets for existing users.\nInvitation emails for new users typically are not set to expire.\nThe expire period is always 60 minutes when expires is enabled.\nThis method can be called with an empty body.\n", @@ -26531,7 +27211,9 @@ }, "/users/{user_id}/roles": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_roles", "summary": "Get User Roles", "description": "### Get information about roles of a given user\n", @@ -26604,7 +27286,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "set_user_roles", "summary": "Set User Roles", "description": "### Set roles of the user with a specific id.\n", @@ -26685,7 +27369,9 @@ }, "/users/{user_id}/attribute_values": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_attribute_user_values", "summary": "Get User Attribute Values", "description": "### Get user attribute values for a given user.\n\nReturns the values of specified user attributes (or all user attributes) for a certain user.\n\nA value for each user attribute is searched for in the following locations, in this order:\n\n1. in the user's account information\n1. in groups that the user is a member of\n1. the default value of the user attribute\n\nIf more than one group has a value defined for a user attribute, the group with the lowest rank wins.\n\nThe response will only include user attributes for which values were found. Use `include_unset=true` to include\nempty records for user attributes with no value.\n\nThe value of all hidden user attributes will be blank.\n", @@ -26774,7 +27460,9 @@ }, "/users/{user_id}/attribute_values/{user_attribute_id}": { "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "set_user_attribute_user_value", "summary": "Set User Attribute User Value", "description": "### Store a custom value for a user attribute in a user's account settings.\n\nPer-user user attribute values take precedence over group or default values.\n", @@ -26857,7 +27545,9 @@ } }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_attribute_user_value", "summary": "Delete User Attribute User Value", "description": "### Delete a user attribute value from a user's account settings.\n\nAfter the user attribute value is deleted from the user's account settings, subsequent requests\nfor the user attribute value for this user will draw from the user's groups or the default\nvalue of the user attribute. See [Get User Attribute Values](#!/User/user_attribute_user_values) for more\ninformation about how user attribute values are resolved.\n", @@ -26914,7 +27604,9 @@ }, "/vector_thumbnail/{type}/{resource_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "vector_thumbnail", "summary": "Get Vector Thumbnail", "description": "### Get a vector image representing the contents of a dashboard or look.\n\n# DEPRECATED: Use [content_thumbnail()](#!/Content/content_thumbnail)\n\nThe returned thumbnail is an abstract representation of the contents of a dashbord or look and does not\nreflect the actual data displayed in the respective visualizations.\n", @@ -26986,7 +27678,9 @@ }, "/versions": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "versions", "summary": "Get ApiVersion", "description": "### Get information about all API versions supported by this Looker instance.\n", @@ -27039,7 +27733,9 @@ }, "/whitelabel_configuration": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "whitelabel_configuration", "summary": "Get Whitelabel configuration", "description": "### This feature is enabled only by special license.\n### Gets the whitelabel configuration, which includes hiding documentation links, custom favicon uploading, etc.\n", @@ -27090,7 +27786,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_whitelabel_configuration", "summary": "Update Whitelabel configuration", "description": "### Update the whitelabel configuration\n", @@ -27163,7 +27861,9 @@ }, "/workspaces": { "get": { - "tags": ["Workspace"], + "tags": [ + "Workspace" + ], "operationId": "all_workspaces", "summary": "Get All Workspaces", "description": "### Get All Workspaces\n\nReturns all workspaces available to the calling user.\n", @@ -27208,7 +27908,9 @@ }, "/workspaces/{workspace_id}": { "get": { - "tags": ["Workspace"], + "tags": [ + "Workspace" + ], "operationId": "workspace", "summary": "Get Workspace", "description": "### Get A Workspace\n\nReturns information about a workspace such as the git status and selected branches\nof all projects available to the caller's user account.\n\nA workspace defines which versions of project files will be used to evaluate expressions\nand operations that use model definitions - operations such as running queries or rendering dashboards.\nEach project has its own git repository, and each project in a workspace may be configured to reference\nparticular branch or revision within their respective repositories.\n\nThere are two predefined workspaces available: \"production\" and \"dev\".\n\nThe production workspace is shared across all Looker users. Models in the production workspace are read-only.\nChanging files in production is accomplished by modifying files in a git branch and using Pull Requests\nto merge the changes from the dev branch into the production branch, and then telling\nLooker to sync with production.\n\nThe dev workspace is local to each Looker user. Changes made to project/model files in the dev workspace only affect\nthat user, and only when the dev workspace is selected as the active workspace for the API session.\n(See set_session_workspace()).\n\nThe dev workspace is NOT unique to an API session. Two applications accessing the Looker API using\nthe same user account will see the same files in the dev workspace. To avoid collisions between\nAPI clients it's best to have each client login with API3 credentials for a different user account.\n\nChanges made to files in a dev workspace are persistent across API sessions. It's a good\nidea to commit any changes you've made to the git repository, but not strictly required. Your modified files\nreside in a special user-specific directory on the Looker server and will still be there when you login in again\nlater and use update_session(workspace_id: \"dev\") to select the dev workspace for the new API session.\n", @@ -27262,7 +27964,7 @@ }, "servers": [ { - "url": "https://localhost:20000/api/3.1" + "url": "https://self-signed.looker.com:19999/api/3.1" } ], "components": { @@ -27285,7 +27987,10 @@ } }, "x-looker-status": "stable", - "required": ["message", "documentation_url"] + "required": [ + "message", + "documentation_url" + ] }, "DashboardBase": { "properties": { @@ -27497,7 +28202,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "CreateSpace": { "properties": { @@ -27513,7 +28220,10 @@ } }, "x-looker-status": "stable", - "required": ["name", "parent_id"] + "required": [ + "name", + "parent_id" + ] }, "UpdateSpace": { "properties": { @@ -27653,7 +28363,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "Homepage": { "properties": { @@ -28037,7 +28749,10 @@ } }, "x-looker-status": "stable", - "required": ["message", "documentation_url"] + "required": [ + "message", + "documentation_url" + ] }, "ValidationErrorDetail": { "properties": { @@ -28068,7 +28783,9 @@ } }, "x-looker-status": "stable", - "required": ["documentation_url"] + "required": [ + "documentation_url" + ] }, "AccessToken": { "properties": { @@ -28352,7 +29069,10 @@ "permission_type": { "type": "string", "readOnly": true, - "enum": ["view", "edit"], + "enum": [ + "view", + "edit" + ], "description": "Type of permission: \"view\" or \"edit\" Valid values are: \"view\", \"edit\".", "nullable": true }, @@ -28578,7 +29298,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "ContentValidationFolder": { "properties": { @@ -28595,7 +29317,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "ContentValidationLook": { "properties": { @@ -29978,7 +30702,12 @@ } }, "x-looker-status": "stable", - "required": ["dashboard_id", "name", "title", "type"] + "required": [ + "dashboard_id", + "name", + "title", + "type" + ] }, "DashboardLayoutComponent": { "properties": { @@ -31381,7 +32110,9 @@ } }, "x-looker-status": "stable", - "required": ["target_url"] + "required": [ + "target_url" + ] }, "EmbedUrlResponse": { "properties": { @@ -31499,7 +32230,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "CreateFolder": { "properties": { @@ -31515,7 +32248,10 @@ } }, "x-looker-status": "stable", - "required": ["name", "parent_id"] + "required": [ + "name", + "parent_id" + ] }, "UpdateFolder": { "properties": { @@ -31655,7 +32391,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "GitBranch": { "properties": { @@ -32141,7 +32879,11 @@ "type": "string" }, "readOnly": true, - "enum": ["cell", "query", "dashboard"], + "enum": [ + "cell", + "query", + "dashboard" + ], "description": "A list of action types the integration supports. Valid values are: \"cell\", \"query\", \"dashboard\".", "nullable": false }, @@ -32151,7 +32893,10 @@ "type": "string" }, "readOnly": true, - "enum": ["formatted", "unformatted"], + "enum": [ + "formatted", + "unformatted" + ], "description": "A list of formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: \"formatted\", \"unformatted\".", "nullable": false }, @@ -32161,7 +32906,10 @@ "type": "string" }, "readOnly": true, - "enum": ["apply", "noapply"], + "enum": [ + "apply", + "noapply" + ], "description": "A list of visualization formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: \"apply\", \"noapply\".", "nullable": false }, @@ -32171,7 +32919,10 @@ "type": "string" }, "readOnly": true, - "enum": ["push", "url"], + "enum": [ + "push", + "url" + ], "description": "A list of all the download mechanisms the integration supports. The order of values is not significant: Looker will select the most appropriate supported download mechanism for a given query. The integration must ensure it can handle any of the mechanisms it claims to support. If unspecified, this defaults to all download setting values. Valid values are: \"push\", \"url\".", "nullable": false }, @@ -34228,7 +34979,10 @@ "align": { "type": "string", "readOnly": true, - "enum": ["left", "right"], + "enum": [ + "left", + "right" + ], "description": "The appropriate horizontal text alignment the values of this field should be displayed in. Valid values are: \"left\", \"right\".", "nullable": false }, @@ -34241,7 +34995,12 @@ "category": { "type": "string", "readOnly": true, - "enum": ["parameter", "filter", "measure", "dimension"], + "enum": [ + "parameter", + "filter", + "measure", + "dimension" + ], "description": "Field category Valid values are: \"parameter\", \"filter\", \"measure\", \"dimension\".", "nullable": true }, @@ -34293,7 +35052,10 @@ "fill_style": { "type": "string", "readOnly": true, - "enum": ["enumeration", "range"], + "enum": [ + "enumeration", + "range" + ], "description": "The style of dimension fill that is possible for this field. Null if no dimension fill is possible. Valid values are: \"enumeration\", \"range\".", "nullable": true }, @@ -34708,7 +35470,10 @@ "format": { "type": "string", "readOnly": true, - "enum": ["topojson", "vector_tile_region"], + "enum": [ + "topojson", + "vector_tile_region" + ], "description": "Specifies the data format of the region information. Valid values are: \"topojson\", \"vector_tile_region\".", "nullable": false }, @@ -35829,7 +36594,12 @@ }, "pull_request_mode": { "type": "string", - "enum": ["off", "links", "recommended", "required"], + "enum": [ + "off", + "links", + "recommended", + "required" + ], "description": "The git pull request policy for this project. Valid values are: \"off\", \"links\", \"recommended\", \"required\".", "nullable": false }, @@ -36270,7 +37040,10 @@ } }, "x-looker-status": "stable", - "required": ["model", "view"] + "required": [ + "model", + "view" + ] }, "CreateQueryTask": { "properties": { @@ -36329,7 +37102,10 @@ } }, "x-looker-status": "stable", - "required": ["query_id", "result_format"] + "required": [ + "query_id", + "result_format" + ] }, "QueryTask": { "properties": { @@ -38984,4 +39760,4 @@ } } } -} +} \ No newline at end of file diff --git a/spec/Looker.4.0.json b/spec/Looker.4.0.json index 9b4e04518..5b0b00e36 100644 --- a/spec/Looker.4.0.json +++ b/spec/Looker.4.0.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "version": "4.0.21.20", - "x-looker-release-version": "21.20.8", + "version": "4.0.21.21", + "x-looker-release-version": "21.21.0", "title": "Looker API 4.0 (Beta) Reference", "description": "\nWelcome to the future! API 4.0 co-exists with APIs 3.1 and 3.0. (3.0 should no longer be used.)\nThe \"beta\" tag means updates for API 4.0 may include breaking changes, but as always we will work to minimize them.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 version was introduced so we can make adjustments to API functions, parameters, and response types to\nfix bugs and inconsistencies. These changes fall outside the bounds of non-breaking additive changes we can\nmake to our stable API 3.1.\n\nOne benefit of these type adjustments in API 4.0 is dramatically better support for strongly\ntyped languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nWhile API 3.1 is still the de-facto Looker API (\"current\", \"stable\", \"default\", etc), the bulk\nof our development activity has shifted to API 4.0, where all new features are added.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -11,14 +11,20 @@ }, "license": { "name": "EULA", - "url": "https://localhost:10000/eula" + "url": "https://self-signed.looker.com:9999/eula" } }, "basePath": "/api/4.0", - "consumes": ["application/json"], - "produces": ["application/json"], - "host": "localhost:20000", - "schemes": ["https"], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "host": "self-signed.looker.com:19999", + "schemes": [ + "https" + ], "tags": [ { "name": "Alert", @@ -144,7 +150,9 @@ "paths": { "/query_tasks": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_query_task", "summary": "Run Query Async", "description": "### Create an async query task\n\nCreates a query task (job) to run a previously created query asynchronously. Returns a Query Task ID.\n\nUse [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task.\nAfter the query task status reaches \"Complete\", use [query_task_results(query_task_id)](#!/Query/query_task_results) to fetch the results of the query.\n", @@ -297,7 +305,9 @@ }, "/query_tasks/multi_results": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task_multi_results", "summary": "Get Multiple Async Query Results", "description": "### Fetch results of multiple async queries\n\nReturns the results of multiple async queries in one request.\n\nFor Query Tasks that are not completed, the response will include the execution status of the Query Task but will not include query results.\nQuery Tasks whose results have expired will have a status of 'expired'.\nIf the user making the API request does not have sufficient privileges to view a Query Task result, the result will have a status of 'missing'\n", @@ -344,7 +354,9 @@ }, "/query_tasks/{query_task_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task", "summary": "Get Async Query Info", "description": "### Get Query Task details\n\nUse this function to check the status of an async query task. After the status\nreaches \"Complete\", you can call [query_task_results(query_task_id)](#!/Query/query_task_results) to\nretrieve the results of the query.\n\nUse [create_query_task()](#!/Query/create_query_task) to create an async query task.\n", @@ -390,11 +402,16 @@ }, "/query_tasks/{query_task_id}/results": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task_results", "summary": "Get Async Query Results", "description": "### Get Async Query Results\n\nReturns the results of an async query task if the query has completed.\n\nIf the query task is still running or waiting to run, this function returns 204 No Content.\n\nIf the query task ID is invalid or the cached results of the query task have expired, this function returns 404 Not Found.\n\nUse [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task\nCall query_task_results only after the query task status reaches \"Complete\".\n\nYou can also use [query_task_multi_results()](#!/Query/query_task_multi_results) retrieve the\nresults of multiple async query tasks at the same time.\n\n#### SQL Error Handling:\nIf the query fails due to a SQL db error, how this is communicated depends on the result_format you requested in `create_query_task()`.\n\nFor `json_detail` result_format: `query_task_results()` will respond with HTTP status '200 OK' and db SQL error info\nwill be in the `errors` property of the response object. The 'data' property will be empty.\n\nFor all other result formats: `query_task_results()` will respond with HTTP status `400 Bad Request` and some db SQL error info\nwill be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`.\nThese data formats can only carry row data, and error info is not row data.\n", - "produces": ["text", "application/json"], + "produces": [ + "text", + "application/json" + ], "parameters": [ { "name": "query_task_id", @@ -436,7 +453,9 @@ }, "/queries/{query_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query", "summary": "Get Query", "description": "### Get a previously created query by id.\n\nA Looker query object includes the various parameters that define a database query that has been run or\ncould be run in the future. These parameters include: model, view, fields, filters, pivots, etc.\nQuery *results* are not part of the query object.\n\nQuery objects are unique and immutable. Query objects are created automatically in Looker as users explore data.\nLooker does not delete them; they become part of the query history. When asked to create a query for\nany given set of parameters, Looker will first try to find an existing query object with matching\nparameters and will only create a new object when an appropriate object can not be found.\n\nThis 'get' method is used to get the details about a query for a given id. See the other methods here\nto 'create' and 'run' queries.\n\nNote that some fields like 'filter_config' and 'vis_config' etc are specific to how the Looker UI\nbuilds queries and visualizations and are not generally useful for API use. They are not required when\ncreating new queries and can usually just be ignored.\n\n", @@ -483,7 +502,9 @@ }, "/queries/slug/{slug}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_for_slug", "summary": "Get Query for Slug", "description": "### Get the query for a given query slug.\n\nThis returns the query for the 'slug' in a query share URL.\n\nThe 'slug' is a randomly chosen short string that is used as an alternative to the query's id value\nfor use in URLs etc. This method exists as a convenience to help you use the API to 'find' queries that\nhave been created using the Looker UI.\n\nYou can use the Looker explore page to build a query and then choose the 'Share' option to\nshow the share url for the query. Share urls generally look something like 'https://looker.yourcompany/x/vwGSbfc'.\nThe trailing 'vwGSbfc' is the share slug. You can pass that string to this api method to get details about the query.\nThose details include the 'id' that you can use to run the query. Or, you can copy the query body\n(perhaps with your own modification) and use that as the basis to make/run new queries.\n\nThis will also work with slugs from Looker explore urls like\n'https://looker.yourcompany/explore/ecommerce/orders?qid=aogBgL6o3cKK1jN3RoZl5s'. In this case\n'aogBgL6o3cKK1jN3RoZl5s' is the slug.\n", @@ -529,7 +550,9 @@ }, "/queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_query", "summary": "Create Query", "description": "### Create a query.\n\nThis allows you to create a new query that you can later run. Looker queries are immutable once created\nand are not deleted. If you create a query that is exactly like an existing query then the existing query\nwill be returned and no new query will be created. Whether a new query is created or not, you can use\nthe 'id' in the returned query with the 'run' method.\n\nThe query parameters are passed as json in the body of the request.\n\n", @@ -595,11 +618,18 @@ }, "/queries/{query_id}/run/{result_format}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_query", "summary": "Run Query", "description": "### Run a saved query.\n\nThis runs a previously saved query. You can use this on a query that was generated in the Looker UI\nor one that you have explicitly created using the API. You can also use a query 'id' from a saved 'Look'.\n\nThe 'result_format' parameter specifies the desired structure and format of the response.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", - "produces": ["text", "application/json", "image/png", "image/jpeg"], + "produces": [ + "text", + "application/json", + "image/png", + "image/jpeg" + ], "parameters": [ { "name": "query_id", @@ -749,11 +779,18 @@ }, "/queries/run/{result_format}": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_inline_query", "summary": "Run Inline Query", "description": "### Run the query that is specified inline in the posted body.\n\nThis allows running a query as defined in json in the posted body. This combines\nthe two actions of posting & running a query into one step.\n\nHere is an example body in json:\n```\n{\n \"model\":\"thelook\",\n \"view\":\"inventory_items\",\n \"fields\":[\"category.name\",\"inventory_items.days_in_inventory_tier\",\"products.count\"],\n \"filters\":{\"category.name\":\"socks\"},\n \"sorts\":[\"products.count desc 0\"],\n \"limit\":\"500\",\n \"query_timezone\":\"America/Los_Angeles\"\n}\n```\n\nWhen using the Ruby SDK this would be passed as a Ruby hash like:\n```\n{\n :model=>\"thelook\",\n :view=>\"inventory_items\",\n :fields=>\n [\"category.name\",\n \"inventory_items.days_in_inventory_tier\",\n \"products.count\"],\n :filters=>{:\"category.name\"=>\"socks\"},\n :sorts=>[\"products.count desc 0\"],\n :limit=>\"500\",\n :query_timezone=>\"America/Los_Angeles\",\n}\n```\n\nThis will return the result of running the query in the format specified by the 'result_format' parameter.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", - "produces": ["text", "application/json", "image/png", "image/jpeg"], + "produces": [ + "text", + "application/json", + "image/png", + "image/jpeg" + ], "parameters": [ { "name": "result_format", @@ -897,11 +934,18 @@ }, "/queries/models/{model_name}/views/{view_name}/run/{result_format}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_url_encoded_query", "summary": "Run Url Encoded Query", "description": "### Run an URL encoded query.\n\nThis requires the caller to encode the specifiers for the query into the URL query part using\nLooker-specific syntax as explained below.\n\nGenerally, you would want to use one of the methods that takes the parameters as json in the POST body\nfor creating and/or running queries. This method exists for cases where one really needs to encode the\nparameters into the URL of a single 'GET' request. This matches the way that the Looker UI formats\n'explore' URLs etc.\n\nThe parameters here are very similar to the json body formatting except that the filter syntax is\ntricky. Unfortunately, this format makes this method not currently callable via the 'Try it out!' button\nin this documentation page. But, this is callable when creating URLs manually or when using the Looker SDK.\n\nHere is an example inline query URL:\n\n```\nhttps://looker.mycompany.com:19999/api/3.0/queries/models/thelook/views/inventory_items/run/json?fields=category.name,inventory_items.days_in_inventory_tier,products.count&f[category.name]=socks&sorts=products.count+desc+0&limit=500&query_timezone=America/Los_Angeles\n```\n\nWhen invoking this endpoint with the Ruby SDK, pass the query parameter parts as a hash. The hash to match the above would look like:\n\n```ruby\nquery_params =\n{\n :fields => \"category.name,inventory_items.days_in_inventory_tier,products.count\",\n :\"f[category.name]\" => \"socks\",\n :sorts => \"products.count desc 0\",\n :limit => \"500\",\n :query_timezone => \"America/Los_Angeles\"\n}\nresponse = ruby_sdk.run_url_encoded_query('thelook','inventory_items','json', query_params)\n\n```\n\nAgain, it is generally easier to use the variant of this method that passes the full query in the POST body.\nThis method is available for cases where other alternatives won't fit the need.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", - "produces": ["text", "application/json", "image/png", "image/jpeg"], + "produces": [ + "text", + "application/json", + "image/png", + "image/jpeg" + ], "parameters": [ { "name": "model_name", @@ -963,11 +1007,15 @@ }, "/login": { "post": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "login", "summary": "Login", "description": "### Present client credentials to obtain an authorization token\n\nLooker API implements the OAuth2 [Resource Owner Password Credentials Grant](https://looker.com/docs/r/api/outh2_resource_owner_pc) pattern.\nThe client credentials required for this login must be obtained by creating an API3 key on a user account\nin the Looker Admin console. The API3 key consists of a public `client_id` and a private `client_secret`.\n\nThe access token returned by `login` must be used in the HTTP Authorization header of subsequent\nAPI requests, like this:\n```\nAuthorization: token 4QDkCyCtZzYgj4C2p2cj3csJH7zqS5RzKs2kTnG4\n```\nReplace \"4QDkCy...\" with the `access_token` value returned by `login`.\nThe word `token` is a string literal and must be included exactly as shown.\n\nThis function can accept `client_id` and `client_secret` parameters as URL query params or as www-form-urlencoded params in the body of the HTTP request. Since there is a small risk that URL parameters may be visible to intermediate nodes on the network route (proxies, routers, etc), passing credentials in the body of the request is considered more secure than URL params.\n\nExample of passing credentials in the HTTP request body:\n````\nPOST HTTP /login\nContent-Type: application/x-www-form-urlencoded\n\nclient_id=CGc9B7v7J48dQSJvxxx&client_secret=nNVS9cSS3xNpSC9JdsBvvvvv\n````\n\n### Best Practice:\nAlways pass credentials in body params. Pass credentials in URL query params **only** when you cannot pass body params due to application, tool, or other limitations.\n\nFor more information and detailed examples of Looker API authorization, see [How to Authenticate to Looker API3](https://github.com/looker/looker-sdk-ruby/blob/master/authentication.md).\n", - "consumes": ["application/x-www-form-urlencoded"], + "consumes": [ + "application/x-www-form-urlencoded" + ], "parameters": [ { "name": "client_id", @@ -1010,7 +1058,9 @@ }, "/login/{user_id}": { "post": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "login_user", "summary": "Login user", "description": "### Create an access token that runs as a given user.\n\nThis can only be called by an authenticated admin user. It allows that admin to generate a new\nauthentication token for the user with the given user id. That token can then be used for subsequent\nAPI calls - which are then performed *as* that target user.\n\nThe target user does *not* need to have a pre-existing API client_id/client_secret pair. And, no such\ncredentials are created by this call.\n\nThis allows for building systems where api user authentication for an arbitrary number of users is done\noutside of Looker and funneled through a single 'service account' with admin permissions. Note that a\nnew access token is generated on each call. If target users are going to be making numerous API\ncalls in a short period then it is wise to cache this authentication token rather than call this before\neach of those API calls.\n\nSee 'login' for more detail on the access token and how to use it.\n", @@ -1057,7 +1107,9 @@ }, "/logout": { "delete": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "logout", "summary": "Logout", "description": "### Logout of the API and invalidate the current access token.\n", @@ -1087,7 +1139,9 @@ }, "/alerts/search": { "get": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "search_alerts", "summary": "Search Alerts", "description": "### Search Alerts\n", @@ -1200,7 +1254,9 @@ }, "/alerts/{alert_id}": { "get": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "get_alert", "summary": "Get an alert", "description": "### Get an alert by a given alert ID\n", @@ -1238,7 +1294,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "update_alert_field", "summary": "Update select fields on an alert", "description": "### Update select alert fields\n# Available fields: `owner_id`, `is_disabled`, `disabled_reason`, `is_public`, `threshold`\n#\n", @@ -1303,7 +1361,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "update_alert", "summary": "Update an alert", "description": "### Update an alert\n# Required fields: `owner_id`, `field`, `destinations`, `comparison_type`, `threshold`, `cron`\n#\n", @@ -1362,7 +1422,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "delete_alert", "summary": "Delete an alert", "description": "### Delete an alert by a given alert ID\n", @@ -1411,7 +1473,9 @@ }, "/alerts": { "post": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "create_alert", "summary": "Create an alert", "description": "### Create a new alert and return details of the newly created object\n\nRequired fields: `field`, `destinations`, `comparison_type`, `threshold`, `cron`\n\nExample Request:\nRun alert on dashboard element '103' at 5am every day. Send an email to 'test@test.com' if inventory for Los Angeles (using dashboard filter `Warehouse Name`) is lower than 1,000\n```\n{\n \"cron\": \"0 5 * * *\",\n \"custom_title\": \"Alert when LA inventory is low\",\n \"dashboard_element_id\": 103,\n \"applied_dashboard_filters\": [\n {\n \"filter_title\": \"Warehouse Name\",\n \"field_name\": \"distribution_centers.name\",\n \"filter_value\": \"Los Angeles CA\",\n \"filter_description\": \"is Los Angeles CA\"\n }\n ],\n \"comparison_type\": \"LESS_THAN\",\n \"destinations\": [\n {\n \"destination_type\": \"EMAIL\",\n \"email_address\": \"test@test.com\"\n }\n ],\n \"field\": {\n \"title\": \"Number on Hand\",\n \"name\": \"inventory_items.number_on_hand\"\n },\n \"is_disabled\": false,\n \"is_public\": true,\n \"threshold\": 1000\n}\n```\n", @@ -1476,7 +1540,9 @@ }, "/alerts/{alert_id}/enqueue": { "post": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "enqueue_alert", "summary": "Enqueue an alert", "description": "### Enqueue an Alert by ID\n", @@ -1533,7 +1599,9 @@ }, "/cloud_storage": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "cloud_storage_configuration", "summary": "Get Cloud Storage", "description": "Get the current Cloud Storage Configuration.\n", @@ -1561,7 +1629,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_cloud_storage_configuration", "summary": "Update Cloud Storage", "description": "Update the current Cloud Storage Configuration.\n", @@ -1608,7 +1678,9 @@ }, "/color_collections": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "all_color_collections", "summary": "Get all Color Collections", "description": "### Get an array of all existing Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1648,7 +1720,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "create_color_collection", "summary": "Create ColorCollection", "description": "### Create a custom color collection with the specified information\n\nCreates a new custom color collection object, returning the details, including the created id.\n\n**Update** an existing color collection with [Update Color Collection](#!/ColorCollection/update_color_collection)\n\n**Permanently delete** an existing custom color collection with [Delete Color Collection](#!/ColorCollection/delete_color_collection)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1713,7 +1787,9 @@ }, "/color_collections/custom": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collections_custom", "summary": "Get all Custom Color Collections", "description": "### Get an array of all existing **Custom** Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1755,7 +1831,9 @@ }, "/color_collections/standard": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collections_standard", "summary": "Get all Standard Color Collections", "description": "### Get an array of all existing **Standard** Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1797,7 +1875,9 @@ }, "/color_collections/default": { "put": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "set_default_color_collection", "summary": "Set Default Color Collection", "description": "### Set the global default Color Collection by ID\n\nReturns the new specified default Color Collection object.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1846,7 +1926,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "default_color_collection", "summary": "Get Default Color Collection", "description": "### Get the default color collection\n\nUse this to retrieve the default Color Collection.\n\nSet the default color collection with [ColorCollection](#!/ColorCollection/set_default_color_collection)\n", @@ -1876,7 +1958,9 @@ }, "/color_collections/{collection_id}": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collection", "summary": "Get Color Collection by ID", "description": "### Get a Color Collection by ID\n\nUse this to retrieve a specific Color Collection.\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1920,7 +2004,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "update_color_collection", "summary": "Update Custom Color collection", "description": "### Update a custom color collection by id.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -1984,7 +2070,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "delete_color_collection", "summary": "Delete ColorCollection", "description": "### Delete a custom color collection by id\n\nThis operation permanently deletes the identified **Custom** color collection.\n\n**Standard** color collections cannot be deleted\n\nBecause multiple color collections can have the same label, they must be deleted by ID, not name.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2038,7 +2126,9 @@ }, "/commands": { "post": { - "tags": ["Command"], + "tags": [ + "Command" + ], "operationId": "create_command", "summary": "Create a custom command", "description": "### Create a new command.\n# Required fields: [:name, :linked_content_id, :linked_content_type]\n# `linked_content_type` must be one of [\"dashboard\", \"lookml_dashboard\"]\n#\n", @@ -2095,7 +2185,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Command"], + "tags": [ + "Command" + ], "operationId": "get_all_commands", "summary": "Get All Commands", "description": "### Get All Commands.\n", @@ -2158,7 +2250,9 @@ }, "/commands/{command_id}": { "patch": { - "tags": ["Command"], + "tags": [ + "Command" + ], "operationId": "update_command", "summary": "Update a custom command", "description": "### Update an existing custom command.\n# Optional fields: ['name', 'description']\n#\n", @@ -2217,7 +2311,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Command"], + "tags": [ + "Command" + ], "operationId": "delete_command", "summary": "Delete a custom command", "description": "### Delete an existing custom command.\n", @@ -2266,7 +2362,9 @@ }, "/content_favorite/search": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "search_content_favorites", "summary": "Search Favorite Contents", "description": "### Search Favorite Content\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -2381,7 +2479,9 @@ }, "/content_favorite/{content_favorite_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_favorite", "summary": "Get Favorite Content", "description": "### Get favorite content by its id", @@ -2426,7 +2526,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "delete_content_favorite", "summary": "Delete Favorite Content", "description": "### Delete favorite content", @@ -2472,7 +2574,9 @@ }, "/content_favorite": { "post": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "create_content_favorite", "summary": "Create Favorite Content", "description": "### Create favorite content", @@ -2531,7 +2635,9 @@ }, "/content_metadata": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "all_content_metadatas", "summary": "Get All Content Metadatas", "description": "### Get information about all content metadata in a space.\n", @@ -2581,7 +2687,9 @@ }, "/content_metadata/{content_metadata_id}": { "patch": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "update_content_metadata", "summary": "Update Content Metadata", "description": "### Move a piece of content.\n", @@ -2640,7 +2748,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_metadata", "summary": "Get Content Metadata", "description": "### Get information about an individual content metadata record.\n", @@ -2687,7 +2797,9 @@ }, "/content_metadata_access": { "post": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "create_content_metadata_access", "summary": "Create Content Metadata Access", "description": "### Create content metadata access.\n", @@ -2752,7 +2864,9 @@ "x-looker-rate-limited": true }, "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "all_content_metadata_accesses", "summary": "Get All Content Metadata Accesses", "description": "### All content metadata access records for a content metadata item.\n", @@ -2802,7 +2916,9 @@ }, "/content_metadata_access/{content_metadata_access_id}": { "put": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "update_content_metadata_access", "summary": "Update Content Metadata Access", "description": "### Update type of access for content metadata.\n", @@ -2860,7 +2976,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "delete_content_metadata_access", "summary": "Delete Content Metadata Access", "description": "### Remove content metadata access.\n", @@ -2906,11 +3024,16 @@ }, "/content_thumbnail/{type}/{resource_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_thumbnail", "summary": "Get Content Thumbnail", "description": "### Get an image representing the contents of a dashboard or look.\n\nThe returned thumbnail is an abstract representation of the contents of a dashbord or look and does not\nreflect the actual data displayed in the respective visualizations.\n", - "produces": ["image/svg+xml", "image/png"], + "produces": [ + "image/svg+xml", + "image/png" + ], "parameters": [ { "name": "type", @@ -2983,7 +3106,9 @@ }, "/content_validation": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_validation", "summary": "Validate Content", "description": "### Validate All Content\n\nPerforms validation of all looks and dashboards\nReturns a list of errors found as well as metadata about the content validation run.\n", @@ -3034,7 +3159,9 @@ }, "/content_view/search": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "search_content_views", "summary": "Search Content Views", "description": "### Search Content Views\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -3162,7 +3289,9 @@ }, "/credentials_email/search": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "search_credentials_email", "summary": "Search CredentialsEmail", "description": "### Search email credentials\n\nReturns all credentials_email records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -3256,7 +3385,9 @@ }, "/custom_welcome_email": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "custom_welcome_email", "summary": "Get Custom Welcome Email", "description": "### Get the current status and content of custom welcome emails\n", @@ -3285,7 +3416,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_custom_welcome_email", "summary": "Update Custom Welcome Email Content", "description": "Update custom welcome email setting and values. Optionally send a test email with the new content to the currently logged in user.\n", @@ -3346,7 +3479,9 @@ }, "/custom_welcome_email_test": { "put": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_custom_welcome_email_test", "summary": "Send a test welcome email to the currently logged in user with the supplied content ", "description": "Requests to this endpoint will send a welcome email with the custom content provided in the body to the currently logged in user.\n", @@ -3399,7 +3534,9 @@ }, "/dashboards": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "all_dashboards", "summary": "Get All Dashboards", "description": "### Get information about all active dashboards.\n\nReturns an array of **abbreviated dashboard objects**. Dashboards marked as deleted are excluded from this list.\n\nGet the **full details** of a specific dashboard by id with [dashboard()](#!/Dashboard/dashboard)\n\nFind **deleted dashboards** with [search_dashboards()](#!/Dashboard/search_dashboards)\n", @@ -3439,7 +3576,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard", "summary": "Create Dashboard", "description": "### Create a new dashboard\n\nCreates a new dashboard object and returns the details of the newly created dashboard.\n\n`Title`, `user_id`, and `space_id` are all required fields.\n`Space_id` and `user_id` must contain the id of an existing space or user, respectively.\nA dashboard's `title` must be unique within the space in which it resides.\n\nIf you receive a 422 error response when creating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n\nYou can **update** an existing dashboard with [update_dashboard()](#!/Dashboard/update_dashboard)\n\nYou can **permanently delete** an existing dashboard with [delete_dashboard()](#!/Dashboard/delete_dashboard)\n", @@ -3498,7 +3637,9 @@ }, "/dashboards/search": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "search_dashboards", "summary": "Search Dashboards", "description": "### Search Dashboards\n\nReturns an **array of dashboard objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nThe parameters `limit`, and `offset` are recommended for fetching results in page-size chunks.\n\nGet a **single dashboard** by id with [dashboard()](#!/Dashboard/dashboard)\n", @@ -3670,7 +3811,9 @@ }, "/dashboards/{lookml_dashboard_id}/import/{space_id}": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "import_lookml_dashboard", "summary": "Import LookML Dashboard", "description": "### Import a LookML dashboard to a space as a UDD\nCreates a UDD (a dashboard which exists in the Looker database rather than as a LookML file) from the LookML dashboard\nand places it in the space specified. The created UDD will have a lookml_link_id which links to the original LookML dashboard.\n\nTo give the imported dashboard specify a (e.g. title: \"my title\") in the body of your request, otherwise the imported\ndashboard will have the same title as the original LookML dashboard.\n\nFor this operation to succeed the user must have permission to see the LookML dashboard in question, and have permission to\ncreate content in the space the dashboard is being imported to.\n\n**Sync** a linked UDD with [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard)\n**Unlink** a linked UDD by setting lookml_link_id to null with [update_dashboard()](#!/Dashboard/update_dashboard)\n", @@ -3756,7 +3899,9 @@ }, "/dashboards/{lookml_dashboard_id}/sync": { "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "sync_lookml_dashboard", "summary": "Sync LookML Dashboard", "description": "### Update all linked dashboards to match the specified LookML dashboard.\n\nAny UDD (a dashboard which exists in the Looker database rather than as a LookML file) which has a `lookml_link_id`\nproperty value referring to a LookML dashboard's id (model::dashboardname) will be updated so that it matches the current state of the LookML dashboard.\n\nFor this operation to succeed the user must have permission to view the LookML dashboard, and only linked dashboards\nthat the user has permission to update will be synced.\n\nTo **link** or **unlink** a UDD set the `lookml_link_id` property with [update_dashboard()](#!/Dashboard/update_dashboard)\n", @@ -3827,7 +3972,9 @@ }, "/dashboards/{dashboard_id}": { "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard", "summary": "Delete Dashboard", "description": "### Delete the dashboard with the specified id\n\nPermanently **deletes** a dashboard. (The dashboard cannot be recovered after this operation.)\n\n\"Soft\" delete or hide a dashboard by setting its `deleted` status to `True` with [update_dashboard()](#!/Dashboard/update_dashboard).\n\nNote: When a dashboard is deleted in the UI, it is soft deleted. Use this API call to permanently remove it, if desired.\n", @@ -3876,7 +4023,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard", "summary": "Update Dashboard", "description": "### Update a dashboard\n\nYou can use this function to change the string and integer properties of\na dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components\ncannot be modified by this function - use the update functions for the respective\nnested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter)\nto modify nested objects referenced by a dashboard.\n\nIf you receive a 422 error response when updating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n", @@ -3940,7 +4089,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard", "summary": "Get Dashboard", "description": "### Get information about a dashboard\n\nReturns the full details of the identified dashboard object\n\nGet a **summary list** of all active dashboards with [all_dashboards()](#!/Dashboard/all_dashboards)\n\nYou can **Search** for dashboards with [search_dashboards()](#!/Dashboard/search_dashboards)\n", @@ -3986,7 +4137,9 @@ }, "/dashboards/aggregate_table_lookml/{dashboard_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_aggregate_table_lookml", "summary": "Get Aggregate Table LookML for a dashboard", "description": "### Get Aggregate Table LookML for Each Query on a Dahboard\n\nReturns a JSON object that contains the dashboard id and Aggregate Table lookml\n\n", @@ -4025,7 +4178,9 @@ }, "/dashboards/lookml/{dashboard_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_lookml", "summary": "Get lookml of a UDD", "description": "### Get lookml of a UDD\n\nReturns a JSON object that contains the dashboard id and the full lookml\n\n", @@ -4064,7 +4219,9 @@ }, "/dashboards/{dashboard_id}/move": { "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "move_dashboard", "summary": "Move Dashboard", "description": "### Move an existing dashboard\n\nMoves a dashboard to a specified folder, and returns the moved dashboard.\n\n`dashboard_id` and `folder_id` are required.\n`dashboard_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard.\n", @@ -4128,7 +4285,9 @@ }, "/dashboards/{dashboard_id}/copy": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "copy_dashboard", "summary": "Copy Dashboard", "description": "### Copy an existing dashboard\n\nCreates a copy of an existing dashboard, in a specified folder, and returns the copied dashboard.\n\n`dashboard_id` is required, `dashboard_id` and `folder_id` must already exist if specified.\n`folder_id` will default to the existing folder.\n\nIf a dashboard with the same title already exists in the target folder, the copy will have '(copy)'\n or '(copy <# of copies>)' appended.\n", @@ -4198,7 +4357,9 @@ }, "/dashboard_elements/search": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "search_dashboard_elements", "summary": "Search Dashboard Elements", "description": "### Search Dashboard Elements\n\nReturns an **array of DashboardElement objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -4284,7 +4445,9 @@ }, "/dashboard_elements/{dashboard_element_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_element", "summary": "Get DashboardElement", "description": "### Get information about the dashboard element with a specific id.", @@ -4328,7 +4491,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_element", "summary": "Delete DashboardElement", "description": "### Delete a dashboard element with a specific id.", @@ -4371,7 +4536,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_element", "summary": "Update DashboardElement", "description": "### Update the dashboard element with a specific id.", @@ -4438,7 +4605,9 @@ }, "/dashboards/{dashboard_id}/dashboard_elements": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_elements", "summary": "Get All DashboardElements", "description": "### Get information about all the dashboard elements on a dashboard with a specific id.", @@ -4487,7 +4656,9 @@ }, "/dashboard_elements": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_element", "summary": "Create DashboardElement", "description": "### Create a dashboard element on the dashboard with a specific id.", @@ -4553,7 +4724,9 @@ }, "/dashboard_filters/{dashboard_filter_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_filter", "summary": "Get Dashboard Filter", "description": "### Get information about the dashboard filters with a specific id.", @@ -4597,7 +4770,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_filter", "summary": "Delete Dashboard Filter", "description": "### Delete a dashboard filter with a specific id.", @@ -4640,7 +4815,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_filter", "summary": "Update Dashboard Filter", "description": "### Update the dashboard filter with a specific id.", @@ -4707,7 +4884,9 @@ }, "/dashboards/{dashboard_id}/dashboard_filters": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_filters", "summary": "Get All Dashboard Filters", "description": "### Get information about all the dashboard filters on a dashboard with a specific id.", @@ -4756,7 +4935,9 @@ }, "/dashboard_filters": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_filter", "summary": "Create Dashboard Filter", "description": "### Create a dashboard filter on the dashboard with a specific id.", @@ -4822,7 +5003,9 @@ }, "/dashboard_layout_components/{dashboard_layout_component_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout_component", "summary": "Get DashboardLayoutComponent", "description": "### Get information about the dashboard elements with a specific id.", @@ -4866,7 +5049,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_layout_component", "summary": "Update DashboardLayoutComponent", "description": "### Update the dashboard element with a specific id.", @@ -4933,7 +5118,9 @@ }, "/dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout_dashboard_layout_components", "summary": "Get All DashboardLayoutComponents", "description": "### Get information about all the dashboard layout components for a dashboard layout with a specific id.", @@ -4982,7 +5169,9 @@ }, "/dashboard_layouts/{dashboard_layout_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout", "summary": "Get DashboardLayout", "description": "### Get information about the dashboard layouts with a specific id.", @@ -5026,7 +5215,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_layout", "summary": "Delete DashboardLayout", "description": "### Delete a dashboard layout with a specific id.", @@ -5075,7 +5266,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_layout", "summary": "Update DashboardLayout", "description": "### Update the dashboard layout with a specific id.", @@ -5142,7 +5335,9 @@ }, "/dashboards/{dashboard_id}/dashboard_layouts": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_layouts", "summary": "Get All DashboardLayouts", "description": "### Get information about all the dashboard elements on a dashboard with a specific id.", @@ -5191,7 +5386,9 @@ }, "/dashboard_layouts": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_layout", "summary": "Create DashboardLayout", "description": "### Create a dashboard layout on the dashboard with a specific id.", @@ -5257,7 +5454,9 @@ }, "/data_actions": { "post": { - "tags": ["DataAction"], + "tags": [ + "DataAction" + ], "operationId": "perform_data_action", "summary": "Send a Data Action", "description": "Perform a data action. The data action object can be obtained from query results, and used to perform an arbitrary action.", @@ -5298,7 +5497,9 @@ }, "/data_actions/form": { "post": { - "tags": ["DataAction"], + "tags": [ + "DataAction" + ], "operationId": "fetch_remote_data_action_form", "summary": "Fetch Remote Data Action Form", "description": "For some data actions, the remote server may supply a form requesting further user input. This endpoint takes a data action, asks the remote server to generate a form for it, and returns that form to you for presentation to the user.", @@ -5348,7 +5549,9 @@ }, "/datagroups": { "get": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "all_datagroups", "summary": "Get All Datagroups", "description": "### Get information about all datagroups.\n", @@ -5381,7 +5584,9 @@ }, "/datagroups/{datagroup_id}": { "get": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "datagroup", "summary": "Get Datagroup", "description": "### Get information about a datagroup.\n", @@ -5419,7 +5624,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "update_datagroup", "summary": "Update Datagroup", "description": "### Update a datagroup using the specified params.\n", @@ -5486,7 +5693,9 @@ }, "/connections": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_connections", "summary": "Get All Connections", "description": "### Get information about all connections.\n", @@ -5526,7 +5735,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_connection", "summary": "Create Connection", "description": "### Create a connection using the specified configuration.\n", @@ -5585,7 +5796,9 @@ }, "/connections/{connection_name}": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "connection", "summary": "Get Connection", "description": "### Get information about a connection.\n", @@ -5629,7 +5842,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "update_connection", "summary": "Update Connection", "description": "### Update a connection using the specified configuration.\n", @@ -5687,7 +5902,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_connection", "summary": "Delete Connection", "description": "### Delete a connection.\n", @@ -5732,7 +5949,9 @@ }, "/connections/{connection_name}/connection_override/{override_context}": { "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_connection_override", "summary": "Delete Connection Override", "description": "### Delete a connection override.\n", @@ -5790,7 +6009,9 @@ }, "/connections/{connection_name}/test": { "put": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_connection", "summary": "Test Connection", "description": "### Test an existing connection.\n\nNote that a connection's 'dialect' property has a 'connection_tests' property that lists the\nspecific types of tests that the connection supports.\n\nThis API is rate limited.\n\nUnsupported tests in the request will be ignored.\n", @@ -5856,7 +6077,9 @@ }, "/connections/test": { "put": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_connection_config", "summary": "Test Connection Configuration", "description": "### Test a connection configuration.\n\nNote that a connection's 'dialect' property has a 'connection_tests' property that lists the\nspecific types of tests that the connection supports.\n\nThis API is rate limited.\n\nUnsupported tests in the request will be ignored.\n", @@ -5918,7 +6141,9 @@ }, "/projects/{project_id}/manifest/lock_all": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "lock_all", "summary": "Lock All", "description": " ### Generate Lockfile for All LookML Dependencies\n\n Git must have been configured, must be in dev mode and deploy permission required\n\n Install_all is a two step process\n 1. For each remote_dependency in a project the dependency manager will resolve any ambiguous ref.\n 2. The project will then write out a lockfile including each remote_dependency with its resolved ref.\n\n", @@ -5979,7 +6204,9 @@ }, "/derived_table/graph/model/{model}": { "get": { - "tags": ["DerivedTable"], + "tags": [ + "DerivedTable" + ], "operationId": "graph_derived_tables_for_model", "summary": "Get Derived Table graph for model", "description": "### Discover information about derived tables\n", @@ -6032,7 +6259,9 @@ }, "/derived_table/graph/view/{view}": { "get": { - "tags": ["DerivedTable"], + "tags": [ + "DerivedTable" + ], "operationId": "graph_derived_tables_for_view", "summary": "Get subgraph of derived table and dependencies", "description": "### Get the subgraph representing this derived table and its dependencies.\n", @@ -6085,7 +6314,9 @@ }, "/dialect_info": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_dialect_infos", "summary": "Get All Dialect Infos", "description": "### Get information about all dialects.\n", @@ -6127,7 +6358,9 @@ }, "/digest_emails_enabled": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "digest_emails_enabled", "summary": "Get Digest_emails", "description": "### Retrieve the value for whether or not digest emails is enabled\n", @@ -6155,7 +6388,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_digest_emails_enabled", "summary": "Update Digest_emails", "description": "### Update the setting for enabling/disabling digest emails\n", @@ -6208,7 +6443,9 @@ }, "/digest_email_send": { "post": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "create_digest_email_send", "summary": "Deliver digest email contents", "description": "### Trigger the generation of digest email records and send them to Looker's internal system. This does not send\nany actual emails, it generates records containing content which may be of interest for users who have become inactive.\nEmails will be sent at a later time from Looker's internal system if the Digest Emails feature is enabled in settings.", @@ -6245,7 +6482,9 @@ }, "/embed_config/secrets": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_embed_secret", "summary": "Create Embed Secret", "description": "### Create an embed secret using the specified information.\n\nThe value of the `secret` field will be set by Looker and returned.\n", @@ -6304,7 +6543,9 @@ }, "/embed_config/secrets/{embed_secret_id}": { "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_embed_secret", "summary": "Delete Embed Secret", "description": "### Delete an embed secret.\n", @@ -6350,7 +6591,9 @@ }, "/embed/sso_url": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_sso_embed_url", "summary": "Create SSO Embed Url", "description": "### Create SSO Embed URL\n\nCreates an SSO embed URL and cryptographically signs it with an embed secret.\nThis signed URL can then be used to instantiate a Looker embed session in a PBL web application.\nDo not make any modifications to this URL - any change may invalidate the signature and\ncause the URL to fail to load a Looker embed session.\n\nA signed SSO embed URL can only be used once. After it has been used to request a page from the\nLooker server, the URL is invalid. Future requests using the same URL will fail. This is to prevent\n'replay attacks'.\n\nThe `target_url` property must be a complete URL of a Looker UI page - scheme, hostname, path and query params.\nTo load a dashboard with id 56 and with a filter of `Date=1 years`, the looker URL would look like `https:/myname.looker.com/dashboards/56?Date=1%20years`.\nThe best way to obtain this target_url is to navigate to the desired Looker page in your web browser,\ncopy the URL shown in the browser address bar and paste it into the `target_url` property as a quoted string value in this API request.\n\nPermissions for the embed user are defined by the groups in which the embed user is a member (group_ids property)\nand the lists of models and permissions assigned to the embed user.\nAt a minimum, you must provide values for either the group_ids property, or both the models and permissions properties.\nThese properties are additive; an embed user can be a member of certain groups AND be granted access to models and permissions.\n\nThe embed user's access is the union of permissions granted by the group_ids, models, and permissions properties.\n\nThis function does not strictly require all group_ids, user attribute names, or model names to exist at the moment the\nSSO embed url is created. Unknown group_id, user attribute names or model names will be passed through to the output URL.\nTo diagnose potential problems with an SSO embed URL, you can copy the signed URL into the Embed URI Validator text box in `/admin/embed`.\n\nThe `secret_id` parameter is optional. If specified, its value must be the id of an active secret defined in the Looker instance.\nif not specified, the URL will be signed using the newest active secret defined in the Looker instance.\n\n#### Security Note\nProtect this signed URL as you would an access token or password credentials - do not write\nit to disk, do not pass it to a third party, and only pass it through a secure HTTPS\nencrypted transport.\n", @@ -6409,7 +6652,9 @@ }, "/embed/token_url/me": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_embed_url_as_me", "summary": "Create Embed URL", "description": "### Create an Embed URL\n\nCreates an embed URL that runs as the Looker user making this API call. (\"Embed as me\")\nThis embed URL can then be used to instantiate a Looker embed session in a\n\"Powered by Looker\" (PBL) web application.\n\nThis is similar to Private Embedding (https://docs.looker.com/r/admin/embed/private-embed). Instead of\nof logging into the Web UI to authenticate, the user has already authenticated against the API to be able to\nmake this call. However, unlike Private Embed where the user has access to any other part of the Looker UI,\nthe embed web session created by requesting the EmbedUrlResponse.url in a browser only has access to\ncontent visible under the `/embed` context.\n\nAn embed URL can only be used once, and must be used within 5 minutes of being created. After it\nhas been used to request a page from the Looker server, the URL is invalid. Future requests using\nthe same URL will fail. This is to prevent 'replay attacks'.\n\nThe `target_url` property must be a complete URL of a Looker Embedded UI page - scheme, hostname, path starting with \"/embed\" and query params.\nTo load a dashboard with id 56 and with a filter of `Date=1 years`, the looker Embed URL would look like `https://myname.looker.com/embed/dashboards/56?Date=1%20years`.\nThe best way to obtain this target_url is to navigate to the desired Looker page in your web browser,\ncopy the URL shown in the browser address bar, insert \"/embed\" after the host/port, and paste it into the `target_url` property as a quoted string value in this API request.\n\n#### Security Note\nProtect this embed URL as you would an access token or password credentials - do not write\nit to disk, do not pass it to a third party, and only pass it through a secure HTTPS\nencrypted transport.\n", @@ -6468,7 +6713,9 @@ }, "/external_oauth_applications": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_external_oauth_applications", "summary": "Get All External OAuth Applications", "description": "### Get all External OAuth Applications.\n\nThis is an OAuth Application which Looker uses to access external systems.\n", @@ -6515,7 +6762,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_external_oauth_application", "summary": "Create External OAuth Application", "description": "### Create an OAuth Application using the specified configuration.\n\nThis is an OAuth Application which Looker uses to access external systems.\n", @@ -6574,7 +6823,9 @@ }, "/external_oauth_applications/user_state": { "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_oauth_application_user_state", "summary": "Create Create OAuth user state.", "description": "### Create OAuth User state.\n", @@ -6633,7 +6884,9 @@ }, "/projects/{project_id}/git_branches": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_git_branches", "summary": "Get All Git Branches", "description": "### Get All Git Branches\n\nReturns a list of git branches in the project repository\n", @@ -6675,7 +6928,9 @@ }, "/projects/{project_id}/git_branch": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "git_branch", "summary": "Get Active Git Branch", "description": "### Get the Current Git Branch\n\nReturns the git branch currently checked out in the given project repository\n", @@ -6712,7 +6967,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_git_branch", "summary": "Checkout New Git Branch", "description": "### Create and Checkout a Git Branch\n\nCreates and checks out a new branch in the given project repository\nOnly allowed in development mode\n - Call `update_session` to select the 'dev' workspace.\n\nOptionally specify a branch name, tag name or commit SHA as the start point in the ref field.\n If no ref is specified, HEAD of the current branch will be used as the start point for the new branch.\n\n", @@ -6776,7 +7033,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_git_branch", "summary": "Update Project Git Branch", "description": "### Checkout and/or reset --hard an existing Git Branch\n\nOnly allowed in development mode\n - Call `update_session` to select the 'dev' workspace.\n\nCheckout an existing branch if name field is different from the name of the currently checked out branch.\n\nOptionally specify a branch name, tag name or commit SHA to which the branch should be reset.\n **DANGER** hard reset will be force pushed to the remote. Unsaved changes and commits may be permanently lost.\n\n", @@ -6836,7 +7095,9 @@ }, "/projects/{project_id}/git_branch/{branch_name}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "find_git_branch", "summary": "Find a Git Branch", "description": "### Get the specified Git Branch\n\nReturns the git branch specified in branch_name path param if it exists in the given project repository\n", @@ -6880,7 +7141,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "delete_git_branch", "summary": "Delete a Git Branch", "description": "### Delete the specified Git Branch\n\nDelete git branch specified in branch_name path param from local and remote of specified project repository\n", @@ -6932,7 +7195,9 @@ }, "/groups": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_groups", "summary": "Get All Groups", "description": "### Get information about all groups.\n", @@ -7022,7 +7287,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "create_group", "summary": "Create Group", "description": "### Creates a new group (admin only).\n", @@ -7088,7 +7355,9 @@ }, "/groups/search": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "search_groups", "summary": "Search Groups", "description": "### Search groups\n\nReturns all group records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -7196,7 +7465,9 @@ }, "/groups/search/with_roles": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "search_groups_with_roles", "summary": "Search Groups with Roles", "description": "### Search groups include roles\n\nReturns all group records that match the given search criteria, and attaches any associated roles.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -7304,7 +7575,9 @@ }, "/groups/search/with_hierarchy": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "search_groups_with_hierarchy", "summary": "Search Groups with Hierarchy", "description": "### Search groups include hierarchy\n\nReturns all group records that match the given search criteria, and attaches\nassociated role_ids and parent group_ids.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -7412,7 +7685,9 @@ }, "/groups/{group_id}": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "group", "summary": "Get Group", "description": "### Get information about a group.\n", @@ -7457,7 +7732,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "update_group", "summary": "Update Group", "description": "### Updates the a group (admin only).", @@ -7523,7 +7800,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group", "summary": "Delete Group", "description": "### Deletes a group (admin only).\n", @@ -7575,7 +7854,9 @@ }, "/groups/{group_id}/groups": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_group_groups", "summary": "Get All Groups in Group", "description": "### Get information about all the groups in a group\n", @@ -7623,7 +7904,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "add_group_group", "summary": "Add a Group to Group", "description": "### Adds a new group to a group.\n", @@ -7678,7 +7961,9 @@ }, "/groups/{group_id}/users": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_group_users", "summary": "Get All Users in Group", "description": "### Get information about all the users directly included in a group.\n", @@ -7749,7 +8034,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "add_group_user", "summary": "Add a User to Group", "description": "### Adds a new user to a group.\n", @@ -7804,7 +8091,9 @@ }, "/groups/{group_id}/users/{user_id}": { "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group_user", "summary": "Remove a User from Group", "description": "### Removes a user from a group.\n", @@ -7855,7 +8144,9 @@ }, "/groups/{group_id}/groups/{deleting_group_id}": { "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group_from_group", "summary": "Deletes a Group from Group", "description": "### Removes a group from a group.\n", @@ -7906,7 +8197,9 @@ }, "/groups/{group_id}/attribute_values/{user_attribute_id}": { "patch": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "update_user_attribute_group_value", "summary": "Set User Attribute Group Value", "description": "### Set the value of a user attribute for a group.\n\nFor information about how user attribute values are calculated, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values).\n", @@ -7967,7 +8260,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_user_attribute_group_value", "summary": "Delete User Attribute Group Value", "description": "### Remove a user attribute value from a group.\n", @@ -8012,7 +8307,9 @@ }, "/boards": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "all_boards", "summary": "Get All Boards", "description": "### Get information about all boards.\n", @@ -8052,7 +8349,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "create_board", "summary": "Create Board", "description": "### Create a new board.\n", @@ -8118,7 +8417,9 @@ }, "/boards/search": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "search_boards", "summary": "Search Boards", "description": "### Search Boards\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -8248,7 +8549,9 @@ }, "/boards/{board_id}": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "board", "summary": "Get Board", "description": "### Get information about a board.\n", @@ -8293,7 +8596,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "update_board", "summary": "Update Board", "description": "### Update a board definition.\n", @@ -8359,7 +8664,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "delete_board", "summary": "Delete Board", "description": "### Delete a board.\n", @@ -8405,7 +8712,9 @@ }, "/board_items": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "all_board_items", "summary": "Get All Board Items", "description": "### Get information about all board items.\n", @@ -8459,7 +8768,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "create_board_item", "summary": "Create Board Item", "description": "### Create a new board item.\n", @@ -8525,7 +8836,9 @@ }, "/board_items/{board_item_id}": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "board_item", "summary": "Get Board Item", "description": "### Get information about a board item.\n", @@ -8570,7 +8883,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "update_board_item", "summary": "Update Board Item", "description": "### Update a board item definition.\n", @@ -8636,7 +8951,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "delete_board_item", "summary": "Delete Board Item", "description": "### Delete a board item.\n", @@ -8682,7 +8999,9 @@ }, "/primary_homepage_sections": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "all_primary_homepage_sections", "summary": "Get All Primary homepage sections", "description": "### Get information about the primary homepage's sections.\n", @@ -8724,7 +9043,9 @@ }, "/board_sections": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "all_board_sections", "summary": "Get All Board sections", "description": "### Get information about all board sections.\n", @@ -8771,7 +9092,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "create_board_section", "summary": "Create Board section", "description": "### Create a new board section.\n", @@ -8837,7 +9160,9 @@ }, "/board_sections/{board_section_id}": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "board_section", "summary": "Get Board section", "description": "### Get information about a board section.\n", @@ -8882,7 +9207,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "update_board_section", "summary": "Update Board section", "description": "### Update a board section definition.\n", @@ -8948,7 +9275,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "delete_board_section", "summary": "Delete Board section", "description": "### Delete a board section.\n", @@ -8994,7 +9323,9 @@ }, "/integration_hubs": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "all_integration_hubs", "summary": "Get All Integration Hubs", "description": "### Get information about all Integration Hubs.\n", @@ -9034,7 +9365,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "create_integration_hub", "summary": "Create Integration Hub", "description": "### Create a new Integration Hub.\n\nThis API is rate limited to prevent it from being used for SSRF attacks\n", @@ -9101,7 +9434,9 @@ }, "/integration_hubs/{integration_hub_id}": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "integration_hub", "summary": "Get Integration Hub", "description": "### Get information about a Integration Hub.\n", @@ -9146,7 +9481,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "update_integration_hub", "summary": "Update Integration Hub", "description": "### Update a Integration Hub definition.\n\nThis API is rate limited to prevent it from being used for SSRF attacks\n", @@ -9213,7 +9550,9 @@ "x-looker-rate-limited": true }, "delete": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "delete_integration_hub", "summary": "Delete Integration Hub", "description": "### Delete a Integration Hub.\n", @@ -9259,7 +9598,9 @@ }, "/integration_hubs/{integration_hub_id}/accept_legal_agreement": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "accept_integration_hub_legal_agreement", "summary": "Accept Integration Hub Legal Agreement", "description": "Accepts the legal agreement for a given integration hub. This only works for integration hubs that have legal_agreement_required set to true and legal_agreement_signed set to false.", @@ -9305,7 +9646,9 @@ }, "/integrations": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "all_integrations", "summary": "Get All Integrations", "description": "### Get information about all Integrations.\n", @@ -9354,7 +9697,9 @@ }, "/integrations/{integration_id}": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "integration", "summary": "Get Integration", "description": "### Get information about a Integration.\n", @@ -9398,7 +9743,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "update_integration", "summary": "Update Integration", "description": "### Update parameters on a Integration.\n", @@ -9465,7 +9812,9 @@ }, "/integrations/{integration_id}/form": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "fetch_integration_form", "summary": "Fetch Remote Integration Form", "description": "Returns the Integration form for presentation to the user.", @@ -9522,7 +9871,9 @@ }, "/integrations/{integration_id}/test": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "test_integration", "summary": "Test integration", "description": "Tests the integration to make sure all the settings are working.", @@ -9567,7 +9918,9 @@ }, "/internal_help_resources_content": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "internal_help_resources_content", "summary": "Get Internal Help Resources Content", "description": "### Set the menu item name and content for internal help resources\n", @@ -9595,7 +9948,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_internal_help_resources_content", "summary": "Update internal help resources content", "description": "Update internal help resources content\n", @@ -9648,7 +10003,9 @@ }, "/internal_help_resources_enabled": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "internal_help_resources", "summary": "Get Internal Help Resources", "description": "### Get and set the options for internal help resources\n", @@ -9678,7 +10035,9 @@ }, "/internal_help_resources": { "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_internal_help_resources", "summary": "Update internal help resources configuration", "description": "Update internal help resources settings\n", @@ -9731,7 +10090,9 @@ }, "/ldap_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "ldap_config", "summary": "Get LDAP Configuration", "description": "### Get the LDAP configuration.\n\nLooker can be optionally configured to authenticate users against an Active Directory or other LDAP directory server.\nLDAP setup requires coordination with an administrator of that directory server.\n\nOnly Looker administrators can read and update the LDAP configuration.\n\nConfiguring LDAP impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single LDAP configuration. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nLDAP is enabled or disabled for Looker using the **enabled** field.\n\nLooker will never return an **auth_password** field. That value can be set, but never retrieved.\n\nSee the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information.\n", @@ -9753,7 +10114,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_ldap_config", "summary": "Update LDAP Configuration", "description": "### Update the LDAP configuration.\n\nConfiguring LDAP impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the LDAP configuration.\n\nLDAP is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any LDAP setting changes be tested using the APIs below before being set globally.\n\nSee the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information.\n", @@ -9800,7 +10163,9 @@ }, "/ldap_config/test_connection": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_connection", "summary": "Test LDAP Connection", "description": "### Test the connection settings for an LDAP configuration.\n\nThis tests that the connection is possible given a connection_host and connection_port.\n\n**connection_host** and **connection_port** are required. **connection_tls** is optional.\n\nExample:\n```json\n{\n \"connection_host\": \"ldap.example.com\",\n \"connection_port\": \"636\",\n \"connection_tls\": true\n}\n```\n\nNo authentication to the LDAP server is attempted.\n\nThe active LDAP settings are not modified.\n", @@ -9847,7 +10212,9 @@ }, "/ldap_config/test_auth": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_auth", "summary": "Test LDAP Auth", "description": "### Test the connection authentication settings for an LDAP configuration.\n\nThis tests that the connection is possible and that a 'server' account to be used by Looker can authenticate to the LDAP server given connection and authentication information.\n\n**connection_host**, **connection_port**, and **auth_username**, are required. **connection_tls** and **auth_password** are optional.\n\nExample:\n```json\n{\n \"connection_host\": \"ldap.example.com\",\n \"connection_port\": \"636\",\n \"connection_tls\": true,\n \"auth_username\": \"cn=looker,dc=example,dc=com\",\n \"auth_password\": \"secret\"\n}\n```\n\nLooker will never return an **auth_password**. If this request omits the **auth_password** field, then the **auth_password** value from the active config (if present) will be used for the test.\n\nThe active LDAP settings are not modified.\n\n", @@ -9894,7 +10261,9 @@ }, "/ldap_config/test_user_info": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_user_info", "summary": "Test LDAP User Info", "description": "### Test the user authentication settings for an LDAP configuration without authenticating the user.\n\nThis test will let you easily test the mapping for user properties and roles for any user without needing to authenticate as that user.\n\nThis test accepts a full LDAP configuration along with a username and attempts to find the full info for the user from the LDAP server without actually authenticating the user. So, user password is not required.The configuration is validated before attempting to contact the server.\n\n**test_ldap_user** is required.\n\nThe active LDAP settings are not modified.\n\n", @@ -9941,7 +10310,9 @@ }, "/ldap_config/test_user_auth": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_user_auth", "summary": "Test LDAP User Auth", "description": "### Test the user authentication settings for an LDAP configuration.\n\nThis test accepts a full LDAP configuration along with a username/password pair and attempts to authenticate the user with the LDAP server. The configuration is validated before attempting the authentication.\n\nLooker will never return an **auth_password**. If this request omits the **auth_password** field, then the **auth_password** value from the active config (if present) will be used for the test.\n\n**test_ldap_user** and **test_ldap_password** are required.\n\nThe active LDAP settings are not modified.\n\n", @@ -9988,7 +10359,9 @@ }, "/legacy_features": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_legacy_features", "summary": "Get All Legacy Features", "description": "### Get all legacy features.\n", @@ -10021,7 +10394,9 @@ }, "/legacy_features/{legacy_feature_id}": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "legacy_feature", "summary": "Get Legacy Feature", "description": "### Get information about the legacy feature with a specific id.\n", @@ -10058,7 +10433,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_legacy_feature", "summary": "Update Legacy Feature", "description": "### Update information about the legacy feature with a specific id.\n", @@ -10118,7 +10495,9 @@ }, "/locales": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_locales", "summary": "Get All Locales", "description": "### Get a list of locales that Looker supports.\n", @@ -10151,7 +10530,9 @@ }, "/looks": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "all_looks", "summary": "Get All Looks", "description": "### Get information about all active Looks\n\nReturns an array of **abbreviated Look objects** describing all the looks that the caller has access to. Soft-deleted Looks are **not** included.\n\nGet the **full details** of a specific look by id with [look(id)](#!/Look/look)\n\nFind **soft-deleted looks** with [search_looks()](#!/Look/search_looks)\n", @@ -10191,7 +10572,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "create_look", "summary": "Create Look", "description": "### Create a Look\n\nTo create a look to display query data, first create the query with [create_query()](#!/Query/create_query)\nthen assign the query's id to the `query_id` property in the call to `create_look()`.\n\nTo place the look into a particular space, assign the space's id to the `space_id` property\nin the call to `create_look()`.\n", @@ -10257,7 +10640,9 @@ }, "/looks/search": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "search_looks", "summary": "Search Looks", "description": "### Search Looks\n\nReturns an **array of Look objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nGet a **single look** by id with [look(id)](#!/Look/look)\n", @@ -10423,7 +10808,9 @@ }, "/looks/{look_id}": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "look", "summary": "Get Look", "description": "### Get a Look.\n\nReturns detailed information about a Look and its associated Query.\n\n", @@ -10467,7 +10854,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "update_look", "summary": "Update Look", "description": "### Modify a Look\n\nUse this function to modify parts of a look. Property values given in a call to `update_look` are\napplied to the existing look, so there's no need to include properties whose values are not changing.\nIt's best to specify only the properties you want to change and leave everything else out\nof your `update_look` call. **Look properties marked 'read-only' will be ignored.**\n\nWhen a user deletes a look in the Looker UI, the look data remains in the database but is\nmarked with a deleted flag (\"soft-deleted\"). Soft-deleted looks can be undeleted (by an admin)\nif the delete was in error.\n\nTo soft-delete a look via the API, use [update_look()](#!/Look/update_look) to change the look's `deleted` property to `true`.\nYou can undelete a look by calling `update_look` to change the look's `deleted` property to `false`.\n\nSoft-deleted looks are excluded from the results of [all_looks()](#!/Look/all_looks) and [search_looks()](#!/Look/search_looks), so they\nessentially disappear from view even though they still reside in the db.\nIn API 3.1 and later, you can pass `deleted: true` as a parameter to [search_looks()](#!/3.1/Look/search_looks) to list soft-deleted looks.\n\nNOTE: [delete_look()](#!/Look/delete_look) performs a \"hard delete\" - the look data is removed from the Looker\ndatabase and destroyed. There is no \"undo\" for `delete_look()`.\n", @@ -10532,7 +10921,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "delete_look", "summary": "Delete Look", "description": "### Permanently Delete a Look\n\nThis operation **permanently** removes a look from the Looker database.\n\nNOTE: There is no \"undo\" for this kind of delete.\n\nFor information about soft-delete (which can be undone) see [update_look()](#!/Look/update_look).\n", @@ -10577,11 +10968,18 @@ }, "/looks/{look_id}/run/{result_format}": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "run_look", "summary": "Run Look", "description": "### Run a Look\n\nRuns a given look's query and returns the results in the requested format.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", - "produces": ["text", "application/json", "image/png", "image/jpeg"], + "produces": [ + "text", + "application/json", + "image/png", + "image/jpeg" + ], "parameters": [ { "name": "look_id", @@ -10723,7 +11121,9 @@ }, "/looks/{look_id}/copy": { "post": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "copy_look", "summary": "Copy Look", "description": "### Copy an existing look\n\nCreates a copy of an existing look, in a specified folder, and returns the copied look.\n\n`look_id` and `folder_id` are required.\n\n`look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard.\n", @@ -10793,7 +11193,9 @@ }, "/looks/{look_id}/move": { "patch": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "move_look", "summary": "Move Look", "description": "### Move an existing look\n\nMoves a look to a specified folder, and returns the moved look.\n\n`look_id` and `folder_id` are required.\n`look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard.\n", @@ -10857,7 +11259,9 @@ }, "/lookml_models": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "all_lookml_models", "summary": "Get All LookML Models", "description": "### Get information about all lookml models.\n", @@ -10913,7 +11317,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "create_lookml_model", "summary": "Create LookML Model", "description": "### Create a lookml model using the specified configuration.\n", @@ -10972,7 +11378,9 @@ }, "/lookml_models/{lookml_model_name}": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "lookml_model", "summary": "Get LookML Model", "description": "### Get information about a lookml model.\n", @@ -11016,7 +11424,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "update_lookml_model", "summary": "Update LookML Model", "description": "### Update a lookml model using the specified configuration.\n", @@ -11074,7 +11484,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "delete_lookml_model", "summary": "Delete LookML Model", "description": "### Delete a lookml model.\n", @@ -11119,7 +11531,9 @@ }, "/lookml_models/{lookml_model_name}/explores/{explore_name}": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "lookml_model_explore", "summary": "Get LookML Model Explore", "description": "### Get information about a lookml model explore.\n", @@ -11172,7 +11586,9 @@ }, "/merge_queries/{merge_query_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "merge_query", "summary": "Get Merge Query", "description": "### Get Merge Query\n\nReturns a merge query object given its id.\n", @@ -11218,7 +11634,9 @@ }, "/merge_queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_merge_query", "summary": "Create Merge Query", "description": "### Create Merge Query\n\nCreates a new merge query object.\n\nA merge query takes the results of one or more queries and combines (merges) the results\naccording to field mapping definitions. The result is similar to a SQL left outer join.\n\nA merge query can merge results of queries from different SQL databases.\n\nThe order that queries are defined in the source_queries array property is significant. The\nfirst query in the array defines the primary key into which the results of subsequent\nqueries will be merged.\n\nLike model/view query objects, merge queries are immutable and have structural identity - if\nyou make a request to create a new merge query that is identical to an existing merge query,\nthe existing merge query will be returned instead of creating a duplicate. Conversely, any\nchange to the contents of a merge query will produce a new object with a new id.\n", @@ -11284,10 +11702,12 @@ }, "/models/{model_name}/views/{view_name}/fields/{field_name}/suggestions": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "model_fieldname_suggestions", "summary": "Model field name suggestions", - "description": "### Field name suggestions for a model and view\n\n", + "description": "### Field name suggestions for a model and view\n\n`filters` is a string hash of values, with the key as the field name and the string value as the filter expression:\n\n```ruby\n{'users.age': '>=60'}\n```\n\nor\n\n```ruby\n{'users.age': '<30'}\n```\n\nor\n\n```ruby\n{'users.age': '=50'}\n```\n", "parameters": [ { "name": "model_name", @@ -11313,16 +11733,19 @@ { "name": "term", "in": "query", - "description": "Search term", + "description": "Search term pattern (evaluated as as `%term%`)", "required": false, "type": "string" }, { "name": "filters", "in": "query", - "description": "Suggestion filters", + "description": "Suggestion filters with field name keys and comparison expressions", "required": false, - "type": "string" + "type": "object", + "additionalProperties": { + "type": "string" + } } ], "responses": { @@ -11351,7 +11774,9 @@ }, "/models/{model_name}": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "get_model", "summary": "Get a single model", "description": "### Get a single model\n\n", @@ -11390,7 +11815,9 @@ }, "/connections/{connection_name}/databases": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_databases", "summary": "List accessible databases to this connection", "description": "### List databases available to this connection\n\nCertain dialects can support multiple databases per single connection.\nIf this connection supports multiple databases, the database names will be returned in an array.\n\nConnections using dialects that do not support multiple databases will return an empty array.\n\n**Note**: [Connection Features](#!/Metadata/connection_features) can be used to determine if a connection supports\nmultiple databases.\n", @@ -11438,7 +11865,9 @@ }, "/connections/{connection_name}/features": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_features", "summary": "Metadata features supported by this connection", "description": "### Retrieve metadata features for this connection\n\nReturns a list of feature names with `true` (available) or `false` (not available)\n\n", @@ -11497,7 +11926,9 @@ }, "/connections/{connection_name}/schemas": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_schemas", "summary": "Get schemas for a connection", "description": "### Get the list of schemas and tables for a connection\n\n", @@ -11572,7 +12003,9 @@ }, "/connections/{connection_name}/tables": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_tables", "summary": "Get tables for a connection", "description": "### Get the list of tables for a schema\n\nFor dialects that support multiple databases, optionally identify which to use. If not provided, the default\ndatabase for the connection will be used.\n\nFor dialects that do **not** support multiple databases, **do not use** the database parameter\n", @@ -11611,6 +12044,21 @@ "description": "Requested fields.", "required": false, "type": "string" + }, + { + "name": "table_filter", + "in": "query", + "description": "Optional. Return tables with names that contain this value", + "required": false, + "type": "string" + }, + { + "name": "table_limit", + "in": "query", + "description": "Optional. Return tables up to the table_limit", + "required": false, + "type": "integer", + "format": "int64" } ], "responses": { @@ -11654,7 +12102,9 @@ }, "/connections/{connection_name}/columns": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_columns", "summary": "Get columns for a connection", "description": "### Get the columns (and therefore also the tables) in a specific schema\n\n", @@ -11751,7 +12201,9 @@ }, "/connections/{connection_name}/search_columns": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_search_columns", "summary": "Search a connection for columns", "description": "### Search a connection for columns matching the specified name\n\n**Note**: `column_name` must be a valid column name. It is not a search pattern.\n", @@ -11820,7 +12272,9 @@ }, "/connections/{connection_name}/cost_estimate": { "post": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_cost_estimate", "summary": "Estimate costs for a connection", "description": "### Connection cost estimating\n\nAssign a `sql` statement to the body of the request. e.g., for Ruby, `{sql: 'select * from users'}`\n\n**Note**: If the connection's dialect has no support for cost estimates, an error will be returned\n", @@ -11888,7 +12342,9 @@ }, "/mobile/settings": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "mobile_settings", "summary": "Get Mobile_Settings", "description": "### Get all mobile settings.\n", @@ -11918,7 +12374,9 @@ }, "/model_sets/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_model_sets", "summary": "Search Model Sets", "description": "### Search model sets\nReturns all model set records that match the given search criteria.\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -12019,7 +12477,9 @@ }, "/model_sets/{model_set_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "model_set", "summary": "Get Model Set", "description": "### Get information about the model set with a specific id.\n", @@ -12064,7 +12524,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_model_set", "summary": "Delete Model Set", "description": "### Delete the model set with a specific id.\n", @@ -12108,7 +12570,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_model_set", "summary": "Update Model Set", "description": "### Update information about the model set with a specific id.\n", @@ -12169,7 +12633,9 @@ }, "/model_sets": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_model_sets", "summary": "Get All Model Sets", "description": "### Get information about all model sets.\n", @@ -12203,7 +12669,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_model_set", "summary": "Create Model Set", "description": "### Create a model set with the specified information. Model sets are used by Roles.\n", @@ -12256,7 +12724,9 @@ }, "/oauth_client_apps": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "all_oauth_client_apps", "summary": "Get All OAuth Client Apps", "description": "### List All OAuth Client Apps\n\nLists all applications registered to use OAuth2 login with this Looker instance, including\nenabled and disabled apps.\n\nResults are filtered to include only the apps that the caller (current user)\nhas permission to see.\n", @@ -12298,7 +12768,9 @@ }, "/oauth_client_apps/{client_guid}": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "oauth_client_app", "summary": "Get OAuth Client App", "description": "### Get Oauth Client App\n\nReturns the registered app client with matching client_guid.\n", @@ -12342,7 +12814,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_oauth_client_app", "summary": "Delete OAuth Client App", "description": "### Delete OAuth Client App\n\nDeletes the registration info of the app with the matching client_guid.\nAll active sessions and tokens issued for this app will immediately become invalid.\n\n### Note: this deletion cannot be undone.\n", @@ -12385,7 +12859,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "register_oauth_client_app", "summary": "Register OAuth App", "description": "### Register an OAuth2 Client App\n\nRegisters details identifying an external web app or native app as an OAuth2 login client of the Looker instance.\nThe app registration must provide a unique client_guid and redirect_uri that the app will present\nin OAuth login requests. If the client_guid and redirect_uri parameters in the login request do not match\nthe app details registered with the Looker instance, the request is assumed to be a forgery and is rejected.\n", @@ -12456,7 +12932,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_oauth_client_app", "summary": "Update OAuth App", "description": "### Update OAuth2 Client App Details\n\nModifies the details a previously registered OAuth2 login client app.\n", @@ -12523,7 +13001,9 @@ }, "/oauth_client_apps/{client_guid}/tokens": { "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "invalidate_tokens", "summary": "Invalidate Tokens", "description": "### Invalidate All Issued Tokens\n\nImmediately invalidates all auth codes, sessions, access tokens and refresh tokens issued for\nthis app for ALL USERS of this app.\n", @@ -12568,7 +13048,9 @@ }, "/oauth_client_apps/{client_guid}/users/{user_id}": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "activate_app_user", "summary": "Activate OAuth App User", "description": "### Activate an app for a user\n\nActivates a user for a given oauth client app. This indicates the user has been informed that\nthe app will have access to the user's looker data, and that the user has accepted and allowed\nthe app to use their Looker account.\n\nActivating a user for an app that the user is already activated with returns a success response.\n", @@ -12635,7 +13117,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "deactivate_app_user", "summary": "Deactivate OAuth App User", "description": "### Deactivate an app for a user\n\nDeactivate a user for a given oauth client app. All tokens issued to the app for\nthis user will be invalid immediately. Before the user can use the app with their\nLooker account, the user will have to read and accept an account use disclosure statement for the app.\n\nAdmin users can deactivate other users, but non-admin users can only deactivate themselves.\n\nAs with most REST DELETE operations, this endpoint does not return an error if the indicated\nresource (app or user) does not exist or has already been deactivated.\n", @@ -12695,7 +13179,9 @@ }, "/oidc_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "oidc_config", "summary": "Get OIDC Configuration", "description": "### Get the OIDC configuration.\n\nLooker can be optionally configured to authenticate users against an OpenID Connect (OIDC)\nauthentication server. OIDC setup requires coordination with an administrator of that server.\n\nOnly Looker administrators can read and update the OIDC configuration.\n\nConfiguring OIDC impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single OIDC configuation. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nOIDC is enabled or disabled for Looker using the **enabled** field.\n", @@ -12717,7 +13203,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_oidc_config", "summary": "Update OIDC Configuration", "description": "### Update the OIDC configuration.\n\nConfiguring OIDC impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the OIDC configuration.\n\nOIDC is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any OIDC setting changes be tested using the APIs below before being set globally.\n", @@ -12764,7 +13252,9 @@ }, "/oidc_test_configs/{test_slug}": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "oidc_test_config", "summary": "Get OIDC Test Configuration", "description": "### Get a OIDC test configuration by test_slug.\n", @@ -12795,7 +13285,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_oidc_test_config", "summary": "Delete OIDC Test Configuration", "description": "### Delete a OIDC test configuration.\n", @@ -12834,7 +13326,9 @@ }, "/oidc_test_configs": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_oidc_test_config", "summary": "Create OIDC Test Configuration", "description": "### Create a OIDC test configuration.\n", @@ -12881,7 +13375,9 @@ }, "/password_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "password_config", "summary": "Get Password Config", "description": "### Get password config.\n", @@ -12909,7 +13405,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_password_config", "summary": "Update Password Config", "description": "### Update password config.\n", @@ -12962,7 +13460,9 @@ }, "/password_config/force_password_reset_at_next_login_for_all_users": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "force_password_reset_at_next_login_for_all_users", "summary": "Force password reset", "description": "### Force all credentials_email users to reset their login passwords upon their next login.\n", @@ -13004,7 +13504,9 @@ }, "/permissions": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_permissions", "summary": "Get All Permissions", "description": "### Get all supported permissions.\n", @@ -13037,7 +13539,9 @@ }, "/permission_sets/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_permission_sets", "summary": "Search Permission Sets", "description": "### Search permission sets\nReturns all permission set records that match the given search criteria.\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -13138,7 +13642,9 @@ }, "/permission_sets/{permission_set_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "permission_set", "summary": "Get Permission Set", "description": "### Get information about the permission set with a specific id.\n", @@ -13183,7 +13689,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_permission_set", "summary": "Delete Permission Set", "description": "### Delete the permission set with a specific id.\n", @@ -13233,7 +13741,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_permission_set", "summary": "Update Permission Set", "description": "### Update information about the permission set with a specific id.\n", @@ -13300,7 +13810,9 @@ }, "/permission_sets": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_permission_sets", "summary": "Get All Permission Sets", "description": "### Get information about all permission sets.\n", @@ -13340,7 +13852,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_permission_set", "summary": "Create Permission Set", "description": "### Create a permission set with the specified information. Permission sets are used by Roles.\n", @@ -13399,7 +13913,9 @@ }, "/projects/{project_id}/deploy_ref_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "deploy_ref_to_production", "summary": "Deploy Remote Branch or Ref to Production", "description": "### Deploy a Remote Branch or Ref to Production\n\nGit must have been configured and deploy permission required.\n\nDeploy is a one/two step process\n1. If this is the first deploy of this project, create the production project with git repository.\n2. Pull the branch or ref into the production project.\n\nCan only specify either a branch or a ref.\n\n", @@ -13467,7 +13983,9 @@ }, "/projects/{project_id}/deploy_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "deploy_to_production", "summary": "Deploy To Production", "description": "### Deploy LookML from this Development Mode Project to Production\n\nGit must have been configured, must be in dev mode and deploy permission required\n\nDeploy is a two / three step process:\n\n1. Push commits in current branch of dev mode project to the production branch (origin/master).\n Note a. This step is skipped in read-only projects.\n Note b. If this step is unsuccessful for any reason (e.g. rejected non-fastforward because production branch has\n commits not in current branch), subsequent steps will be skipped.\n2. If this is the first deploy of this project, create the production project with git repository.\n3. Pull the production branch into the production project.\n\n", @@ -13521,7 +14039,9 @@ }, "/projects/{project_id}/reset_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "reset_project_to_production", "summary": "Reset To Production", "description": "### Reset a project to the revision of the project that is in production.\n\n**DANGER** this will delete any changes that have not been pushed to a remote repository.\n", @@ -13575,7 +14095,9 @@ }, "/projects/{project_id}/reset_to_remote": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "reset_project_to_remote", "summary": "Reset To Remote", "description": "### Reset a project development branch to the revision of the project that is on the remote.\n\n**DANGER** this will delete any changes that have not been pushed to a remote repository.\n", @@ -13629,7 +14151,9 @@ }, "/projects": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_projects", "summary": "Get All Projects", "description": "### Get All Projects\n\nReturns all projects visible to the current user\n", @@ -13669,7 +14193,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_project", "summary": "Create Project", "description": "### Create A Project\n\ndev mode required.\n- Call `update_session` to select the 'dev' workspace.\n\n`name` is required.\n`git_remote_url` is not allowed. To configure Git for the newly created project, follow the instructions in `update_project`.\n\n", @@ -13728,7 +14254,9 @@ }, "/projects/{project_id}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project", "summary": "Get Project", "description": "### Get A Project\n\nReturns the project with the given project id\n", @@ -13772,7 +14300,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_project", "summary": "Update Project", "description": "### Update Project Configuration\n\nApply changes to a project's configuration.\n\n\n#### Configuring Git for a Project\n\nTo set up a Looker project with a remote git repository, follow these steps:\n\n1. Call `update_session` to select the 'dev' workspace.\n1. Call `create_git_deploy_key` to create a new deploy key for the project\n1. Copy the deploy key text into the remote git repository's ssh key configuration\n1. Call `update_project` to set project's `git_remote_url` ()and `git_service_name`, if necessary).\n\nWhen you modify a project's `git_remote_url`, Looker connects to the remote repository to fetch\nmetadata. The remote git repository MUST be configured with the Looker-generated deploy\nkey for this project prior to setting the project's `git_remote_url`.\n\nTo set up a Looker project with a git repository residing on the Looker server (a 'bare' git repo):\n\n1. Call `update_session` to select the 'dev' workspace.\n1. Call `update_project` setting `git_remote_url` to null and `git_service_name` to \"bare\".\n\n", @@ -13851,7 +14381,9 @@ }, "/projects/{project_id}/manifest": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "manifest", "summary": "Get Manifest", "description": "### Get A Projects Manifest object\n\nReturns the project with the given project id\n", @@ -13890,11 +14422,15 @@ }, "/projects/{project_id}/git/deploy_key": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_git_deploy_key", "summary": "Create Deploy Key", "description": "### Create Git Deploy Key\n\nCreate a public/private key pair for authenticating ssh git requests from Looker to a remote git repository\nfor a particular Looker project.\n\nReturns the public key of the generated ssh key pair.\n\nCopy this public key to your remote git repository's ssh keys configuration so that the remote git service can\nvalidate and accept git requests from the Looker server.\n", - "produces": ["text/plain"], + "produces": [ + "text/plain" + ], "parameters": [ { "name": "project_id", @@ -13946,11 +14482,15 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "git_deploy_key", "summary": "Git Deploy Key", "description": "### Git Deploy Key\n\nReturns the ssh public key previously created for a project's git repository.\n", - "produces": ["text/plain"], + "produces": [ + "text/plain" + ], "parameters": [ { "name": "project_id", @@ -13986,7 +14526,9 @@ }, "/projects/{project_id}/validate": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "validate_project", "summary": "Validate Project", "description": "### Validate Project\n\nPerforms lint validation of all lookml files in the project.\nReturns a list of errors found, if any.\n\nValidating the content of all the files in a project can be computationally intensive\nfor large projects. For best performance, call `validate_project(project_id)` only\nwhen you really want to recompute project validation. To quickly display the results of\nthe most recent project validation (without recomputing), use `project_validation_results(project_id)`\n", @@ -14042,7 +14584,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_validation_results", "summary": "Cached Project Validation Results", "description": "### Get Cached Project Validation Results\n\nReturns the cached results of a previous project validation calculation, if any.\nReturns http status 204 No Content if no validation results exist.\n\nValidating the content of all the files in a project can be computationally intensive\nfor large projects. Use this API to simply fetch the results of the most recent\nproject validation rather than revalidating the entire project from scratch.\n\nA value of `\"stale\": true` in the response indicates that the project has changed since\nthe cached validation results were computed. The cached validation results may no longer\nreflect the current state of the project.\n", @@ -14091,7 +14635,9 @@ }, "/projects/{project_id}/current_workspace": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_workspace", "summary": "Get Project Workspace", "description": "### Get Project Workspace\n\nReturns information about the state of the project files in the currently selected workspace\n", @@ -14137,7 +14683,9 @@ }, "/projects/{project_id}/files": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_project_files", "summary": "Get All Project Files", "description": "### Get All Project Files\n\nReturns a list of the files in the project\n", @@ -14186,7 +14734,9 @@ }, "/projects/{project_id}/files/file": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_file", "summary": "Get Project File", "description": "### Get Project File Info\n\nReturns information about a file in the project\n", @@ -14239,7 +14789,9 @@ }, "/projects/{project_id}/git_connection_tests": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_git_connection_tests", "summary": "Get All Git Connection Tests", "description": "### Get All Git Connection Tests\n\ndev mode required.\n - Call `update_session` to select the 'dev' workspace.\n\nReturns a list of tests which can be run against a project's (or the dependency project for the provided remote_url) git connection. Call [Run Git Connection Test](#!/Project/run_git_connection_test) to execute each test in sequence.\n\nTests are ordered by increasing specificity. Tests should be run in the order returned because later tests require functionality tested by tests earlier in the test list.\n\nFor example, a late-stage test for write access is meaningless if connecting to the git server (an early test) is failing.\n", @@ -14288,7 +14840,9 @@ }, "/projects/{project_id}/git_connection_tests/{test_id}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "run_git_connection_test", "summary": "Run Git Connection Test", "description": "### Run a git connection test\n\nRun the named test on the git service used by this project (or the dependency project for the provided remote_url) and return the result. This\nis intended to help debug git connections when things do not work properly, to give\nmore helpful information about why a git url is not working with Looker.\n\nTests should be run in the order they are returned by [Get All Git Connection Tests](#!/Project/all_git_connection_tests).\n", @@ -14360,7 +14914,9 @@ }, "/projects/{project_id}/lookml_tests": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_lookml_tests", "summary": "Get All LookML Tests", "description": "### Get All LookML Tests\n\nReturns a list of tests which can be run to validate a project's LookML code and/or the underlying data,\noptionally filtered by the file id.\nCall [Run LookML Test](#!/Project/run_lookml_test) to execute tests.\n", @@ -14409,7 +14965,9 @@ }, "/projects/{project_id}/lookml_tests/run": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "run_lookml_test", "summary": "Run LookML Test", "description": "### Run LookML Tests\n\nRuns all tests in the project, optionally filtered by file, test, and/or model.\n", @@ -14484,7 +15042,9 @@ }, "/projects/{project_id}/tag": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "tag_ref", "summary": "Tag Ref", "description": "### Creates a tag for the most recent commit, or a specific ref is a SHA is provided\n\nThis is an internal-only, undocumented route.\n", @@ -14574,7 +15134,9 @@ }, "/render_tasks/looks/{look_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_look_render_task", "summary": "Create Look Render Task", "description": "### Create a new task to render a look to an image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -14662,7 +15224,9 @@ }, "/render_tasks/queries/{query_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_query_render_task", "summary": "Create Query Render Task", "description": "### Create a new task to render an existing query to an image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -14750,7 +15314,9 @@ }, "/render_tasks/dashboards/{dashboard_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_dashboard_render_task", "summary": "Create Dashboard Render Task", "description": "### Create a new task to render a dashboard to a document or image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -14867,7 +15433,9 @@ }, "/render_tasks/{render_task_id}": { "get": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "render_task", "summary": "Get Render Task", "description": "### Get information about a render task.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -14913,11 +15481,17 @@ }, "/render_tasks/{render_task_id}/results": { "get": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "render_task_results", "summary": "Render Task Results", "description": "### Get the document or image produced by a completed render task.\n\nNote that the PDF or image result will be a binary blob in the HTTP response, as indicated by the\nContent-Type in the response headers. This may require specialized (or at least different) handling than text\nresponses such as JSON. You may need to tell your HTTP client that the response is binary so that it does not\nattempt to parse the binary data as text.\n\nIf the render task exists but has not finished rendering the results, the response HTTP status will be\n**202 Accepted**, the response body will be empty, and the response will have a Retry-After header indicating\nthat the caller should repeat the request at a later time.\n\nReturns 404 if the render task cannot be found, if the cached result has expired, or if the caller\ndoes not have permission to view the results.\n\nFor detailed information about the status of the render task, use [Render Task](#!/RenderTask/render_task).\nPolling loops waiting for completion of a render task would be better served by polling **render_task(id)** until\nthe task status reaches completion (or error) instead of polling **render_task_results(id)** alone.\n", - "produces": ["image/jpeg", "image/png", "application/pdf"], + "produces": [ + "image/jpeg", + "image/png", + "application/pdf" + ], "parameters": [ { "name": "render_task_id", @@ -14954,9 +15528,100 @@ "x-looker-activity-type": "db_query" } }, + "/render_tasks/dashboard_elements/{dashboard_element_id}/{result_format}": { + "post": { + "tags": [ + "RenderTask" + ], + "operationId": "create_dashboard_element_render_task", + "summary": "Create Dashboard Element Render Task", + "description": "### Create a new task to render a dashboard element to an image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", + "parameters": [ + { + "name": "dashboard_element_id", + "in": "path", + "description": "Id of dashboard element to render: UDD dashboard element would be numeric and LookML dashboard element would be model_name::dashboard_title::lookml_link_id", + "required": true, + "type": "string" + }, + { + "name": "result_format", + "in": "path", + "description": "Output type: png or jpg", + "required": true, + "type": "string" + }, + { + "name": "width", + "in": "query", + "description": "Output width in pixels", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "height", + "in": "query", + "description": "Output height in pixels", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "fields", + "in": "query", + "description": "Requested fields.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Render Task", + "schema": { + "$ref": "#/definitions/RenderTask" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "409": { + "description": "Resource Already Exists", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "db_query" + } + }, "/projects/{root_project_id}/credential/{credential_id}": { "put": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_repository_credential", "summary": "Create Repository Credential", "description": "### Configure Repository Credential for a remote dependency\n\nAdmin required.\n\n`root_project_id` is required.\n`credential_id` is required.\n\n", @@ -15027,7 +15692,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "delete_repository_credential", "summary": "Delete Repository Credential", "description": "### Repository Credential for a remote dependency\n\nAdmin required.\n\n`root_project_id` is required.\n`credential_id` is required.\n", @@ -15079,7 +15746,9 @@ }, "/projects/{root_project_id}/credentials": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "get_all_repository_credentials", "summary": "Get All Repository Credentials", "description": "### Get all Repository Credentials for a project\n\n`root_project_id` is required.\n", @@ -15121,7 +15790,9 @@ }, "/roles": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_roles", "summary": "Get All Roles", "description": "### Get information about all roles.\n", @@ -15173,7 +15844,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_role", "summary": "Create Role", "description": "### Create a role with the specified information.\n", @@ -15232,7 +15905,9 @@ }, "/roles/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_roles", "summary": "Search Roles", "description": "### Search roles\n\nReturns all role records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -15326,7 +16001,9 @@ }, "/roles/search/with_user_count": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_roles_with_user_count", "summary": "Search Roles with User Count", "description": "### Search roles include user count\n\nReturns all role records that match the given search criteria, and attaches\nassociated user counts.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -15420,7 +16097,9 @@ }, "/roles/{role_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role", "summary": "Get Role", "description": "### Get information about the role with a specific id.\n", @@ -15458,7 +16137,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_role", "summary": "Delete Role", "description": "### Delete the role with a specific id.\n", @@ -15508,7 +16189,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_role", "summary": "Update Role", "description": "### Update information about the role with a specific id.\n", @@ -15575,7 +16258,9 @@ }, "/roles/{role_id}/groups": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role_groups", "summary": "Get Role Groups", "description": "### Get information about all the groups with the role that has a specific id.\n", @@ -15623,7 +16308,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "set_role_groups", "summary": "Update Role Groups", "description": "### Set all groups for a role, removing all existing group associations from that role.\n", @@ -15691,7 +16378,9 @@ }, "/roles/{role_id}/users": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role_users", "summary": "Get Role Users", "description": "### Get information about all the users with the role that has a specific id.\n", @@ -15746,7 +16435,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "set_role_users", "summary": "Update Role Users", "description": "### Set all the users of the role with a specific id.\n", @@ -15826,7 +16517,9 @@ }, "/running_queries": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "all_running_queries", "summary": "Get All Running Queries", "description": "Get information about all running queries.\n", @@ -15853,7 +16546,9 @@ }, "/running_queries/{query_task_id}": { "delete": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "kill_query", "summary": "Kill Running Query", "description": "Kill a query with a specific query_task_id.\n", @@ -15898,7 +16593,9 @@ }, "/saml_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "saml_config", "summary": "Get SAML Configuration", "description": "### Get the SAML configuration.\n\nLooker can be optionally configured to authenticate users against a SAML authentication server.\nSAML setup requires coordination with an administrator of that server.\n\nOnly Looker administrators can read and update the SAML configuration.\n\nConfiguring SAML impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single SAML configuation. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nSAML is enabled or disabled for Looker using the **enabled** field.\n", @@ -15920,7 +16617,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_saml_config", "summary": "Update SAML Configuration", "description": "### Update the SAML configuration.\n\nConfiguring SAML impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the SAML configuration.\n\nSAML is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any SAML setting changes be tested using the APIs below before being set globally.\n", @@ -15967,7 +16666,9 @@ }, "/saml_test_configs/{test_slug}": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "saml_test_config", "summary": "Get SAML Test Configuration", "description": "### Get a SAML test configuration by test_slug.\n", @@ -15998,7 +16699,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_saml_test_config", "summary": "Delete SAML Test Configuration", "description": "### Delete a SAML test configuration.\n", @@ -16037,7 +16740,9 @@ }, "/saml_test_configs": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_saml_test_config", "summary": "Create SAML Test Configuration", "description": "### Create a SAML test configuration.\n", @@ -16084,11 +16789,15 @@ }, "/parse_saml_idp_metadata": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "parse_saml_idp_metadata", "summary": "Parse SAML IdP XML", "description": "### Parse the given xml as a SAML IdP metadata document and return the result.\n", - "consumes": ["text/plain"], + "consumes": [ + "text/plain" + ], "parameters": [ { "name": "body", @@ -16126,11 +16835,15 @@ }, "/fetch_and_parse_saml_idp_metadata": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "fetch_and_parse_saml_idp_metadata", "summary": "Parse SAML IdP Url", "description": "### Fetch the given url and parse it as a SAML IdP metadata document and return the result.\nNote that this requires that the url be public or at least at a location where the Looker instance\ncan fetch it without requiring any special authentication.\n", - "consumes": ["text/plain"], + "consumes": [ + "text/plain" + ], "parameters": [ { "name": "body", @@ -16168,7 +16881,9 @@ }, "/scheduled_plans/space/{space_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_space", "summary": "Scheduled Plans for Space", "description": "### Get Scheduled Plans for a Space\n\nReturns scheduled plans owned by the caller for a given space id.\n", @@ -16218,7 +16933,9 @@ }, "/scheduled_plans/{scheduled_plan_id}": { "delete": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "delete_scheduled_plan", "summary": "Delete Scheduled Plan", "description": "### Delete a Scheduled Plan\n\nNormal users can only delete their own scheduled plans.\nAdmins can delete other users' scheduled plans.\nThis delete cannot be undone.\n", @@ -16262,7 +16979,9 @@ "x-looker-activity-type": "db_query" }, "patch": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "update_scheduled_plan", "summary": "Update Scheduled Plan", "description": "### Update a Scheduled Plan\n\nAdmins can update other users' Scheduled Plans.\n\nNote: Any scheduled plan destinations specified in an update will **replace** all scheduled plan destinations\ncurrently defined for the scheduled plan.\n\nFor Example: If a scheduled plan has destinations A, B, and C, and you call update on this scheduled plan\nspecifying only B in the destinations, then destinations A and C will be deleted by the update.\n\nUpdating a scheduled plan to assign null or an empty array to the scheduled_plan_destinations property is an error, as a scheduled plan must always have at least one destination.\n\nIf you omit the scheduled_plan_destinations property from the object passed to update, then the destinations\ndefined on the original scheduled plan will remain unchanged.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -16321,7 +17040,9 @@ "x-looker-activity-type": "db_query" }, "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan", "summary": "Get Scheduled Plan", "description": "### Get Information About a Scheduled Plan\n\nAdmins can fetch information about other users' Scheduled Plans.\n", @@ -16368,7 +17089,9 @@ }, "/scheduled_plans": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "create_scheduled_plan", "summary": "Create Scheduled Plan", "description": "### Create a Scheduled Plan\n\nCreate a scheduled plan to render a Look or Dashboard on a recurring schedule.\n\nTo create a scheduled plan, you MUST provide values for the following fields:\n`name`\nand\n`look_id`, `dashboard_id`, `lookml_dashboard_id`, or `query_id`\nand\n`cron_tab` or `datagroup`\nand\nat least one scheduled_plan_destination\n\nA scheduled plan MUST have at least one scheduled_plan_destination defined.\n\nWhen `look_id` is set, `require_no_results`, `require_results`, and `require_change` are all required.\n\nIf `create_scheduled_plan` fails with a 422 error, be sure to look at the error messages in the response which will explain exactly what fields are missing or values that are incompatible.\n\nThe queries that provide the data for the look or dashboard are run in the context of user account that owns the scheduled plan.\n\nWhen `run_as_recipient` is `false` or not specified, the queries that provide the data for the\nlook or dashboard are run in the context of user account that owns the scheduled plan.\n\nWhen `run_as_recipient` is `true` and all the email recipients are Looker user accounts, the\nqueries are run in the context of each recipient, so different recipients may see different\ndata from the same scheduled render of a look or dashboard. For more details, see [Run As Recipient](https://looker.com/docs/r/admin/run-as-recipient).\n\nAdmins can create and modify scheduled plans on behalf of other users by specifying a user id.\nNon-admin users may not create or modify scheduled plans by or for other users.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -16425,7 +17148,9 @@ "x-looker-activity-type": "db_query" }, "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "all_scheduled_plans", "summary": "Get All Scheduled Plans", "description": "### List All Scheduled Plans\n\nReturns all scheduled plans which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -16488,7 +17213,9 @@ }, "/scheduled_plans/run_once": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan_run_once", "summary": "Run Scheduled Plan Once", "description": "### Run a Scheduled Plan Immediately\n\nCreate a scheduled plan that runs only once, and immediately.\n\nThis can be useful for testing a Scheduled Plan before committing to a production schedule.\n\nAdmins can create scheduled plans on behalf of other users by specifying a user id.\n\nThis API is rate limited to prevent it from being used for relay spam or DoS attacks\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -16548,7 +17275,9 @@ }, "/scheduled_plans/look/{look_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_look", "summary": "Scheduled Plans for Look", "description": "### Get Scheduled Plans for a Look\n\nReturns all scheduled plans for a look which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -16613,7 +17342,9 @@ }, "/scheduled_plans/dashboard/{dashboard_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_dashboard", "summary": "Scheduled Plans for Dashboard", "description": "### Get Scheduled Plans for a Dashboard\n\nReturns all scheduled plans for a dashboard which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -16678,7 +17409,9 @@ }, "/scheduled_plans/lookml_dashboard/{lookml_dashboard_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_lookml_dashboard", "summary": "Scheduled Plans for LookML Dashboard", "description": "### Get Scheduled Plans for a LookML Dashboard\n\nReturns all scheduled plans for a LookML Dashboard which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -16742,7 +17475,9 @@ }, "/scheduled_plans/{scheduled_plan_id}/run_once": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan_run_once_by_id", "summary": "Run Scheduled Plan Once by Id", "description": "### Run a Scheduled Plan By Id Immediately\nThis function creates a run-once schedule plan based on an existing scheduled plan,\napplies modifications (if any) to the new scheduled plan, and runs the new schedule plan immediately.\nThis can be useful for testing modifications to an existing scheduled plan before committing to a production schedule.\n\nThis function internally performs the following operations:\n\n1. Copies the properties of the existing scheduled plan into a new scheduled plan\n2. Copies any properties passed in the JSON body of this request into the new scheduled plan (replacing the original values)\n3. Creates the new scheduled plan\n4. Runs the new scheduled plan\n\nThe original scheduled plan is not modified by this operation.\nAdmins can create, modify, and run scheduled plans on behalf of other users by specifying a user id.\nNon-admins can only create, modify, and run their own scheduled plans.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n\nThis API is rate limited to prevent it from being used for relay spam or DoS attacks\n\n", @@ -16810,7 +17545,9 @@ }, "/session_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "session_config", "summary": "Get Session Config", "description": "### Get session config.\n", @@ -16838,7 +17575,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_session_config", "summary": "Update Session Config", "description": "### Update session config.\n", @@ -16891,7 +17630,9 @@ }, "/session": { "get": { - "tags": ["Session"], + "tags": [ + "Session" + ], "operationId": "session", "summary": "Get Session", "description": "### Get API Session\n\nReturns information about the current API session, such as which workspace is selected for the session.\n", @@ -16919,7 +17660,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Session"], + "tags": [ + "Session" + ], "operationId": "update_session", "summary": "Update Session", "description": "### Update API Session\n\n#### API Session Workspace\n\nYou can use this endpoint to change the active workspace for the current API session.\n\nOnly one workspace can be active in a session. The active workspace can be changed\nany number of times in a session.\n\nThe default workspace for API sessions is the \"production\" workspace.\n\nAll Looker APIs that use projects or lookml models (such as running queries) will\nuse the version of project and model files defined by this workspace for the lifetime of the\ncurrent API session or until the session workspace is changed again.\n\nAn API session has the same lifetime as the access_token used to authenticate API requests. Each successful\nAPI login generates a new access_token and a new API session.\n\nIf your Looker API client application needs to work in a dev workspace across multiple\nAPI sessions, be sure to select the dev workspace after each login.\n", @@ -16972,7 +17715,9 @@ }, "/setting": { "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "set_setting", "summary": "Set Setting", "description": "### Configure Looker Settings\n\nAvailable settings are:\n - extension_framework_enabled\n - marketplace_auto_install_enabled\n - marketplace_enabled\n - whitelabel_configuration\n - custom_welcome_email\n\nSee the `Setting` type for more information on the specific values that can be configured.\n", @@ -17036,7 +17781,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "get_setting", "summary": "Get Setting", "description": "### Get Looker Settings\n\nAvailable settings are:\n - extension_framework_enabled\n - marketplace_auto_install_enabled\n - marketplace_enabled\n - whitelabel_configuration\n - custom_welcome_email\n\n", @@ -17085,9 +17832,52 @@ "x-looker-activity-type": "non_query" } }, + "/smtp_status": { + "get": { + "tags": [ + "Config" + ], + "operationId": "smtp_status", + "summary": "Get SMTP Status", + "description": "### Get current SMTP status.\n", + "parameters": [ + { + "name": "fields", + "in": "query", + "description": "Include only these fields in the response", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "SMTP Status", + "schema": { + "$ref": "#/definitions/SmtpStatus" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/folders/search": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "search_folders", "summary": "Search Folders", "description": "Search for folders by creator id, parent id, name, etc", @@ -17211,7 +18001,9 @@ }, "/folders/{folder_id}": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder", "summary": "Get Folder", "description": "### Get information about the folder with a specific id.", @@ -17255,7 +18047,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "delete_folder", "summary": "Delete Folder", "description": "### Delete the folder with a specific id including any children folders.\n**DANGER** this will delete all looks and dashboards in the folder.\n", @@ -17298,7 +18092,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "update_folder", "summary": "Update Folder", "description": "### Update the folder with a specific id.", @@ -17358,10 +18154,12 @@ }, "/folders": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "all_folders", "summary": "Get All Folders", - "description": "### Get information about all folders.\n\nIn API 3.x, this will not return empty personal folders, unless they belong to the calling user.\nIn API 4.0+, all personal folders will be returned.\n\n", + "description": "### Get information about all folders.\n\nIn API 3.x, this will not return empty personal folders, unless they belong to the calling user,\nor if they contain soft-deleted content.\n\nIn API 4.0+, all personal folders will be returned.\n\n", "parameters": [ { "name": "fields", @@ -17398,7 +18196,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "create_folder", "summary": "Create Folder", "description": "### Create a folder with specified information.\n\nCaller must have permission to edit the parent folder and to create folders, otherwise the request\nreturns 404 Not Found.\n", @@ -17457,7 +18257,9 @@ }, "/folders/{folder_id}/children": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_children", "summary": "Get Folder Children", "description": "### Get the children of a folder.", @@ -17529,7 +18331,9 @@ }, "/folders/{folder_id}/children/search": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_children_search", "summary": "Search Folder Children", "description": "### Search the children of a folder", @@ -17592,7 +18396,9 @@ }, "/folders/{folder_id}/parent": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_parent", "summary": "Get Folder Parent", "description": "### Get the parent of a folder", @@ -17638,7 +18444,9 @@ }, "/folders/{folder_id}/ancestors": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_ancestors", "summary": "Get Folder Ancestors", "description": "### Get the ancestors of a folder", @@ -17687,7 +18495,9 @@ }, "/folders/{folder_id}/looks": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_looks", "summary": "Get Folder Looks", "description": "### Get all looks in a folder.\nIn API 3.x, this will return all looks in a folder, including looks in the trash.\nIn API 4.0+, all looks in a folder will be returned, excluding looks in the trash.\n", @@ -17736,7 +18546,9 @@ }, "/folders/{folder_id}/dashboards": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_dashboards", "summary": "Get Folder Dashboards", "description": "### Get the dashboards in a folder", @@ -17785,7 +18597,9 @@ }, "/sql_queries/{slug}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "sql_query", "summary": "Get SQL Runner Query", "description": "Get a SQL Runner query.", @@ -17824,7 +18638,9 @@ }, "/sql_queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_sql_query", "summary": "Create SQL Runner Query", "description": "### Create a SQL Runner Query\n\nEither the `connection_name` or `model_name` parameter MUST be provided.\n", @@ -17883,11 +18699,18 @@ }, "/sql_queries/{slug}/run/{result_format}": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_sql_query", "summary": "Run SQL Runner Query", "description": "Execute a SQL Runner query in a given result_format.", - "produces": ["text", "application/json", "image/png", "image/jpeg"], + "produces": [ + "text", + "application/json", + "image/png", + "image/jpeg" + ], "parameters": [ { "name": "slug", @@ -17947,9 +18770,289 @@ "x-looker-activity-type": "db_query" } }, + "/support_access/allowlist": { + "get": { + "tags": [ + "Auth" + ], + "operationId": "get_support_access_allowlist_entries", + "summary": "Get Support Access Allowlist Users", + "description": "### Get Support Access Allowlist Users\n\nReturns the users that have been added to the Support Access Allowlist\n", + "parameters": [ + { + "name": "fields", + "in": "query", + "description": "Requested fields.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Support Access Allowlist Entries", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/SupportAccessAllowlistEntry" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + }, + "post": { + "tags": [ + "Auth" + ], + "operationId": "add_support_access_allowlist_entries", + "summary": "Add Support Access Allowlist Users", + "description": "### Add Support Access Allowlist Users\n\nAdds a list of emails to the Allowlist, using the provided reason\n", + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Request params.", + "required": true, + "schema": { + "$ref": "#/definitions/SupportAccessAddEntries" + } + } + ], + "responses": { + "200": { + "description": "Support Access Allowlist Entries", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/SupportAccessAllowlistEntry" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/support_access/allowlist/{entry_id}": { + "delete": { + "tags": [ + "Auth" + ], + "operationId": "delete_support_access_allowlist_entry", + "summary": "Delete Support Access Allowlist Entry", + "description": "### Delete Support Access Allowlist User\n\nDeletes the specified Allowlist Entry Id\n", + "parameters": [ + { + "name": "entry_id", + "in": "path", + "description": "Id of Allowlist Entry", + "required": true, + "type": "string" + } + ], + "responses": { + "204": { + "description": "Entry successfully deleted.", + "schema": { + "type": "string" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/support_access/enable": { + "put": { + "tags": [ + "Auth" + ], + "operationId": "enable_support_access", + "summary": "Enable Support Access", + "description": "### Enable Support Access\n\nEnables Support Access for the provided duration\n", + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Enable Support Access request params.", + "required": true, + "schema": { + "$ref": "#/definitions/SupportAccessEnable" + } + } + ], + "responses": { + "200": { + "description": "Support Access Status", + "schema": { + "$ref": "#/definitions/SupportAccessStatus" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "409": { + "description": "Resource Already Exists", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/support_access/disable": { + "put": { + "tags": [ + "Auth" + ], + "operationId": "disable_support_access", + "summary": "Disable Support Access", + "description": "### Disable Support Access\n\nDisables Support Access immediately\n", + "responses": { + "200": { + "description": "Support Access Status", + "schema": { + "$ref": "#/definitions/SupportAccessStatus" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/support_access/status": { + "get": { + "tags": [ + "Auth" + ], + "operationId": "support_access_status", + "summary": "Support Access Status", + "description": "### Support Access Status\n\nReturns the current Support Access Status\n", + "responses": { + "200": { + "description": "Support Access Status", + "schema": { + "$ref": "#/definitions/SupportAccessStatus" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/themes": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "all_themes", "summary": "Get All Themes", "description": "### Get an array of all existing themes\n\nGet a **single theme** by id with [Theme](#!/Theme/theme)\n\nThis method returns an array of all existing themes. The active time for the theme is not considered.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -17989,7 +19092,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "create_theme", "summary": "Create Theme", "description": "### Create a theme\n\nCreates a new theme object, returning the theme details, including the created id.\n\nIf `settings` are not specified, the default theme settings will be copied into the new theme.\n\nThe theme `name` can only contain alphanumeric characters or underscores. Theme names should not contain any confidential information, such as customer names.\n\n**Update** an existing theme with [Update Theme](#!/Theme/update_theme)\n\n**Permanently delete** an existing theme with [Delete Theme](#!/Theme/delete_theme)\n\nFor more information, see [Creating and Applying Themes](https://looker.com/docs/r/admin/themes).\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -18048,7 +19153,9 @@ }, "/themes/search": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "search_themes", "summary": "Search Themes", "description": "### Search all themes for matching criteria.\n\nReturns an **array of theme objects** that match the specified search criteria.\n\n| Search Parameters | Description\n| :-------------------: | :------ |\n| `begin_at` only | Find themes active at or after `begin_at`\n| `end_at` only | Find themes active at or before `end_at`\n| both set | Find themes with an active inclusive period between `begin_at` and `end_at`\n\nNote: Range matching requires boolean AND logic.\nWhen using `begin_at` and `end_at` together, do not use `filter_or`=TRUE\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nGet a **single theme** by id with [Theme](#!/Theme/theme)\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -18151,7 +19258,9 @@ }, "/themes/default": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "default_theme", "summary": "Get Default Theme", "description": "### Get the default theme\n\nReturns the active theme object set as the default.\n\nThe **default** theme name can be set in the UI on the Admin|Theme UI page\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\" If specified, it returns the default theme at the time indicated.\n", @@ -18189,7 +19298,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "set_default_theme", "summary": "Set Default Theme", "description": "### Set the global default theme by theme name\n\nOnly Admin users can call this function.\n\nOnly an active theme with no expiration (`end_at` not set) can be assigned as the default theme. As long as a theme has an active record with no expiration, it can be set as the default.\n\n[Create Theme](#!/Theme/create) has detailed information on rules for default and active themes\n\nReturns the new specified default theme object.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -18240,7 +19351,9 @@ }, "/themes/active": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "active_themes", "summary": "Get Active Themes", "description": "### Get active themes\n\nReturns an array of active themes.\n\nIf the `name` parameter is specified, it will return an array with one theme if it's active and found.\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\"\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n\n", @@ -18297,7 +19410,9 @@ }, "/themes/theme_or_default": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "theme_or_default", "summary": "Get Theme or Default", "description": "### Get the named theme if it's active. Otherwise, return the default theme\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\"\nNote: API users with `show` ability can call this function\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -18344,7 +19459,9 @@ }, "/themes/validate": { "post": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "validate_theme", "summary": "Validate Theme", "description": "### Validate a theme with the specified information\n\nValidates all values set for the theme, returning any errors encountered, or 200 OK if valid\n\nSee [Create Theme](#!/Theme/create_theme) for constraints\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -18409,7 +19526,9 @@ }, "/themes/{theme_id}": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "theme", "summary": "Get Theme", "description": "### Get a theme by ID\n\nUse this to retrieve a specific theme, whether or not it's currently active.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -18454,7 +19573,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "update_theme", "summary": "Update Theme", "description": "### Update the theme by id.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -18513,7 +19634,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "delete_theme", "summary": "Delete Theme", "description": "### Delete a specific theme by id\n\nThis operation permanently deletes the identified theme from the database.\n\nBecause multiple themes can have the same name (with different activation time spans) themes can only be deleted by ID.\n\nAll IDs associated with a theme name can be retrieved by searching for the theme name with [Theme Search](#!/Theme/search).\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -18558,7 +19681,9 @@ }, "/timezones": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_timezones", "summary": "Get All Timezones", "description": "### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks).\n", @@ -18591,7 +19716,9 @@ }, "/ssh_servers": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_ssh_servers", "summary": "Get All SSH Servers", "description": "### Get information about all SSH Servers.\n", @@ -18631,7 +19758,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_ssh_server", "summary": "Create SSH Server", "description": "### Create an SSH Server.\n", @@ -18690,7 +19819,9 @@ }, "/ssh_server/{ssh_server_id}": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "ssh_server", "summary": "Get SSH Server", "description": "### Get information about an SSH Server.\n", @@ -18727,7 +19858,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "update_ssh_server", "summary": "Update SSH Server", "description": "### Update an SSH Server.\n", @@ -18785,7 +19918,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_ssh_server", "summary": "Delete SSH Server", "description": "### Delete an SSH Server.\n", @@ -18830,7 +19965,9 @@ }, "/ssh_server/{ssh_server_id}/test": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_ssh_server", "summary": "Test SSH Server", "description": "### Test the SSH Server\n", @@ -18869,7 +20006,9 @@ }, "/ssh_tunnels": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_ssh_tunnels", "summary": "Get All SSH Tunnels", "description": "### Get information about all SSH Tunnels.\n", @@ -18909,7 +20048,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_ssh_tunnel", "summary": "Create SSH Tunnel", "description": "### Create an SSH Tunnel\n", @@ -18968,7 +20109,9 @@ }, "/ssh_tunnel/{ssh_tunnel_id}": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "ssh_tunnel", "summary": "Get SSH Tunnel", "description": "### Get information about an SSH Tunnel.\n", @@ -19005,7 +20148,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "update_ssh_tunnel", "summary": "Update SSH Tunnel", "description": "### Update an SSH Tunnel\n", @@ -19063,7 +20208,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_ssh_tunnel", "summary": "Delete SSH Tunnel", "description": "### Delete an SSH Tunnel\n", @@ -19108,7 +20255,9 @@ }, "/ssh_tunnel/{ssh_tunnel_id}/test": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_ssh_tunnel", "summary": "Test SSH Tunnel", "description": "### Test the SSH Tunnel\n", @@ -19147,7 +20296,9 @@ }, "/ssh_public_key": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "ssh_public_key", "summary": "Get SSH Public Key", "description": "### Get the SSH public key\n\nGet the public key created for this instance to identify itself to a remote SSH server.\n", @@ -19177,7 +20328,9 @@ }, "/user_attributes": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "all_user_attributes", "summary": "Get All User Attributes", "description": "### Get information about all user attributes.\n", @@ -19224,7 +20377,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "create_user_attribute", "summary": "Create User Attribute", "description": "### Create a new user attribute\n\nPermission information for a user attribute is conveyed through the `can` and `user_can_edit` fields.\nThe `user_can_edit` field indicates whether an attribute is user-editable _anywhere_ in the application.\nThe `can` field gives more granular access information, with the `set_value` child field indicating whether\nan attribute's value can be set by [Setting the User Attribute User Value](#!/User/set_user_attribute_user_value).\n\nNote: `name` and `label` fields must be unique across all user attributes in the Looker instance.\nAttempting to create a new user attribute with a name or label that duplicates an existing\nuser attribute will fail with a 422 error.\n", @@ -19290,7 +20445,9 @@ }, "/user_attributes/{user_attribute_id}": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "user_attribute", "summary": "Get User Attribute", "description": "### Get information about a user attribute.\n", @@ -19335,7 +20492,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "update_user_attribute", "summary": "Update User Attribute", "description": "### Update a user attribute definition.\n", @@ -19401,7 +20560,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "delete_user_attribute", "summary": "Delete User Attribute", "description": "### Delete a user attribute (admin only).\n", @@ -19447,7 +20608,9 @@ }, "/user_attributes/{user_attribute_id}/group_values": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "all_user_attribute_group_values", "summary": "Get User Attribute Group Values", "description": "### Returns all values of a user attribute defined by user groups, in precedence order.\n\nA user may be a member of multiple groups which define different values for a given user attribute.\nThe order of group-values in the response determines precedence for selecting which group-value applies\nto a given user. For more information, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values).\n\nResults will only include groups that the caller's user account has permission to see.\n", @@ -19495,7 +20658,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "set_user_attribute_group_values", "summary": "Set User Attribute Group Values", "description": "### Define values for a user attribute across a set of groups, in priority order.\n\nThis function defines all values for a user attribute defined by user groups. This is a global setting, potentially affecting\nall users in the system. This function replaces any existing group value definitions for the indicated user attribute.\n\nThe value of a user attribute for a given user is determined by searching the following locations, in this order:\n\n1. the user's account settings\n2. the groups that the user is a member of\n3. the default value of the user attribute, if any\n\nThe user may be a member of multiple groups which define different values for that user attribute. The order of items in the group_values parameter\ndetermines which group takes priority for that user. Lowest array index wins.\n\nAn alternate method to indicate the selection precedence of group-values is to assign numbers to the 'rank' property of each\ngroup-value object in the array. Lowest 'rank' value wins. If you use this technique, you must assign a\nrank value to every group-value object in the array.\n\n To set a user attribute value for a single user, see [Set User Attribute User Value](#!/User/set_user_attribute_user_value).\nTo set a user attribute value for all members of a group, see [Set User Attribute Group Value](#!/Group/update_user_attribute_group_value).\n", @@ -19568,7 +20733,9 @@ }, "/user_login_lockouts": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "all_user_login_lockouts", "summary": "Get All User Login Lockouts", "description": "### Get currently locked-out users.\n", @@ -19610,7 +20777,9 @@ }, "/user_login_lockouts/search": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "search_user_login_lockouts", "summary": "Search User Login Lockouts", "description": "### Search currently locked-out users.\n", @@ -19710,7 +20879,9 @@ }, "/user_login_lockout/{key}": { "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_user_login_lockout", "summary": "Delete User Login Lockout", "description": "### Removes login lockout for the associated user.\n", @@ -19755,7 +20926,9 @@ }, "/user": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "me", "summary": "Get Current User", "description": "### Get information about the current user; i.e. the user account currently calling the API.\n", @@ -19788,7 +20961,9 @@ }, "/users": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_users", "summary": "Get All Users", "description": "### Get information about all users.\n", @@ -19879,7 +21054,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user", "summary": "Create User", "description": "### Create a user with the specified information.\n", @@ -19939,7 +21116,9 @@ }, "/users/search": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "search_users", "summary": "Search Users", "description": "### Search users\n\nReturns all* user records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\n(*) Results are always filtered to the level of information the caller is permitted to view.\nLooker admins can see all user details; normal users in an open system can see\nnames of other users but no details; normal users in a closed system can only see\nnames of other users who are members of the same group as the user.\n\n", @@ -20090,7 +21269,9 @@ }, "/users/search/names/{pattern}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "search_users_names", "summary": "Search User Names", "description": "### Search for user accounts by name\n\nReturns all user accounts where `first_name` OR `last_name` OR `email` field values match a pattern.\nThe pattern can contain `%` and `_` wildcards as in SQL LIKE expressions.\n\nAny additional search params will be combined into a logical AND expression.\n", @@ -20221,7 +21402,9 @@ }, "/users/{user_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user", "summary": "Get User by Id", "description": "### Get information about the user with a specific id.\n\nIf the caller is an admin or the caller is the user being specified, then full user information will\nbe returned. Otherwise, a minimal 'public' variant of the user information will be returned. This contains\nThe user name and avatar url, but no sensitive information.\n", @@ -20266,7 +21449,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "update_user", "summary": "Update User", "description": "### Update information about the user with a specific id.\n", @@ -20326,7 +21511,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user", "summary": "Delete User", "description": "### Delete the user with a specific id.\n\n**DANGER** this will delete the user and all looks and other information owned by the user.\n", @@ -20372,7 +21559,9 @@ }, "/users/credential/{credential_type}/{credential_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_for_credential", "summary": "Get User by Credential Id", "description": "### Get information about the user with a credential of given type with specific id.\n\nThis is used to do things like find users by their embed external_user_id. Or, find the user with\na given api3 client_id, etc. The 'credential_type' matches the 'type' name of the various credential\ntypes. It must be one of the values listed in the table below. The 'credential_id' is your unique Id\nfor the user and is specific to each type of credential.\n\nAn example using the Ruby sdk might look like:\n\n`sdk.user_for_credential('embed', 'customer-4959425')`\n\nThis table shows the supported 'Credential Type' strings. The right column is for reference; it shows\nwhich field in the given credential type is actually searched when finding a user with the supplied\n'credential_id'.\n\n| Credential Types | Id Field Matched |\n| ---------------- | ---------------- |\n| email | email |\n| google | google_user_id |\n| saml | saml_user_id |\n| oidc | oidc_user_id |\n| ldap | ldap_id |\n| api | token |\n| api3 | client_id |\n| embed | external_user_id |\n| looker_openid | email |\n\n**NOTE**: The 'api' credential type was only used with the legacy Looker query API and is no longer supported. The credential type for API you are currently looking at is 'api3'.\n\n", @@ -20425,7 +21614,9 @@ }, "/users/{user_id}/credentials_email": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_email", "summary": "Get Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -20470,7 +21661,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_email", "summary": "Create Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -20542,7 +21735,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "update_user_credentials_email", "summary": "Update Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -20608,7 +21803,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_email", "summary": "Delete Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -20654,7 +21851,9 @@ }, "/users/{user_id}/credentials_totp": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_totp", "summary": "Get Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -20699,7 +21898,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_totp", "summary": "Create Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -20771,7 +21972,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_totp", "summary": "Delete Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -20817,7 +22020,9 @@ }, "/users/{user_id}/credentials_ldap": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_ldap", "summary": "Get LDAP Credential", "description": "### LDAP login information for the specified user.", @@ -20862,7 +22067,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_ldap", "summary": "Delete LDAP Credential", "description": "### LDAP login information for the specified user.", @@ -20908,7 +22115,9 @@ }, "/users/{user_id}/credentials_google": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_google", "summary": "Get Google Auth Credential", "description": "### Google authentication login information for the specified user.", @@ -20953,7 +22162,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_google", "summary": "Delete Google Auth Credential", "description": "### Google authentication login information for the specified user.", @@ -20999,7 +22210,9 @@ }, "/users/{user_id}/credentials_saml": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_saml", "summary": "Get Saml Auth Credential", "description": "### Saml authentication login information for the specified user.", @@ -21044,7 +22257,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_saml", "summary": "Delete Saml Auth Credential", "description": "### Saml authentication login information for the specified user.", @@ -21090,7 +22305,9 @@ }, "/users/{user_id}/credentials_oidc": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_oidc", "summary": "Get OIDC Auth Credential", "description": "### OpenID Connect (OIDC) authentication login information for the specified user.", @@ -21135,7 +22352,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_oidc", "summary": "Delete OIDC Auth Credential", "description": "### OpenID Connect (OIDC) authentication login information for the specified user.", @@ -21181,7 +22400,9 @@ }, "/users/{user_id}/credentials_api3/{credentials_api3_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_api3", "summary": "Get API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -21234,7 +22455,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_api3", "summary": "Delete API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -21288,7 +22511,9 @@ }, "/users/{user_id}/credentials_api3": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_credentials_api3s", "summary": "Get All API 3 Credentials", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -21336,7 +22561,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_api3", "summary": "Create API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -21401,7 +22628,9 @@ }, "/users/{user_id}/credentials_embed/{credentials_embed_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_embed", "summary": "Get Embedding Credential", "description": "### Embed login information for the specified user.", @@ -21454,7 +22683,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_embed", "summary": "Delete Embedding Credential", "description": "### Embed login information for the specified user.", @@ -21508,7 +22739,9 @@ }, "/users/{user_id}/credentials_embed": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_credentials_embeds", "summary": "Get All Embedding Credentials", "description": "### Embed login information for the specified user.", @@ -21558,7 +22791,9 @@ }, "/users/{user_id}/credentials_looker_openid": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_looker_openid", "summary": "Get Looker OpenId Credential", "description": "### Looker Openid login information for the specified user. Used by Looker Analysts.", @@ -21603,7 +22838,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_looker_openid", "summary": "Delete Looker OpenId Credential", "description": "### Looker Openid login information for the specified user. Used by Looker Analysts.", @@ -21649,7 +22886,9 @@ }, "/users/{user_id}/sessions/{session_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_session", "summary": "Get Web Login Session", "description": "### Web login session for the specified user.", @@ -21702,7 +22941,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_session", "summary": "Delete Web Login Session", "description": "### Web login session for the specified user.", @@ -21756,7 +22997,9 @@ }, "/users/{user_id}/sessions": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_sessions", "summary": "Get All Web Login Sessions", "description": "### Web login session for the specified user.", @@ -21806,7 +23049,9 @@ }, "/users/{user_id}/credentials_email/password_reset": { "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_email_password_reset", "summary": "Create Password Reset Token", "description": "### Create a password reset token.\nThis will create a cryptographically secure random password reset token for the user.\nIf the user already has a password reset token then this invalidates the old token and creates a new one.\nThe token is expressed as the 'password_reset_url' of the user's email/password credential object.\nThis takes an optional 'expires' param to indicate if the new token should be an expiring token.\nTokens that expire are typically used for self-service password resets for existing users.\nInvitation emails for new users typically are not set to expire.\nThe expire period is always 60 minutes when expires is enabled.\nThis method can be called with an empty body.\n", @@ -21860,7 +23105,9 @@ }, "/users/{user_id}/roles": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_roles", "summary": "Get User Roles", "description": "### Get information about roles of a given user\n", @@ -21915,7 +23162,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "set_user_roles", "summary": "Set User Roles", "description": "### Set roles of the user with a specific id.\n", @@ -21978,7 +23227,9 @@ }, "/users/{user_id}/attribute_values": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_attribute_user_values", "summary": "Get User Attribute Values", "description": "### Get user attribute values for a given user.\n\nReturns the values of specified user attributes (or all user attributes) for a certain user.\n\nA value for each user attribute is searched for in the following locations, in this order:\n\n1. in the user's account information\n1. in groups that the user is a member of\n1. the default value of the user attribute\n\nIf more than one group has a value defined for a user attribute, the group with the lowest rank wins.\n\nThe response will only include user attributes for which values were found. Use `include_unset=true` to include\nempty records for user attributes with no value.\n\nThe value of all hidden user attributes will be blank.\n", @@ -22048,7 +23299,9 @@ }, "/users/{user_id}/attribute_values/{user_attribute_id}": { "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "set_user_attribute_user_value", "summary": "Set User Attribute User Value", "description": "### Store a custom value for a user attribute in a user's account settings.\n\nPer-user user attribute values take precedence over group or default values.\n", @@ -22109,7 +23362,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_attribute_user_value", "summary": "Delete User Attribute User Value", "description": "### Delete a user attribute value from a user's account settings.\n\nAfter the user attribute value is deleted from the user's account settings, subsequent requests\nfor the user attribute value for this user will draw from the user's groups or the default\nvalue of the user attribute. See [Get User Attribute Values](#!/User/user_attribute_user_values) for more\ninformation about how user attribute values are resolved.\n", @@ -22154,7 +23409,9 @@ }, "/users/{user_id}/credentials_email/send_password_reset": { "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "send_user_credentials_email_password_reset", "summary": "Send Password Reset Token", "description": "### Send a password reset token.\nThis will send a password reset email to the user. If a password reset token does not already exist\nfor this user, it will create one and then send it.\nIf the user has not yet set up their account, it will send a setup email to the user.\nThe URL sent in the email is expressed as the 'password_reset_url' of the user's email/password credential object.\nPassword reset URLs will expire in 60 minutes.\nThis method can be called with an empty body.\n", @@ -22201,7 +23458,9 @@ }, "/users/{user_id}/update_emails": { "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "wipeout_user_emails", "summary": "Wipeout User Emails", "description": "### Change a disabled user's email addresses\n\nAllows the admin to change the email addresses for all the user's\nassociated credentials. Will overwrite all associated email addresses with\nthe value supplied in the 'email' body param.\nThe user's 'is_disabled' status must be true.\n", @@ -22275,7 +23534,9 @@ }, "/users/embed_user": { "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_embed_user", "summary": "Create an embed user from an external user ID", "description": "Create an embed user from an external user ID\n", @@ -22316,11 +23577,15 @@ }, "/vector_thumbnail/{type}/{resource_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "vector_thumbnail", "summary": "Get Vector Thumbnail", "description": "### Get a vector image representing the contents of a dashboard or look.\n\n# DEPRECATED: Use [content_thumbnail()](#!/Content/content_thumbnail)\n\nThe returned thumbnail is an abstract representation of the contents of a dashbord or look and does not\nreflect the actual data displayed in the respective visualizations.\n", - "produces": ["image/svg+xml"], + "produces": [ + "image/svg+xml" + ], "parameters": [ { "name": "type", @@ -22371,7 +23636,9 @@ }, "/versions": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "versions", "summary": "Get ApiVersion", "description": "### Get information about all API versions supported by this Looker instance.\n", @@ -22410,7 +23677,9 @@ }, "/api_spec/{api_version}/{specification}": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "api_spec", "summary": "Get an API specification", "description": "### Get an API specification for this Looker instance.\n\nThe specification is returned as a JSON document in Swagger 2.x format\n", @@ -22457,7 +23726,9 @@ }, "/whitelabel_configuration": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "whitelabel_configuration", "summary": "Get Whitelabel configuration", "description": "### This feature is enabled only by special license.\n### Gets the whitelabel configuration, which includes hiding documentation links, custom favicon uploading, etc.\n", @@ -22495,7 +23766,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_whitelabel_configuration", "summary": "Update Whitelabel configuration", "description": "### Update the whitelabel configuration\n", @@ -22549,7 +23822,9 @@ }, "/workspaces": { "get": { - "tags": ["Workspace"], + "tags": [ + "Workspace" + ], "operationId": "all_workspaces", "summary": "Get All Workspaces", "description": "### Get All Workspaces\n\nReturns all workspaces available to the calling user.\n", @@ -22582,7 +23857,9 @@ }, "/workspaces/{workspace_id}": { "get": { - "tags": ["Workspace"], + "tags": [ + "Workspace" + ], "operationId": "workspace", "summary": "Get Workspace", "description": "### Get A Workspace\n\nReturns information about a workspace such as the git status and selected branches\nof all projects available to the caller's user account.\n\nA workspace defines which versions of project files will be used to evaluate expressions\nand operations that use model definitions - operations such as running queries or rendering dashboards.\nEach project has its own git repository, and each project in a workspace may be configured to reference\nparticular branch or revision within their respective repositories.\n\nThere are two predefined workspaces available: \"production\" and \"dev\".\n\nThe production workspace is shared across all Looker users. Models in the production workspace are read-only.\nChanging files in production is accomplished by modifying files in a git branch and using Pull Requests\nto merge the changes from the dev branch into the production branch, and then telling\nLooker to sync with production.\n\nThe dev workspace is local to each Looker user. Changes made to project/model files in the dev workspace only affect\nthat user, and only when the dev workspace is selected as the active workspace for the API session.\n(See set_session_workspace()).\n\nThe dev workspace is NOT unique to an API session. Two applications accessing the Looker API using\nthe same user account will see the same files in the dev workspace. To avoid collisions between\nAPI clients it's best to have each client login with API3 credentials for a different user account.\n\nChanges made to files in a dev workspace are persistent across API sessions. It's a good\nidea to commit any changes you've made to the git repository, but not strictly required. Your modified files\nreside in a special user-specific directory on the Looker server and will still be there when you login in again\nlater and use update_session(workspace_id: \"dev\") to select the dev workspace for the new API session.\n", @@ -22638,7 +23915,10 @@ } }, "x-looker-status": "stable", - "required": ["message", "documentation_url"] + "required": [ + "message", + "documentation_url" + ] }, "DashboardBase": { "properties": { @@ -23044,7 +24324,10 @@ } }, "x-looker-status": "stable", - "required": ["message", "documentation_url"] + "required": [ + "message", + "documentation_url" + ] }, "ValidationErrorDetail": { "properties": { @@ -23075,7 +24358,9 @@ } }, "x-looker-status": "stable", - "required": ["documentation_url"] + "required": [ + "documentation_url" + ] }, "AccessToken": { "properties": { @@ -23127,7 +24412,10 @@ } }, "x-looker-status": "beta", - "required": ["field_name", "field_value"] + "required": [ + "field_name", + "field_value" + ] }, "AlertAppliedDashboardFilter": { "properties": { @@ -23154,7 +24442,11 @@ } }, "x-looker-status": "beta", - "required": ["filter_title", "field_name", "filter_value"] + "required": [ + "filter_title", + "field_name", + "filter_value" + ] }, "AlertField": { "properties": { @@ -23178,7 +24470,10 @@ } }, "x-looker-status": "beta", - "required": ["title", "name"] + "required": [ + "title", + "name" + ] }, "AlertConditionState": { "properties": { @@ -23292,7 +24587,9 @@ }, "investigative_content_type": { "type": "string", - "x-looker-values": ["dashboard"], + "x-looker-values": [ + "dashboard" + ], "description": "The type of the investigative content Valid values are: \"dashboard\".", "x-looker-nullable": true }, @@ -23356,7 +24653,10 @@ "properties": { "destination_type": { "type": "string", - "x-looker-values": ["EMAIL", "ACTION_HUB"], + "x-looker-values": [ + "EMAIL", + "ACTION_HUB" + ], "description": "Type of destination that the alert will be sent to Valid values are: \"EMAIL\", \"ACTION_HUB\".", "x-looker-nullable": false }, @@ -23377,7 +24677,9 @@ } }, "x-looker-status": "beta", - "required": ["destination_type"] + "required": [ + "destination_type" + ] }, "AlertPatch": { "properties": { @@ -23940,7 +25242,10 @@ }, "linked_content_type": { "type": "string", - "x-looker-values": ["dashboard", "lookml_dashboard"], + "x-looker-values": [ + "dashboard", + "lookml_dashboard" + ], "description": "Name of the command Valid values are: \"dashboard\", \"lookml_dashboard\".", "x-looker-nullable": false } @@ -24044,7 +25349,10 @@ "permission_type": { "type": "string", "readOnly": true, - "x-looker-values": ["view", "edit"], + "x-looker-values": [ + "view", + "edit" + ], "description": "Type of permission: \"view\" or \"edit\" Valid values are: \"view\", \"edit\".", "x-looker-nullable": true }, @@ -24279,7 +25587,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "ContentValidationLook": { "properties": { @@ -24690,7 +26000,9 @@ } }, "x-looker-status": "stable", - "required": ["external_user_id"] + "required": [ + "external_user_id" + ] }, "CreateOAuthApplicationUserStateRequest": { "properties": { @@ -24747,7 +26059,10 @@ } }, "x-looker-status": "beta", - "required": ["user_id", "oauth_application_id"] + "required": [ + "user_id", + "oauth_application_id" + ] }, "CredentialsApi3": { "properties": { @@ -25854,7 +27169,12 @@ } }, "x-looker-status": "stable", - "required": ["dashboard_id", "name", "title", "type"] + "required": [ + "dashboard_id", + "name", + "title", + "type" + ] }, "DashboardLayoutComponent": { "properties": { @@ -27235,7 +28555,9 @@ } }, "x-looker-status": "beta", - "required": ["target_url"] + "required": [ + "target_url" + ] }, "EmbedSsoParams": { "properties": { @@ -27323,7 +28645,9 @@ } }, "x-looker-status": "stable", - "required": ["target_url"] + "required": [ + "target_url" + ] }, "EmbedSecret": { "properties": { @@ -27531,7 +28855,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "CreateFolder": { "properties": { @@ -27547,7 +28873,10 @@ } }, "x-looker-status": "stable", - "required": ["name", "parent_id"] + "required": [ + "name", + "parent_id" + ] }, "UpdateFolder": { "properties": { @@ -27687,7 +29016,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "GitBranch": { "properties": { @@ -28308,7 +29639,11 @@ "type": "string" }, "readOnly": true, - "x-looker-values": ["cell", "query", "dashboard"], + "x-looker-values": [ + "cell", + "query", + "dashboard" + ], "description": "A list of action types the integration supports. Valid values are: \"cell\", \"query\", \"dashboard\".", "x-looker-nullable": false }, @@ -28318,7 +29653,10 @@ "type": "string" }, "readOnly": true, - "x-looker-values": ["formatted", "unformatted"], + "x-looker-values": [ + "formatted", + "unformatted" + ], "description": "A list of formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: \"formatted\", \"unformatted\".", "x-looker-nullable": false }, @@ -28328,7 +29666,10 @@ "type": "string" }, "readOnly": true, - "x-looker-values": ["apply", "noapply"], + "x-looker-values": [ + "apply", + "noapply" + ], "description": "A list of visualization formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: \"apply\", \"noapply\".", "x-looker-nullable": false }, @@ -28338,7 +29679,10 @@ "type": "string" }, "readOnly": true, - "x-looker-values": ["push", "url"], + "x-looker-values": [ + "push", + "url" + ], "description": "A list of all the download mechanisms the integration supports. The order of values is not significant: Looker will select the most appropriate supported download mechanism for a given query. The integration must ensure it can handle any of the mechanisms it claims to support. If unspecified, this defaults to all download setting values. Valid values are: \"push\", \"url\".", "x-looker-nullable": false }, @@ -30198,6 +31542,15 @@ "readOnly": true, "description": "An array of items describing which custom measure types are supported for creating a custom measure 'based_on' each possible dimension type.", "x-looker-nullable": false + }, + "always_join": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true, + "description": "An array of joins that will always be included in the SQL for this explore, even if the user has not selected a field from the joined view.", + "x-looker-nullable": true } }, "x-looker-status": "stable" @@ -30384,7 +31737,10 @@ "align": { "type": "string", "readOnly": true, - "x-looker-values": ["left", "right"], + "x-looker-values": [ + "left", + "right" + ], "description": "The appropriate horizontal text alignment the values of this field should be displayed in. Valid values are: \"left\", \"right\".", "x-looker-nullable": false }, @@ -30397,7 +31753,12 @@ "category": { "type": "string", "readOnly": true, - "x-looker-values": ["parameter", "filter", "measure", "dimension"], + "x-looker-values": [ + "parameter", + "filter", + "measure", + "dimension" + ], "description": "Field category Valid values are: \"parameter\", \"filter\", \"measure\", \"dimension\".", "x-looker-nullable": true }, @@ -30449,7 +31810,10 @@ "fill_style": { "type": "string", "readOnly": true, - "x-looker-values": ["enumeration", "range"], + "x-looker-values": [ + "enumeration", + "range" + ], "description": "The style of dimension fill that is possible for this field. Null if no dimension fill is possible. Valid values are: \"enumeration\", \"range\".", "x-looker-nullable": true }, @@ -30883,7 +32247,10 @@ "format": { "type": "string", "readOnly": true, - "x-looker-values": ["topojson", "vector_tile_region"], + "x-looker-values": [ + "topojson", + "vector_tile_region" + ], "description": "Specifies the data format of the region information. Valid values are: \"topojson\", \"vector_tile_region\".", "x-looker-nullable": false }, @@ -32071,7 +33438,12 @@ }, "pull_request_mode": { "type": "string", - "x-looker-values": ["off", "links", "recommended", "required"], + "x-looker-values": [ + "off", + "links", + "recommended", + "required" + ], "description": "The git pull request policy for this project. Valid values are: \"off\", \"links\", \"recommended\", \"required\".", "x-looker-nullable": false }, @@ -32514,7 +33886,10 @@ } }, "x-looker-status": "stable", - "required": ["model", "view"] + "required": [ + "model", + "view" + ] }, "CreateQueryTask": { "properties": { @@ -32572,7 +33947,10 @@ } }, "x-looker-status": "stable", - "required": ["query_id", "result_format"] + "required": [ + "query_id", + "result_format" + ] }, "QueryTask": { "properties": { @@ -34342,6 +35720,12 @@ "readOnly": true, "description": "Tables for this schema", "x-looker-nullable": false + }, + "table_limit_hit": { + "type": "boolean", + "readOnly": true, + "description": "True if the table limit was hit while retrieving tables in this schema", + "x-looker-nullable": false } }, "x-looker-status": "beta" @@ -34709,6 +36093,56 @@ }, "x-looker-status": "beta" }, + "SmtpStatus": { + "properties": { + "is_valid": { + "type": "boolean", + "readOnly": true, + "description": "Overall SMTP status of cluster", + "x-looker-nullable": false + }, + "node_count": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Total number of nodes in cluster", + "x-looker-nullable": true + }, + "node_status": { + "type": "array", + "items": { + "$ref": "#/definitions/SmtpNodeStatus" + }, + "readOnly": true, + "description": "array of each node's status containing is_valid, message, hostname", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, + "SmtpNodeStatus": { + "properties": { + "is_valid": { + "type": "boolean", + "readOnly": true, + "description": "SMTP status of node", + "x-looker-nullable": false + }, + "message": { + "type": "string", + "readOnly": true, + "description": "Error message for node", + "x-looker-nullable": true + }, + "hostname": { + "type": "string", + "readOnly": true, + "description": "Host name of node", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, "Snippet": { "properties": { "name": { @@ -35003,6 +36437,90 @@ }, "x-looker-status": "beta" }, + "SupportAccessAllowlistEntry": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Unique ID", + "x-looker-nullable": false + }, + "email": { + "type": "string", + "description": "Email address", + "x-looker-nullable": true + }, + "full_name": { + "type": "string", + "readOnly": true, + "description": "Full name of allowlisted user", + "x-looker-nullable": true + }, + "reason": { + "type": "string", + "description": "Reason the Email is included in the Allowlist", + "x-looker-nullable": true + }, + "created_date": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Date the Email was added to the Allowlist", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, + "SupportAccessAddEntries": { + "properties": { + "emails": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of emails to add to the Allowlist", + "x-looker-nullable": true + }, + "reason": { + "type": "string", + "description": "Reason for adding emails to the Allowlist", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, + "SupportAccessEnable": { + "properties": { + "duration_in_seconds": { + "type": "integer", + "format": "int64", + "description": "Duration Support Access will remain enabled", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta", + "required": [ + "duration_in_seconds" + ] + }, + "SupportAccessStatus": { + "properties": { + "open": { + "type": "boolean", + "readOnly": true, + "description": "Whether or not Support Access is open", + "x-looker-nullable": false + }, + "open_until": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Time that Support Access will expire", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, "ThemeSettings": { "properties": { "background_color": { @@ -35231,7 +36749,11 @@ } }, "x-looker-status": "stable", - "required": ["name", "label", "type"] + "required": [ + "name", + "label", + "type" + ] }, "UserAttributeGroupValue": { "properties": { @@ -35372,7 +36894,9 @@ } }, "x-looker-status": "stable", - "required": ["email"] + "required": [ + "email" + ] }, "UserLoginLockout": { "properties": { @@ -35945,4 +37469,4 @@ "x-looker-status": "stable" } } -} +} \ No newline at end of file diff --git a/spec/Looker.4.0.oas.json b/spec/Looker.4.0.oas.json index c21d69bde..265989907 100644 --- a/spec/Looker.4.0.oas.json +++ b/spec/Looker.4.0.oas.json @@ -1,8 +1,8 @@ { "openapi": "3.0.0", "info": { - "version": "4.0.21.20", - "x-looker-release-version": "21.20.8", + "version": "4.0.21.21", + "x-looker-release-version": "21.21.0", "title": "Looker API 4.0 (Beta) Reference", "description": "\nWelcome to the future! API 4.0 co-exists with APIs 3.1 and 3.0. (3.0 should no longer be used.)\nThe \"beta\" tag means updates for API 4.0 may include breaking changes, but as always we will work to minimize them.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 version was introduced so we can make adjustments to API functions, parameters, and response types to\nfix bugs and inconsistencies. These changes fall outside the bounds of non-breaking additive changes we can\nmake to our stable API 3.1.\n\nOne benefit of these type adjustments in API 4.0 is dramatically better support for strongly\ntyped languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nWhile API 3.1 is still the de-facto Looker API (\"current\", \"stable\", \"default\", etc), the bulk\nof our development activity has shifted to API 4.0, where all new features are added.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -11,7 +11,7 @@ }, "license": { "name": "EULA", - "url": "https://localhost:10000/eula" + "url": "https://self-signed.looker.com:9999/eula" } }, "tags": [ @@ -139,7 +139,9 @@ "paths": { "/query_tasks": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_query_task", "summary": "Run Query Async", "description": "### Create an async query task\n\nCreates a query task (job) to run a previously created query asynchronously. Returns a Query Task ID.\n\nUse [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task.\nAfter the query task status reaches \"Complete\", use [query_task_results(query_task_id)](#!/Query/query_task_results) to fetch the results of the query.\n", @@ -344,7 +346,9 @@ }, "/query_tasks/multi_results": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task_multi_results", "summary": "Get Multiple Async Query Results", "description": "### Fetch results of multiple async queries\n\nReturns the results of multiple async queries in one request.\n\nFor Query Tasks that are not completed, the response will include the execution status of the Query Task but will not include query results.\nQuery Tasks whose results have expired will have a status of 'expired'.\nIf the user making the API request does not have sufficient privileges to view a Query Task result, the result will have a status of 'missing'\n", @@ -406,7 +410,9 @@ }, "/query_tasks/{query_task_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task", "summary": "Get Async Query Info", "description": "### Get Query Task details\n\nUse this function to check the status of an async query task. After the status\nreaches \"Complete\", you can call [query_task_results(query_task_id)](#!/Query/query_task_results) to\nretrieve the results of the query.\n\nUse [create_query_task()](#!/Query/create_query_task) to create an async query task.\n", @@ -468,7 +474,9 @@ }, "/query_tasks/{query_task_id}/results": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_task_results", "summary": "Get Async Query Results", "description": "### Get Async Query Results\n\nReturns the results of an async query task if the query has completed.\n\nIf the query task is still running or waiting to run, this function returns 204 No Content.\n\nIf the query task ID is invalid or the cached results of the query task have expired, this function returns 404 Not Found.\n\nUse [query_task(query_task_id)](#!/Query/query_task) to check the execution status of the query task\nCall query_task_results only after the query task status reaches \"Complete\".\n\nYou can also use [query_task_multi_results()](#!/Query/query_task_multi_results) retrieve the\nresults of multiple async query tasks at the same time.\n\n#### SQL Error Handling:\nIf the query fails due to a SQL db error, how this is communicated depends on the result_format you requested in `create_query_task()`.\n\nFor `json_detail` result_format: `query_task_results()` will respond with HTTP status '200 OK' and db SQL error info\nwill be in the `errors` property of the response object. The 'data' property will be empty.\n\nFor all other result formats: `query_task_results()` will respond with HTTP status `400 Bad Request` and some db SQL error info\nwill be in the message of the 400 error response, but not as detailed as expressed in `json_detail.errors`.\nThese data formats can only carry row data, and error info is not row data.\n", @@ -551,7 +559,9 @@ }, "/queries/{query_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query", "summary": "Get Query", "description": "### Get a previously created query by id.\n\nA Looker query object includes the various parameters that define a database query that has been run or\ncould be run in the future. These parameters include: model, view, fields, filters, pivots, etc.\nQuery *results* are not part of the query object.\n\nQuery objects are unique and immutable. Query objects are created automatically in Looker as users explore data.\nLooker does not delete them; they become part of the query history. When asked to create a query for\nany given set of parameters, Looker will first try to find an existing query object with matching\nparameters and will only create a new object when an appropriate object can not be found.\n\nThis 'get' method is used to get the details about a query for a given id. See the other methods here\nto 'create' and 'run' queries.\n\nNote that some fields like 'filter_config' and 'vis_config' etc are specific to how the Looker UI\nbuilds queries and visualizations and are not generally useful for API use. They are not required when\ncreating new queries and can usually just be ignored.\n\n", @@ -614,7 +624,9 @@ }, "/queries/slug/{slug}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "query_for_slug", "summary": "Get Query for Slug", "description": "### Get the query for a given query slug.\n\nThis returns the query for the 'slug' in a query share URL.\n\nThe 'slug' is a randomly chosen short string that is used as an alternative to the query's id value\nfor use in URLs etc. This method exists as a convenience to help you use the API to 'find' queries that\nhave been created using the Looker UI.\n\nYou can use the Looker explore page to build a query and then choose the 'Share' option to\nshow the share url for the query. Share urls generally look something like 'https://looker.yourcompany/x/vwGSbfc'.\nThe trailing 'vwGSbfc' is the share slug. You can pass that string to this api method to get details about the query.\nThose details include the 'id' that you can use to run the query. Or, you can copy the query body\n(perhaps with your own modification) and use that as the basis to make/run new queries.\n\nThis will also work with slugs from Looker explore urls like\n'https://looker.yourcompany/explore/ecommerce/orders?qid=aogBgL6o3cKK1jN3RoZl5s'. In this case\n'aogBgL6o3cKK1jN3RoZl5s' is the slug.\n", @@ -676,7 +688,9 @@ }, "/queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_query", "summary": "Create Query", "description": "### Create a query.\n\nThis allows you to create a new query that you can later run. Looker queries are immutable once created\nand are not deleted. If you create a query that is exactly like an existing query then the existing query\nwill be returned and no new query will be created. Whether a new query is created or not, you can use\nthe 'id' in the returned query with the 'run' method.\n\nThe query parameters are passed as json in the body of the request.\n\n", @@ -770,7 +784,9 @@ }, "/queries/{query_id}/run/{result_format}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_query", "summary": "Run Query", "description": "### Run a saved query.\n\nThis runs a previously saved query. You can use this on a query that was generated in the Looker UI\nor one that you have explicitly created using the API. You can also use a query 'id' from a saved 'Look'.\n\nThe 'result_format' parameter specifies the desired structure and format of the response.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", @@ -1048,7 +1064,9 @@ }, "/queries/run/{result_format}": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_inline_query", "summary": "Run Inline Query", "description": "### Run the query that is specified inline in the posted body.\n\nThis allows running a query as defined in json in the posted body. This combines\nthe two actions of posting & running a query into one step.\n\nHere is an example body in json:\n```\n{\n \"model\":\"thelook\",\n \"view\":\"inventory_items\",\n \"fields\":[\"category.name\",\"inventory_items.days_in_inventory_tier\",\"products.count\"],\n \"filters\":{\"category.name\":\"socks\"},\n \"sorts\":[\"products.count desc 0\"],\n \"limit\":\"500\",\n \"query_timezone\":\"America/Los_Angeles\"\n}\n```\n\nWhen using the Ruby SDK this would be passed as a Ruby hash like:\n```\n{\n :model=>\"thelook\",\n :view=>\"inventory_items\",\n :fields=>\n [\"category.name\",\n \"inventory_items.days_in_inventory_tier\",\n \"products.count\"],\n :filters=>{:\"category.name\"=>\"socks\"},\n :sorts=>[\"products.count desc 0\"],\n :limit=>\"500\",\n :query_timezone=>\"America/Los_Angeles\",\n}\n```\n\nThis will return the result of running the query in the format specified by the 'result_format' parameter.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", @@ -1318,7 +1336,9 @@ }, "/queries/models/{model_name}/views/{view_name}/run/{result_format}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_url_encoded_query", "summary": "Run Url Encoded Query", "description": "### Run an URL encoded query.\n\nThis requires the caller to encode the specifiers for the query into the URL query part using\nLooker-specific syntax as explained below.\n\nGenerally, you would want to use one of the methods that takes the parameters as json in the POST body\nfor creating and/or running queries. This method exists for cases where one really needs to encode the\nparameters into the URL of a single 'GET' request. This matches the way that the Looker UI formats\n'explore' URLs etc.\n\nThe parameters here are very similar to the json body formatting except that the filter syntax is\ntricky. Unfortunately, this format makes this method not currently callable via the 'Try it out!' button\nin this documentation page. But, this is callable when creating URLs manually or when using the Looker SDK.\n\nHere is an example inline query URL:\n\n```\nhttps://looker.mycompany.com:19999/api/3.0/queries/models/thelook/views/inventory_items/run/json?fields=category.name,inventory_items.days_in_inventory_tier,products.count&f[category.name]=socks&sorts=products.count+desc+0&limit=500&query_timezone=America/Los_Angeles\n```\n\nWhen invoking this endpoint with the Ruby SDK, pass the query parameter parts as a hash. The hash to match the above would look like:\n\n```ruby\nquery_params =\n{\n :fields => \"category.name,inventory_items.days_in_inventory_tier,products.count\",\n :\"f[category.name]\" => \"socks\",\n :sorts => \"products.count desc 0\",\n :limit => \"500\",\n :query_timezone => \"America/Los_Angeles\"\n}\nresponse = ruby_sdk.run_url_encoded_query('thelook','inventory_items','json', query_params)\n\n```\n\nAgain, it is generally easier to use the variant of this method that passes the full query in the POST body.\nThis method is available for cases where other alternatives won't fit the need.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", @@ -1484,7 +1504,9 @@ }, "/login": { "post": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "login", "summary": "Login", "description": "### Present client credentials to obtain an authorization token\n\nLooker API implements the OAuth2 [Resource Owner Password Credentials Grant](https://looker.com/docs/r/api/outh2_resource_owner_pc) pattern.\nThe client credentials required for this login must be obtained by creating an API3 key on a user account\nin the Looker Admin console. The API3 key consists of a public `client_id` and a private `client_secret`.\n\nThe access token returned by `login` must be used in the HTTP Authorization header of subsequent\nAPI requests, like this:\n```\nAuthorization: token 4QDkCyCtZzYgj4C2p2cj3csJH7zqS5RzKs2kTnG4\n```\nReplace \"4QDkCy...\" with the `access_token` value returned by `login`.\nThe word `token` is a string literal and must be included exactly as shown.\n\nThis function can accept `client_id` and `client_secret` parameters as URL query params or as www-form-urlencoded params in the body of the HTTP request. Since there is a small risk that URL parameters may be visible to intermediate nodes on the network route (proxies, routers, etc), passing credentials in the body of the request is considered more secure than URL params.\n\nExample of passing credentials in the HTTP request body:\n````\nPOST HTTP /login\nContent-Type: application/x-www-form-urlencoded\n\nclient_id=CGc9B7v7J48dQSJvxxx&client_secret=nNVS9cSS3xNpSC9JdsBvvvvv\n````\n\n### Best Practice:\nAlways pass credentials in body params. Pass credentials in URL query params **only** when you cannot pass body params due to application, tool, or other limitations.\n\nFor more information and detailed examples of Looker API authorization, see [How to Authenticate to Looker API3](https://github.com/looker/looker-sdk-ruby/blob/master/authentication.md).\n", @@ -1546,7 +1568,9 @@ }, "/login/{user_id}": { "post": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "login_user", "summary": "Login user", "description": "### Create an access token that runs as a given user.\n\nThis can only be called by an authenticated admin user. It allows that admin to generate a new\nauthentication token for the user with the given user id. That token can then be used for subsequent\nAPI calls - which are then performed *as* that target user.\n\nThe target user does *not* need to have a pre-existing API client_id/client_secret pair. And, no such\ncredentials are created by this call.\n\nThis allows for building systems where api user authentication for an arbitrary number of users is done\noutside of Looker and funneled through a single 'service account' with admin permissions. Note that a\nnew access token is generated on each call. If target users are going to be making numerous API\ncalls in a short period then it is wise to cache this authentication token rather than call this before\neach of those API calls.\n\nSee 'login' for more detail on the access token and how to use it.\n", @@ -1609,7 +1633,9 @@ }, "/logout": { "delete": { - "tags": ["ApiAuth"], + "tags": [ + "ApiAuth" + ], "operationId": "logout", "summary": "Logout", "description": "### Logout of the API and invalidate the current access token.\n", @@ -1651,7 +1677,9 @@ }, "/alerts/search": { "get": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "search_alerts", "summary": "Search Alerts", "description": "### Search Alerts\n", @@ -1800,7 +1828,9 @@ }, "/alerts/{alert_id}": { "get": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "get_alert", "summary": "Get an alert", "description": "### Get an alert by a given alert ID\n", @@ -1852,7 +1882,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "update_alert_field", "summary": "Update select fields on an alert", "description": "### Update select alert fields\n# Available fields: `owner_id`, `is_disabled`, `disabled_reason`, `is_public`, `threshold`\n#\n", @@ -1945,7 +1977,9 @@ } }, "put": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "update_alert", "summary": "Update an alert", "description": "### Update an alert\n# Required fields: `owner_id`, `field`, `destinations`, `comparison_type`, `threshold`, `cron`\n#\n", @@ -2028,7 +2062,9 @@ } }, "delete": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "delete_alert", "summary": "Delete an alert", "description": "### Delete an alert by a given alert ID\n", @@ -2095,7 +2131,9 @@ }, "/alerts": { "post": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "create_alert", "summary": "Create an alert", "description": "### Create a new alert and return details of the newly created object\n\nRequired fields: `field`, `destinations`, `comparison_type`, `threshold`, `cron`\n\nExample Request:\nRun alert on dashboard element '103' at 5am every day. Send an email to 'test@test.com' if inventory for Los Angeles (using dashboard filter `Warehouse Name`) is lower than 1,000\n```\n{\n \"cron\": \"0 5 * * *\",\n \"custom_title\": \"Alert when LA inventory is low\",\n \"dashboard_element_id\": 103,\n \"applied_dashboard_filters\": [\n {\n \"filter_title\": \"Warehouse Name\",\n \"field_name\": \"distribution_centers.name\",\n \"filter_value\": \"Los Angeles CA\",\n \"filter_description\": \"is Los Angeles CA\"\n }\n ],\n \"comparison_type\": \"LESS_THAN\",\n \"destinations\": [\n {\n \"destination_type\": \"EMAIL\",\n \"email_address\": \"test@test.com\"\n }\n ],\n \"field\": {\n \"title\": \"Number on Hand\",\n \"name\": \"inventory_items.number_on_hand\"\n },\n \"is_disabled\": false,\n \"is_public\": true,\n \"threshold\": 1000\n}\n```\n", @@ -2188,7 +2226,9 @@ }, "/alerts/{alert_id}/enqueue": { "post": { - "tags": ["Alert"], + "tags": [ + "Alert" + ], "operationId": "enqueue_alert", "summary": "Enqueue an alert", "description": "### Enqueue an Alert by ID\n", @@ -2265,7 +2305,9 @@ }, "/cloud_storage": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "cloud_storage_configuration", "summary": "Get Cloud Storage", "description": "Get the current Cloud Storage Configuration.\n", @@ -2305,7 +2347,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_cloud_storage_configuration", "summary": "Update Cloud Storage", "description": "Update the current Cloud Storage Configuration.\n", @@ -2368,7 +2412,9 @@ }, "/color_collections": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "all_color_collections", "summary": "Get all Color Collections", "description": "### Get an array of all existing Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2422,7 +2468,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "create_color_collection", "summary": "Create ColorCollection", "description": "### Create a custom color collection with the specified information\n\nCreates a new custom color collection object, returning the details, including the created id.\n\n**Update** an existing color collection with [Update Color Collection](#!/ColorCollection/update_color_collection)\n\n**Permanently delete** an existing custom color collection with [Delete Color Collection](#!/ColorCollection/delete_color_collection)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2515,7 +2563,9 @@ }, "/color_collections/custom": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collections_custom", "summary": "Get all Custom Color Collections", "description": "### Get an array of all existing **Custom** Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2571,7 +2621,9 @@ }, "/color_collections/standard": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collections_standard", "summary": "Get all Standard Color Collections", "description": "### Get an array of all existing **Standard** Color Collections\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2627,7 +2679,9 @@ }, "/color_collections/default": { "put": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "set_default_color_collection", "summary": "Set Default Color Collection", "description": "### Set the global default Color Collection by ID\n\nReturns the new specified default Color Collection object.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2698,7 +2752,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "default_color_collection", "summary": "Get Default Color Collection", "description": "### Get the default color collection\n\nUse this to retrieve the default Color Collection.\n\nSet the default color collection with [ColorCollection](#!/ColorCollection/set_default_color_collection)\n", @@ -2740,7 +2796,9 @@ }, "/color_collections/{collection_id}": { "get": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "color_collection", "summary": "Get Color Collection by ID", "description": "### Get a Color Collection by ID\n\nUse this to retrieve a specific Color Collection.\nGet a **single** color collection by id with [ColorCollection](#!/ColorCollection/color_collection)\n\nGet all **standard** color collections with [ColorCollection](#!/ColorCollection/color_collections_standard)\n\nGet all **custom** color collections with [ColorCollection](#!/ColorCollection/color_collections_custom)\n\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2800,7 +2858,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "update_color_collection", "summary": "Update Custom Color collection", "description": "### Update a custom color collection by id.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2892,7 +2952,9 @@ } }, "delete": { - "tags": ["ColorCollection"], + "tags": [ + "ColorCollection" + ], "operationId": "delete_color_collection", "summary": "Delete ColorCollection", "description": "### Delete a custom color collection by id\n\nThis operation permanently deletes the identified **Custom** color collection.\n\n**Standard** color collections cannot be deleted\n\nBecause multiple color collections can have the same label, they must be deleted by ID, not name.\n**Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors.\n\n", @@ -2968,7 +3030,9 @@ }, "/commands": { "post": { - "tags": ["Command"], + "tags": [ + "Command" + ], "operationId": "create_command", "summary": "Create a custom command", "description": "### Create a new command.\n# Required fields: [:name, :linked_content_id, :linked_content_type]\n# `linked_content_type` must be one of [\"dashboard\", \"lookml_dashboard\"]\n#\n", @@ -3049,7 +3113,9 @@ } }, "get": { - "tags": ["Command"], + "tags": [ + "Command" + ], "operationId": "get_all_commands", "summary": "Get All Commands", "description": "### Get All Commands.\n", @@ -3134,7 +3200,9 @@ }, "/commands/{command_id}": { "patch": { - "tags": ["Command"], + "tags": [ + "Command" + ], "operationId": "update_command", "summary": "Update a custom command", "description": "### Update an existing custom command.\n# Optional fields: ['name', 'description']\n#\n", @@ -3217,7 +3285,9 @@ } }, "delete": { - "tags": ["Command"], + "tags": [ + "Command" + ], "operationId": "delete_command", "summary": "Delete a custom command", "description": "### Delete an existing custom command.\n", @@ -3284,7 +3354,9 @@ }, "/content_favorite/search": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "search_content_favorites", "summary": "Search Favorite Contents", "description": "### Search Favorite Content\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -3433,7 +3505,9 @@ }, "/content_favorite/{content_favorite_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_favorite", "summary": "Get Favorite Content", "description": "### Get favorite content by its id", @@ -3494,7 +3568,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "delete_content_favorite", "summary": "Delete Favorite Content", "description": "### Delete favorite content", @@ -3558,7 +3634,9 @@ }, "/content_favorite": { "post": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "create_content_favorite", "summary": "Create Favorite Content", "description": "### Create favorite content", @@ -3641,7 +3719,9 @@ }, "/content_metadata": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "all_content_metadatas", "summary": "Get All Content Metadatas", "description": "### Get information about all content metadata in a space.\n", @@ -3707,7 +3787,9 @@ }, "/content_metadata/{content_metadata_id}": { "patch": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "update_content_metadata", "summary": "Update Content Metadata", "description": "### Move a piece of content.\n", @@ -3790,7 +3872,9 @@ } }, "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_metadata", "summary": "Get Content Metadata", "description": "### Get information about an individual content metadata record.\n", @@ -3853,7 +3937,9 @@ }, "/content_metadata_access": { "post": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "create_content_metadata_access", "summary": "Create Content Metadata Access", "description": "### Create content metadata access.\n", @@ -3946,7 +4032,9 @@ } }, "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "all_content_metadata_accesses", "summary": "Get All Content Metadata Accesses", "description": "### All content metadata access records for a content metadata item.\n", @@ -4012,7 +4100,9 @@ }, "/content_metadata_access/{content_metadata_access_id}": { "put": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "update_content_metadata_access", "summary": "Update Content Metadata Access", "description": "### Update type of access for content metadata.\n", @@ -4094,7 +4184,9 @@ } }, "delete": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "delete_content_metadata_access", "summary": "Delete Content Metadata Access", "description": "### Remove content metadata access.\n", @@ -4158,7 +4250,9 @@ }, "/content_thumbnail/{type}/{resource_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_thumbnail", "summary": "Get Content Thumbnail", "description": "### Get an image representing the contents of a dashboard or look.\n\nThe returned thumbnail is an abstract representation of the contents of a dashbord or look and does not\nreflect the actual data displayed in the respective visualizations.\n", @@ -4273,7 +4367,9 @@ }, "/content_validation": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "content_validation", "summary": "Validate Content", "description": "### Validate All Content\n\nPerforms validation of all looks and dashboards\nReturns a list of errors found as well as metadata about the content validation run.\n", @@ -4346,7 +4442,9 @@ }, "/content_view/search": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "search_content_views", "summary": "Search Content Views", "description": "### Search Content Views\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -4512,7 +4610,9 @@ }, "/credentials_email/search": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "search_credentials_email", "summary": "Search CredentialsEmail", "description": "### Search email credentials\n\nReturns all credentials_email records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -4634,7 +4734,9 @@ }, "/custom_welcome_email": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "custom_welcome_email", "summary": "Get Custom Welcome Email", "description": "### Get the current status and content of custom welcome emails\n", @@ -4675,7 +4777,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_custom_welcome_email", "summary": "Update Custom Welcome Email Content", "description": "Update custom welcome email setting and values. Optionally send a test email with the new content to the currently logged in user.\n", @@ -4760,7 +4864,9 @@ }, "/custom_welcome_email_test": { "put": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_custom_welcome_email_test", "summary": "Send a test welcome email to the currently logged in user with the supplied content ", "description": "Requests to this endpoint will send a welcome email with the custom content provided in the body to the currently logged in user.\n", @@ -4833,7 +4939,9 @@ }, "/dashboards": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "all_dashboards", "summary": "Get All Dashboards", "description": "### Get information about all active dashboards.\n\nReturns an array of **abbreviated dashboard objects**. Dashboards marked as deleted are excluded from this list.\n\nGet the **full details** of a specific dashboard by id with [dashboard()](#!/Dashboard/dashboard)\n\nFind **deleted dashboards** with [search_dashboards()](#!/Dashboard/search_dashboards)\n", @@ -4887,7 +4995,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard", "summary": "Create Dashboard", "description": "### Create a new dashboard\n\nCreates a new dashboard object and returns the details of the newly created dashboard.\n\n`Title`, `user_id`, and `space_id` are all required fields.\n`Space_id` and `user_id` must contain the id of an existing space or user, respectively.\nA dashboard's `title` must be unique within the space in which it resides.\n\nIf you receive a 422 error response when creating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n\nYou can **update** an existing dashboard with [update_dashboard()](#!/Dashboard/update_dashboard)\n\nYou can **permanently delete** an existing dashboard with [delete_dashboard()](#!/Dashboard/delete_dashboard)\n", @@ -4970,7 +5080,9 @@ }, "/dashboards/search": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "search_dashboards", "summary": "Search Dashboards", "description": "### Search Dashboards\n\nReturns an **array of dashboard objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nThe parameters `limit`, and `offset` are recommended for fetching results in page-size chunks.\n\nGet a **single dashboard** by id with [dashboard()](#!/Dashboard/dashboard)\n", @@ -5192,7 +5304,9 @@ }, "/dashboards/{lookml_dashboard_id}/import/{space_id}": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "import_lookml_dashboard", "summary": "Import LookML Dashboard", "description": "### Import a LookML dashboard to a space as a UDD\nCreates a UDD (a dashboard which exists in the Looker database rather than as a LookML file) from the LookML dashboard\nand places it in the space specified. The created UDD will have a lookml_link_id which links to the original LookML dashboard.\n\nTo give the imported dashboard specify a (e.g. title: \"my title\") in the body of your request, otherwise the imported\ndashboard will have the same title as the original LookML dashboard.\n\nFor this operation to succeed the user must have permission to see the LookML dashboard in question, and have permission to\ncreate content in the space the dashboard is being imported to.\n\n**Sync** a linked UDD with [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard)\n**Unlink** a linked UDD by setting lookml_link_id to null with [update_dashboard()](#!/Dashboard/update_dashboard)\n", @@ -5314,7 +5428,9 @@ }, "/dashboards/{lookml_dashboard_id}/sync": { "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "sync_lookml_dashboard", "summary": "Sync LookML Dashboard", "description": "### Update all linked dashboards to match the specified LookML dashboard.\n\nAny UDD (a dashboard which exists in the Looker database rather than as a LookML file) which has a `lookml_link_id`\nproperty value referring to a LookML dashboard's id (model::dashboardname) will be updated so that it matches the current state of the LookML dashboard.\n\nFor this operation to succeed the user must have permission to view the LookML dashboard, and only linked dashboards\nthat the user has permission to update will be synced.\n\nTo **link** or **unlink** a UDD set the `lookml_link_id` property with [update_dashboard()](#!/Dashboard/update_dashboard)\n", @@ -5411,7 +5527,9 @@ }, "/dashboards/{dashboard_id}": { "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard", "summary": "Delete Dashboard", "description": "### Delete the dashboard with the specified id\n\nPermanently **deletes** a dashboard. (The dashboard cannot be recovered after this operation.)\n\n\"Soft\" delete or hide a dashboard by setting its `deleted` status to `True` with [update_dashboard()](#!/Dashboard/update_dashboard).\n\nNote: When a dashboard is deleted in the UI, it is soft deleted. Use this API call to permanently remove it, if desired.\n", @@ -5482,7 +5600,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard", "summary": "Update Dashboard", "description": "### Update a dashboard\n\nYou can use this function to change the string and integer properties of\na dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components\ncannot be modified by this function - use the update functions for the respective\nnested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter)\nto modify nested objects referenced by a dashboard.\n\nIf you receive a 422 error response when updating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n", @@ -5574,7 +5694,9 @@ } }, "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard", "summary": "Get Dashboard", "description": "### Get information about a dashboard\n\nReturns the full details of the identified dashboard object\n\nGet a **summary list** of all active dashboards with [all_dashboards()](#!/Dashboard/all_dashboards)\n\nYou can **Search** for dashboards with [search_dashboards()](#!/Dashboard/search_dashboards)\n", @@ -5636,7 +5758,9 @@ }, "/dashboards/aggregate_table_lookml/{dashboard_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_aggregate_table_lookml", "summary": "Get Aggregate Table LookML for a dashboard", "description": "### Get Aggregate Table LookML for Each Query on a Dahboard\n\nReturns a JSON object that contains the dashboard id and Aggregate Table lookml\n\n", @@ -5689,7 +5813,9 @@ }, "/dashboards/lookml/{dashboard_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_lookml", "summary": "Get lookml of a UDD", "description": "### Get lookml of a UDD\n\nReturns a JSON object that contains the dashboard id and the full lookml\n\n", @@ -5742,7 +5868,9 @@ }, "/dashboards/{dashboard_id}/move": { "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "move_dashboard", "summary": "Move Dashboard", "description": "### Move an existing dashboard\n\nMoves a dashboard to a specified folder, and returns the moved dashboard.\n\n`dashboard_id` and `folder_id` are required.\n`dashboard_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard.\n", @@ -5834,7 +5962,9 @@ }, "/dashboards/{dashboard_id}/copy": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "copy_dashboard", "summary": "Copy Dashboard", "description": "### Copy an existing dashboard\n\nCreates a copy of an existing dashboard, in a specified folder, and returns the copied dashboard.\n\n`dashboard_id` is required, `dashboard_id` and `folder_id` must already exist if specified.\n`folder_id` will default to the existing folder.\n\nIf a dashboard with the same title already exists in the target folder, the copy will have '(copy)'\n or '(copy <# of copies>)' appended.\n", @@ -5936,7 +6066,9 @@ }, "/dashboard_elements/search": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "search_dashboard_elements", "summary": "Search Dashboard Elements", "description": "### Search Dashboard Elements\n\nReturns an **array of DashboardElement objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -6048,7 +6180,9 @@ }, "/dashboard_elements/{dashboard_element_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_element", "summary": "Get DashboardElement", "description": "### Get information about the dashboard element with a specific id.", @@ -6108,7 +6242,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_element", "summary": "Delete DashboardElement", "description": "### Delete a dashboard element with a specific id.", @@ -6169,7 +6305,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_element", "summary": "Update DashboardElement", "description": "### Update the dashboard element with a specific id.", @@ -6262,7 +6400,9 @@ }, "/dashboards/{dashboard_id}/dashboard_elements": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_elements", "summary": "Get All DashboardElements", "description": "### Get information about all the dashboard elements on a dashboard with a specific id.", @@ -6327,7 +6467,9 @@ }, "/dashboard_elements": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_element", "summary": "Create DashboardElement", "description": "### Create a dashboard element on the dashboard with a specific id.", @@ -6421,7 +6563,9 @@ }, "/dashboard_filters/{dashboard_filter_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_filter", "summary": "Get Dashboard Filter", "description": "### Get information about the dashboard filters with a specific id.", @@ -6481,7 +6625,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_filter", "summary": "Delete Dashboard Filter", "description": "### Delete a dashboard filter with a specific id.", @@ -6542,7 +6688,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_filter", "summary": "Update Dashboard Filter", "description": "### Update the dashboard filter with a specific id.", @@ -6635,7 +6783,9 @@ }, "/dashboards/{dashboard_id}/dashboard_filters": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_filters", "summary": "Get All Dashboard Filters", "description": "### Get information about all the dashboard filters on a dashboard with a specific id.", @@ -6700,7 +6850,9 @@ }, "/dashboard_filters": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_filter", "summary": "Create Dashboard Filter", "description": "### Create a dashboard filter on the dashboard with a specific id.", @@ -6794,7 +6946,9 @@ }, "/dashboard_layout_components/{dashboard_layout_component_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout_component", "summary": "Get DashboardLayoutComponent", "description": "### Get information about the dashboard elements with a specific id.", @@ -6854,7 +7008,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_layout_component", "summary": "Update DashboardLayoutComponent", "description": "### Update the dashboard element with a specific id.", @@ -6947,7 +7103,9 @@ }, "/dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout_dashboard_layout_components", "summary": "Get All DashboardLayoutComponents", "description": "### Get information about all the dashboard layout components for a dashboard layout with a specific id.", @@ -7012,7 +7170,9 @@ }, "/dashboard_layouts/{dashboard_layout_id}": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_layout", "summary": "Get DashboardLayout", "description": "### Get information about the dashboard layouts with a specific id.", @@ -7072,7 +7232,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "delete_dashboard_layout", "summary": "Delete DashboardLayout", "description": "### Delete a dashboard layout with a specific id.", @@ -7143,7 +7305,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "update_dashboard_layout", "summary": "Update DashboardLayout", "description": "### Update the dashboard layout with a specific id.", @@ -7236,7 +7400,9 @@ }, "/dashboards/{dashboard_id}/dashboard_layouts": { "get": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "dashboard_dashboard_layouts", "summary": "Get All DashboardLayouts", "description": "### Get information about all the dashboard elements on a dashboard with a specific id.", @@ -7301,7 +7467,9 @@ }, "/dashboard_layouts": { "post": { - "tags": ["Dashboard"], + "tags": [ + "Dashboard" + ], "operationId": "create_dashboard_layout", "summary": "Create DashboardLayout", "description": "### Create a dashboard layout on the dashboard with a specific id.", @@ -7395,7 +7563,9 @@ }, "/data_actions": { "post": { - "tags": ["DataAction"], + "tags": [ + "DataAction" + ], "operationId": "perform_data_action", "summary": "Send a Data Action", "description": "Perform a data action. The data action object can be obtained from query results, and used to perform an arbitrary action.", @@ -7448,7 +7618,9 @@ }, "/data_actions/form": { "post": { - "tags": ["DataAction"], + "tags": [ + "DataAction" + ], "operationId": "fetch_remote_data_action_form", "summary": "Fetch Remote Data Action Form", "description": "For some data actions, the remote server may supply a form requesting further user input. This endpoint takes a data action, asks the remote server to generate a form for it, and returns that form to you for presentation to the user.", @@ -7514,7 +7686,9 @@ }, "/datagroups": { "get": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "all_datagroups", "summary": "Get All Datagroups", "description": "### Get information about all datagroups.\n", @@ -7559,7 +7733,9 @@ }, "/datagroups/{datagroup_id}": { "get": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "datagroup", "summary": "Get Datagroup", "description": "### Get information about a datagroup.\n", @@ -7611,7 +7787,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Datagroup"], + "tags": [ + "Datagroup" + ], "operationId": "update_datagroup", "summary": "Update Datagroup", "description": "### Update a datagroup using the specified params.\n", @@ -7706,7 +7884,9 @@ }, "/connections": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_connections", "summary": "Get All Connections", "description": "### Get information about all connections.\n", @@ -7760,7 +7940,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_connection", "summary": "Create Connection", "description": "### Create a connection using the specified configuration.\n", @@ -7843,7 +8025,9 @@ }, "/connections/{connection_name}": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "connection", "summary": "Get Connection", "description": "### Get information about a connection.\n", @@ -7903,7 +8087,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "update_connection", "summary": "Update Connection", "description": "### Update a connection using the specified configuration.\n", @@ -7985,7 +8171,9 @@ } }, "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_connection", "summary": "Delete Connection", "description": "### Delete a connection.\n", @@ -8048,7 +8236,9 @@ }, "/connections/{connection_name}/connection_override/{override_context}": { "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_connection_override", "summary": "Delete Connection Override", "description": "### Delete a connection override.\n", @@ -8130,7 +8320,9 @@ }, "/connections/{connection_name}/test": { "put": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_connection", "summary": "Test Connection", "description": "### Test an existing connection.\n\nNote that a connection's 'dialect' property has a 'connection_tests' property that lists the\nspecific types of tests that the connection supports.\n\nThis API is rate limited.\n\nUnsupported tests in the request will be ignored.\n", @@ -8221,7 +8413,9 @@ }, "/connections/test": { "put": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_connection_config", "summary": "Test Connection Configuration", "description": "### Test a connection configuration.\n\nNote that a connection's 'dialect' property has a 'connection_tests' property that lists the\nspecific types of tests that the connection supports.\n\nThis API is rate limited.\n\nUnsupported tests in the request will be ignored.\n", @@ -8304,7 +8498,9 @@ }, "/projects/{project_id}/manifest/lock_all": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "lock_all", "summary": "Lock All", "description": " ### Generate Lockfile for All LookML Dependencies\n\n Git must have been configured, must be in dev mode and deploy permission required\n\n Install_all is a two step process\n 1. For each remote_dependency in a project the dependency manager will resolve any ambiguous ref.\n 2. The project will then write out a lockfile including each remote_dependency with its resolved ref.\n\n", @@ -8389,7 +8585,9 @@ }, "/derived_table/graph/model/{model}": { "get": { - "tags": ["DerivedTable"], + "tags": [ + "DerivedTable" + ], "operationId": "graph_derived_tables_for_model", "summary": "Get Derived Table graph for model", "description": "### Discover information about derived tables\n", @@ -8460,7 +8658,9 @@ }, "/derived_table/graph/view/{view}": { "get": { - "tags": ["DerivedTable"], + "tags": [ + "DerivedTable" + ], "operationId": "graph_derived_tables_for_view", "summary": "Get subgraph of derived table and dependencies", "description": "### Get the subgraph representing this derived table and its dependencies.\n", @@ -8531,7 +8731,9 @@ }, "/dialect_info": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_dialect_infos", "summary": "Get All Dialect Infos", "description": "### Get information about all dialects.\n", @@ -8587,7 +8789,9 @@ }, "/digest_emails_enabled": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "digest_emails_enabled", "summary": "Get Digest_emails", "description": "### Retrieve the value for whether or not digest emails is enabled\n", @@ -8627,7 +8831,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_digest_emails_enabled", "summary": "Update Digest_emails", "description": "### Update the setting for enabling/disabling digest emails\n", @@ -8700,7 +8906,9 @@ }, "/digest_email_send": { "post": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "create_digest_email_send", "summary": "Deliver digest email contents", "description": "### Trigger the generation of digest email records and send them to Looker's internal system. This does not send\nany actual emails, it generates records containing content which may be of interest for users who have become inactive.\nEmails will be sent at a later time from Looker's internal system if the Digest Emails feature is enabled in settings.", @@ -8753,7 +8961,9 @@ }, "/embed_config/secrets": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_embed_secret", "summary": "Create Embed Secret", "description": "### Create an embed secret using the specified information.\n\nThe value of the `secret` field will be set by Looker and returned.\n", @@ -8836,7 +9046,9 @@ }, "/embed_config/secrets/{embed_secret_id}": { "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_embed_secret", "summary": "Delete Embed Secret", "description": "### Delete an embed secret.\n", @@ -8900,7 +9112,9 @@ }, "/embed/sso_url": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_sso_embed_url", "summary": "Create SSO Embed Url", "description": "### Create SSO Embed URL\n\nCreates an SSO embed URL and cryptographically signs it with an embed secret.\nThis signed URL can then be used to instantiate a Looker embed session in a PBL web application.\nDo not make any modifications to this URL - any change may invalidate the signature and\ncause the URL to fail to load a Looker embed session.\n\nA signed SSO embed URL can only be used once. After it has been used to request a page from the\nLooker server, the URL is invalid. Future requests using the same URL will fail. This is to prevent\n'replay attacks'.\n\nThe `target_url` property must be a complete URL of a Looker UI page - scheme, hostname, path and query params.\nTo load a dashboard with id 56 and with a filter of `Date=1 years`, the looker URL would look like `https:/myname.looker.com/dashboards/56?Date=1%20years`.\nThe best way to obtain this target_url is to navigate to the desired Looker page in your web browser,\ncopy the URL shown in the browser address bar and paste it into the `target_url` property as a quoted string value in this API request.\n\nPermissions for the embed user are defined by the groups in which the embed user is a member (group_ids property)\nand the lists of models and permissions assigned to the embed user.\nAt a minimum, you must provide values for either the group_ids property, or both the models and permissions properties.\nThese properties are additive; an embed user can be a member of certain groups AND be granted access to models and permissions.\n\nThe embed user's access is the union of permissions granted by the group_ids, models, and permissions properties.\n\nThis function does not strictly require all group_ids, user attribute names, or model names to exist at the moment the\nSSO embed url is created. Unknown group_id, user attribute names or model names will be passed through to the output URL.\nTo diagnose potential problems with an SSO embed URL, you can copy the signed URL into the Embed URI Validator text box in `/admin/embed`.\n\nThe `secret_id` parameter is optional. If specified, its value must be the id of an active secret defined in the Looker instance.\nif not specified, the URL will be signed using the newest active secret defined in the Looker instance.\n\n#### Security Note\nProtect this signed URL as you would an access token or password credentials - do not write\nit to disk, do not pass it to a third party, and only pass it through a secure HTTPS\nencrypted transport.\n", @@ -8983,7 +9197,9 @@ }, "/embed/token_url/me": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_embed_url_as_me", "summary": "Create Embed URL", "description": "### Create an Embed URL\n\nCreates an embed URL that runs as the Looker user making this API call. (\"Embed as me\")\nThis embed URL can then be used to instantiate a Looker embed session in a\n\"Powered by Looker\" (PBL) web application.\n\nThis is similar to Private Embedding (https://docs.looker.com/r/admin/embed/private-embed). Instead of\nof logging into the Web UI to authenticate, the user has already authenticated against the API to be able to\nmake this call. However, unlike Private Embed where the user has access to any other part of the Looker UI,\nthe embed web session created by requesting the EmbedUrlResponse.url in a browser only has access to\ncontent visible under the `/embed` context.\n\nAn embed URL can only be used once, and must be used within 5 minutes of being created. After it\nhas been used to request a page from the Looker server, the URL is invalid. Future requests using\nthe same URL will fail. This is to prevent 'replay attacks'.\n\nThe `target_url` property must be a complete URL of a Looker Embedded UI page - scheme, hostname, path starting with \"/embed\" and query params.\nTo load a dashboard with id 56 and with a filter of `Date=1 years`, the looker Embed URL would look like `https://myname.looker.com/embed/dashboards/56?Date=1%20years`.\nThe best way to obtain this target_url is to navigate to the desired Looker page in your web browser,\ncopy the URL shown in the browser address bar, insert \"/embed\" after the host/port, and paste it into the `target_url` property as a quoted string value in this API request.\n\n#### Security Note\nProtect this embed URL as you would an access token or password credentials - do not write\nit to disk, do not pass it to a third party, and only pass it through a secure HTTPS\nencrypted transport.\n", @@ -9066,7 +9282,9 @@ }, "/external_oauth_applications": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_external_oauth_applications", "summary": "Get All External OAuth Applications", "description": "### Get all External OAuth Applications.\n\nThis is an OAuth Application which Looker uses to access external systems.\n", @@ -9129,7 +9347,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_external_oauth_application", "summary": "Create External OAuth Application", "description": "### Create an OAuth Application using the specified configuration.\n\nThis is an OAuth Application which Looker uses to access external systems.\n", @@ -9212,7 +9432,9 @@ }, "/external_oauth_applications/user_state": { "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_oauth_application_user_state", "summary": "Create Create OAuth user state.", "description": "### Create OAuth User state.\n", @@ -9295,7 +9517,9 @@ }, "/projects/{project_id}/git_branches": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_git_branches", "summary": "Get All Git Branches", "description": "### Get All Git Branches\n\nReturns a list of git branches in the project repository\n", @@ -9351,7 +9575,9 @@ }, "/projects/{project_id}/git_branch": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "git_branch", "summary": "Get Active Git Branch", "description": "### Get the Current Git Branch\n\nReturns the git branch currently checked out in the given project repository\n", @@ -9402,7 +9628,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_git_branch", "summary": "Checkout New Git Branch", "description": "### Create and Checkout a Git Branch\n\nCreates and checks out a new branch in the given project repository\nOnly allowed in development mode\n - Call `update_session` to select the 'dev' workspace.\n\nOptionally specify a branch name, tag name or commit SHA as the start point in the ref field.\n If no ref is specified, HEAD of the current branch will be used as the start point for the new branch.\n\n", @@ -9494,7 +9722,9 @@ } }, "put": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_git_branch", "summary": "Update Project Git Branch", "description": "### Checkout and/or reset --hard an existing Git Branch\n\nOnly allowed in development mode\n - Call `update_session` to select the 'dev' workspace.\n\nCheckout an existing branch if name field is different from the name of the currently checked out branch.\n\nOptionally specify a branch name, tag name or commit SHA to which the branch should be reset.\n **DANGER** hard reset will be force pushed to the remote. Unsaved changes and commits may be permanently lost.\n\n", @@ -9578,7 +9808,9 @@ }, "/projects/{project_id}/git_branch/{branch_name}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "find_git_branch", "summary": "Find a Git Branch", "description": "### Get the specified Git Branch\n\nReturns the git branch specified in branch_name path param if it exists in the given project repository\n", @@ -9638,7 +9870,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "delete_git_branch", "summary": "Delete a Git Branch", "description": "### Delete the specified Git Branch\n\nDelete git branch specified in branch_name path param from local and remote of specified project repository\n", @@ -9710,7 +9944,9 @@ }, "/groups": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_groups", "summary": "Get All Groups", "description": "### Get information about all groups.\n", @@ -9827,7 +10063,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "create_group", "summary": "Create Group", "description": "### Creates a new group (admin only).\n", @@ -9921,7 +10159,9 @@ }, "/groups/search": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "search_groups", "summary": "Search Groups", "description": "### Search groups\n\nReturns all group records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -10061,7 +10301,9 @@ }, "/groups/search/with_roles": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "search_groups_with_roles", "summary": "Search Groups with Roles", "description": "### Search groups include roles\n\nReturns all group records that match the given search criteria, and attaches any associated roles.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -10201,7 +10443,9 @@ }, "/groups/search/with_hierarchy": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "search_groups_with_hierarchy", "summary": "Search Groups with Hierarchy", "description": "### Search groups include hierarchy\n\nReturns all group records that match the given search criteria, and attaches\nassociated role_ids and parent group_ids.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -10341,7 +10585,9 @@ }, "/groups/{group_id}": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "group", "summary": "Get Group", "description": "### Get information about a group.\n", @@ -10402,7 +10648,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "update_group", "summary": "Update Group", "description": "### Updates the a group (admin only).", @@ -10494,7 +10742,9 @@ } }, "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group", "summary": "Delete Group", "description": "### Deletes a group (admin only).\n", @@ -10568,7 +10818,9 @@ }, "/groups/{group_id}/groups": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_group_groups", "summary": "Get All Groups in Group", "description": "### Get information about all the groups in a group\n", @@ -10632,7 +10884,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "add_group_group", "summary": "Add a Group to Group", "description": "### Adds a new group to a group.\n", @@ -10707,7 +10961,9 @@ }, "/groups/{group_id}/users": { "get": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "all_group_users", "summary": "Get All Users in Group", "description": "### Get information about all the users directly included in a group.\n", @@ -10800,7 +11056,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "add_group_user", "summary": "Add a User to Group", "description": "### Adds a new user to a group.\n", @@ -10875,7 +11133,9 @@ }, "/groups/{group_id}/users/{user_id}": { "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group_user", "summary": "Remove a User from Group", "description": "### Removes a user from a group.\n", @@ -10942,7 +11202,9 @@ }, "/groups/{group_id}/groups/{deleting_group_id}": { "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_group_from_group", "summary": "Deletes a Group from Group", "description": "### Removes a group from a group.\n", @@ -11009,7 +11271,9 @@ }, "/groups/{group_id}/attribute_values/{user_attribute_id}": { "patch": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "update_user_attribute_group_value", "summary": "Set User Attribute Group Value", "description": "### Set the value of a user attribute for a group.\n\nFor information about how user attribute values are calculated, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values).\n", @@ -11092,7 +11356,9 @@ } }, "delete": { - "tags": ["Group"], + "tags": [ + "Group" + ], "operationId": "delete_user_attribute_group_value", "summary": "Delete User Attribute Group Value", "description": "### Remove a user attribute value from a group.\n", @@ -11149,7 +11415,9 @@ }, "/boards": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "all_boards", "summary": "Get All Boards", "description": "### Get information about all boards.\n", @@ -11203,7 +11471,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "create_board", "summary": "Create Board", "description": "### Create a new board.\n", @@ -11297,7 +11567,9 @@ }, "/boards/search": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "search_boards", "summary": "Search Boards", "description": "### Search Boards\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -11465,7 +11737,9 @@ }, "/boards/{board_id}": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "board", "summary": "Get Board", "description": "### Get information about a board.\n", @@ -11526,7 +11800,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "update_board", "summary": "Update Board", "description": "### Update a board definition.\n", @@ -11618,7 +11894,9 @@ } }, "delete": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "delete_board", "summary": "Delete Board", "description": "### Delete a board.\n", @@ -11682,7 +11960,9 @@ }, "/board_items": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "all_board_items", "summary": "Get All Board Items", "description": "### Get information about all board items.\n", @@ -11754,7 +12034,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "create_board_item", "summary": "Create Board Item", "description": "### Create a new board item.\n", @@ -11848,7 +12130,9 @@ }, "/board_items/{board_item_id}": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "board_item", "summary": "Get Board Item", "description": "### Get information about a board item.\n", @@ -11909,7 +12193,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "update_board_item", "summary": "Update Board Item", "description": "### Update a board item definition.\n", @@ -12001,7 +12287,9 @@ } }, "delete": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "delete_board_item", "summary": "Delete Board Item", "description": "### Delete a board item.\n", @@ -12065,7 +12353,9 @@ }, "/primary_homepage_sections": { "get": { - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "operationId": "all_primary_homepage_sections", "summary": "Get All Primary homepage sections", "description": "### Get information about the primary homepage's sections.\n", @@ -12121,7 +12411,9 @@ }, "/board_sections": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "all_board_sections", "summary": "Get All Board sections", "description": "### Get information about all board sections.\n", @@ -12184,7 +12476,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "create_board_section", "summary": "Create Board section", "description": "### Create a new board section.\n", @@ -12278,7 +12572,9 @@ }, "/board_sections/{board_section_id}": { "get": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "board_section", "summary": "Get Board section", "description": "### Get information about a board section.\n", @@ -12339,7 +12635,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "update_board_section", "summary": "Update Board section", "description": "### Update a board section definition.\n", @@ -12431,7 +12729,9 @@ } }, "delete": { - "tags": ["Board"], + "tags": [ + "Board" + ], "operationId": "delete_board_section", "summary": "Delete Board section", "description": "### Delete a board section.\n", @@ -12495,7 +12795,9 @@ }, "/integration_hubs": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "all_integration_hubs", "summary": "Get All Integration Hubs", "description": "### Get information about all Integration Hubs.\n", @@ -12549,7 +12851,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "create_integration_hub", "summary": "Create Integration Hub", "description": "### Create a new Integration Hub.\n\nThis API is rate limited to prevent it from being used for SSRF attacks\n", @@ -12644,7 +12948,9 @@ }, "/integration_hubs/{integration_hub_id}": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "integration_hub", "summary": "Get Integration Hub", "description": "### Get information about a Integration Hub.\n", @@ -12705,7 +13011,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "update_integration_hub", "summary": "Update Integration Hub", "description": "### Update a Integration Hub definition.\n\nThis API is rate limited to prevent it from being used for SSRF attacks\n", @@ -12798,7 +13106,9 @@ } }, "delete": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "delete_integration_hub", "summary": "Delete Integration Hub", "description": "### Delete a Integration Hub.\n", @@ -12862,7 +13172,9 @@ }, "/integration_hubs/{integration_hub_id}/accept_legal_agreement": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "accept_integration_hub_legal_agreement", "summary": "Accept Integration Hub Legal Agreement", "description": "Accepts the legal agreement for a given integration hub. This only works for integration hubs that have legal_agreement_required set to true and legal_agreement_signed set to false.", @@ -12926,7 +13238,9 @@ }, "/integrations": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "all_integrations", "summary": "Get All Integrations", "description": "### Get information about all Integrations.\n", @@ -12991,7 +13305,9 @@ }, "/integrations/{integration_id}": { "get": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "integration", "summary": "Get Integration", "description": "### Get information about a Integration.\n", @@ -13051,7 +13367,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "update_integration", "summary": "Update Integration", "description": "### Update parameters on a Integration.\n", @@ -13144,7 +13462,9 @@ }, "/integrations/{integration_id}/form": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "fetch_integration_form", "summary": "Fetch Remote Integration Form", "description": "Returns the Integration form for presentation to the user.", @@ -13221,7 +13541,9 @@ }, "/integrations/{integration_id}/test": { "post": { - "tags": ["Integration"], + "tags": [ + "Integration" + ], "operationId": "test_integration", "summary": "Test integration", "description": "Tests the integration to make sure all the settings are working.", @@ -13284,7 +13606,9 @@ }, "/internal_help_resources_content": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "internal_help_resources_content", "summary": "Get Internal Help Resources Content", "description": "### Set the menu item name and content for internal help resources\n", @@ -13324,7 +13648,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_internal_help_resources_content", "summary": "Update internal help resources content", "description": "Update internal help resources content\n", @@ -13397,7 +13723,9 @@ }, "/internal_help_resources_enabled": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "internal_help_resources", "summary": "Get Internal Help Resources", "description": "### Get and set the options for internal help resources\n", @@ -13439,7 +13767,9 @@ }, "/internal_help_resources": { "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_internal_help_resources", "summary": "Update internal help resources configuration", "description": "Update internal help resources settings\n", @@ -13512,7 +13842,9 @@ }, "/ldap_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "ldap_config", "summary": "Get LDAP Configuration", "description": "### Get the LDAP configuration.\n\nLooker can be optionally configured to authenticate users against an Active Directory or other LDAP directory server.\nLDAP setup requires coordination with an administrator of that directory server.\n\nOnly Looker administrators can read and update the LDAP configuration.\n\nConfiguring LDAP impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single LDAP configuration. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nLDAP is enabled or disabled for Looker using the **enabled** field.\n\nLooker will never return an **auth_password** field. That value can be set, but never retrieved.\n\nSee the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information.\n", @@ -13542,7 +13874,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_ldap_config", "summary": "Update LDAP Configuration", "description": "### Update the LDAP configuration.\n\nConfiguring LDAP impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the LDAP configuration.\n\nLDAP is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any LDAP setting changes be tested using the APIs below before being set globally.\n\nSee the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information.\n", @@ -13605,7 +13939,9 @@ }, "/ldap_config/test_connection": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_connection", "summary": "Test LDAP Connection", "description": "### Test the connection settings for an LDAP configuration.\n\nThis tests that the connection is possible given a connection_host and connection_port.\n\n**connection_host** and **connection_port** are required. **connection_tls** is optional.\n\nExample:\n```json\n{\n \"connection_host\": \"ldap.example.com\",\n \"connection_port\": \"636\",\n \"connection_tls\": true\n}\n```\n\nNo authentication to the LDAP server is attempted.\n\nThe active LDAP settings are not modified.\n", @@ -13668,7 +14004,9 @@ }, "/ldap_config/test_auth": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_auth", "summary": "Test LDAP Auth", "description": "### Test the connection authentication settings for an LDAP configuration.\n\nThis tests that the connection is possible and that a 'server' account to be used by Looker can authenticate to the LDAP server given connection and authentication information.\n\n**connection_host**, **connection_port**, and **auth_username**, are required. **connection_tls** and **auth_password** are optional.\n\nExample:\n```json\n{\n \"connection_host\": \"ldap.example.com\",\n \"connection_port\": \"636\",\n \"connection_tls\": true,\n \"auth_username\": \"cn=looker,dc=example,dc=com\",\n \"auth_password\": \"secret\"\n}\n```\n\nLooker will never return an **auth_password**. If this request omits the **auth_password** field, then the **auth_password** value from the active config (if present) will be used for the test.\n\nThe active LDAP settings are not modified.\n\n", @@ -13731,7 +14069,9 @@ }, "/ldap_config/test_user_info": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_user_info", "summary": "Test LDAP User Info", "description": "### Test the user authentication settings for an LDAP configuration without authenticating the user.\n\nThis test will let you easily test the mapping for user properties and roles for any user without needing to authenticate as that user.\n\nThis test accepts a full LDAP configuration along with a username and attempts to find the full info for the user from the LDAP server without actually authenticating the user. So, user password is not required.The configuration is validated before attempting to contact the server.\n\n**test_ldap_user** is required.\n\nThe active LDAP settings are not modified.\n\n", @@ -13794,7 +14134,9 @@ }, "/ldap_config/test_user_auth": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "test_ldap_config_user_auth", "summary": "Test LDAP User Auth", "description": "### Test the user authentication settings for an LDAP configuration.\n\nThis test accepts a full LDAP configuration along with a username/password pair and attempts to authenticate the user with the LDAP server. The configuration is validated before attempting the authentication.\n\nLooker will never return an **auth_password**. If this request omits the **auth_password** field, then the **auth_password** value from the active config (if present) will be used for the test.\n\n**test_ldap_user** and **test_ldap_password** are required.\n\nThe active LDAP settings are not modified.\n\n", @@ -13857,7 +14199,9 @@ }, "/legacy_features": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_legacy_features", "summary": "Get All Legacy Features", "description": "### Get all legacy features.\n", @@ -13902,7 +14246,9 @@ }, "/legacy_features/{legacy_feature_id}": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "legacy_feature", "summary": "Get Legacy Feature", "description": "### Get information about the legacy feature with a specific id.\n", @@ -13953,7 +14299,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_legacy_feature", "summary": "Update Legacy Feature", "description": "### Update information about the legacy feature with a specific id.\n", @@ -14037,7 +14385,9 @@ }, "/locales": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_locales", "summary": "Get All Locales", "description": "### Get a list of locales that Looker supports.\n", @@ -14082,7 +14432,9 @@ }, "/looks": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "all_looks", "summary": "Get All Looks", "description": "### Get information about all active Looks\n\nReturns an array of **abbreviated Look objects** describing all the looks that the caller has access to. Soft-deleted Looks are **not** included.\n\nGet the **full details** of a specific look by id with [look(id)](#!/Look/look)\n\nFind **soft-deleted looks** with [search_looks()](#!/Look/search_looks)\n", @@ -14136,7 +14488,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "create_look", "summary": "Create Look", "description": "### Create a Look\n\nTo create a look to display query data, first create the query with [create_query()](#!/Query/create_query)\nthen assign the query's id to the `query_id` property in the call to `create_look()`.\n\nTo place the look into a particular space, assign the space's id to the `space_id` property\nin the call to `create_look()`.\n", @@ -14230,7 +14584,9 @@ }, "/looks/search": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "search_looks", "summary": "Search Looks", "description": "### Search Looks\n\nReturns an **array of Look objects** that match the specified search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nGet a **single look** by id with [look(id)](#!/Look/look)\n", @@ -14444,7 +14800,9 @@ }, "/looks/{look_id}": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "look", "summary": "Get Look", "description": "### Get a Look.\n\nReturns detailed information about a Look and its associated Query.\n\n", @@ -14504,7 +14862,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "update_look", "summary": "Update Look", "description": "### Modify a Look\n\nUse this function to modify parts of a look. Property values given in a call to `update_look` are\napplied to the existing look, so there's no need to include properties whose values are not changing.\nIt's best to specify only the properties you want to change and leave everything else out\nof your `update_look` call. **Look properties marked 'read-only' will be ignored.**\n\nWhen a user deletes a look in the Looker UI, the look data remains in the database but is\nmarked with a deleted flag (\"soft-deleted\"). Soft-deleted looks can be undeleted (by an admin)\nif the delete was in error.\n\nTo soft-delete a look via the API, use [update_look()](#!/Look/update_look) to change the look's `deleted` property to `true`.\nYou can undelete a look by calling `update_look` to change the look's `deleted` property to `false`.\n\nSoft-deleted looks are excluded from the results of [all_looks()](#!/Look/all_looks) and [search_looks()](#!/Look/search_looks), so they\nessentially disappear from view even though they still reside in the db.\nIn API 3.1 and later, you can pass `deleted: true` as a parameter to [search_looks()](#!/3.1/Look/search_looks) to list soft-deleted looks.\n\nNOTE: [delete_look()](#!/Look/delete_look) performs a \"hard delete\" - the look data is removed from the Looker\ndatabase and destroyed. There is no \"undo\" for `delete_look()`.\n", @@ -14595,7 +14955,9 @@ } }, "delete": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "delete_look", "summary": "Delete Look", "description": "### Permanently Delete a Look\n\nThis operation **permanently** removes a look from the Looker database.\n\nNOTE: There is no \"undo\" for this kind of delete.\n\nFor information about soft-delete (which can be undone) see [update_look()](#!/Look/update_look).\n", @@ -14658,7 +15020,9 @@ }, "/looks/{look_id}/run/{result_format}": { "get": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "run_look", "summary": "Run Look", "description": "### Run a Look\n\nRuns a given look's query and returns the results in the requested format.\n\nSupported formats:\n\n| result_format | Description\n| :-----------: | :--- |\n| json | Plain json\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| md | Simple markdown\n| xlsx | MS Excel spreadsheet\n| sql | Returns the generated SQL rather than running the query\n| png | A PNG image of the visualization of the query\n| jpg | A JPG image of the visualization of the query\n\n\n", @@ -14926,7 +15290,9 @@ }, "/looks/{look_id}/copy": { "post": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "copy_look", "summary": "Copy Look", "description": "### Copy an existing look\n\nCreates a copy of an existing look, in a specified folder, and returns the copied look.\n\n`look_id` and `folder_id` are required.\n\n`look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard.\n", @@ -15028,7 +15394,9 @@ }, "/looks/{look_id}/move": { "patch": { - "tags": ["Look"], + "tags": [ + "Look" + ], "operationId": "move_look", "summary": "Move Look", "description": "### Move an existing look\n\nMoves a look to a specified folder, and returns the moved look.\n\n`look_id` and `folder_id` are required.\n`look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard.\n", @@ -15120,7 +15488,9 @@ }, "/lookml_models": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "all_lookml_models", "summary": "Get All LookML Models", "description": "### Get information about all lookml models.\n", @@ -15194,7 +15564,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "create_lookml_model", "summary": "Create LookML Model", "description": "### Create a lookml model using the specified configuration.\n", @@ -15277,7 +15649,9 @@ }, "/lookml_models/{lookml_model_name}": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "lookml_model", "summary": "Get LookML Model", "description": "### Get information about a lookml model.\n", @@ -15337,7 +15711,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "update_lookml_model", "summary": "Update LookML Model", "description": "### Update a lookml model using the specified configuration.\n", @@ -15419,7 +15795,9 @@ } }, "delete": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "delete_lookml_model", "summary": "Delete LookML Model", "description": "### Delete a lookml model.\n", @@ -15482,7 +15860,9 @@ }, "/lookml_models/{lookml_model_name}/explores/{explore_name}": { "get": { - "tags": ["LookmlModel"], + "tags": [ + "LookmlModel" + ], "operationId": "lookml_model_explore", "summary": "Get LookML Model Explore", "description": "### Get information about a lookml model explore.\n", @@ -15553,7 +15933,9 @@ }, "/merge_queries/{merge_query_id}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "merge_query", "summary": "Get Merge Query", "description": "### Get Merge Query\n\nReturns a merge query object given its id.\n", @@ -15615,7 +15997,9 @@ }, "/merge_queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_merge_query", "summary": "Create Merge Query", "description": "### Create Merge Query\n\nCreates a new merge query object.\n\nA merge query takes the results of one or more queries and combines (merges) the results\naccording to field mapping definitions. The result is similar to a SQL left outer join.\n\nA merge query can merge results of queries from different SQL databases.\n\nThe order that queries are defined in the source_queries array property is significant. The\nfirst query in the array defines the primary key into which the results of subsequent\nqueries will be merged.\n\nLike model/view query objects, merge queries are immutable and have structural identity - if\nyou make a request to create a new merge query that is identical to an existing merge query,\nthe existing merge query will be returned instead of creating a duplicate. Conversely, any\nchange to the contents of a merge query will produce a new object with a new id.\n", @@ -15709,10 +16093,12 @@ }, "/models/{model_name}/views/{view_name}/fields/{field_name}/suggestions": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "model_fieldname_suggestions", "summary": "Model field name suggestions", - "description": "### Field name suggestions for a model and view\n\n", + "description": "### Field name suggestions for a model and view\n\n`filters` is a string hash of values, with the key as the field name and the string value as the filter expression:\n\n```ruby\n{'users.age': '>=60'}\n```\n\nor\n\n```ruby\n{'users.age': '<30'}\n```\n\nor\n\n```ruby\n{'users.age': '=50'}\n```\n", "parameters": [ { "name": "model_name", @@ -15744,7 +16130,7 @@ { "name": "term", "in": "query", - "description": "Search term", + "description": "Search term pattern (evaluated as as `%term%`)", "required": false, "schema": { "type": "string" @@ -15753,10 +16139,13 @@ { "name": "filters", "in": "query", - "description": "Suggestion filters", + "description": "Suggestion filters with field name keys and comparison expressions", "required": false, - "schema": { + "additionalProperties": { "type": "string" + }, + "schema": { + "type": "object" } } ], @@ -15798,7 +16187,9 @@ }, "/models/{model_name}": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "get_model", "summary": "Get a single model", "description": "### Get a single model\n\n", @@ -15851,7 +16242,9 @@ }, "/connections/{connection_name}/databases": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_databases", "summary": "List accessible databases to this connection", "description": "### List databases available to this connection\n\nCertain dialects can support multiple databases per single connection.\nIf this connection supports multiple databases, the database names will be returned in an array.\n\nConnections using dialects that do not support multiple databases will return an empty array.\n\n**Note**: [Connection Features](#!/Metadata/connection_features) can be used to determine if a connection supports\nmultiple databases.\n", @@ -15917,7 +16310,9 @@ }, "/connections/{connection_name}/features": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_features", "summary": "Metadata features supported by this connection", "description": "### Retrieve metadata features for this connection\n\nReturns a list of feature names with `true` (available) or `false` (not available)\n\n", @@ -16000,7 +16395,9 @@ }, "/connections/{connection_name}/schemas": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_schemas", "summary": "Get schemas for a connection", "description": "### Get the list of schemas and tables for a connection\n\n", @@ -16103,7 +16500,9 @@ }, "/connections/{connection_name}/tables": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_tables", "summary": "Get tables for a connection", "description": "### Get the list of tables for a schema\n\nFor dialects that support multiple databases, optionally identify which to use. If not provided, the default\ndatabase for the connection will be used.\n\nFor dialects that do **not** support multiple databases, **do not use** the database parameter\n", @@ -16152,6 +16551,25 @@ "schema": { "type": "string" } + }, + { + "name": "table_filter", + "in": "query", + "description": "Optional. Return tables with names that contain this value", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "table_limit", + "in": "query", + "description": "Optional. Return tables up to the table_limit", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -16215,7 +16633,9 @@ }, "/connections/{connection_name}/columns": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_columns", "summary": "Get columns for a connection", "description": "### Get the columns (and therefore also the tables) in a specific schema\n\n", @@ -16346,7 +16766,9 @@ }, "/connections/{connection_name}/search_columns": { "get": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_search_columns", "summary": "Search a connection for columns", "description": "### Search a connection for columns matching the specified name\n\n**Note**: `column_name` must be a valid column name. It is not a search pattern.\n", @@ -16441,7 +16863,9 @@ }, "/connections/{connection_name}/cost_estimate": { "post": { - "tags": ["Metadata"], + "tags": [ + "Metadata" + ], "operationId": "connection_cost_estimate", "summary": "Estimate costs for a connection", "description": "### Connection cost estimating\n\nAssign a `sql` statement to the body of the request. e.g., for Ruby, `{sql: 'select * from users'}`\n\n**Note**: If the connection's dialect has no support for cost estimates, an error will be returned\n", @@ -16535,7 +16959,9 @@ }, "/mobile/settings": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "mobile_settings", "summary": "Get Mobile_Settings", "description": "### Get all mobile settings.\n", @@ -16577,7 +17003,9 @@ }, "/model_sets/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_model_sets", "summary": "Search Model Sets", "description": "### Search model sets\nReturns all model set records that match the given search criteria.\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -16708,7 +17136,9 @@ }, "/model_sets/{model_set_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "model_set", "summary": "Get Model Set", "description": "### Get information about the model set with a specific id.\n", @@ -16769,7 +17199,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_model_set", "summary": "Delete Model Set", "description": "### Delete the model set with a specific id.\n", @@ -16831,7 +17263,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_model_set", "summary": "Update Model Set", "description": "### Update information about the model set with a specific id.\n", @@ -16916,7 +17350,9 @@ }, "/model_sets": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_model_sets", "summary": "Get All Model Sets", "description": "### Get information about all model sets.\n", @@ -16960,7 +17396,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_model_set", "summary": "Create Model Set", "description": "### Create a model set with the specified information. Model sets are used by Roles.\n", @@ -17033,7 +17471,9 @@ }, "/oauth_client_apps": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "all_oauth_client_apps", "summary": "Get All OAuth Client Apps", "description": "### List All OAuth Client Apps\n\nLists all applications registered to use OAuth2 login with this Looker instance, including\nenabled and disabled apps.\n\nResults are filtered to include only the apps that the caller (current user)\nhas permission to see.\n", @@ -17089,7 +17529,9 @@ }, "/oauth_client_apps/{client_guid}": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "oauth_client_app", "summary": "Get OAuth Client App", "description": "### Get Oauth Client App\n\nReturns the registered app client with matching client_guid.\n", @@ -17149,7 +17591,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_oauth_client_app", "summary": "Delete OAuth Client App", "description": "### Delete OAuth Client App\n\nDeletes the registration info of the app with the matching client_guid.\nAll active sessions and tokens issued for this app will immediately become invalid.\n\n### Note: this deletion cannot be undone.\n", @@ -17210,7 +17654,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "register_oauth_client_app", "summary": "Register OAuth App", "description": "### Register an OAuth2 Client App\n\nRegisters details identifying an external web app or native app as an OAuth2 login client of the Looker instance.\nThe app registration must provide a unique client_guid and redirect_uri that the app will present\nin OAuth login requests. If the client_guid and redirect_uri parameters in the login request do not match\nthe app details registered with the Looker instance, the request is assumed to be a forgery and is rejected.\n", @@ -17311,7 +17757,9 @@ } }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_oauth_client_app", "summary": "Update OAuth App", "description": "### Update OAuth2 Client App Details\n\nModifies the details a previously registered OAuth2 login client app.\n", @@ -17404,7 +17852,9 @@ }, "/oauth_client_apps/{client_guid}/tokens": { "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "invalidate_tokens", "summary": "Invalidate Tokens", "description": "### Invalidate All Issued Tokens\n\nImmediately invalidates all auth codes, sessions, access tokens and refresh tokens issued for\nthis app for ALL USERS of this app.\n", @@ -17467,7 +17917,9 @@ }, "/oauth_client_apps/{client_guid}/users/{user_id}": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "activate_app_user", "summary": "Activate OAuth App User", "description": "### Activate an app for a user\n\nActivates a user for a given oauth client app. This indicates the user has been informed that\nthe app will have access to the user's looker data, and that the user has accepted and allowed\nthe app to use their Looker account.\n\nActivating a user for an app that the user is already activated with returns a success response.\n", @@ -17560,7 +18012,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "deactivate_app_user", "summary": "Deactivate OAuth App User", "description": "### Deactivate an app for a user\n\nDeactivate a user for a given oauth client app. All tokens issued to the app for\nthis user will be invalid immediately. Before the user can use the app with their\nLooker account, the user will have to read and accept an account use disclosure statement for the app.\n\nAdmin users can deactivate other users, but non-admin users can only deactivate themselves.\n\nAs with most REST DELETE operations, this endpoint does not return an error if the indicated\nresource (app or user) does not exist or has already been deactivated.\n", @@ -17642,7 +18096,9 @@ }, "/oidc_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "oidc_config", "summary": "Get OIDC Configuration", "description": "### Get the OIDC configuration.\n\nLooker can be optionally configured to authenticate users against an OpenID Connect (OIDC)\nauthentication server. OIDC setup requires coordination with an administrator of that server.\n\nOnly Looker administrators can read and update the OIDC configuration.\n\nConfiguring OIDC impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single OIDC configuation. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nOIDC is enabled or disabled for Looker using the **enabled** field.\n", @@ -17672,7 +18128,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_oidc_config", "summary": "Update OIDC Configuration", "description": "### Update the OIDC configuration.\n\nConfiguring OIDC impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the OIDC configuration.\n\nOIDC is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any OIDC setting changes be tested using the APIs below before being set globally.\n", @@ -17735,7 +18193,9 @@ }, "/oidc_test_configs/{test_slug}": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "oidc_test_config", "summary": "Get OIDC Test Configuration", "description": "### Get a OIDC test configuration by test_slug.\n", @@ -17776,7 +18236,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_oidc_test_config", "summary": "Delete OIDC Test Configuration", "description": "### Delete a OIDC test configuration.\n", @@ -17829,7 +18291,9 @@ }, "/oidc_test_configs": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_oidc_test_config", "summary": "Create OIDC Test Configuration", "description": "### Create a OIDC test configuration.\n", @@ -17892,7 +18356,9 @@ }, "/password_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "password_config", "summary": "Get Password Config", "description": "### Get password config.\n", @@ -17932,7 +18398,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_password_config", "summary": "Update Password Config", "description": "### Update password config.\n", @@ -18005,7 +18473,9 @@ }, "/password_config/force_password_reset_at_next_login_for_all_users": { "put": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "force_password_reset_at_next_login_for_all_users", "summary": "Force password reset", "description": "### Force all credentials_email users to reset their login passwords upon their next login.\n", @@ -18067,7 +18537,9 @@ }, "/permissions": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_permissions", "summary": "Get All Permissions", "description": "### Get all supported permissions.\n", @@ -18112,7 +18584,9 @@ }, "/permission_sets/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_permission_sets", "summary": "Search Permission Sets", "description": "### Search permission sets\nReturns all permission set records that match the given search criteria.\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -18243,7 +18717,9 @@ }, "/permission_sets/{permission_set_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "permission_set", "summary": "Get Permission Set", "description": "### Get information about the permission set with a specific id.\n", @@ -18304,7 +18780,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_permission_set", "summary": "Delete Permission Set", "description": "### Delete the permission set with a specific id.\n", @@ -18376,7 +18854,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_permission_set", "summary": "Update Permission Set", "description": "### Update information about the permission set with a specific id.\n", @@ -18471,7 +18951,9 @@ }, "/permission_sets": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_permission_sets", "summary": "Get All Permission Sets", "description": "### Get information about all permission sets.\n", @@ -18525,7 +19007,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_permission_set", "summary": "Create Permission Set", "description": "### Create a permission set with the specified information. Permission sets are used by Roles.\n", @@ -18608,7 +19092,9 @@ }, "/projects/{project_id}/deploy_ref_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "deploy_ref_to_production", "summary": "Deploy Remote Branch or Ref to Production", "description": "### Deploy a Remote Branch or Ref to Production\n\nGit must have been configured and deploy permission required.\n\nDeploy is a one/two step process\n1. If this is the first deploy of this project, create the production project with git repository.\n2. Pull the branch or ref into the production project.\n\nCan only specify either a branch or a ref.\n\n", @@ -18702,7 +19188,9 @@ }, "/projects/{project_id}/deploy_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "deploy_to_production", "summary": "Deploy To Production", "description": "### Deploy LookML from this Development Mode Project to Production\n\nGit must have been configured, must be in dev mode and deploy permission required\n\nDeploy is a two / three step process:\n\n1. Push commits in current branch of dev mode project to the production branch (origin/master).\n Note a. This step is skipped in read-only projects.\n Note b. If this step is unsuccessful for any reason (e.g. rejected non-fastforward because production branch has\n commits not in current branch), subsequent steps will be skipped.\n2. If this is the first deploy of this project, create the production project with git repository.\n3. Pull the production branch into the production project.\n\n", @@ -18778,7 +19266,9 @@ }, "/projects/{project_id}/reset_to_production": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "reset_project_to_production", "summary": "Reset To Production", "description": "### Reset a project to the revision of the project that is in production.\n\n**DANGER** this will delete any changes that have not been pushed to a remote repository.\n", @@ -18854,7 +19344,9 @@ }, "/projects/{project_id}/reset_to_remote": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "reset_project_to_remote", "summary": "Reset To Remote", "description": "### Reset a project development branch to the revision of the project that is on the remote.\n\n**DANGER** this will delete any changes that have not been pushed to a remote repository.\n", @@ -18930,7 +19422,9 @@ }, "/projects": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_projects", "summary": "Get All Projects", "description": "### Get All Projects\n\nReturns all projects visible to the current user\n", @@ -18984,7 +19478,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_project", "summary": "Create Project", "description": "### Create A Project\n\ndev mode required.\n- Call `update_session` to select the 'dev' workspace.\n\n`name` is required.\n`git_remote_url` is not allowed. To configure Git for the newly created project, follow the instructions in `update_project`.\n\n", @@ -19067,7 +19563,9 @@ }, "/projects/{project_id}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project", "summary": "Get Project", "description": "### Get A Project\n\nReturns the project with the given project id\n", @@ -19127,7 +19625,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_project", "summary": "Update Project", "description": "### Update Project Configuration\n\nApply changes to a project's configuration.\n\n\n#### Configuring Git for a Project\n\nTo set up a Looker project with a remote git repository, follow these steps:\n\n1. Call `update_session` to select the 'dev' workspace.\n1. Call `create_git_deploy_key` to create a new deploy key for the project\n1. Copy the deploy key text into the remote git repository's ssh key configuration\n1. Call `update_project` to set project's `git_remote_url` ()and `git_service_name`, if necessary).\n\nWhen you modify a project's `git_remote_url`, Looker connects to the remote repository to fetch\nmetadata. The remote git repository MUST be configured with the Looker-generated deploy\nkey for this project prior to setting the project's `git_remote_url`.\n\nTo set up a Looker project with a git repository residing on the Looker server (a 'bare' git repo):\n\n1. Call `update_session` to select the 'dev' workspace.\n1. Call `update_project` setting `git_remote_url` to null and `git_service_name` to \"bare\".\n\n", @@ -19240,7 +19740,9 @@ }, "/projects/{project_id}/manifest": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "manifest", "summary": "Get Manifest", "description": "### Get A Projects Manifest object\n\nReturns the project with the given project id\n", @@ -19293,7 +19795,9 @@ }, "/projects/{project_id}/git/deploy_key": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "create_git_deploy_key", "summary": "Create Deploy Key", "description": "### Create Git Deploy Key\n\nCreate a public/private key pair for authenticating ssh git requests from Looker to a remote git repository\nfor a particular Looker project.\n\nReturns the public key of the generated ssh key pair.\n\nCopy this public key to your remote git repository's ssh keys configuration so that the remote git service can\nvalidate and accept git requests from the Looker server.\n", @@ -19374,7 +19878,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "git_deploy_key", "summary": "Git Deploy Key", "description": "### Git Deploy Key\n\nReturns the ssh public key previously created for a project's git repository.\n", @@ -19427,7 +19933,9 @@ }, "/projects/{project_id}/validate": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "validate_project", "summary": "Validate Project", "description": "### Validate Project\n\nPerforms lint validation of all lookml files in the project.\nReturns a list of errors found, if any.\n\nValidating the content of all the files in a project can be computationally intensive\nfor large projects. For best performance, call `validate_project(project_id)` only\nwhen you really want to recompute project validation. To quickly display the results of\nthe most recent project validation (without recomputing), use `project_validation_results(project_id)`\n", @@ -19507,7 +20015,9 @@ "x-looker-activity-type": "non_query" }, "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_validation_results", "summary": "Cached Project Validation Results", "description": "### Get Cached Project Validation Results\n\nReturns the cached results of a previous project validation calculation, if any.\nReturns http status 204 No Content if no validation results exist.\n\nValidating the content of all the files in a project can be computationally intensive\nfor large projects. Use this API to simply fetch the results of the most recent\nproject validation rather than revalidating the entire project from scratch.\n\nA value of `\"stale\": true` in the response indicates that the project has changed since\nthe cached validation results were computed. The cached validation results may no longer\nreflect the current state of the project.\n", @@ -19572,7 +20082,9 @@ }, "/projects/{project_id}/current_workspace": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_workspace", "summary": "Get Project Workspace", "description": "### Get Project Workspace\n\nReturns information about the state of the project files in the currently selected workspace\n", @@ -19634,7 +20146,9 @@ }, "/projects/{project_id}/files": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_project_files", "summary": "Get All Project Files", "description": "### Get All Project Files\n\nReturns a list of the files in the project\n", @@ -19699,7 +20213,9 @@ }, "/projects/{project_id}/files/file": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "project_file", "summary": "Get Project File", "description": "### Get Project File Info\n\nReturns information about a file in the project\n", @@ -19770,7 +20286,9 @@ }, "/projects/{project_id}/git_connection_tests": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_git_connection_tests", "summary": "Get All Git Connection Tests", "description": "### Get All Git Connection Tests\n\ndev mode required.\n - Call `update_session` to select the 'dev' workspace.\n\nReturns a list of tests which can be run against a project's (or the dependency project for the provided remote_url) git connection. Call [Run Git Connection Test](#!/Project/run_git_connection_test) to execute each test in sequence.\n\nTests are ordered by increasing specificity. Tests should be run in the order returned because later tests require functionality tested by tests earlier in the test list.\n\nFor example, a late-stage test for write access is meaningless if connecting to the git server (an early test) is failing.\n", @@ -19835,7 +20353,9 @@ }, "/projects/{project_id}/git_connection_tests/{test_id}": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "run_git_connection_test", "summary": "Run Git Connection Test", "description": "### Run a git connection test\n\nRun the named test on the git service used by this project (or the dependency project for the provided remote_url) and return the result. This\nis intended to help debug git connections when things do not work properly, to give\nmore helpful information about why a git url is not working with Looker.\n\nTests should be run in the order they are returned by [Get All Git Connection Tests](#!/Project/all_git_connection_tests).\n", @@ -19935,7 +20455,9 @@ }, "/projects/{project_id}/lookml_tests": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "all_lookml_tests", "summary": "Get All LookML Tests", "description": "### Get All LookML Tests\n\nReturns a list of tests which can be run to validate a project's LookML code and/or the underlying data,\noptionally filtered by the file id.\nCall [Run LookML Test](#!/Project/run_lookml_test) to execute tests.\n", @@ -20000,7 +20522,9 @@ }, "/projects/{project_id}/lookml_tests/run": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "run_lookml_test", "summary": "Run LookML Test", "description": "### Run LookML Tests\n\nRuns all tests in the project, optionally filtered by file, test, and/or model.\n", @@ -20103,7 +20627,9 @@ }, "/projects/{project_id}/tag": { "post": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "tag_ref", "summary": "Tag Ref", "description": "### Creates a tag for the most recent commit, or a specific ref is a SHA is provided\n\nThis is an internal-only, undocumented route.\n", @@ -20227,7 +20753,9 @@ }, "/render_tasks/looks/{look_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_look_render_task", "summary": "Create Look Render Task", "description": "### Create a new task to render a look to an image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -20349,7 +20877,9 @@ }, "/render_tasks/queries/{query_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_query_render_task", "summary": "Create Query Render Task", "description": "### Create a new task to render an existing query to an image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -20471,7 +21001,9 @@ }, "/render_tasks/dashboards/{dashboard_id}/{result_format}": { "post": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "create_dashboard_render_task", "summary": "Create Dashboard Render Task", "description": "### Create a new task to render a dashboard to a document or image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -20630,7 +21162,9 @@ }, "/render_tasks/{render_task_id}": { "get": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "render_task", "summary": "Get Render Task", "description": "### Get information about a render task.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", @@ -20692,7 +21226,9 @@ }, "/render_tasks/{render_task_id}/results": { "get": { - "tags": ["RenderTask"], + "tags": [ + "RenderTask" + ], "operationId": "render_task_results", "summary": "Render Task Results", "description": "### Get the document or image produced by a completed render task.\n\nNote that the PDF or image result will be a binary blob in the HTTP response, as indicated by the\nContent-Type in the response headers. This may require specialized (or at least different) handling than text\nresponses such as JSON. You may need to tell your HTTP client that the response is binary so that it does not\nattempt to parse the binary data as text.\n\nIf the render task exists but has not finished rendering the results, the response HTTP status will be\n**202 Accepted**, the response body will be empty, and the response will have a Retry-After header indicating\nthat the caller should repeat the request at a later time.\n\nReturns 404 if the render task cannot be found, if the cached result has expired, or if the caller\ndoes not have permission to view the results.\n\nFor detailed information about the status of the render task, use [Render Task](#!/RenderTask/render_task).\nPolling loops waiting for completion of a render task would be better served by polling **render_task(id)** until\nthe task status reaches completion (or error) instead of polling **render_task_results(id)** alone.\n", @@ -20776,9 +21312,134 @@ "x-looker-activity-type": "db_query" } }, + "/render_tasks/dashboard_elements/{dashboard_element_id}/{result_format}": { + "post": { + "tags": [ + "RenderTask" + ], + "operationId": "create_dashboard_element_render_task", + "summary": "Create Dashboard Element Render Task", + "description": "### Create a new task to render a dashboard element to an image.\n\nReturns a render task object.\nTo check the status of a render task, pass the render_task.id to [Get Render Task](#!/RenderTask/get_render_task).\nOnce the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results).\n\n", + "parameters": [ + { + "name": "dashboard_element_id", + "in": "path", + "description": "Id of dashboard element to render: UDD dashboard element would be numeric and LookML dashboard element would be model_name::dashboard_title::lookml_link_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "result_format", + "in": "path", + "description": "Output type: png or jpg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "width", + "in": "query", + "description": "Output width in pixels", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "height", + "in": "query", + "description": "Output height in pixels", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "fields", + "in": "query", + "description": "Requested fields.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Render Task", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RenderTask" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Resource Already Exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "db_query" + } + }, "/projects/{root_project_id}/credential/{credential_id}": { "put": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "update_repository_credential", "summary": "Create Repository Credential", "description": "### Configure Repository Credential for a remote dependency\n\nAdmin required.\n\n`root_project_id` is required.\n`credential_id` is required.\n\n", @@ -20879,7 +21540,9 @@ } }, "delete": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "delete_repository_credential", "summary": "Delete Repository Credential", "description": "### Repository Credential for a remote dependency\n\nAdmin required.\n\n`root_project_id` is required.\n`credential_id` is required.\n", @@ -20951,7 +21614,9 @@ }, "/projects/{root_project_id}/credentials": { "get": { - "tags": ["Project"], + "tags": [ + "Project" + ], "operationId": "get_all_repository_credentials", "summary": "Get All Repository Credentials", "description": "### Get all Repository Credentials for a project\n\n`root_project_id` is required.\n", @@ -21007,7 +21672,9 @@ }, "/roles": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "all_roles", "summary": "Get All Roles", "description": "### Get information about all roles.\n", @@ -21076,7 +21743,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "create_role", "summary": "Create Role", "description": "### Create a role with the specified information.\n", @@ -21159,7 +21828,9 @@ }, "/roles/search": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_roles", "summary": "Search Roles", "description": "### Search roles\n\nReturns all role records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -21281,7 +21952,9 @@ }, "/roles/search/with_user_count": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "search_roles_with_user_count", "summary": "Search Roles with User Count", "description": "### Search roles include user count\n\nReturns all role records that match the given search criteria, and attaches\nassociated user counts.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n", @@ -21403,7 +22076,9 @@ }, "/roles/{role_id}": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role", "summary": "Get Role", "description": "### Get information about the role with a specific id.\n", @@ -21455,7 +22130,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "delete_role", "summary": "Delete Role", "description": "### Delete the role with a specific id.\n", @@ -21527,7 +22204,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "update_role", "summary": "Update Role", "description": "### Update information about the role with a specific id.\n", @@ -21622,7 +22301,9 @@ }, "/roles/{role_id}/groups": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role_groups", "summary": "Get Role Groups", "description": "### Get information about all the groups with the role that has a specific id.\n", @@ -21686,7 +22367,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "set_role_groups", "summary": "Update Role Groups", "description": "### Set all groups for a role, removing all existing group associations from that role.\n", @@ -21778,7 +22461,9 @@ }, "/roles/{role_id}/users": { "get": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "role_users", "summary": "Get Role Users", "description": "### Get information about all the users with the role that has a specific id.\n", @@ -21851,7 +22536,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Role"], + "tags": [ + "Role" + ], "operationId": "set_role_users", "summary": "Update Role Users", "description": "### Set all the users of the role with a specific id.\n", @@ -21963,7 +22650,9 @@ }, "/running_queries": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "all_running_queries", "summary": "Get All Running Queries", "description": "Get information about all running queries.\n", @@ -21998,7 +22687,9 @@ }, "/running_queries/{query_task_id}": { "delete": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "kill_query", "summary": "Kill Running Query", "description": "Kill a query with a specific query_task_id.\n", @@ -22061,7 +22752,9 @@ }, "/saml_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "saml_config", "summary": "Get SAML Configuration", "description": "### Get the SAML configuration.\n\nLooker can be optionally configured to authenticate users against a SAML authentication server.\nSAML setup requires coordination with an administrator of that server.\n\nOnly Looker administrators can read and update the SAML configuration.\n\nConfiguring SAML impacts authentication for all users. This configuration should be done carefully.\n\nLooker maintains a single SAML configuation. It can be read and updated. Updates only succeed if the new state will be valid (in the sense that all required fields are populated); it is up to you to ensure that the configuration is appropriate and correct).\n\nSAML is enabled or disabled for Looker using the **enabled** field.\n", @@ -22091,7 +22784,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_saml_config", "summary": "Update SAML Configuration", "description": "### Update the SAML configuration.\n\nConfiguring SAML impacts authentication for all users. This configuration should be done carefully.\n\nOnly Looker administrators can read and update the SAML configuration.\n\nSAML is enabled or disabled for Looker using the **enabled** field.\n\nIt is **highly** recommended that any SAML setting changes be tested using the APIs below before being set globally.\n", @@ -22154,7 +22849,9 @@ }, "/saml_test_configs/{test_slug}": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "saml_test_config", "summary": "Get SAML Test Configuration", "description": "### Get a SAML test configuration by test_slug.\n", @@ -22195,7 +22892,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_saml_test_config", "summary": "Delete SAML Test Configuration", "description": "### Delete a SAML test configuration.\n", @@ -22248,7 +22947,9 @@ }, "/saml_test_configs": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "create_saml_test_config", "summary": "Create SAML Test Configuration", "description": "### Create a SAML test configuration.\n", @@ -22311,7 +23012,9 @@ }, "/parse_saml_idp_metadata": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "parse_saml_idp_metadata", "summary": "Parse SAML IdP XML", "description": "### Parse the given xml as a SAML IdP metadata document and return the result.\n", @@ -22364,7 +23067,9 @@ }, "/fetch_and_parse_saml_idp_metadata": { "post": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "fetch_and_parse_saml_idp_metadata", "summary": "Parse SAML IdP Url", "description": "### Fetch the given url and parse it as a SAML IdP metadata document and return the result.\nNote that this requires that the url be public or at least at a location where the Looker instance\ncan fetch it without requiring any special authentication.\n", @@ -22417,7 +23122,9 @@ }, "/scheduled_plans/space/{space_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_space", "summary": "Scheduled Plans for Space", "description": "### Get Scheduled Plans for a Space\n\nReturns scheduled plans owned by the caller for a given space id.\n", @@ -22483,7 +23190,9 @@ }, "/scheduled_plans/{scheduled_plan_id}": { "delete": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "delete_scheduled_plan", "summary": "Delete Scheduled Plan", "description": "### Delete a Scheduled Plan\n\nNormal users can only delete their own scheduled plans.\nAdmins can delete other users' scheduled plans.\nThis delete cannot be undone.\n", @@ -22545,7 +23254,9 @@ "x-looker-activity-type": "db_query" }, "patch": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "update_scheduled_plan", "summary": "Update Scheduled Plan", "description": "### Update a Scheduled Plan\n\nAdmins can update other users' Scheduled Plans.\n\nNote: Any scheduled plan destinations specified in an update will **replace** all scheduled plan destinations\ncurrently defined for the scheduled plan.\n\nFor Example: If a scheduled plan has destinations A, B, and C, and you call update on this scheduled plan\nspecifying only B in the destinations, then destinations A and C will be deleted by the update.\n\nUpdating a scheduled plan to assign null or an empty array to the scheduled_plan_destinations property is an error, as a scheduled plan must always have at least one destination.\n\nIf you omit the scheduled_plan_destinations property from the object passed to update, then the destinations\ndefined on the original scheduled plan will remain unchanged.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -22628,7 +23339,9 @@ } }, "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan", "summary": "Get Scheduled Plan", "description": "### Get Information About a Scheduled Plan\n\nAdmins can fetch information about other users' Scheduled Plans.\n", @@ -22691,7 +23404,9 @@ }, "/scheduled_plans": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "create_scheduled_plan", "summary": "Create Scheduled Plan", "description": "### Create a Scheduled Plan\n\nCreate a scheduled plan to render a Look or Dashboard on a recurring schedule.\n\nTo create a scheduled plan, you MUST provide values for the following fields:\n`name`\nand\n`look_id`, `dashboard_id`, `lookml_dashboard_id`, or `query_id`\nand\n`cron_tab` or `datagroup`\nand\nat least one scheduled_plan_destination\n\nA scheduled plan MUST have at least one scheduled_plan_destination defined.\n\nWhen `look_id` is set, `require_no_results`, `require_results`, and `require_change` are all required.\n\nIf `create_scheduled_plan` fails with a 422 error, be sure to look at the error messages in the response which will explain exactly what fields are missing or values that are incompatible.\n\nThe queries that provide the data for the look or dashboard are run in the context of user account that owns the scheduled plan.\n\nWhen `run_as_recipient` is `false` or not specified, the queries that provide the data for the\nlook or dashboard are run in the context of user account that owns the scheduled plan.\n\nWhen `run_as_recipient` is `true` and all the email recipients are Looker user accounts, the\nqueries are run in the context of each recipient, so different recipients may see different\ndata from the same scheduled render of a look or dashboard. For more details, see [Run As Recipient](https://looker.com/docs/r/admin/run-as-recipient).\n\nAdmins can create and modify scheduled plans on behalf of other users by specifying a user id.\nNon-admin users may not create or modify scheduled plans by or for other users.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -22772,7 +23487,9 @@ } }, "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "all_scheduled_plans", "summary": "Get All Scheduled Plans", "description": "### List All Scheduled Plans\n\nReturns all scheduled plans which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -22857,7 +23574,9 @@ }, "/scheduled_plans/run_once": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan_run_once", "summary": "Run Scheduled Plan Once", "description": "### Run a Scheduled Plan Immediately\n\nCreate a scheduled plan that runs only once, and immediately.\n\nThis can be useful for testing a Scheduled Plan before committing to a production schedule.\n\nAdmins can create scheduled plans on behalf of other users by specifying a user id.\n\nThis API is rate limited to prevent it from being used for relay spam or DoS attacks\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n", @@ -22941,7 +23660,9 @@ }, "/scheduled_plans/look/{look_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_look", "summary": "Scheduled Plans for Look", "description": "### Get Scheduled Plans for a Look\n\nReturns all scheduled plans for a look which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -23026,7 +23747,9 @@ }, "/scheduled_plans/dashboard/{dashboard_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_dashboard", "summary": "Scheduled Plans for Dashboard", "description": "### Get Scheduled Plans for a Dashboard\n\nReturns all scheduled plans for a dashboard which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -23111,7 +23834,9 @@ }, "/scheduled_plans/lookml_dashboard/{lookml_dashboard_id}": { "get": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plans_for_lookml_dashboard", "summary": "Scheduled Plans for LookML Dashboard", "description": "### Get Scheduled Plans for a LookML Dashboard\n\nReturns all scheduled plans for a LookML Dashboard which belong to the caller or given user.\n\nIf no user_id is provided, this function returns the scheduled plans owned by the caller.\n\n\nTo list all schedules for all users, pass `all_users=true`.\n\n\nThe caller must have `see_schedules` permission to see other users' scheduled plans.\n\n\n", @@ -23195,7 +23920,9 @@ }, "/scheduled_plans/{scheduled_plan_id}/run_once": { "post": { - "tags": ["ScheduledPlan"], + "tags": [ + "ScheduledPlan" + ], "operationId": "scheduled_plan_run_once_by_id", "summary": "Run Scheduled Plan Once by Id", "description": "### Run a Scheduled Plan By Id Immediately\nThis function creates a run-once schedule plan based on an existing scheduled plan,\napplies modifications (if any) to the new scheduled plan, and runs the new schedule plan immediately.\nThis can be useful for testing modifications to an existing scheduled plan before committing to a production schedule.\n\nThis function internally performs the following operations:\n\n1. Copies the properties of the existing scheduled plan into a new scheduled plan\n2. Copies any properties passed in the JSON body of this request into the new scheduled plan (replacing the original values)\n3. Creates the new scheduled plan\n4. Runs the new scheduled plan\n\nThe original scheduled plan is not modified by this operation.\nAdmins can create, modify, and run scheduled plans on behalf of other users by specifying a user id.\nNon-admins can only create, modify, and run their own scheduled plans.\n\n#### Email Permissions:\n\nFor details about permissions required to schedule delivery to email and the safeguards\nLooker offers to protect against sending to unauthorized email destinations, see [Email Domain Whitelist for Scheduled Looks](https://docs.looker.com/r/api/embed-permissions).\n\n\n#### Scheduled Plan Destination Formats\n\nScheduled plan destinations must specify the data format to produce and send to the destination.\n\nFormats:\n\n| format | Description\n| :-----------: | :--- |\n| json | A JSON object containing a `data` property which contains an array of JSON objects, one per row. No metadata.\n| json_detail | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query\n| inline_json | Same as the JSON format, except that the `data` property is a string containing JSON-escaped row data. Additional properties describe the data operation. This format is primarily used to send data to web hooks so that the web hook doesn't have to re-encode the JSON row data in order to pass it on to its ultimate destination.\n| csv | Comma separated values with a header\n| txt | Tab separated values with a header\n| html | Simple html\n| xlsx | MS Excel spreadsheet\n| wysiwyg_pdf | Dashboard rendered in a tiled layout to produce a PDF document\n| assembled_pdf | Dashboard rendered in a single column layout to produce a PDF document\n| wysiwyg_png | Dashboard rendered in a tiled layout to produce a PNG image\n||\n\nValid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example.\n\n\n\nThis API is rate limited to prevent it from being used for relay spam or DoS attacks\n\n", @@ -23291,7 +24018,9 @@ }, "/session_config": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "session_config", "summary": "Get Session Config", "description": "### Get session config.\n", @@ -23331,7 +24060,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "update_session_config", "summary": "Update Session Config", "description": "### Update session config.\n", @@ -23404,7 +24135,9 @@ }, "/session": { "get": { - "tags": ["Session"], + "tags": [ + "Session" + ], "operationId": "session", "summary": "Get Session", "description": "### Get API Session\n\nReturns information about the current API session, such as which workspace is selected for the session.\n", @@ -23444,7 +24177,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Session"], + "tags": [ + "Session" + ], "operationId": "update_session", "summary": "Update Session", "description": "### Update API Session\n\n#### API Session Workspace\n\nYou can use this endpoint to change the active workspace for the current API session.\n\nOnly one workspace can be active in a session. The active workspace can be changed\nany number of times in a session.\n\nThe default workspace for API sessions is the \"production\" workspace.\n\nAll Looker APIs that use projects or lookml models (such as running queries) will\nuse the version of project and model files defined by this workspace for the lifetime of the\ncurrent API session or until the session workspace is changed again.\n\nAn API session has the same lifetime as the access_token used to authenticate API requests. Each successful\nAPI login generates a new access_token and a new API session.\n\nIf your Looker API client application needs to work in a dev workspace across multiple\nAPI sessions, be sure to select the dev workspace after each login.\n", @@ -23517,7 +24252,9 @@ }, "/setting": { "patch": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "set_setting", "summary": "Set Setting", "description": "### Configure Looker Settings\n\nAvailable settings are:\n - extension_framework_enabled\n - marketplace_auto_install_enabled\n - marketplace_enabled\n - whitelabel_configuration\n - custom_welcome_email\n\nSee the `Setting` type for more information on the specific values that can be configured.\n", @@ -23609,7 +24346,9 @@ } }, "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "get_setting", "summary": "Get Setting", "description": "### Get Looker Settings\n\nAvailable settings are:\n - extension_framework_enabled\n - marketplace_auto_install_enabled\n - marketplace_enabled\n - whitelabel_configuration\n - custom_welcome_email\n\n", @@ -23680,9 +24419,66 @@ "x-looker-activity-type": "non_query" } }, + "/smtp_status": { + "get": { + "tags": [ + "Config" + ], + "operationId": "smtp_status", + "summary": "Get SMTP Status", + "description": "### Get current SMTP status.\n", + "parameters": [ + { + "name": "fields", + "in": "query", + "description": "Include only these fields in the response", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "SMTP Status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SmtpStatus" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/folders/search": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "search_folders", "summary": "Search Folders", "description": "Search for folders by creator id, parent id, name, etc", @@ -23842,7 +24638,9 @@ }, "/folders/{folder_id}": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder", "summary": "Get Folder", "description": "### Get information about the folder with a specific id.", @@ -23902,7 +24700,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "delete_folder", "summary": "Delete Folder", "description": "### Delete the folder with a specific id including any children folders.\n**DANGER** this will delete all looks and dashboards in the folder.\n", @@ -23963,7 +24763,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "update_folder", "summary": "Update Folder", "description": "### Update the folder with a specific id.", @@ -24047,10 +24849,12 @@ }, "/folders": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "all_folders", "summary": "Get All Folders", - "description": "### Get information about all folders.\n\nIn API 3.x, this will not return empty personal folders, unless they belong to the calling user.\nIn API 4.0+, all personal folders will be returned.\n\n", + "description": "### Get information about all folders.\n\nIn API 3.x, this will not return empty personal folders, unless they belong to the calling user,\nor if they contain soft-deleted content.\n\nIn API 4.0+, all personal folders will be returned.\n\n", "parameters": [ { "name": "fields", @@ -24101,7 +24905,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "create_folder", "summary": "Create Folder", "description": "### Create a folder with specified information.\n\nCaller must have permission to edit the parent folder and to create folders, otherwise the request\nreturns 404 Not Found.\n", @@ -24184,7 +24990,9 @@ }, "/folders/{folder_id}/children": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_children", "summary": "Get Folder Children", "description": "### Get the children of a folder.", @@ -24278,7 +25086,9 @@ }, "/folders/{folder_id}/children/search": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_children_search", "summary": "Search Folder Children", "description": "### Search the children of a folder", @@ -24361,7 +25171,9 @@ }, "/folders/{folder_id}/parent": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_parent", "summary": "Get Folder Parent", "description": "### Get the parent of a folder", @@ -24423,7 +25235,9 @@ }, "/folders/{folder_id}/ancestors": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_ancestors", "summary": "Get Folder Ancestors", "description": "### Get the ancestors of a folder", @@ -24488,7 +25302,9 @@ }, "/folders/{folder_id}/looks": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_looks", "summary": "Get Folder Looks", "description": "### Get all looks in a folder.\nIn API 3.x, this will return all looks in a folder, including looks in the trash.\nIn API 4.0+, all looks in a folder will be returned, excluding looks in the trash.\n", @@ -24553,7 +25369,9 @@ }, "/folders/{folder_id}/dashboards": { "get": { - "tags": ["Folder"], + "tags": [ + "Folder" + ], "operationId": "folder_dashboards", "summary": "Get Folder Dashboards", "description": "### Get the dashboards in a folder", @@ -24618,7 +25436,9 @@ }, "/sql_queries/{slug}": { "get": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "sql_query", "summary": "Get SQL Runner Query", "description": "Get a SQL Runner query.", @@ -24671,7 +25491,9 @@ }, "/sql_queries": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "create_sql_query", "summary": "Create SQL Runner Query", "description": "### Create a SQL Runner Query\n\nEither the `connection_name` or `model_name` parameter MUST be provided.\n", @@ -24754,7 +25576,9 @@ }, "/sql_queries/{slug}/run/{result_format}": { "post": { - "tags": ["Query"], + "tags": [ + "Query" + ], "operationId": "run_sql_query", "summary": "Run SQL Runner Query", "description": "Execute a SQL Runner query in a given result_format.", @@ -24918,12 +25742,14 @@ "x-looker-activity-type": "db_query" } }, - "/themes": { + "/support_access/allowlist": { "get": { - "tags": ["Theme"], - "operationId": "all_themes", - "summary": "Get All Themes", - "description": "### Get an array of all existing themes\n\nGet a **single theme** by id with [Theme](#!/Theme/theme)\n\nThis method returns an array of all existing themes. The active time for the theme is not considered.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", + "tags": [ + "Auth" + ], + "operationId": "get_support_access_allowlist_entries", + "summary": "Get Support Access Allowlist Users", + "description": "### Get Support Access Allowlist Users\n\nReturns the users that have been added to the Support Access Allowlist\n", "parameters": [ { "name": "fields", @@ -24937,13 +25763,13 @@ ], "responses": { "200": { - "description": "Themes", + "description": "Support Access Allowlist Entries", "content": { "application/json": { "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/Theme" + "$ref": "#/components/schemas/SupportAccessAllowlistEntry" } } } @@ -24974,17 +25800,22 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Theme"], - "operationId": "create_theme", - "summary": "Create Theme", - "description": "### Create a theme\n\nCreates a new theme object, returning the theme details, including the created id.\n\nIf `settings` are not specified, the default theme settings will be copied into the new theme.\n\nThe theme `name` can only contain alphanumeric characters or underscores. Theme names should not contain any confidential information, such as customer names.\n\n**Update** an existing theme with [Update Theme](#!/Theme/update_theme)\n\n**Permanently delete** an existing theme with [Delete Theme](#!/Theme/delete_theme)\n\nFor more information, see [Creating and Applying Themes](https://looker.com/docs/r/admin/themes).\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", + "tags": [ + "Auth" + ], + "operationId": "add_support_access_allowlist_entries", + "summary": "Add Support Access Allowlist Users", + "description": "### Add Support Access Allowlist Users\n\nAdds a list of emails to the Allowlist, using the provided reason\n", "responses": { "200": { - "description": "Theme", + "description": "Support Access Allowlist Entries", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Theme" + "type": "array", + "items": { + "$ref": "#/components/schemas/SupportAccessAllowlistEntry" + } } } } @@ -25009,16 +25840,395 @@ } } }, - "409": { - "description": "Resource Already Exists", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SupportAccessAddEntries" + } + } + }, + "description": "Request params.", + "required": true + } + } + }, + "/support_access/allowlist/{entry_id}": { + "delete": { + "tags": [ + "Auth" + ], + "operationId": "delete_support_access_allowlist_entry", + "summary": "Delete Support Access Allowlist Entry", + "description": "### Delete Support Access Allowlist User\n\nDeletes the specified Allowlist Entry Id\n", + "parameters": [ + { + "name": "entry_id", + "in": "path", + "description": "Id of Allowlist Entry", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Entry successfully deleted.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/support_access/enable": { + "put": { + "tags": [ + "Auth" + ], + "operationId": "enable_support_access", + "summary": "Enable Support Access", + "description": "### Enable Support Access\n\nEnables Support Access for the provided duration\n", + "responses": { + "200": { + "description": "Support Access Status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SupportAccessStatus" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Resource Already Exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SupportAccessEnable" + } + } + }, + "description": "Enable Support Access request params.", + "required": true + } + } + }, + "/support_access/disable": { + "put": { + "tags": [ + "Auth" + ], + "operationId": "disable_support_access", + "summary": "Disable Support Access", + "description": "### Disable Support Access\n\nDisables Support Access immediately\n", + "responses": { + "200": { + "description": "Support Access Status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SupportAccessStatus" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/support_access/status": { + "get": { + "tags": [ + "Auth" + ], + "operationId": "support_access_status", + "summary": "Support Access Status", + "description": "### Support Access Status\n\nReturns the current Support Access Status\n", + "responses": { + "200": { + "description": "Support Access Status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SupportAccessStatus" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/themes": { + "get": { + "tags": [ + "Theme" + ], + "operationId": "all_themes", + "summary": "Get All Themes", + "description": "### Get an array of all existing themes\n\nGet a **single theme** by id with [Theme](#!/Theme/theme)\n\nThis method returns an array of all existing themes. The active time for the theme is not considered.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", + "parameters": [ + { + "name": "fields", + "in": "query", + "description": "Requested fields.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Themes", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Theme" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + }, + "post": { + "tags": [ + "Theme" + ], + "operationId": "create_theme", + "summary": "Create Theme", + "description": "### Create a theme\n\nCreates a new theme object, returning the theme details, including the created id.\n\nIf `settings` are not specified, the default theme settings will be copied into the new theme.\n\nThe theme `name` can only contain alphanumeric characters or underscores. Theme names should not contain any confidential information, such as customer names.\n\n**Update** an existing theme with [Update Theme](#!/Theme/update_theme)\n\n**Permanently delete** an existing theme with [Delete Theme](#!/Theme/delete_theme)\n\nFor more information, see [Creating and Applying Themes](https://looker.com/docs/r/admin/themes).\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", + "responses": { + "200": { + "description": "Theme", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Theme" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Resource Already Exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Validation Error", "content": { @@ -25057,7 +26267,9 @@ }, "/themes/search": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "search_themes", "summary": "Search Themes", "description": "### Search all themes for matching criteria.\n\nReturns an **array of theme objects** that match the specified search criteria.\n\n| Search Parameters | Description\n| :-------------------: | :------ |\n| `begin_at` only | Find themes active at or after `begin_at`\n| `end_at` only | Find themes active at or before `end_at`\n| both set | Find themes with an active inclusive period between `begin_at` and `end_at`\n\nNote: Range matching requires boolean AND logic.\nWhen using `begin_at` and `end_at` together, do not use `filter_or`=TRUE\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\nGet a **single theme** by id with [Theme](#!/Theme/theme)\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -25190,7 +26402,9 @@ }, "/themes/default": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "default_theme", "summary": "Get Default Theme", "description": "### Get the default theme\n\nReturns the active theme object set as the default.\n\nThe **default** theme name can be set in the UI on the Admin|Theme UI page\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\" If specified, it returns the default theme at the time indicated.\n", @@ -25242,7 +26456,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "set_default_theme", "summary": "Set Default Theme", "description": "### Set the global default theme by theme name\n\nOnly Admin users can call this function.\n\nOnly an active theme with no expiration (`end_at` not set) can be assigned as the default theme. As long as a theme has an active record with no expiration, it can be set as the default.\n\n[Create Theme](#!/Theme/create) has detailed information on rules for default and active themes\n\nReturns the new specified default theme object.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -25315,7 +26531,9 @@ }, "/themes/active": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "active_themes", "summary": "Get Active Themes", "description": "### Get active themes\n\nReturns an array of active themes.\n\nIf the `name` parameter is specified, it will return an array with one theme if it's active and found.\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\"\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n\n", @@ -25390,7 +26608,9 @@ }, "/themes/theme_or_default": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "theme_or_default", "summary": "Get Theme or Default", "description": "### Get the named theme if it's active. Otherwise, return the default theme\n\nThe optional `ts` parameter can specify a different timestamp than \"now.\"\nNote: API users with `show` ability can call this function\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -25453,7 +26673,9 @@ }, "/themes/validate": { "post": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "validate_theme", "summary": "Validate Theme", "description": "### Validate a theme with the specified information\n\nValidates all values set for the theme, returning any errors encountered, or 200 OK if valid\n\nSee [Create Theme](#!/Theme/create_theme) for constraints\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -25546,7 +26768,9 @@ }, "/themes/{theme_id}": { "get": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "theme", "summary": "Get Theme", "description": "### Get a theme by ID\n\nUse this to retrieve a specific theme, whether or not it's currently active.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -25607,7 +26831,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "update_theme", "summary": "Update Theme", "description": "### Update the theme by id.\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -25690,7 +26916,9 @@ } }, "delete": { - "tags": ["Theme"], + "tags": [ + "Theme" + ], "operationId": "delete_theme", "summary": "Delete Theme", "description": "### Delete a specific theme by id\n\nThis operation permanently deletes the identified theme from the database.\n\nBecause multiple themes can have the same name (with different activation time spans) themes can only be deleted by ID.\n\nAll IDs associated with a theme name can be retrieved by searching for the theme name with [Theme Search](#!/Theme/search).\n\n**Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature.\n\n", @@ -25753,7 +26981,9 @@ }, "/timezones": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "all_timezones", "summary": "Get All Timezones", "description": "### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks).\n", @@ -25798,7 +27028,9 @@ }, "/ssh_servers": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_ssh_servers", "summary": "Get All SSH Servers", "description": "### Get information about all SSH Servers.\n", @@ -25852,7 +27084,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_ssh_server", "summary": "Create SSH Server", "description": "### Create an SSH Server.\n", @@ -25935,7 +27169,9 @@ }, "/ssh_server/{ssh_server_id}": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "ssh_server", "summary": "Get SSH Server", "description": "### Get information about an SSH Server.\n", @@ -25986,7 +27222,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "update_ssh_server", "summary": "Update SSH Server", "description": "### Update an SSH Server.\n", @@ -26068,7 +27306,9 @@ } }, "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_ssh_server", "summary": "Delete SSH Server", "description": "### Delete an SSH Server.\n", @@ -26131,7 +27371,9 @@ }, "/ssh_server/{ssh_server_id}/test": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_ssh_server", "summary": "Test SSH Server", "description": "### Test the SSH Server\n", @@ -26184,7 +27426,9 @@ }, "/ssh_tunnels": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "all_ssh_tunnels", "summary": "Get All SSH Tunnels", "description": "### Get information about all SSH Tunnels.\n", @@ -26238,7 +27482,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "create_ssh_tunnel", "summary": "Create SSH Tunnel", "description": "### Create an SSH Tunnel\n", @@ -26321,7 +27567,9 @@ }, "/ssh_tunnel/{ssh_tunnel_id}": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "ssh_tunnel", "summary": "Get SSH Tunnel", "description": "### Get information about an SSH Tunnel.\n", @@ -26372,7 +27620,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "update_ssh_tunnel", "summary": "Update SSH Tunnel", "description": "### Update an SSH Tunnel\n", @@ -26454,7 +27704,9 @@ } }, "delete": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "delete_ssh_tunnel", "summary": "Delete SSH Tunnel", "description": "### Delete an SSH Tunnel\n", @@ -26517,7 +27769,9 @@ }, "/ssh_tunnel/{ssh_tunnel_id}/test": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "test_ssh_tunnel", "summary": "Test SSH Tunnel", "description": "### Test the SSH Tunnel\n", @@ -26570,7 +27824,9 @@ }, "/ssh_public_key": { "get": { - "tags": ["Connection"], + "tags": [ + "Connection" + ], "operationId": "ssh_public_key", "summary": "Get SSH Public Key", "description": "### Get the SSH public key\n\nGet the public key created for this instance to identify itself to a remote SSH server.\n", @@ -26612,7 +27868,9 @@ }, "/user_attributes": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "all_user_attributes", "summary": "Get All User Attributes", "description": "### Get information about all user attributes.\n", @@ -26675,7 +27933,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "create_user_attribute", "summary": "Create User Attribute", "description": "### Create a new user attribute\n\nPermission information for a user attribute is conveyed through the `can` and `user_can_edit` fields.\nThe `user_can_edit` field indicates whether an attribute is user-editable _anywhere_ in the application.\nThe `can` field gives more granular access information, with the `set_value` child field indicating whether\nan attribute's value can be set by [Setting the User Attribute User Value](#!/User/set_user_attribute_user_value).\n\nNote: `name` and `label` fields must be unique across all user attributes in the Looker instance.\nAttempting to create a new user attribute with a name or label that duplicates an existing\nuser attribute will fail with a 422 error.\n", @@ -26769,7 +28029,9 @@ }, "/user_attributes/{user_attribute_id}": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "user_attribute", "summary": "Get User Attribute", "description": "### Get information about a user attribute.\n", @@ -26830,7 +28092,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "update_user_attribute", "summary": "Update User Attribute", "description": "### Update a user attribute definition.\n", @@ -26922,7 +28186,9 @@ } }, "delete": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "delete_user_attribute", "summary": "Delete User Attribute", "description": "### Delete a user attribute (admin only).\n", @@ -26986,7 +28252,9 @@ }, "/user_attributes/{user_attribute_id}/group_values": { "get": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "all_user_attribute_group_values", "summary": "Get User Attribute Group Values", "description": "### Returns all values of a user attribute defined by user groups, in precedence order.\n\nA user may be a member of multiple groups which define different values for a given user attribute.\nThe order of group-values in the response determines precedence for selecting which group-value applies\nto a given user. For more information, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values).\n\nResults will only include groups that the caller's user account has permission to see.\n", @@ -27050,7 +28318,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["UserAttribute"], + "tags": [ + "UserAttribute" + ], "operationId": "set_user_attribute_group_values", "summary": "Set User Attribute Group Values", "description": "### Define values for a user attribute across a set of groups, in priority order.\n\nThis function defines all values for a user attribute defined by user groups. This is a global setting, potentially affecting\nall users in the system. This function replaces any existing group value definitions for the indicated user attribute.\n\nThe value of a user attribute for a given user is determined by searching the following locations, in this order:\n\n1. the user's account settings\n2. the groups that the user is a member of\n3. the default value of the user attribute, if any\n\nThe user may be a member of multiple groups which define different values for that user attribute. The order of items in the group_values parameter\ndetermines which group takes priority for that user. Lowest array index wins.\n\nAn alternate method to indicate the selection precedence of group-values is to assign numbers to the 'rank' property of each\ngroup-value object in the array. Lowest 'rank' value wins. If you use this technique, you must assign a\nrank value to every group-value object in the array.\n\n To set a user attribute value for a single user, see [Set User Attribute User Value](#!/User/set_user_attribute_user_value).\nTo set a user attribute value for all members of a group, see [Set User Attribute Group Value](#!/Group/update_user_attribute_group_value).\n", @@ -27151,7 +28421,9 @@ }, "/user_login_lockouts": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "all_user_login_lockouts", "summary": "Get All User Login Lockouts", "description": "### Get currently locked-out users.\n", @@ -27207,7 +28479,9 @@ }, "/user_login_lockouts/search": { "get": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "search_user_login_lockouts", "summary": "Search User Login Lockouts", "description": "### Search currently locked-out users.\n", @@ -27337,7 +28611,9 @@ }, "/user_login_lockout/{key}": { "delete": { - "tags": ["Auth"], + "tags": [ + "Auth" + ], "operationId": "delete_user_login_lockout", "summary": "Delete User Login Lockout", "description": "### Removes login lockout for the associated user.\n", @@ -27400,7 +28676,9 @@ }, "/user": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "me", "summary": "Get Current User", "description": "### Get information about the current user; i.e. the user account currently calling the API.\n", @@ -27443,7 +28721,9 @@ }, "/users": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_users", "summary": "Get All Users", "description": "### Get information about all users.\n", @@ -27561,7 +28841,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user", "summary": "Create User", "description": "### Create a user with the specified information.\n", @@ -27645,7 +28927,9 @@ }, "/users/search": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "search_users", "summary": "Search Users", "description": "### Search users\n\nReturns all* user records that match the given search criteria.\n\nIf multiple search params are given and `filter_or` is FALSE or not specified,\nsearch params are combined in a logical AND operation.\nOnly rows that match *all* search param criteria will be returned.\n\nIf `filter_or` is TRUE, multiple search params are combined in a logical OR operation.\nResults will include rows that match **any** of the search criteria.\n\nString search params use case-insensitive matching.\nString search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions.\nexample=\"dan%\" will match \"danger\" and \"Danzig\" but not \"David\"\nexample=\"D_m%\" will match \"Damage\" and \"dump\"\n\nInteger search params can accept a single value or a comma separated list of values. The multiple\nvalues will be combined under a logical OR operation - results will match at least one of\nthe given values.\n\nMost search params can accept \"IS NULL\" and \"NOT NULL\" as special expressions to match\nor exclude (respectively) rows where the column is null.\n\nBoolean search params accept only \"true\" and \"false\" as values.\n\n\n(*) Results are always filtered to the level of information the caller is permitted to view.\nLooker admins can see all user details; normal users in an open system can see\nnames of other users but no details; normal users in a closed system can only see\nnames of other users who are members of the same group as the user.\n\n", @@ -27840,7 +29124,9 @@ }, "/users/search/names/{pattern}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "search_users_names", "summary": "Search User Names", "description": "### Search for user accounts by name\n\nReturns all user accounts where `first_name` OR `last_name` OR `email` field values match a pattern.\nThe pattern can contain `%` and `_` wildcards as in SQL LIKE expressions.\n\nAny additional search params will be combined into a logical AND expression.\n", @@ -28009,7 +29295,9 @@ }, "/users/{user_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user", "summary": "Get User by Id", "description": "### Get information about the user with a specific id.\n\nIf the caller is an admin or the caller is the user being specified, then full user information will\nbe returned. Otherwise, a minimal 'public' variant of the user information will be returned. This contains\nThe user name and avatar url, but no sensitive information.\n", @@ -28070,7 +29358,9 @@ "x-looker-activity-type": "non_query" }, "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "update_user", "summary": "Update User", "description": "### Update information about the user with a specific id.\n", @@ -28152,7 +29442,9 @@ } }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user", "summary": "Delete User", "description": "### Delete the user with a specific id.\n\n**DANGER** this will delete the user and all looks and other information owned by the user.\n", @@ -28216,7 +29508,9 @@ }, "/users/credential/{credential_type}/{credential_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_for_credential", "summary": "Get User by Credential Id", "description": "### Get information about the user with a credential of given type with specific id.\n\nThis is used to do things like find users by their embed external_user_id. Or, find the user with\na given api3 client_id, etc. The 'credential_type' matches the 'type' name of the various credential\ntypes. It must be one of the values listed in the table below. The 'credential_id' is your unique Id\nfor the user and is specific to each type of credential.\n\nAn example using the Ruby sdk might look like:\n\n`sdk.user_for_credential('embed', 'customer-4959425')`\n\nThis table shows the supported 'Credential Type' strings. The right column is for reference; it shows\nwhich field in the given credential type is actually searched when finding a user with the supplied\n'credential_id'.\n\n| Credential Types | Id Field Matched |\n| ---------------- | ---------------- |\n| email | email |\n| google | google_user_id |\n| saml | saml_user_id |\n| oidc | oidc_user_id |\n| ldap | ldap_id |\n| api | token |\n| api3 | client_id |\n| embed | external_user_id |\n| looker_openid | email |\n\n**NOTE**: The 'api' credential type was only used with the legacy Looker query API and is no longer supported. The credential type for API you are currently looking at is 'api3'.\n\n", @@ -28287,7 +29581,9 @@ }, "/users/{user_id}/credentials_email": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_email", "summary": "Get Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -28348,7 +29644,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_email", "summary": "Create Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -28450,7 +29748,9 @@ } }, "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "update_user_credentials_email", "summary": "Update Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -28542,7 +29842,9 @@ } }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_email", "summary": "Delete Email/Password Credential", "description": "### Email/password login information for the specified user.", @@ -28606,7 +29908,9 @@ }, "/users/{user_id}/credentials_totp": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_totp", "summary": "Get Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -28667,7 +29971,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_totp", "summary": "Create Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -28769,7 +30075,9 @@ } }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_totp", "summary": "Delete Two-Factor Credential", "description": "### Two-factor login information for the specified user.", @@ -28833,7 +30141,9 @@ }, "/users/{user_id}/credentials_ldap": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_ldap", "summary": "Get LDAP Credential", "description": "### LDAP login information for the specified user.", @@ -28894,7 +30204,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_ldap", "summary": "Delete LDAP Credential", "description": "### LDAP login information for the specified user.", @@ -28958,7 +30270,9 @@ }, "/users/{user_id}/credentials_google": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_google", "summary": "Get Google Auth Credential", "description": "### Google authentication login information for the specified user.", @@ -29019,7 +30333,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_google", "summary": "Delete Google Auth Credential", "description": "### Google authentication login information for the specified user.", @@ -29083,7 +30399,9 @@ }, "/users/{user_id}/credentials_saml": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_saml", "summary": "Get Saml Auth Credential", "description": "### Saml authentication login information for the specified user.", @@ -29144,7 +30462,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_saml", "summary": "Delete Saml Auth Credential", "description": "### Saml authentication login information for the specified user.", @@ -29208,7 +30528,9 @@ }, "/users/{user_id}/credentials_oidc": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_oidc", "summary": "Get OIDC Auth Credential", "description": "### OpenID Connect (OIDC) authentication login information for the specified user.", @@ -29269,7 +30591,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_oidc", "summary": "Delete OIDC Auth Credential", "description": "### OpenID Connect (OIDC) authentication login information for the specified user.", @@ -29333,7 +30657,9 @@ }, "/users/{user_id}/credentials_api3/{credentials_api3_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_api3", "summary": "Get API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -29404,7 +30730,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_api3", "summary": "Delete API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -29478,7 +30806,9 @@ }, "/users/{user_id}/credentials_api3": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_credentials_api3s", "summary": "Get All API 3 Credentials", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -29542,7 +30872,9 @@ "x-looker-activity-type": "non_query" }, "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_api3", "summary": "Create API 3 Credential", "description": "### API 3 login information for the specified user. This is for the newer API keys that can be added for any user.", @@ -29635,7 +30967,9 @@ }, "/users/{user_id}/credentials_embed/{credentials_embed_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_embed", "summary": "Get Embedding Credential", "description": "### Embed login information for the specified user.", @@ -29706,7 +31040,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_embed", "summary": "Delete Embedding Credential", "description": "### Embed login information for the specified user.", @@ -29780,7 +31116,9 @@ }, "/users/{user_id}/credentials_embed": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_credentials_embeds", "summary": "Get All Embedding Credentials", "description": "### Embed login information for the specified user.", @@ -29846,7 +31184,9 @@ }, "/users/{user_id}/credentials_looker_openid": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_credentials_looker_openid", "summary": "Get Looker OpenId Credential", "description": "### Looker Openid login information for the specified user. Used by Looker Analysts.", @@ -29907,7 +31247,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_credentials_looker_openid", "summary": "Delete Looker OpenId Credential", "description": "### Looker Openid login information for the specified user. Used by Looker Analysts.", @@ -29971,7 +31313,9 @@ }, "/users/{user_id}/sessions/{session_id}": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_session", "summary": "Get Web Login Session", "description": "### Web login session for the specified user.", @@ -30042,7 +31386,9 @@ "x-looker-activity-type": "non_query" }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_session", "summary": "Delete Web Login Session", "description": "### Web login session for the specified user.", @@ -30116,7 +31462,9 @@ }, "/users/{user_id}/sessions": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "all_user_sessions", "summary": "Get All Web Login Sessions", "description": "### Web login session for the specified user.", @@ -30182,7 +31530,9 @@ }, "/users/{user_id}/credentials_email/password_reset": { "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_user_credentials_email_password_reset", "summary": "Create Password Reset Token", "description": "### Create a password reset token.\nThis will create a cryptographically secure random password reset token for the user.\nIf the user already has a password reset token then this invalidates the old token and creates a new one.\nThe token is expressed as the 'password_reset_url' of the user's email/password credential object.\nThis takes an optional 'expires' param to indicate if the new token should be an expiring token.\nTokens that expire are typically used for self-service password resets for existing users.\nInvitation emails for new users typically are not set to expire.\nThe expire period is always 60 minutes when expires is enabled.\nThis method can be called with an empty body.\n", @@ -30254,7 +31604,9 @@ }, "/users/{user_id}/roles": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_roles", "summary": "Get User Roles", "description": "### Get information about roles of a given user\n", @@ -30327,7 +31679,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "set_user_roles", "summary": "Set User Roles", "description": "### Set roles of the user with a specific id.\n", @@ -30408,7 +31762,9 @@ }, "/users/{user_id}/attribute_values": { "get": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "user_attribute_user_values", "summary": "Get User Attribute Values", "description": "### Get user attribute values for a given user.\n\nReturns the values of specified user attributes (or all user attributes) for a certain user.\n\nA value for each user attribute is searched for in the following locations, in this order:\n\n1. in the user's account information\n1. in groups that the user is a member of\n1. the default value of the user attribute\n\nIf more than one group has a value defined for a user attribute, the group with the lowest rank wins.\n\nThe response will only include user attributes for which values were found. Use `include_unset=true` to include\nempty records for user attributes with no value.\n\nThe value of all hidden user attributes will be blank.\n", @@ -30497,7 +31853,9 @@ }, "/users/{user_id}/attribute_values/{user_attribute_id}": { "patch": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "set_user_attribute_user_value", "summary": "Set User Attribute User Value", "description": "### Store a custom value for a user attribute in a user's account settings.\n\nPer-user user attribute values take precedence over group or default values.\n", @@ -30580,7 +31938,9 @@ } }, "delete": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "delete_user_attribute_user_value", "summary": "Delete User Attribute User Value", "description": "### Delete a user attribute value from a user's account settings.\n\nAfter the user attribute value is deleted from the user's account settings, subsequent requests\nfor the user attribute value for this user will draw from the user's groups or the default\nvalue of the user attribute. See [Get User Attribute Values](#!/User/user_attribute_user_values) for more\ninformation about how user attribute values are resolved.\n", @@ -30637,7 +31997,9 @@ }, "/users/{user_id}/credentials_email/send_password_reset": { "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "send_user_credentials_email_password_reset", "summary": "Send Password Reset Token", "description": "### Send a password reset token.\nThis will send a password reset email to the user. If a password reset token does not already exist\nfor this user, it will create one and then send it.\nIf the user has not yet set up their account, it will send a setup email to the user.\nThe URL sent in the email is expressed as the 'password_reset_url' of the user's email/password credential object.\nPassword reset URLs will expire in 60 minutes.\nThis method can be called with an empty body.\n", @@ -30700,7 +32062,9 @@ }, "/users/{user_id}/update_emails": { "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "wipeout_user_emails", "summary": "Wipeout User Emails", "description": "### Change a disabled user's email addresses\n\nAllows the admin to change the email addresses for all the user's\nassociated credentials. Will overwrite all associated email addresses with\nthe value supplied in the 'email' body param.\nThe user's 'is_disabled' status must be true.\n", @@ -30804,7 +32168,9 @@ }, "/users/embed_user": { "post": { - "tags": ["User"], + "tags": [ + "User" + ], "operationId": "create_embed_user", "summary": "Create an embed user from an external user ID", "description": "Create an embed user from an external user ID\n", @@ -30857,7 +32223,9 @@ }, "/vector_thumbnail/{type}/{resource_id}": { "get": { - "tags": ["Content"], + "tags": [ + "Content" + ], "operationId": "vector_thumbnail", "summary": "Get Vector Thumbnail", "description": "### Get a vector image representing the contents of a dashboard or look.\n\n# DEPRECATED: Use [content_thumbnail()](#!/Content/content_thumbnail)\n\nThe returned thumbnail is an abstract representation of the contents of a dashbord or look and does not\nreflect the actual data displayed in the respective visualizations.\n", @@ -30929,7 +32297,9 @@ }, "/versions": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "versions", "summary": "Get ApiVersion", "description": "### Get information about all API versions supported by this Looker instance.\n", @@ -30982,7 +32352,9 @@ }, "/api_spec/{api_version}/{specification}": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "api_spec", "summary": "Get an API specification", "description": "### Get an API specification for this Looker instance.\n\nThe specification is returned as a JSON document in Swagger 2.x format\n", @@ -31045,7 +32417,9 @@ }, "/whitelabel_configuration": { "get": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "whitelabel_configuration", "summary": "Get Whitelabel configuration", "description": "### This feature is enabled only by special license.\n### Gets the whitelabel configuration, which includes hiding documentation links, custom favicon uploading, etc.\n", @@ -31097,7 +32471,9 @@ "x-looker-activity-type": "non_query" }, "put": { - "tags": ["Config"], + "tags": [ + "Config" + ], "operationId": "update_whitelabel_configuration", "summary": "Update Whitelabel configuration", "description": "### Update the whitelabel configuration\n", @@ -31171,7 +32547,9 @@ }, "/workspaces": { "get": { - "tags": ["Workspace"], + "tags": [ + "Workspace" + ], "operationId": "all_workspaces", "summary": "Get All Workspaces", "description": "### Get All Workspaces\n\nReturns all workspaces available to the calling user.\n", @@ -31216,7 +32594,9 @@ }, "/workspaces/{workspace_id}": { "get": { - "tags": ["Workspace"], + "tags": [ + "Workspace" + ], "operationId": "workspace", "summary": "Get Workspace", "description": "### Get A Workspace\n\nReturns information about a workspace such as the git status and selected branches\nof all projects available to the caller's user account.\n\nA workspace defines which versions of project files will be used to evaluate expressions\nand operations that use model definitions - operations such as running queries or rendering dashboards.\nEach project has its own git repository, and each project in a workspace may be configured to reference\nparticular branch or revision within their respective repositories.\n\nThere are two predefined workspaces available: \"production\" and \"dev\".\n\nThe production workspace is shared across all Looker users. Models in the production workspace are read-only.\nChanging files in production is accomplished by modifying files in a git branch and using Pull Requests\nto merge the changes from the dev branch into the production branch, and then telling\nLooker to sync with production.\n\nThe dev workspace is local to each Looker user. Changes made to project/model files in the dev workspace only affect\nthat user, and only when the dev workspace is selected as the active workspace for the API session.\n(See set_session_workspace()).\n\nThe dev workspace is NOT unique to an API session. Two applications accessing the Looker API using\nthe same user account will see the same files in the dev workspace. To avoid collisions between\nAPI clients it's best to have each client login with API3 credentials for a different user account.\n\nChanges made to files in a dev workspace are persistent across API sessions. It's a good\nidea to commit any changes you've made to the git repository, but not strictly required. Your modified files\nreside in a special user-specific directory on the Looker server and will still be there when you login in again\nlater and use update_session(workspace_id: \"dev\") to select the dev workspace for the new API session.\n", @@ -31270,7 +32650,7 @@ }, "servers": [ { - "url": "https://localhost:20000/api/4.0" + "url": "https://self-signed.looker.com:19999/api/4.0" } ], "components": { @@ -31293,7 +32673,10 @@ } }, "x-looker-status": "stable", - "required": ["message", "documentation_url"] + "required": [ + "message", + "documentation_url" + ] }, "DashboardBase": { "properties": { @@ -31693,7 +33076,10 @@ } }, "x-looker-status": "stable", - "required": ["message", "documentation_url"] + "required": [ + "message", + "documentation_url" + ] }, "ValidationErrorDetail": { "properties": { @@ -31724,7 +33110,9 @@ } }, "x-looker-status": "stable", - "required": ["documentation_url"] + "required": [ + "documentation_url" + ] }, "AccessToken": { "properties": { @@ -31776,7 +33164,10 @@ } }, "x-looker-status": "beta", - "required": ["field_name", "field_value"] + "required": [ + "field_name", + "field_value" + ] }, "AlertAppliedDashboardFilter": { "properties": { @@ -31803,7 +33194,11 @@ } }, "x-looker-status": "beta", - "required": ["filter_title", "field_name", "filter_value"] + "required": [ + "filter_title", + "field_name", + "filter_value" + ] }, "AlertField": { "properties": { @@ -31827,7 +33222,10 @@ } }, "x-looker-status": "beta", - "required": ["title", "name"] + "required": [ + "title", + "name" + ] }, "AlertConditionState": { "properties": { @@ -31939,7 +33337,9 @@ }, "investigative_content_type": { "type": "string", - "enum": ["dashboard"], + "enum": [ + "dashboard" + ], "description": "The type of the investigative content Valid values are: \"dashboard\".", "nullable": true }, @@ -32000,7 +33400,10 @@ "properties": { "destination_type": { "type": "string", - "enum": ["EMAIL", "ACTION_HUB"], + "enum": [ + "EMAIL", + "ACTION_HUB" + ], "description": "Type of destination that the alert will be sent to Valid values are: \"EMAIL\", \"ACTION_HUB\".", "nullable": false }, @@ -32021,7 +33424,9 @@ } }, "x-looker-status": "beta", - "required": ["destination_type"] + "required": [ + "destination_type" + ] }, "AlertPatch": { "properties": { @@ -32584,7 +33989,10 @@ }, "linked_content_type": { "type": "string", - "enum": ["dashboard", "lookml_dashboard"], + "enum": [ + "dashboard", + "lookml_dashboard" + ], "description": "Name of the command Valid values are: \"dashboard\", \"lookml_dashboard\".", "nullable": false } @@ -32682,7 +34090,10 @@ "permission_type": { "type": "string", "readOnly": true, - "enum": ["view", "edit"], + "enum": [ + "view", + "edit" + ], "description": "Type of permission: \"view\" or \"edit\" Valid values are: \"view\", \"edit\".", "nullable": true }, @@ -32901,7 +34312,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "ContentValidationLook": { "properties": { @@ -33306,7 +34719,9 @@ } }, "x-looker-status": "stable", - "required": ["external_user_id"] + "required": [ + "external_user_id" + ] }, "CreateOAuthApplicationUserStateRequest": { "properties": { @@ -33363,7 +34778,10 @@ } }, "x-looker-status": "beta", - "required": ["user_id", "oauth_application_id"] + "required": [ + "user_id", + "oauth_application_id" + ] }, "CredentialsApi3": { "properties": { @@ -34462,7 +35880,12 @@ } }, "x-looker-status": "stable", - "required": ["dashboard_id", "name", "title", "type"] + "required": [ + "dashboard_id", + "name", + "title", + "type" + ] }, "DashboardLayoutComponent": { "properties": { @@ -35818,7 +37241,9 @@ } }, "x-looker-status": "beta", - "required": ["target_url"] + "required": [ + "target_url" + ] }, "EmbedSsoParams": { "properties": { @@ -35906,7 +37331,9 @@ } }, "x-looker-status": "stable", - "required": ["target_url"] + "required": [ + "target_url" + ] }, "EmbedSecret": { "properties": { @@ -36114,7 +37541,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "CreateFolder": { "properties": { @@ -36130,7 +37559,10 @@ } }, "x-looker-status": "stable", - "required": ["name", "parent_id"] + "required": [ + "name", + "parent_id" + ] }, "UpdateFolder": { "properties": { @@ -36270,7 +37702,9 @@ } }, "x-looker-status": "stable", - "required": ["name"] + "required": [ + "name" + ] }, "GitBranch": { "properties": { @@ -36891,7 +38325,11 @@ "type": "string" }, "readOnly": true, - "enum": ["cell", "query", "dashboard"], + "enum": [ + "cell", + "query", + "dashboard" + ], "description": "A list of action types the integration supports. Valid values are: \"cell\", \"query\", \"dashboard\".", "nullable": false }, @@ -36901,7 +38339,10 @@ "type": "string" }, "readOnly": true, - "enum": ["formatted", "unformatted"], + "enum": [ + "formatted", + "unformatted" + ], "description": "A list of formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: \"formatted\", \"unformatted\".", "nullable": false }, @@ -36911,7 +38352,10 @@ "type": "string" }, "readOnly": true, - "enum": ["apply", "noapply"], + "enum": [ + "apply", + "noapply" + ], "description": "A list of visualization formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: \"apply\", \"noapply\".", "nullable": false }, @@ -36921,7 +38365,10 @@ "type": "string" }, "readOnly": true, - "enum": ["push", "url"], + "enum": [ + "push", + "url" + ], "description": "A list of all the download mechanisms the integration supports. The order of values is not significant: Looker will select the most appropriate supported download mechanism for a given query. The integration must ensure it can handle any of the mechanisms it claims to support. If unspecified, this defaults to all download setting values. Valid values are: \"push\", \"url\".", "nullable": false }, @@ -38754,6 +40201,15 @@ "readOnly": true, "description": "An array of items describing which custom measure types are supported for creating a custom measure 'based_on' each possible dimension type.", "nullable": false + }, + "always_join": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true, + "description": "An array of joins that will always be included in the SQL for this explore, even if the user has not selected a field from the joined view.", + "nullable": true } }, "x-looker-status": "stable" @@ -38940,7 +40396,10 @@ "align": { "type": "string", "readOnly": true, - "enum": ["left", "right"], + "enum": [ + "left", + "right" + ], "description": "The appropriate horizontal text alignment the values of this field should be displayed in. Valid values are: \"left\", \"right\".", "nullable": false }, @@ -38953,7 +40412,12 @@ "category": { "type": "string", "readOnly": true, - "enum": ["parameter", "filter", "measure", "dimension"], + "enum": [ + "parameter", + "filter", + "measure", + "dimension" + ], "description": "Field category Valid values are: \"parameter\", \"filter\", \"measure\", \"dimension\".", "nullable": true }, @@ -39005,7 +40469,10 @@ "fill_style": { "type": "string", "readOnly": true, - "enum": ["enumeration", "range"], + "enum": [ + "enumeration", + "range" + ], "description": "The style of dimension fill that is possible for this field. Null if no dimension fill is possible. Valid values are: \"enumeration\", \"range\".", "nullable": true }, @@ -39433,7 +40900,10 @@ "format": { "type": "string", "readOnly": true, - "enum": ["topojson", "vector_tile_region"], + "enum": [ + "topojson", + "vector_tile_region" + ], "description": "Specifies the data format of the region information. Valid values are: \"topojson\", \"vector_tile_region\".", "nullable": false }, @@ -40615,7 +42085,12 @@ }, "pull_request_mode": { "type": "string", - "enum": ["off", "links", "recommended", "required"], + "enum": [ + "off", + "links", + "recommended", + "required" + ], "description": "The git pull request policy for this project. Valid values are: \"off\", \"links\", \"recommended\", \"required\".", "nullable": false }, @@ -41055,7 +42530,10 @@ } }, "x-looker-status": "stable", - "required": ["model", "view"] + "required": [ + "model", + "view" + ] }, "CreateQueryTask": { "properties": { @@ -41113,7 +42591,10 @@ } }, "x-looker-status": "stable", - "required": ["query_id", "result_format"] + "required": [ + "query_id", + "result_format" + ] }, "QueryTask": { "properties": { @@ -42850,6 +44331,12 @@ "readOnly": true, "description": "Tables for this schema", "nullable": false + }, + "table_limit_hit": { + "type": "boolean", + "readOnly": true, + "description": "True if the table limit was hit while retrieving tables in this schema", + "nullable": false } }, "x-looker-status": "beta" @@ -43211,6 +44698,56 @@ }, "x-looker-status": "beta" }, + "SmtpStatus": { + "properties": { + "is_valid": { + "type": "boolean", + "readOnly": true, + "description": "Overall SMTP status of cluster", + "nullable": false + }, + "node_count": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Total number of nodes in cluster", + "nullable": true + }, + "node_status": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SmtpNodeStatus" + }, + "readOnly": true, + "description": "array of each node's status containing is_valid, message, hostname", + "nullable": true + } + }, + "x-looker-status": "beta" + }, + "SmtpNodeStatus": { + "properties": { + "is_valid": { + "type": "boolean", + "readOnly": true, + "description": "SMTP status of node", + "nullable": false + }, + "message": { + "type": "string", + "readOnly": true, + "description": "Error message for node", + "nullable": true + }, + "hostname": { + "type": "string", + "readOnly": true, + "description": "Host name of node", + "nullable": true + } + }, + "x-looker-status": "beta" + }, "Snippet": { "properties": { "name": { @@ -43499,6 +45036,90 @@ }, "x-looker-status": "beta" }, + "SupportAccessAllowlistEntry": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Unique ID", + "nullable": false + }, + "email": { + "type": "string", + "description": "Email address", + "nullable": true + }, + "full_name": { + "type": "string", + "readOnly": true, + "description": "Full name of allowlisted user", + "nullable": true + }, + "reason": { + "type": "string", + "description": "Reason the Email is included in the Allowlist", + "nullable": true + }, + "created_date": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Date the Email was added to the Allowlist", + "nullable": true + } + }, + "x-looker-status": "beta" + }, + "SupportAccessAddEntries": { + "properties": { + "emails": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of emails to add to the Allowlist", + "nullable": true + }, + "reason": { + "type": "string", + "description": "Reason for adding emails to the Allowlist", + "nullable": true + } + }, + "x-looker-status": "beta" + }, + "SupportAccessEnable": { + "properties": { + "duration_in_seconds": { + "type": "integer", + "format": "int64", + "description": "Duration Support Access will remain enabled", + "nullable": true + } + }, + "x-looker-status": "beta", + "required": [ + "duration_in_seconds" + ] + }, + "SupportAccessStatus": { + "properties": { + "open": { + "type": "boolean", + "readOnly": true, + "description": "Whether or not Support Access is open", + "nullable": false + }, + "open_until": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Time that Support Access will expire", + "nullable": true + } + }, + "x-looker-status": "beta" + }, "ThemeSettings": { "properties": { "background_color": { @@ -43725,7 +45346,11 @@ } }, "x-looker-status": "stable", - "required": ["name", "label", "type"] + "required": [ + "name", + "label", + "type" + ] }, "UserAttributeGroupValue": { "properties": { @@ -43866,7 +45491,9 @@ } }, "x-looker-status": "stable", - "required": ["email"] + "required": [ + "email" + ] }, "UserLoginLockout": { "properties": { @@ -44416,4 +46043,4 @@ } } } -} +} \ No newline at end of file From 83309aaca74b3abe0f5411a02592e44deef8f8de Mon Sep 17 00:00:00 2001 From: Bryn Ryans Date: Mon, 10 Jan 2022 03:39:29 +0000 Subject: [PATCH 2/8] Fixes dart lint issues. --- dart/looker_sdk/README.md | 8 +- dart/looker_sdk/analysis_options.yaml | 2 +- dart/looker_sdk/example/main.dart | 34 +- dart/looker_sdk/lib/src/rtl/api_methods.dart | 14 +- dart/looker_sdk/lib/src/rtl/auth_session.dart | 5 +- dart/looker_sdk/lib/src/rtl/transport.dart | 4 +- dart/looker_sdk/lib/src/sdk/methods.dart | 3567 +++++----- dart/looker_sdk/lib/src/sdk/models.dart | 6235 +++++------------ dart/looker_sdk/package.json | 3 +- dart/looker_sdk/pubspec.yaml | 1 + dart/looker_sdk/test/e2e/boards_test.dart | 2 +- .../looker_sdk/test/e2e/connections_test.dart | 16 +- dart/looker_sdk/test/e2e/dashboards_test.dart | 6 +- dart/looker_sdk/test/e2e/looks_test.dart | 7 +- packages/sdk-codegen/src/dart.gen.spec.ts | 8 +- packages/sdk-codegen/src/dart.gen.ts | 62 +- 16 files changed, 3596 insertions(+), 6378 deletions(-) diff --git a/dart/looker_sdk/README.md b/dart/looker_sdk/README.md index 2384a08cf..261fe234c 100644 --- a/dart/looker_sdk/README.md +++ b/dart/looker_sdk/README.md @@ -55,9 +55,13 @@ Run `yarn test` from `{reporoot}/dart/looker_sdk` to run all tests. Run `yarn format` from `{reporoot}/dart/looker_sdk` to format the `dart` files correctly. This should be run if you change any of the run time library `dart` files. The repo CI will run the linter and will fail if the files have not been correctly formatted. -### Run format +### Run format-check + +Run `yarn format-check` from `{reporoot}/dart/looker_sdk` to check the formatting of the `dart` files. + +### Run analyze -Run `yarn format` from `{reporoot}/dart/looker_sdk` to lint the `dart` files. +Run `yarn format-analyze` from `{reporoot}/dart/looker_sdk` to lint the `dart` files. ## TODOs diff --git a/dart/looker_sdk/analysis_options.yaml b/dart/looker_sdk/analysis_options.yaml index 3872f5d52..c6abcbf71 100644 --- a/dart/looker_sdk/analysis_options.yaml +++ b/dart/looker_sdk/analysis_options.yaml @@ -1,3 +1,3 @@ -include: package:pedantic/analysis_options.yaml +include: package:lints/recommended.yaml analyzer: diff --git a/dart/looker_sdk/example/main.dart b/dart/looker_sdk/example/main.dart index bc6e508c6..78a4e3ef7 100644 --- a/dart/looker_sdk/example/main.dart +++ b/dart/looker_sdk/example/main.dart @@ -21,16 +21,18 @@ Future createSdk() async { Future runLooks(LookerSDK sdk) async { try { - var looks = await sdk.ok(sdk.all_looks()); + var looks = await sdk.ok(sdk.allLooks()); if (looks.isNotEmpty) { - looks.forEach((look) => print(look.title)); - var look = await sdk.ok(sdk.run_look(looks[looks.length - 1].id, 'png')); + for (var look in looks) { + print(look.title); + } + var look = await sdk.ok(sdk.runLook(looks[looks.length - 1].id, 'png')); var dir = Directory('./temp'); if (!dir.existsSync()) { dir.createSync(); } File('./temp/look.png').writeAsBytesSync(look as Uint8List); - look = await sdk.ok(sdk.run_look(looks[looks.length - 1].id, 'csv')); + look = await sdk.ok(sdk.runLook(looks[looks.length - 1].id, 'csv')); File('./temp/look.csv').writeAsStringSync(look as String); } } catch (error, stacktrace) { @@ -41,8 +43,10 @@ Future runLooks(LookerSDK sdk) async { Future runDashboardApis(LookerSDK sdk) async { try { - var dashboards = await sdk.ok(sdk.all_dashboards()); - dashboards.forEach((dashboard) => print(dashboard.title)); + var dashboards = await sdk.ok(sdk.allDashboards()); + for (var dashboard in dashboards) { + print(dashboard.title); + } var dashboard = await sdk.ok(sdk.dashboard(dashboards[0].id)); print(dashboard.toJson()); } catch (error, stacktrace) { @@ -53,8 +57,10 @@ Future runDashboardApis(LookerSDK sdk) async { Future runConnectionApis(LookerSDK sdk) async { try { - var connections = await sdk.ok(sdk.all_connections()); - connections.forEach((connection) => print(connection.name)); + var connections = await sdk.ok(sdk.allConnections()); + for (var connection in connections) { + print(connection.name); + } var connection = await sdk .ok(sdk.connection(connections[0].name, fields: 'name,host,port')); print( @@ -72,22 +78,24 @@ Future runConnectionApis(LookerSDK sdk) async { newConnection.password = 'look_your_data'; newConnection.database = 'demo_db2'; newConnection.tmpDbName = 'looker_demo_scratch'; - connection = await sdk.ok(sdk.create_connection(newConnection)); + connection = await sdk.ok(sdk.createConnection(newConnection)); print('created ${connection.name}'); } var updateConnection = WriteDBConnection(); updateConnection.username = 'looker_demo'; connection = - await sdk.ok(sdk.update_connection('TestConnection', updateConnection)); + await sdk.ok(sdk.updateConnection('TestConnection', updateConnection)); print('Connection updated: username=${connection.username}'); var testResults = await sdk.ok( - sdk.test_connection('TestConnection', tests: DelimList(['connect']))); + sdk.testConnection('TestConnection', tests: DelimList(['connect']))); if (testResults.isEmpty) { print('No connection tests run'); } else { - testResults.forEach((i) => print('test result: ${i.name}=${i.message}')); + for (var i in testResults) { + print('test result: ${i.name}=${i.message}'); + } } - var deleteResult = await sdk.ok(sdk.delete_connection('TestConnection')); + var deleteResult = await sdk.ok(sdk.deleteConnection('TestConnection')); print('Delete result $deleteResult'); } catch (error, stacktrace) { print(error); diff --git a/dart/looker_sdk/lib/src/rtl/api_methods.dart b/dart/looker_sdk/lib/src/rtl/api_methods.dart index a1478101f..78712e912 100644 --- a/dart/looker_sdk/lib/src/rtl/api_methods.dart +++ b/dart/looker_sdk/lib/src/rtl/api_methods.dart @@ -48,8 +48,7 @@ class APIMethods { T Function(dynamic responseData, String contentType) responseHandler, String path, [dynamic queryParams, - dynamic body, - T responseInstance]) async { + dynamic body]) async { var headers = await _getHeaders(); return _authSession.transport.request(responseHandler, HttpMethod.delete, '${_authSession.apiPath}$path', queryParams, body, headers); @@ -59,8 +58,7 @@ class APIMethods { T Function(dynamic responseData, String contentType) responseHandler, String path, [dynamic queryParams, - dynamic body, - T responseInstance]) async { + dynamic body]) async { var headers = await _getHeaders(); var requestBody = body == null ? null : jsonEncode(body); return _authSession.transport.request(responseHandler, HttpMethod.post, @@ -71,8 +69,7 @@ class APIMethods { T Function(dynamic responseData, String contentType) responseHandler, String path, [dynamic queryParams, - dynamic body, - T responseInstance]) async { + dynamic body]) async { var headers = await _getHeaders(); return _authSession.transport.request(responseHandler, HttpMethod.put, '${_authSession.apiPath}$path', queryParams, body, headers); @@ -82,10 +79,9 @@ class APIMethods { T Function(dynamic responseData, String contentType) responseHandler, String path, [dynamic queryParams, - dynamic body, - T responseInstance]) async { + dynamic body]) async { var headers = await _getHeaders(); - var requestBody; + Object requestBody; if (body != null) { body.removeWhere((key, value) => value == null); requestBody = jsonEncode(body); diff --git a/dart/looker_sdk/lib/src/rtl/auth_session.dart b/dart/looker_sdk/lib/src/rtl/auth_session.dart index 1f2baddf2..f24d14b82 100644 --- a/dart/looker_sdk/lib/src/rtl/auth_session.dart +++ b/dart/looker_sdk/lib/src/rtl/auth_session.dart @@ -58,7 +58,10 @@ class AuthSession { } Future logout() async { - Function jsonHandler = (Map json) => json; + dynamic jsonHandler(dynamic json, String contentType) { + return json; + } + try { await ok(transport.request( jsonHandler, diff --git a/dart/looker_sdk/lib/src/rtl/transport.dart b/dart/looker_sdk/lib/src/rtl/transport.dart index f6893da44..670533dd8 100644 --- a/dart/looker_sdk/lib/src/rtl/transport.dart +++ b/dart/looker_sdk/lib/src/rtl/transport.dart @@ -128,8 +128,8 @@ class Transport { SDKResponse handleResponse(http.Response response, T Function(dynamic response, String contentType) responseHandler) { var ok = response.statusCode >= 200 && response.statusCode <= 299; - var result; - var responseBody; + Object result; + Object responseBody; var contentType = response.headers['content-type'] ?? ''; if (contentType.startsWith('application/json')) { responseBody = jsonDecode(response.body); diff --git a/dart/looker_sdk/lib/src/sdk/methods.dart b/dart/looker_sdk/lib/src/sdk/methods.dart index 2bdf2219e..25075fcda 100644 --- a/dart/looker_sdk/lib/src/sdk/methods.dart +++ b/dart/looker_sdk/lib/src/sdk/methods.dart @@ -38,7 +38,7 @@ class LookerSDK extends APIMethods { /// ### Search Alerts /// /// GET /alerts/search -> List - Future>> search_alerts( + Future>> searchAlerts( { /// @param {int} limit (Optional) Number of results to return (used with `offset`). @@ -48,7 +48,7 @@ class LookerSDK extends APIMethods { int offset, /// @param {String} group_by (Optional) Dimension by which to order the results(`dashboard` | `owner`) - String group_by, + String groupBy, /// @param {String} fields (Optional) Requested fields. String fields, @@ -60,16 +60,16 @@ class LookerSDK extends APIMethods { String frequency, /// @param {bool} condition_met (Optional) Filter on whether the alert has met its condition when it last executed - bool condition_met, + bool conditionMet, /// @param {String} last_run_start (Optional) Filter on the start range of the last time the alerts were run. Example: 2021-01-01T01:01:01-08:00. - String last_run_start, + String lastRunStart, /// @param {String} last_run_end (Optional) Filter on the start range of the last time the alerts were run. Example: 2021-01-01T01:01:01-08:00. - String last_run_end, + String lastRunEnd, /// @param {bool} all_owners (Admin only) (Optional) Filter for all owners. - bool all_owners}) async { + bool allOwners}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Alert.fromResponse(i, contentType)) @@ -79,31 +79,31 @@ class LookerSDK extends APIMethods { return get(responseHandler, '/alerts/search', { 'limit': limit, 'offset': offset, - 'group_by': group_by, + 'group_by': groupBy, 'fields': fields, 'disabled': disabled, 'frequency': frequency, - 'condition_met': condition_met, - 'last_run_start': last_run_start, - 'last_run_end': last_run_end, - 'all_owners': all_owners + 'condition_met': conditionMet, + 'last_run_start': lastRunStart, + 'last_run_end': lastRunEnd, + 'all_owners': allOwners }); } /// ### Get an alert by a given alert ID /// /// GET /alerts/{alert_id} -> Alert - Future> get_alert( + Future> getAlert( /// @param {int} alert_id ID of an alert - int alert_id) async { - var path_alert_id = encodeParam(alert_id); + int alertId) async { + var pathAlertId = encodeParam(alertId); Alert responseHandler(dynamic json, String contentType) { return Alert.fromResponse(json, contentType); } - return get(responseHandler, '/alerts/$path_alert_id'); + return get(responseHandler, '/alerts/$pathAlertId'); } /// ### Update an alert @@ -111,21 +111,20 @@ class LookerSDK extends APIMethods { /// # /// /// PUT /alerts/{alert_id} -> Alert - Future> update_alert( + Future> updateAlert( /// @param {int} alert_id ID of an alert - int alert_id, + int alertId, /// @param {WriteAlert} body WriteAlert body) async { - var path_alert_id = encodeParam(alert_id); + var pathAlertId = encodeParam(alertId); Alert responseHandler(dynamic json, String contentType) { return Alert.fromResponse(json, contentType); } - return put(responseHandler, '/alerts/$path_alert_id', null, - body == null ? null : body.toJson()); + return put(responseHandler, '/alerts/$pathAlertId', null, body?.toJson()); } /// ### Update select alert fields @@ -133,34 +132,33 @@ class LookerSDK extends APIMethods { /// # /// /// PATCH /alerts/{alert_id} -> Alert - Future> update_alert_field( + Future> updateAlertField( /// @param {int} alert_id ID of an alert - int alert_id, + int alertId, /// @param {AlertPatch} body AlertPatch body) async { - var path_alert_id = encodeParam(alert_id); + var pathAlertId = encodeParam(alertId); Alert responseHandler(dynamic json, String contentType) { return Alert.fromResponse(json, contentType); } - return patch(responseHandler, '/alerts/$path_alert_id', null, - body == null ? null : body.toJson()); + return patch(responseHandler, '/alerts/$pathAlertId', null, body?.toJson()); } /// ### Delete an alert by a given alert ID /// /// DELETE /alerts/{alert_id} -> void - Future> delete_alert( + Future> deleteAlert( /// @param {int} alert_id ID of an alert - int alert_id) async { - var path_alert_id = encodeParam(alert_id); + int alertId) async { + var pathAlertId = encodeParam(alertId); void responseHandler(dynamic json, String contentType) {} - return delete(responseHandler, '/alerts/$path_alert_id'); + return delete(responseHandler, '/alerts/$pathAlertId'); } /// ### Create a new alert and return details of the newly created object @@ -200,7 +198,7 @@ class LookerSDK extends APIMethods { /// ``` /// /// POST /alerts -> Alert - Future> create_alert( + Future> createAlert( /// @param {WriteAlert} body WriteAlert body) async { @@ -208,26 +206,25 @@ class LookerSDK extends APIMethods { return Alert.fromResponse(json, contentType); } - return post( - responseHandler, '/alerts', null, body == null ? null : body.toJson()); + return post(responseHandler, '/alerts', null, body?.toJson()); } /// ### Enqueue an Alert by ID /// /// POST /alerts/{alert_id}/enqueue -> void - Future> enqueue_alert( + Future> enqueueAlert( /// @param {int} alert_id ID of an alert - int alert_id, + int alertId, { /// @param {bool} force Whether to enqueue an alert again if its already running. bool force}) async { - var path_alert_id = encodeParam(alert_id); + var pathAlertId = encodeParam(alertId); void responseHandler(dynamic json, String contentType) {} return post( - responseHandler, '/alerts/$path_alert_id/enqueue', {'force': force}); + responseHandler, '/alerts/$pathAlertId/enqueue', {'force': force}); } // #endregion Alert: Alert @@ -268,16 +265,16 @@ class LookerSDK extends APIMethods { { /// @param {String} client_id client_id part of API3 Key. - String client_id, + String clientId, /// @param {String} client_secret client_secret part of API3 Key. - String client_secret}) async { + String clientSecret}) async { AccessToken responseHandler(dynamic json, String contentType) { return AccessToken.fromResponse(json, contentType); } return post(responseHandler, '/login', - {'client_id': client_id, 'client_secret': client_secret}); + {'client_id': clientId, 'client_secret': clientSecret}); } /// ### Create an access token that runs as a given user. @@ -298,22 +295,22 @@ class LookerSDK extends APIMethods { /// See 'login' for more detail on the access token and how to use it. /// /// POST /login/{user_id} -> AccessToken - Future> login_user( + Future> loginUser( /// @param {int} user_id Id of user. - int user_id, + int userId, { /// @param {bool} associative When true (default), API calls using the returned access_token are attributed to the admin user who created the access_token. When false, API activity is attributed to the user the access_token runs as. False requires a looker license. bool associative}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); AccessToken responseHandler(dynamic json, String contentType) { return AccessToken.fromResponse(json, contentType); } return post( - responseHandler, '/login/$path_user_id', {'associative': associative}); + responseHandler, '/login/$pathUserId', {'associative': associative}); } /// ### Logout of the API and invalidate the current access token. @@ -336,7 +333,7 @@ class LookerSDK extends APIMethods { /// The value of the `secret` field will be set by Looker and returned. /// /// POST /embed_config/secrets -> EmbedSecret - Future> create_embed_secret( + Future> createEmbedSecret( { /// @param {WriteEmbedSecret} body @@ -345,25 +342,23 @@ class LookerSDK extends APIMethods { return EmbedSecret.fromResponse(json, contentType); } - return post(responseHandler, '/embed_config/secrets', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/embed_config/secrets', null, body?.toJson()); } /// ### Delete an embed secret. /// /// DELETE /embed_config/secrets/{embed_secret_id} -> String - Future> delete_embed_secret( + Future> deleteEmbedSecret( /// @param {int} embed_secret_id Id of Embed Secret - int embed_secret_id) async { - var path_embed_secret_id = encodeParam(embed_secret_id); + int embedSecretId) async { + var pathEmbedSecretId = encodeParam(embedSecretId); String responseHandler(dynamic json, String contentType) { return json; } - return delete( - responseHandler, '/embed_config/secrets/$path_embed_secret_id'); + return delete(responseHandler, '/embed_config/secrets/$pathEmbedSecretId'); } /// ### Create SSO Embed URL @@ -402,7 +397,7 @@ class LookerSDK extends APIMethods { /// encrypted transport. /// /// POST /embed/sso_url -> EmbedUrlResponse - Future> create_sso_embed_url( + Future> createSsoEmbedUrl( /// @param {EmbedSsoParams} body EmbedSsoParams body) async { @@ -410,8 +405,7 @@ class LookerSDK extends APIMethods { return EmbedUrlResponse.fromResponse(json, contentType); } - return post(responseHandler, '/embed/sso_url', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/embed/sso_url', null, body?.toJson()); } /// ### Create an Embed URL @@ -441,7 +435,7 @@ class LookerSDK extends APIMethods { /// encrypted transport. /// /// POST /embed/token_url/me -> EmbedUrlResponse - Future> create_embed_url_as_me( + Future> createEmbedUrlAsMe( /// @param {EmbedParams} body EmbedParams body) async { @@ -449,8 +443,7 @@ class LookerSDK extends APIMethods { return EmbedUrlResponse.fromResponse(json, contentType); } - return post(responseHandler, '/embed/token_url/me', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/embed/token_url/me', null, body?.toJson()); } /// ### Get the LDAP configuration. @@ -471,7 +464,7 @@ class LookerSDK extends APIMethods { /// See the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information. /// /// GET /ldap_config -> LDAPConfig - Future> ldap_config() async { + Future> ldapConfig() async { LDAPConfig responseHandler(dynamic json, String contentType) { return LDAPConfig.fromResponse(json, contentType); } @@ -492,7 +485,7 @@ class LookerSDK extends APIMethods { /// See the [Looker LDAP docs](https://www.looker.com/docs/r/api/ldap_setup) for additional information. /// /// PATCH /ldap_config -> LDAPConfig - Future> update_ldap_config( + Future> updateLdapConfig( /// @param {WriteLDAPConfig} body WriteLDAPConfig body) async { @@ -500,8 +493,7 @@ class LookerSDK extends APIMethods { return LDAPConfig.fromResponse(json, contentType); } - return patch(responseHandler, '/ldap_config', null, - body == null ? null : body.toJson()); + return patch(responseHandler, '/ldap_config', null, body?.toJson()); } /// ### Test the connection settings for an LDAP configuration. @@ -524,7 +516,7 @@ class LookerSDK extends APIMethods { /// The active LDAP settings are not modified. /// /// PUT /ldap_config/test_connection -> LDAPConfigTestResult - Future> test_ldap_config_connection( + Future> testLdapConfigConnection( /// @param {WriteLDAPConfig} body WriteLDAPConfig body) async { @@ -532,8 +524,8 @@ class LookerSDK extends APIMethods { return LDAPConfigTestResult.fromResponse(json, contentType); } - return put(responseHandler, '/ldap_config/test_connection', null, - body == null ? null : body.toJson()); + return put( + responseHandler, '/ldap_config/test_connection', null, body?.toJson()); } /// ### Test the connection authentication settings for an LDAP configuration. @@ -558,7 +550,7 @@ class LookerSDK extends APIMethods { /// The active LDAP settings are not modified. /// /// PUT /ldap_config/test_auth -> LDAPConfigTestResult - Future> test_ldap_config_auth( + Future> testLdapConfigAuth( /// @param {WriteLDAPConfig} body WriteLDAPConfig body) async { @@ -566,8 +558,7 @@ class LookerSDK extends APIMethods { return LDAPConfigTestResult.fromResponse(json, contentType); } - return put(responseHandler, '/ldap_config/test_auth', null, - body == null ? null : body.toJson()); + return put(responseHandler, '/ldap_config/test_auth', null, body?.toJson()); } /// ### Test the user authentication settings for an LDAP configuration without authenticating the user. @@ -581,7 +572,7 @@ class LookerSDK extends APIMethods { /// The active LDAP settings are not modified. /// /// PUT /ldap_config/test_user_info -> LDAPConfigTestResult - Future> test_ldap_config_user_info( + Future> testLdapConfigUserInfo( /// @param {WriteLDAPConfig} body WriteLDAPConfig body) async { @@ -589,8 +580,8 @@ class LookerSDK extends APIMethods { return LDAPConfigTestResult.fromResponse(json, contentType); } - return put(responseHandler, '/ldap_config/test_user_info', null, - body == null ? null : body.toJson()); + return put( + responseHandler, '/ldap_config/test_user_info', null, body?.toJson()); } /// ### Test the user authentication settings for an LDAP configuration. @@ -604,7 +595,7 @@ class LookerSDK extends APIMethods { /// The active LDAP settings are not modified. /// /// PUT /ldap_config/test_user_auth -> LDAPConfigTestResult - Future> test_ldap_config_user_auth( + Future> testLdapConfigUserAuth( /// @param {WriteLDAPConfig} body WriteLDAPConfig body) async { @@ -612,8 +603,8 @@ class LookerSDK extends APIMethods { return LDAPConfigTestResult.fromResponse(json, contentType); } - return put(responseHandler, '/ldap_config/test_user_auth', null, - body == null ? null : body.toJson()); + return put( + responseHandler, '/ldap_config/test_user_auth', null, body?.toJson()); } /// ### List All OAuth Client Apps @@ -625,7 +616,7 @@ class LookerSDK extends APIMethods { /// has permission to see. /// /// GET /oauth_client_apps -> List - Future>> all_oauth_client_apps( + Future>> allOauthClientApps( { /// @param {String} fields Requested fields. @@ -645,21 +636,21 @@ class LookerSDK extends APIMethods { /// Returns the registered app client with matching client_guid. /// /// GET /oauth_client_apps/{client_guid} -> OauthClientApp - Future> oauth_client_app( + Future> oauthClientApp( /// @param {String} client_guid The unique id of this application - String client_guid, + String clientGuid, { /// @param {String} fields Requested fields. String fields}) async { - var path_client_guid = encodeParam(client_guid); + var pathClientGuid = encodeParam(clientGuid); OauthClientApp responseHandler(dynamic json, String contentType) { return OauthClientApp.fromResponse(json, contentType); } - return get(responseHandler, '/oauth_client_apps/$path_client_guid', + return get(responseHandler, '/oauth_client_apps/$pathClientGuid', {'fields': fields}); } @@ -671,10 +662,10 @@ class LookerSDK extends APIMethods { /// the app details registered with the Looker instance, the request is assumed to be a forgery and is rejected. /// /// POST /oauth_client_apps/{client_guid} -> OauthClientApp - Future> register_oauth_client_app( + Future> registerOauthClientApp( /// @param {String} client_guid The unique id of this application - String client_guid, + String clientGuid, /// @param {WriteOauthClientApp} body WriteOauthClientApp body, @@ -682,14 +673,14 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_client_guid = encodeParam(client_guid); + var pathClientGuid = encodeParam(clientGuid); OauthClientApp responseHandler(dynamic json, String contentType) { return OauthClientApp.fromResponse(json, contentType); } - return post(responseHandler, '/oauth_client_apps/$path_client_guid', - {'fields': fields}, body == null ? null : body.toJson()); + return post(responseHandler, '/oauth_client_apps/$pathClientGuid', + {'fields': fields}, body?.toJson()); } /// ### Update OAuth2 Client App Details @@ -697,10 +688,10 @@ class LookerSDK extends APIMethods { /// Modifies the details a previously registered OAuth2 login client app. /// /// PATCH /oauth_client_apps/{client_guid} -> OauthClientApp - Future> update_oauth_client_app( + Future> updateOauthClientApp( /// @param {String} client_guid The unique id of this application - String client_guid, + String clientGuid, /// @param {WriteOauthClientApp} body WriteOauthClientApp body, @@ -708,14 +699,14 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_client_guid = encodeParam(client_guid); + var pathClientGuid = encodeParam(clientGuid); OauthClientApp responseHandler(dynamic json, String contentType) { return OauthClientApp.fromResponse(json, contentType); } - return patch(responseHandler, '/oauth_client_apps/$path_client_guid', - {'fields': fields}, body == null ? null : body.toJson()); + return patch(responseHandler, '/oauth_client_apps/$pathClientGuid', + {'fields': fields}, body?.toJson()); } /// ### Delete OAuth Client App @@ -726,17 +717,17 @@ class LookerSDK extends APIMethods { /// ### Note: this deletion cannot be undone. /// /// DELETE /oauth_client_apps/{client_guid} -> String - Future> delete_oauth_client_app( + Future> deleteOauthClientApp( /// @param {String} client_guid The unique id of this application - String client_guid) async { - var path_client_guid = encodeParam(client_guid); + String clientGuid) async { + var pathClientGuid = encodeParam(clientGuid); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/oauth_client_apps/$path_client_guid'); + return delete(responseHandler, '/oauth_client_apps/$pathClientGuid'); } /// ### Invalidate All Issued Tokens @@ -745,18 +736,17 @@ class LookerSDK extends APIMethods { /// this app for ALL USERS of this app. /// /// DELETE /oauth_client_apps/{client_guid}/tokens -> String - Future> invalidate_tokens( + Future> invalidateTokens( /// @param {String} client_guid The unique id of the application - String client_guid) async { - var path_client_guid = encodeParam(client_guid); + String clientGuid) async { + var pathClientGuid = encodeParam(clientGuid); String responseHandler(dynamic json, String contentType) { return json; } - return delete( - responseHandler, '/oauth_client_apps/$path_client_guid/tokens'); + return delete(responseHandler, '/oauth_client_apps/$pathClientGuid/tokens'); } /// ### Activate an app for a user @@ -768,19 +758,19 @@ class LookerSDK extends APIMethods { /// Activating a user for an app that the user is already activated with returns a success response. /// /// POST /oauth_client_apps/{client_guid}/users/{user_id} -> String - Future> activate_app_user( + Future> activateAppUser( /// @param {String} client_guid The unique id of this application - String client_guid, + String clientGuid, /// @param {int} user_id The id of the user to enable use of this app - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_client_guid = encodeParam(client_guid); - var path_user_id = encodeParam(user_id); + var pathClientGuid = encodeParam(clientGuid); + var pathUserId = encodeParam(userId); dynamic responseHandler(dynamic json, String contentType) { return json; @@ -788,7 +778,7 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/oauth_client_apps/$path_client_guid/users/$path_user_id', + '/oauth_client_apps/$pathClientGuid/users/$pathUserId', {'fields': fields}); } @@ -804,19 +794,19 @@ class LookerSDK extends APIMethods { /// resource (app or user) does not exist or has already been deactivated. /// /// DELETE /oauth_client_apps/{client_guid}/users/{user_id} -> String - Future> deactivate_app_user( + Future> deactivateAppUser( /// @param {String} client_guid The unique id of this application - String client_guid, + String clientGuid, /// @param {int} user_id The id of the user to enable use of this app - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_client_guid = encodeParam(client_guid); - var path_user_id = encodeParam(user_id); + var pathClientGuid = encodeParam(clientGuid); + var pathUserId = encodeParam(userId); String responseHandler(dynamic json, String contentType) { return json; @@ -824,7 +814,7 @@ class LookerSDK extends APIMethods { return delete( responseHandler, - '/oauth_client_apps/$path_client_guid/users/$path_user_id', + '/oauth_client_apps/$pathClientGuid/users/$pathUserId', {'fields': fields}); } @@ -842,7 +832,7 @@ class LookerSDK extends APIMethods { /// OIDC is enabled or disabled for Looker using the **enabled** field. /// /// GET /oidc_config -> OIDCConfig - Future> oidc_config() async { + Future> oidcConfig() async { OIDCConfig responseHandler(dynamic json, String contentType) { return OIDCConfig.fromResponse(json, contentType); } @@ -861,7 +851,7 @@ class LookerSDK extends APIMethods { /// It is **highly** recommended that any OIDC setting changes be tested using the APIs below before being set globally. /// /// PATCH /oidc_config -> OIDCConfig - Future> update_oidc_config( + Future> updateOidcConfig( /// @param {WriteOIDCConfig} body WriteOIDCConfig body) async { @@ -869,46 +859,45 @@ class LookerSDK extends APIMethods { return OIDCConfig.fromResponse(json, contentType); } - return patch(responseHandler, '/oidc_config', null, - body == null ? null : body.toJson()); + return patch(responseHandler, '/oidc_config', null, body?.toJson()); } /// ### Get a OIDC test configuration by test_slug. /// /// GET /oidc_test_configs/{test_slug} -> OIDCConfig - Future> oidc_test_config( + Future> oidcTestConfig( /// @param {String} test_slug Slug of test config - String test_slug) async { - var path_test_slug = encodeParam(test_slug); + String testSlug) async { + var pathTestSlug = encodeParam(testSlug); OIDCConfig responseHandler(dynamic json, String contentType) { return OIDCConfig.fromResponse(json, contentType); } - return get(responseHandler, '/oidc_test_configs/$path_test_slug'); + return get(responseHandler, '/oidc_test_configs/$pathTestSlug'); } /// ### Delete a OIDC test configuration. /// /// DELETE /oidc_test_configs/{test_slug} -> String - Future> delete_oidc_test_config( + Future> deleteOidcTestConfig( /// @param {String} test_slug Slug of test config - String test_slug) async { - var path_test_slug = encodeParam(test_slug); + String testSlug) async { + var pathTestSlug = encodeParam(testSlug); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/oidc_test_configs/$path_test_slug'); + return delete(responseHandler, '/oidc_test_configs/$pathTestSlug'); } /// ### Create a OIDC test configuration. /// /// POST /oidc_test_configs -> OIDCConfig - Future> create_oidc_test_config( + Future> createOidcTestConfig( /// @param {WriteOIDCConfig} body WriteOIDCConfig body) async { @@ -916,14 +905,13 @@ class LookerSDK extends APIMethods { return OIDCConfig.fromResponse(json, contentType); } - return post(responseHandler, '/oidc_test_configs', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/oidc_test_configs', null, body?.toJson()); } /// ### Get password config. /// /// GET /password_config -> PasswordConfig - Future> password_config() async { + Future> passwordConfig() async { PasswordConfig responseHandler(dynamic json, String contentType) { return PasswordConfig.fromResponse(json, contentType); } @@ -934,7 +922,7 @@ class LookerSDK extends APIMethods { /// ### Update password config. /// /// PATCH /password_config -> PasswordConfig - Future> update_password_config( + Future> updatePasswordConfig( /// @param {WritePasswordConfig} body WritePasswordConfig body) async { @@ -942,15 +930,13 @@ class LookerSDK extends APIMethods { return PasswordConfig.fromResponse(json, contentType); } - return patch(responseHandler, '/password_config', null, - body == null ? null : body.toJson()); + return patch(responseHandler, '/password_config', null, body?.toJson()); } /// ### Force all credentials_email users to reset their login passwords upon their next login. /// /// PUT /password_config/force_password_reset_at_next_login_for_all_users -> String - Future> - force_password_reset_at_next_login_for_all_users() async { + Future> forcePasswordResetAtNextLoginForAllUsers() async { String responseHandler(dynamic json, String contentType) { return json; } @@ -973,7 +959,7 @@ class LookerSDK extends APIMethods { /// SAML is enabled or disabled for Looker using the **enabled** field. /// /// GET /saml_config -> SamlConfig - Future> saml_config() async { + Future> samlConfig() async { SamlConfig responseHandler(dynamic json, String contentType) { return SamlConfig.fromResponse(json, contentType); } @@ -992,7 +978,7 @@ class LookerSDK extends APIMethods { /// It is **highly** recommended that any SAML setting changes be tested using the APIs below before being set globally. /// /// PATCH /saml_config -> SamlConfig - Future> update_saml_config( + Future> updateSamlConfig( /// @param {WriteSamlConfig} body WriteSamlConfig body) async { @@ -1000,46 +986,45 @@ class LookerSDK extends APIMethods { return SamlConfig.fromResponse(json, contentType); } - return patch(responseHandler, '/saml_config', null, - body == null ? null : body.toJson()); + return patch(responseHandler, '/saml_config', null, body?.toJson()); } /// ### Get a SAML test configuration by test_slug. /// /// GET /saml_test_configs/{test_slug} -> SamlConfig - Future> saml_test_config( + Future> samlTestConfig( /// @param {String} test_slug Slug of test config - String test_slug) async { - var path_test_slug = encodeParam(test_slug); + String testSlug) async { + var pathTestSlug = encodeParam(testSlug); SamlConfig responseHandler(dynamic json, String contentType) { return SamlConfig.fromResponse(json, contentType); } - return get(responseHandler, '/saml_test_configs/$path_test_slug'); + return get(responseHandler, '/saml_test_configs/$pathTestSlug'); } /// ### Delete a SAML test configuration. /// /// DELETE /saml_test_configs/{test_slug} -> String - Future> delete_saml_test_config( + Future> deleteSamlTestConfig( /// @param {String} test_slug Slug of test config - String test_slug) async { - var path_test_slug = encodeParam(test_slug); + String testSlug) async { + var pathTestSlug = encodeParam(testSlug); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/saml_test_configs/$path_test_slug'); + return delete(responseHandler, '/saml_test_configs/$pathTestSlug'); } /// ### Create a SAML test configuration. /// /// POST /saml_test_configs -> SamlConfig - Future> create_saml_test_config( + Future> createSamlTestConfig( /// @param {WriteSamlConfig} body WriteSamlConfig body) async { @@ -1047,14 +1032,13 @@ class LookerSDK extends APIMethods { return SamlConfig.fromResponse(json, contentType); } - return post(responseHandler, '/saml_test_configs', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/saml_test_configs', null, body?.toJson()); } /// ### Parse the given xml as a SAML IdP metadata document and return the result. /// /// POST /parse_saml_idp_metadata -> SamlMetadataParseResult - Future> parse_saml_idp_metadata( + Future> parseSamlIdpMetadata( /// @param {String} body String body) async { @@ -1070,11 +1054,10 @@ class LookerSDK extends APIMethods { /// can fetch it without requiring any special authentication. /// /// POST /fetch_and_parse_saml_idp_metadata -> SamlMetadataParseResult - Future> - fetch_and_parse_saml_idp_metadata( + Future> fetchAndParseSamlIdpMetadata( - /// @param {String} body - String body) async { + /// @param {String} body + String body) async { SamlMetadataParseResult responseHandler(dynamic json, String contentType) { return SamlMetadataParseResult.fromResponse(json, contentType); } @@ -1086,7 +1069,7 @@ class LookerSDK extends APIMethods { /// ### Get session config. /// /// GET /session_config -> SessionConfig - Future> session_config() async { + Future> sessionConfig() async { SessionConfig responseHandler(dynamic json, String contentType) { return SessionConfig.fromResponse(json, contentType); } @@ -1097,7 +1080,7 @@ class LookerSDK extends APIMethods { /// ### Update session config. /// /// PATCH /session_config -> SessionConfig - Future> update_session_config( + Future> updateSessionConfig( /// @param {WriteSessionConfig} body WriteSessionConfig body) async { @@ -1105,8 +1088,7 @@ class LookerSDK extends APIMethods { return SessionConfig.fromResponse(json, contentType); } - return patch(responseHandler, '/session_config', null, - body == null ? null : body.toJson()); + return patch(responseHandler, '/session_config', null, body?.toJson()); } /// ### Get Support Access Allowlist Users @@ -1115,7 +1097,7 @@ class LookerSDK extends APIMethods { /// /// GET /support_access/allowlist -> List Future>> - get_support_access_allowlist_entries( + getSupportAccessAllowlistEntries( { /// @param {String} fields Requested fields. @@ -1138,7 +1120,7 @@ class LookerSDK extends APIMethods { /// /// POST /support_access/allowlist -> List Future>> - add_support_access_allowlist_entries( + addSupportAccessAllowlistEntries( /// @param {SupportAccessAddEntries} body SupportAccessAddEntries body) async { @@ -1150,8 +1132,8 @@ class LookerSDK extends APIMethods { .toList(); } - return post(responseHandler, '/support_access/allowlist', null, - body == null ? null : body.toJson()); + return post( + responseHandler, '/support_access/allowlist', null, body?.toJson()); } /// ### Delete Support Access Allowlist User @@ -1159,17 +1141,17 @@ class LookerSDK extends APIMethods { /// Deletes the specified Allowlist Entry Id /// /// DELETE /support_access/allowlist/{entry_id} -> String - Future> delete_support_access_allowlist_entry( + Future> deleteSupportAccessAllowlistEntry( /// @param {String} entry_id Id of Allowlist Entry - String entry_id) async { - var path_entry_id = encodeParam(entry_id); + String entryId) async { + var pathEntryId = encodeParam(entryId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/support_access/allowlist/$path_entry_id'); + return delete(responseHandler, '/support_access/allowlist/$pathEntryId'); } /// ### Enable Support Access @@ -1177,7 +1159,7 @@ class LookerSDK extends APIMethods { /// Enables Support Access for the provided duration /// /// PUT /support_access/enable -> SupportAccessStatus - Future> enable_support_access( + Future> enableSupportAccess( /// @param {SupportAccessEnable} body SupportAccessEnable body) async { @@ -1185,8 +1167,7 @@ class LookerSDK extends APIMethods { return SupportAccessStatus.fromResponse(json, contentType); } - return put(responseHandler, '/support_access/enable', null, - body == null ? null : body.toJson()); + return put(responseHandler, '/support_access/enable', null, body?.toJson()); } /// ### Disable Support Access @@ -1194,7 +1175,7 @@ class LookerSDK extends APIMethods { /// Disables Support Access immediately /// /// PUT /support_access/disable -> SupportAccessStatus - Future> disable_support_access() async { + Future> disableSupportAccess() async { SupportAccessStatus responseHandler(dynamic json, String contentType) { return SupportAccessStatus.fromResponse(json, contentType); } @@ -1207,7 +1188,7 @@ class LookerSDK extends APIMethods { /// Returns the current Support Access Status /// /// GET /support_access/status -> SupportAccessStatus - Future> support_access_status() async { + Future> supportAccessStatus() async { SupportAccessStatus responseHandler(dynamic json, String contentType) { return SupportAccessStatus.fromResponse(json, contentType); } @@ -1218,7 +1199,7 @@ class LookerSDK extends APIMethods { /// ### Get currently locked-out users. /// /// GET /user_login_lockouts -> List - Future>> all_user_login_lockouts( + Future>> allUserLoginLockouts( { /// @param {String} fields Include only these fields in the response @@ -1236,7 +1217,7 @@ class LookerSDK extends APIMethods { /// ### Search currently locked-out users. /// /// GET /user_login_lockouts/search -> List - Future>> search_user_login_lockouts( + Future>> searchUserLoginLockouts( { /// @param {String} fields Include only these fields in the response @@ -1246,25 +1227,25 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page Return N rows of data per page - int per_page, + int perPage, /// @param {String} sorts Fields to sort by. String sorts, /// @param {String} auth_type Auth type user is locked out for (email, ldap, totp, api) - String auth_type, + String authType, /// @param {String} full_name Match name - String full_name, + String fullName, /// @param {String} email Match email String email, /// @param {String} remote_id Match remote LDAP ID - String remote_id, + String remoteId, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json .map( @@ -1275,30 +1256,30 @@ class LookerSDK extends APIMethods { return get(responseHandler, '/user_login_lockouts/search', { 'fields': fields, 'page': page, - 'per_page': per_page, + 'per_page': perPage, 'sorts': sorts, - 'auth_type': auth_type, - 'full_name': full_name, + 'auth_type': authType, + 'full_name': fullName, 'email': email, - 'remote_id': remote_id, - 'filter_or': filter_or + 'remote_id': remoteId, + 'filter_or': filterOr }); } /// ### Removes login lockout for the associated user. /// /// DELETE /user_login_lockout/{key} -> String - Future> delete_user_login_lockout( + Future> deleteUserLoginLockout( /// @param {String} key The key associated with the locked user String key) async { - var path_key = encodeParam(key); + var pathKey = encodeParam(key); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/user_login_lockout/$path_key'); + return delete(responseHandler, '/user_login_lockout/$pathKey'); } // #endregion Auth: Manage User Authentication Configuration @@ -1308,7 +1289,7 @@ class LookerSDK extends APIMethods { /// ### Get information about all boards. /// /// GET /boards -> List - Future>> all_boards( + Future>> allBoards( { /// @param {String} fields Requested fields. @@ -1325,7 +1306,7 @@ class LookerSDK extends APIMethods { /// ### Create a new board. /// /// POST /boards -> Board - Future> create_board( + Future> createBoard( /// @param {WriteBoard} body WriteBoard body, @@ -1337,8 +1318,7 @@ class LookerSDK extends APIMethods { return Board.fromResponse(json, contentType); } - return post(responseHandler, '/boards', {'fields': fields}, - body == null ? null : body.toJson()); + return post(responseHandler, '/boards', {'fields': fields}, body?.toJson()); } /// ### Search Boards @@ -1365,20 +1345,20 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /boards/search -> List - Future>> search_boards( + Future>> searchBoards( { /// @param {String} title Matches board title. String title, /// @param {String} created_at Matches the timestamp for when the board was created. - String created_at, + String createdAt, /// @param {String} first_name The first name of the user who created this board. - String first_name, + String firstName, /// @param {String} last_name The last name of the user who created this board. - String last_name, + String lastName, /// @param {String} fields Requested fields. String fields, @@ -1387,7 +1367,7 @@ class LookerSDK extends APIMethods { bool favorited, /// @param {String} creator_id Filter on boards created by a particular user. - String creator_id, + String creatorId, /// @param {String} sorts The fields to sort the results by String sorts, @@ -1396,7 +1376,7 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page The number of items in the returned page. - int per_page, + int perPage, /// @param {int} offset The number of items to skip before returning any. (used with limit and takes priority over page and per_page) int offset, @@ -1405,7 +1385,7 @@ class LookerSDK extends APIMethods { int limit, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Board.fromResponse(i, contentType)) @@ -1414,18 +1394,18 @@ class LookerSDK extends APIMethods { return get(responseHandler, '/boards/search', { 'title': title, - 'created_at': created_at, - 'first_name': first_name, - 'last_name': last_name, + 'created_at': createdAt, + 'first_name': firstName, + 'last_name': lastName, 'fields': fields, 'favorited': favorited, - 'creator_id': creator_id, + 'creator_id': creatorId, 'sorts': sorts, 'page': page, - 'per_page': per_page, + 'per_page': perPage, 'offset': offset, 'limit': limit, - 'filter_or': filter_or + 'filter_or': filterOr }); } @@ -1435,27 +1415,27 @@ class LookerSDK extends APIMethods { Future> board( /// @param {int} board_id Id of board - int board_id, + int boardId, { /// @param {String} fields Requested fields. String fields}) async { - var path_board_id = encodeParam(board_id); + var pathBoardId = encodeParam(boardId); Board responseHandler(dynamic json, String contentType) { return Board.fromResponse(json, contentType); } - return get(responseHandler, '/boards/$path_board_id', {'fields': fields}); + return get(responseHandler, '/boards/$pathBoardId', {'fields': fields}); } /// ### Update a board definition. /// /// PATCH /boards/{board_id} -> Board - Future> update_board( + Future> updateBoard( /// @param {int} board_id Id of board - int board_id, + int boardId, /// @param {WriteBoard} body WriteBoard body, @@ -1463,36 +1443,36 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_board_id = encodeParam(board_id); + var pathBoardId = encodeParam(boardId); Board responseHandler(dynamic json, String contentType) { return Board.fromResponse(json, contentType); } - return patch(responseHandler, '/boards/$path_board_id', {'fields': fields}, - body == null ? null : body.toJson()); + return patch(responseHandler, '/boards/$pathBoardId', {'fields': fields}, + body?.toJson()); } /// ### Delete a board. /// /// DELETE /boards/{board_id} -> String - Future> delete_board( + Future> deleteBoard( /// @param {int} board_id Id of board - int board_id) async { - var path_board_id = encodeParam(board_id); + int boardId) async { + var pathBoardId = encodeParam(boardId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/boards/$path_board_id'); + return delete(responseHandler, '/boards/$pathBoardId'); } /// ### Get information about all board items. /// /// GET /board_items -> List - Future>> all_board_items( + Future>> allBoardItems( { /// @param {String} fields Requested fields. @@ -1502,24 +1482,21 @@ class LookerSDK extends APIMethods { String sorts, /// @param {String} board_section_id Filter to a specific board section - String board_section_id}) async { + String boardSectionId}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => BoardItem.fromResponse(i, contentType)) .toList(); } - return get(responseHandler, '/board_items', { - 'fields': fields, - 'sorts': sorts, - 'board_section_id': board_section_id - }); + return get(responseHandler, '/board_items', + {'fields': fields, 'sorts': sorts, 'board_section_id': boardSectionId}); } /// ### Create a new board item. /// /// POST /board_items -> BoardItem - Future> create_board_item( + Future> createBoardItem( /// @param {WriteBoardItem} body WriteBoardItem body, @@ -1531,38 +1508,38 @@ class LookerSDK extends APIMethods { return BoardItem.fromResponse(json, contentType); } - return post(responseHandler, '/board_items', {'fields': fields}, - body == null ? null : body.toJson()); + return post( + responseHandler, '/board_items', {'fields': fields}, body?.toJson()); } /// ### Get information about a board item. /// /// GET /board_items/{board_item_id} -> BoardItem - Future> board_item( + Future> boardItem( /// @param {int} board_item_id Id of board item - int board_item_id, + int boardItemId, { /// @param {String} fields Requested fields. String fields}) async { - var path_board_item_id = encodeParam(board_item_id); + var pathBoardItemId = encodeParam(boardItemId); BoardItem responseHandler(dynamic json, String contentType) { return BoardItem.fromResponse(json, contentType); } - return get(responseHandler, '/board_items/$path_board_item_id', - {'fields': fields}); + return get( + responseHandler, '/board_items/$pathBoardItemId', {'fields': fields}); } /// ### Update a board item definition. /// /// PATCH /board_items/{board_item_id} -> BoardItem - Future> update_board_item( + Future> updateBoardItem( /// @param {int} board_item_id Id of board item - int board_item_id, + int boardItemId, /// @param {WriteBoardItem} body WriteBoardItem body, @@ -1570,36 +1547,36 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_board_item_id = encodeParam(board_item_id); + var pathBoardItemId = encodeParam(boardItemId); BoardItem responseHandler(dynamic json, String contentType) { return BoardItem.fromResponse(json, contentType); } - return patch(responseHandler, '/board_items/$path_board_item_id', - {'fields': fields}, body == null ? null : body.toJson()); + return patch(responseHandler, '/board_items/$pathBoardItemId', + {'fields': fields}, body?.toJson()); } /// ### Delete a board item. /// /// DELETE /board_items/{board_item_id} -> String - Future> delete_board_item( + Future> deleteBoardItem( /// @param {int} board_item_id Id of board_item - int board_item_id) async { - var path_board_item_id = encodeParam(board_item_id); + int boardItemId) async { + var pathBoardItemId = encodeParam(boardItemId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/board_items/$path_board_item_id'); + return delete(responseHandler, '/board_items/$pathBoardItemId'); } /// ### Get information about all board sections. /// /// GET /board_sections -> List - Future>> all_board_sections( + Future>> allBoardSections( { /// @param {String} fields Requested fields. @@ -1620,7 +1597,7 @@ class LookerSDK extends APIMethods { /// ### Create a new board section. /// /// POST /board_sections -> BoardSection - Future> create_board_section( + Future> createBoardSection( /// @param {WriteBoardSection} body WriteBoardSection body, @@ -1632,38 +1609,38 @@ class LookerSDK extends APIMethods { return BoardSection.fromResponse(json, contentType); } - return post(responseHandler, '/board_sections', {'fields': fields}, - body == null ? null : body.toJson()); + return post( + responseHandler, '/board_sections', {'fields': fields}, body?.toJson()); } /// ### Get information about a board section. /// /// GET /board_sections/{board_section_id} -> BoardSection - Future> board_section( + Future> boardSection( /// @param {int} board_section_id Id of board section - int board_section_id, + int boardSectionId, { /// @param {String} fields Requested fields. String fields}) async { - var path_board_section_id = encodeParam(board_section_id); + var pathBoardSectionId = encodeParam(boardSectionId); BoardSection responseHandler(dynamic json, String contentType) { return BoardSection.fromResponse(json, contentType); } - return get(responseHandler, '/board_sections/$path_board_section_id', + return get(responseHandler, '/board_sections/$pathBoardSectionId', {'fields': fields}); } /// ### Update a board section definition. /// /// PATCH /board_sections/{board_section_id} -> BoardSection - Future> update_board_section( + Future> updateBoardSection( /// @param {int} board_section_id Id of board section - int board_section_id, + int boardSectionId, /// @param {WriteBoardSection} body WriteBoardSection body, @@ -1671,30 +1648,30 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_board_section_id = encodeParam(board_section_id); + var pathBoardSectionId = encodeParam(boardSectionId); BoardSection responseHandler(dynamic json, String contentType) { return BoardSection.fromResponse(json, contentType); } - return patch(responseHandler, '/board_sections/$path_board_section_id', - {'fields': fields}, body == null ? null : body.toJson()); + return patch(responseHandler, '/board_sections/$pathBoardSectionId', + {'fields': fields}, body?.toJson()); } /// ### Delete a board section. /// /// DELETE /board_sections/{board_section_id} -> String - Future> delete_board_section( + Future> deleteBoardSection( /// @param {int} board_section_id Id of board section - int board_section_id) async { - var path_board_section_id = encodeParam(board_section_id); + int boardSectionId) async { + var pathBoardSectionId = encodeParam(boardSectionId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/board_sections/$path_board_section_id'); + return delete(responseHandler, '/board_sections/$pathBoardSectionId'); } // #endregion Board: Manage Boards @@ -1711,7 +1688,7 @@ class LookerSDK extends APIMethods { /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. /// /// GET /color_collections -> List - Future>> all_color_collections( + Future>> allColorCollections( { /// @param {String} fields Requested fields. @@ -1737,7 +1714,7 @@ class LookerSDK extends APIMethods { /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. /// /// POST /color_collections -> ColorCollection - Future> create_color_collection( + Future> createColorCollection( /// @param {WriteColorCollection} body WriteColorCollection body) async { @@ -1745,8 +1722,7 @@ class LookerSDK extends APIMethods { return ColorCollection.fromResponse(json, contentType); } - return post(responseHandler, '/color_collections', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/color_collections', null, body?.toJson()); } /// ### Get an array of all existing **Custom** Color Collections @@ -1757,7 +1733,7 @@ class LookerSDK extends APIMethods { /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. /// /// GET /color_collections/custom -> List - Future>> color_collections_custom( + Future>> colorCollectionsCustom( { /// @param {String} fields Requested fields. @@ -1781,7 +1757,7 @@ class LookerSDK extends APIMethods { /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. /// /// GET /color_collections/standard -> List - Future>> color_collections_standard( + Future>> colorCollectionsStandard( { /// @param {String} fields Requested fields. @@ -1804,7 +1780,7 @@ class LookerSDK extends APIMethods { /// Set the default color collection with [ColorCollection](#!/ColorCollection/set_default_color_collection) /// /// GET /color_collections/default -> ColorCollection - Future> default_color_collection() async { + Future> defaultColorCollection() async { ColorCollection responseHandler(dynamic json, String contentType) { return ColorCollection.fromResponse(json, contentType); } @@ -1818,16 +1794,16 @@ class LookerSDK extends APIMethods { /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. /// /// PUT /color_collections/default -> ColorCollection - Future> set_default_color_collection( + Future> setDefaultColorCollection( /// @param {String} collection_id ID of color collection to set as default - String collection_id) async { + String collectionId) async { ColorCollection responseHandler(dynamic json, String contentType) { return ColorCollection.fromResponse(json, contentType); } return put(responseHandler, '/color_collections/default', - {'collection_id': collection_id}); + {'collection_id': collectionId}); } /// ### Get a Color Collection by ID @@ -1842,21 +1818,21 @@ class LookerSDK extends APIMethods { /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. /// /// GET /color_collections/{collection_id} -> ColorCollection - Future> color_collection( + Future> colorCollection( /// @param {String} collection_id Id of Color Collection - String collection_id, + String collectionId, { /// @param {String} fields Requested fields. String fields}) async { - var path_collection_id = encodeParam(collection_id); + var pathCollectionId = encodeParam(collectionId); ColorCollection responseHandler(dynamic json, String contentType) { return ColorCollection.fromResponse(json, contentType); } - return get(responseHandler, '/color_collections/$path_collection_id', + return get(responseHandler, '/color_collections/$pathCollectionId', {'fields': fields}); } @@ -1864,21 +1840,21 @@ class LookerSDK extends APIMethods { /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. /// /// PATCH /color_collections/{collection_id} -> ColorCollection - Future> update_color_collection( + Future> updateColorCollection( /// @param {String} collection_id Id of Custom Color Collection - String collection_id, + String collectionId, /// @param {WriteColorCollection} body WriteColorCollection body) async { - var path_collection_id = encodeParam(collection_id); + var pathCollectionId = encodeParam(collectionId); ColorCollection responseHandler(dynamic json, String contentType) { return ColorCollection.fromResponse(json, contentType); } - return patch(responseHandler, '/color_collections/$path_collection_id', - null, body == null ? null : body.toJson()); + return patch(responseHandler, '/color_collections/$pathCollectionId', null, + body?.toJson()); } /// ### Delete a custom color collection by id @@ -1891,17 +1867,17 @@ class LookerSDK extends APIMethods { /// **Note**: Only an API user with the Admin role can call this endpoint. Unauthorized requests will return `Not Found` (404) errors. /// /// DELETE /color_collections/{collection_id} -> String - Future> delete_color_collection( + Future> deleteColorCollection( /// @param {String} collection_id Id of Color Collection - String collection_id) async { - var path_collection_id = encodeParam(collection_id); + String collectionId) async { + var pathCollectionId = encodeParam(collectionId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/color_collections/$path_collection_id'); + return delete(responseHandler, '/color_collections/$pathCollectionId'); } // #endregion ColorCollection: Manage Color Collections @@ -1911,14 +1887,14 @@ class LookerSDK extends APIMethods { /// ### Get All Commands. /// /// GET /commands -> List - Future>> get_all_commands( + Future>> getAllCommands( { /// @param {String} content_id Id of the associated content. This must be accompanied with content_type. - String content_id, + String contentId, /// @param {String} content_type Type of the associated content. This must be accompanied with content_id. - String content_type, + String contentType, /// @param {int} limit Number of results to return. int limit}) async { @@ -1928,11 +1904,8 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/commands', { - 'content_id': content_id, - 'content_type': content_type, - 'limit': limit - }); + return get(responseHandler, '/commands', + {'content_id': contentId, 'content_type': contentType, 'limit': limit}); } /// ### Create a new command. @@ -1941,7 +1914,7 @@ class LookerSDK extends APIMethods { /// # /// /// POST /commands -> Command - Future> create_command( + Future> createCommand( /// @param {WriteCommand} body WriteCommand body) async { @@ -1949,8 +1922,7 @@ class LookerSDK extends APIMethods { return Command.fromResponse(json, contentType); } - return post(responseHandler, '/commands', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/commands', null, body?.toJson()); } /// ### Update an existing custom command. @@ -1958,34 +1930,34 @@ class LookerSDK extends APIMethods { /// # /// /// PATCH /commands/{command_id} -> Command - Future> update_command( + Future> updateCommand( /// @param {int} command_id ID of a command - int command_id, + int commandId, /// @param {UpdateCommand} body UpdateCommand body) async { - var path_command_id = encodeParam(command_id); + var pathCommandId = encodeParam(commandId); Command responseHandler(dynamic json, String contentType) { return Command.fromResponse(json, contentType); } - return patch(responseHandler, '/commands/$path_command_id', null, - body == null ? null : body.toJson()); + return patch( + responseHandler, '/commands/$pathCommandId', null, body?.toJson()); } /// ### Delete an existing custom command. /// /// DELETE /commands/{command_id} -> void - Future> delete_command( + Future> deleteCommand( /// @param {int} command_id ID of a command - int command_id) async { - var path_command_id = encodeParam(command_id); + int commandId) async { + var pathCommandId = encodeParam(commandId); void responseHandler(dynamic json, String contentType) {} - return delete(responseHandler, '/commands/$path_command_id'); + return delete(responseHandler, '/commands/$pathCommandId'); } // #endregion Command: Manage Commands @@ -1995,7 +1967,7 @@ class LookerSDK extends APIMethods { /// Get the current Cloud Storage Configuration. /// /// GET /cloud_storage -> BackupConfiguration - Future> cloud_storage_configuration() async { + Future> cloudStorageConfiguration() async { BackupConfiguration responseHandler(dynamic json, String contentType) { return BackupConfiguration.fromResponse(json, contentType); } @@ -2006,7 +1978,7 @@ class LookerSDK extends APIMethods { /// Update the current Cloud Storage Configuration. /// /// PATCH /cloud_storage -> BackupConfiguration - Future> update_cloud_storage_configuration( + Future> updateCloudStorageConfiguration( /// @param {WriteBackupConfiguration} body WriteBackupConfiguration body) async { @@ -2014,14 +1986,13 @@ class LookerSDK extends APIMethods { return BackupConfiguration.fromResponse(json, contentType); } - return patch(responseHandler, '/cloud_storage', null, - body == null ? null : body.toJson()); + return patch(responseHandler, '/cloud_storage', null, body?.toJson()); } /// ### Get the current status and content of custom welcome emails /// /// GET /custom_welcome_email -> CustomWelcomeEmail - Future> custom_welcome_email() async { + Future> customWelcomeEmail() async { CustomWelcomeEmail responseHandler(dynamic json, String contentType) { return CustomWelcomeEmail.fromResponse(json, contentType); } @@ -2032,29 +2003,26 @@ class LookerSDK extends APIMethods { /// Update custom welcome email setting and values. Optionally send a test email with the new content to the currently logged in user. /// /// PATCH /custom_welcome_email -> CustomWelcomeEmail - Future> update_custom_welcome_email( + Future> updateCustomWelcomeEmail( /// @param {CustomWelcomeEmail} body CustomWelcomeEmail body, { /// @param {bool} send_test_welcome_email If true a test email with the content from the request will be sent to the current user after saving - bool send_test_welcome_email}) async { + bool sendTestWelcomeEmail}) async { CustomWelcomeEmail responseHandler(dynamic json, String contentType) { return CustomWelcomeEmail.fromResponse(json, contentType); } - return patch( - responseHandler, - '/custom_welcome_email', - {'send_test_welcome_email': send_test_welcome_email}, - body == null ? null : body.toJson()); + return patch(responseHandler, '/custom_welcome_email', + {'send_test_welcome_email': sendTestWelcomeEmail}, body?.toJson()); } /// Requests to this endpoint will send a welcome email with the custom content provided in the body to the currently logged in user. /// /// PUT /custom_welcome_email_test -> WelcomeEmailTest - Future> update_custom_welcome_email_test( + Future> updateCustomWelcomeEmailTest( /// @param {WelcomeEmailTest} body WelcomeEmailTest body) async { @@ -2062,14 +2030,14 @@ class LookerSDK extends APIMethods { return WelcomeEmailTest.fromResponse(json, contentType); } - return put(responseHandler, '/custom_welcome_email_test', null, - body == null ? null : body.toJson()); + return put( + responseHandler, '/custom_welcome_email_test', null, body?.toJson()); } /// ### Retrieve the value for whether or not digest emails is enabled /// /// GET /digest_emails_enabled -> DigestEmails - Future> digest_emails_enabled() async { + Future> digestEmailsEnabled() async { DigestEmails responseHandler(dynamic json, String contentType) { return DigestEmails.fromResponse(json, contentType); } @@ -2080,7 +2048,7 @@ class LookerSDK extends APIMethods { /// ### Update the setting for enabling/disabling digest emails /// /// PATCH /digest_emails_enabled -> DigestEmails - Future> update_digest_emails_enabled( + Future> updateDigestEmailsEnabled( /// @param {DigestEmails} body DigestEmails body) async { @@ -2088,8 +2056,8 @@ class LookerSDK extends APIMethods { return DigestEmails.fromResponse(json, contentType); } - return patch(responseHandler, '/digest_emails_enabled', null, - body == null ? null : body.toJson()); + return patch( + responseHandler, '/digest_emails_enabled', null, body?.toJson()); } /// ### Trigger the generation of digest email records and send them to Looker's internal system. This does not send @@ -2097,7 +2065,7 @@ class LookerSDK extends APIMethods { /// Emails will be sent at a later time from Looker's internal system if the Digest Emails feature is enabled in settings. /// /// POST /digest_email_send -> DigestEmailSend - Future> create_digest_email_send() async { + Future> createDigestEmailSend() async { DigestEmailSend responseHandler(dynamic json, String contentType) { return DigestEmailSend.fromResponse(json, contentType); } @@ -2109,7 +2077,7 @@ class LookerSDK extends APIMethods { /// /// GET /internal_help_resources_content -> InternalHelpResourcesContent Future> - internal_help_resources_content() async { + internalHelpResourcesContent() async { InternalHelpResourcesContent responseHandler( dynamic json, String contentType) { return InternalHelpResourcesContent.fromResponse(json, contentType); @@ -2122,7 +2090,7 @@ class LookerSDK extends APIMethods { /// /// PATCH /internal_help_resources_content -> InternalHelpResourcesContent Future> - update_internal_help_resources_content( + updateInternalHelpResourcesContent( /// @param {WriteInternalHelpResourcesContent} body WriteInternalHelpResourcesContent body) async { @@ -2132,13 +2100,13 @@ class LookerSDK extends APIMethods { } return patch(responseHandler, '/internal_help_resources_content', null, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Get and set the options for internal help resources /// /// GET /internal_help_resources_enabled -> InternalHelpResources - Future> internal_help_resources() async { + Future> internalHelpResources() async { InternalHelpResources responseHandler(dynamic json, String contentType) { return InternalHelpResources.fromResponse(json, contentType); } @@ -2149,7 +2117,7 @@ class LookerSDK extends APIMethods { /// Update internal help resources settings /// /// PATCH /internal_help_resources -> InternalHelpResources - Future> update_internal_help_resources( + Future> updateInternalHelpResources( /// @param {WriteInternalHelpResources} body WriteInternalHelpResources body) async { @@ -2157,14 +2125,14 @@ class LookerSDK extends APIMethods { return InternalHelpResources.fromResponse(json, contentType); } - return patch(responseHandler, '/internal_help_resources', null, - body == null ? null : body.toJson()); + return patch( + responseHandler, '/internal_help_resources', null, body?.toJson()); } /// ### Get all legacy features. /// /// GET /legacy_features -> List - Future>> all_legacy_features() async { + Future>> allLegacyFeatures() async { List responseHandler(dynamic json, String contentType) { return json .map((i) => LegacyFeature.fromResponse(i, contentType)) @@ -2177,43 +2145,43 @@ class LookerSDK extends APIMethods { /// ### Get information about the legacy feature with a specific id. /// /// GET /legacy_features/{legacy_feature_id} -> LegacyFeature - Future> legacy_feature( + Future> legacyFeature( /// @param {String} legacy_feature_id id of legacy feature - String legacy_feature_id) async { - var path_legacy_feature_id = encodeParam(legacy_feature_id); + String legacyFeatureId) async { + var pathLegacyFeatureId = encodeParam(legacyFeatureId); LegacyFeature responseHandler(dynamic json, String contentType) { return LegacyFeature.fromResponse(json, contentType); } - return get(responseHandler, '/legacy_features/$path_legacy_feature_id'); + return get(responseHandler, '/legacy_features/$pathLegacyFeatureId'); } /// ### Update information about the legacy feature with a specific id. /// /// PATCH /legacy_features/{legacy_feature_id} -> LegacyFeature - Future> update_legacy_feature( + Future> updateLegacyFeature( /// @param {String} legacy_feature_id id of legacy feature - String legacy_feature_id, + String legacyFeatureId, /// @param {WriteLegacyFeature} body WriteLegacyFeature body) async { - var path_legacy_feature_id = encodeParam(legacy_feature_id); + var pathLegacyFeatureId = encodeParam(legacyFeatureId); LegacyFeature responseHandler(dynamic json, String contentType) { return LegacyFeature.fromResponse(json, contentType); } - return patch(responseHandler, '/legacy_features/$path_legacy_feature_id', - null, body == null ? null : body.toJson()); + return patch(responseHandler, '/legacy_features/$pathLegacyFeatureId', null, + body?.toJson()); } /// ### Get a list of locales that Looker supports. /// /// GET /locales -> List - Future>> all_locales() async { + Future>> allLocales() async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Locale.fromResponse(i, contentType)) @@ -2226,7 +2194,7 @@ class LookerSDK extends APIMethods { /// ### Get all mobile settings. /// /// GET /mobile/settings -> MobileSettings - Future> mobile_settings() async { + Future> mobileSettings() async { MobileSettings responseHandler(dynamic json, String contentType) { return MobileSettings.fromResponse(json, contentType); } @@ -2244,7 +2212,7 @@ class LookerSDK extends APIMethods { /// - custom_welcome_email /// /// GET /setting -> Setting - Future> get_setting( + Future> getSetting( { /// @param {String} fields Requested fields @@ -2268,7 +2236,7 @@ class LookerSDK extends APIMethods { /// See the `Setting` type for more information on the specific values that can be configured. /// /// PATCH /setting -> Setting - Future> set_setting( + Future> setSetting( /// @param {WriteSetting} body WriteSetting body, @@ -2280,14 +2248,14 @@ class LookerSDK extends APIMethods { return Setting.fromResponse(json, contentType); } - return patch(responseHandler, '/setting', {'fields': fields}, - body == null ? null : body.toJson()); + return patch( + responseHandler, '/setting', {'fields': fields}, body?.toJson()); } /// ### Get current SMTP status. /// /// GET /smtp_status -> SmtpStatus - Future> smtp_status( + Future> smtpStatus( { /// @param {String} fields Include only these fields in the response @@ -2302,7 +2270,7 @@ class LookerSDK extends APIMethods { /// ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). /// /// GET /timezones -> List - Future>> all_timezones() async { + Future>> allTimezones() async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Timezone.fromResponse(i, contentType)) @@ -2332,29 +2300,28 @@ class LookerSDK extends APIMethods { /// The specification is returned as a JSON document in Swagger 2.x format /// /// GET /api_spec/{api_version}/{specification} -> dynamic - Future> api_spec( + Future> apiSpec( /// @param {String} api_version API version - String api_version, + String apiVersion, /// @param {String} specification Specification name. Typically, this is "swagger.json" String specification) async { - var path_api_version = encodeParam(api_version); - var path_specification = encodeParam(specification); + var pathApiVersion = encodeParam(apiVersion); + var pathSpecification = encodeParam(specification); dynamic responseHandler(dynamic json, String contentType) { return json; } - return get( - responseHandler, '/api_spec/$path_api_version/$path_specification'); + return get(responseHandler, '/api_spec/$pathApiVersion/$pathSpecification'); } /// ### This feature is enabled only by special license. /// ### Gets the whitelabel configuration, which includes hiding documentation links, custom favicon uploading, etc. /// /// GET /whitelabel_configuration -> WhitelabelConfiguration - Future> whitelabel_configuration( + Future> whitelabelConfiguration( { /// @param {String} fields Requested fields. @@ -2370,7 +2337,7 @@ class LookerSDK extends APIMethods { /// ### Update the whitelabel configuration /// /// PUT /whitelabel_configuration -> WhitelabelConfiguration - Future> update_whitelabel_configuration( + Future> updateWhitelabelConfiguration( /// @param {WriteWhitelabelConfiguration} body WriteWhitelabelConfiguration body) async { @@ -2378,8 +2345,8 @@ class LookerSDK extends APIMethods { return WhitelabelConfiguration.fromResponse(json, contentType); } - return put(responseHandler, '/whitelabel_configuration', null, - body == null ? null : body.toJson()); + return put( + responseHandler, '/whitelabel_configuration', null, body?.toJson()); } // #endregion Config: Manage General Configuration @@ -2389,7 +2356,7 @@ class LookerSDK extends APIMethods { /// ### Get information about all connections. /// /// GET /connections -> List - Future>> all_connections( + Future>> allConnections( { /// @param {String} fields Requested fields. @@ -2406,7 +2373,7 @@ class LookerSDK extends APIMethods { /// ### Create a connection using the specified configuration. /// /// POST /connections -> DBConnection - Future> create_connection( + Future> createConnection( /// @param {WriteDBConnection} body WriteDBConnection body) async { @@ -2414,8 +2381,7 @@ class LookerSDK extends APIMethods { return DBConnection.fromResponse(json, contentType); } - return post(responseHandler, '/connections', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/connections', null, body?.toJson()); } /// ### Get information about a connection. @@ -2424,76 +2390,76 @@ class LookerSDK extends APIMethods { Future> connection( /// @param {String} connection_name Name of connection - String connection_name, + String connectionName, { /// @param {String} fields Requested fields. String fields}) async { - var path_connection_name = encodeParam(connection_name); + var pathConnectionName = encodeParam(connectionName); DBConnection responseHandler(dynamic json, String contentType) { return DBConnection.fromResponse(json, contentType); } - return get(responseHandler, '/connections/$path_connection_name', + return get(responseHandler, '/connections/$pathConnectionName', {'fields': fields}); } /// ### Update a connection using the specified configuration. /// /// PATCH /connections/{connection_name} -> DBConnection - Future> update_connection( + Future> updateConnection( /// @param {String} connection_name Name of connection - String connection_name, + String connectionName, /// @param {WriteDBConnection} body WriteDBConnection body) async { - var path_connection_name = encodeParam(connection_name); + var pathConnectionName = encodeParam(connectionName); DBConnection responseHandler(dynamic json, String contentType) { return DBConnection.fromResponse(json, contentType); } - return patch(responseHandler, '/connections/$path_connection_name', null, - body == null ? null : body.toJson()); + return patch(responseHandler, '/connections/$pathConnectionName', null, + body?.toJson()); } /// ### Delete a connection. /// /// DELETE /connections/{connection_name} -> String - Future> delete_connection( + Future> deleteConnection( /// @param {String} connection_name Name of connection - String connection_name) async { - var path_connection_name = encodeParam(connection_name); + String connectionName) async { + var pathConnectionName = encodeParam(connectionName); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/connections/$path_connection_name'); + return delete(responseHandler, '/connections/$pathConnectionName'); } /// ### Delete a connection override. /// /// DELETE /connections/{connection_name}/connection_override/{override_context} -> String - Future> delete_connection_override( + Future> deleteConnectionOverride( /// @param {String} connection_name Name of connection - String connection_name, + String connectionName, /// @param {String} override_context Context of connection override - String override_context) async { - var path_connection_name = encodeParam(connection_name); - var path_override_context = encodeParam(override_context); + String overrideContext) async { + var pathConnectionName = encodeParam(connectionName); + var pathOverrideContext = encodeParam(overrideContext); String responseHandler(dynamic json, String contentType) { return json; } return delete(responseHandler, - '/connections/$path_connection_name/connection_override/$path_override_context'); + '/connections/$pathConnectionName/connection_override/$pathOverrideContext'); } /// ### Test an existing connection. @@ -2506,15 +2472,15 @@ class LookerSDK extends APIMethods { /// Unsupported tests in the request will be ignored. /// /// PUT /connections/{connection_name}/test -> List - Future>> test_connection( + Future>> testConnection( /// @param {String} connection_name Name of connection - String connection_name, + String connectionName, { /// @param {DelimList} tests Array of names of tests to run DelimList tests}) async { - var path_connection_name = encodeParam(connection_name); + var pathConnectionName = encodeParam(connectionName); List responseHandler( dynamic json, String contentType) { @@ -2524,7 +2490,7 @@ class LookerSDK extends APIMethods { .toList(); } - return put(responseHandler, '/connections/$path_connection_name/test', + return put(responseHandler, '/connections/$pathConnectionName/test', {'tests': tests}); } @@ -2538,7 +2504,7 @@ class LookerSDK extends APIMethods { /// Unsupported tests in the request will be ignored. /// /// PUT /connections/test -> List - Future>> test_connection_config( + Future>> testConnectionConfig( /// @param {WriteDBConnection} body WriteDBConnection body, @@ -2554,14 +2520,14 @@ class LookerSDK extends APIMethods { .toList(); } - return put(responseHandler, '/connections/test', {'tests': tests}, - body == null ? null : body.toJson()); + return put( + responseHandler, '/connections/test', {'tests': tests}, body?.toJson()); } /// ### Get information about all dialects. /// /// GET /dialect_info -> List - Future>> all_dialect_infos( + Future>> allDialectInfos( { /// @param {String} fields Requested fields. @@ -2581,14 +2547,14 @@ class LookerSDK extends APIMethods { /// /// GET /external_oauth_applications -> List Future>> - all_external_oauth_applications( + allExternalOauthApplications( { /// @param {String} name Application name String name, /// @param {String} client_id Application Client ID - String client_id}) async { + String clientId}) async { List responseHandler( dynamic json, String contentType) { return json @@ -2598,7 +2564,7 @@ class LookerSDK extends APIMethods { } return get(responseHandler, '/external_oauth_applications', - {'name': name, 'client_id': client_id}); + {'name': name, 'client_id': clientId}); } /// ### Create an OAuth Application using the specified configuration. @@ -2606,24 +2572,23 @@ class LookerSDK extends APIMethods { /// This is an OAuth Application which Looker uses to access external systems. /// /// POST /external_oauth_applications -> ExternalOauthApplication - Future> - create_external_oauth_application( + Future> createExternalOauthApplication( - /// @param {WriteExternalOauthApplication} body - WriteExternalOauthApplication body) async { + /// @param {WriteExternalOauthApplication} body + WriteExternalOauthApplication body) async { ExternalOauthApplication responseHandler(dynamic json, String contentType) { return ExternalOauthApplication.fromResponse(json, contentType); } - return post(responseHandler, '/external_oauth_applications', null, - body == null ? null : body.toJson()); + return post( + responseHandler, '/external_oauth_applications', null, body?.toJson()); } /// ### Create OAuth User state. /// /// POST /external_oauth_applications/user_state -> CreateOAuthApplicationUserStateResponse Future> - create_oauth_application_user_state( + createOauthApplicationUserState( /// @param {CreateOAuthApplicationUserStateRequest} body CreateOAuthApplicationUserStateRequest body) async { @@ -2634,13 +2599,13 @@ class LookerSDK extends APIMethods { } return post(responseHandler, '/external_oauth_applications/user_state', - null, body == null ? null : body.toJson()); + null, body?.toJson()); } /// ### Get information about all SSH Servers. /// /// GET /ssh_servers -> List - Future>> all_ssh_servers( + Future>> allSshServers( { /// @param {String} fields Requested fields. @@ -2657,7 +2622,7 @@ class LookerSDK extends APIMethods { /// ### Create an SSH Server. /// /// POST /ssh_servers -> SshServer - Future> create_ssh_server( + Future> createSshServer( /// @param {WriteSshServer} body WriteSshServer body) async { @@ -2665,82 +2630,81 @@ class LookerSDK extends APIMethods { return SshServer.fromResponse(json, contentType); } - return post(responseHandler, '/ssh_servers', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/ssh_servers', null, body?.toJson()); } /// ### Get information about an SSH Server. /// /// GET /ssh_server/{ssh_server_id} -> SshServer - Future> ssh_server( + Future> sshServer( /// @param {String} ssh_server_id Id of SSH Server - String ssh_server_id) async { - var path_ssh_server_id = encodeParam(ssh_server_id); + String sshServerId) async { + var pathSshServerId = encodeParam(sshServerId); SshServer responseHandler(dynamic json, String contentType) { return SshServer.fromResponse(json, contentType); } - return get(responseHandler, '/ssh_server/$path_ssh_server_id'); + return get(responseHandler, '/ssh_server/$pathSshServerId'); } /// ### Update an SSH Server. /// /// PATCH /ssh_server/{ssh_server_id} -> SshServer - Future> update_ssh_server( + Future> updateSshServer( /// @param {String} ssh_server_id Id of SSH Server - String ssh_server_id, + String sshServerId, /// @param {WriteSshServer} body WriteSshServer body) async { - var path_ssh_server_id = encodeParam(ssh_server_id); + var pathSshServerId = encodeParam(sshServerId); SshServer responseHandler(dynamic json, String contentType) { return SshServer.fromResponse(json, contentType); } - return patch(responseHandler, '/ssh_server/$path_ssh_server_id', null, - body == null ? null : body.toJson()); + return patch( + responseHandler, '/ssh_server/$pathSshServerId', null, body?.toJson()); } /// ### Delete an SSH Server. /// /// DELETE /ssh_server/{ssh_server_id} -> String - Future> delete_ssh_server( + Future> deleteSshServer( /// @param {String} ssh_server_id Id of SSH Server - String ssh_server_id) async { - var path_ssh_server_id = encodeParam(ssh_server_id); + String sshServerId) async { + var pathSshServerId = encodeParam(sshServerId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/ssh_server/$path_ssh_server_id'); + return delete(responseHandler, '/ssh_server/$pathSshServerId'); } /// ### Test the SSH Server /// /// GET /ssh_server/{ssh_server_id}/test -> SshServer - Future> test_ssh_server( + Future> testSshServer( /// @param {String} ssh_server_id Id of SSH Server - String ssh_server_id) async { - var path_ssh_server_id = encodeParam(ssh_server_id); + String sshServerId) async { + var pathSshServerId = encodeParam(sshServerId); SshServer responseHandler(dynamic json, String contentType) { return SshServer.fromResponse(json, contentType); } - return get(responseHandler, '/ssh_server/$path_ssh_server_id/test'); + return get(responseHandler, '/ssh_server/$pathSshServerId/test'); } /// ### Get information about all SSH Tunnels. /// /// GET /ssh_tunnels -> List - Future>> all_ssh_tunnels( + Future>> allSshTunnels( { /// @param {String} fields Requested fields. @@ -2757,7 +2721,7 @@ class LookerSDK extends APIMethods { /// ### Create an SSH Tunnel /// /// POST /ssh_tunnels -> SshTunnel - Future> create_ssh_tunnel( + Future> createSshTunnel( /// @param {WriteSshTunnel} body WriteSshTunnel body) async { @@ -2765,76 +2729,75 @@ class LookerSDK extends APIMethods { return SshTunnel.fromResponse(json, contentType); } - return post(responseHandler, '/ssh_tunnels', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/ssh_tunnels', null, body?.toJson()); } /// ### Get information about an SSH Tunnel. /// /// GET /ssh_tunnel/{ssh_tunnel_id} -> SshTunnel - Future> ssh_tunnel( + Future> sshTunnel( /// @param {String} ssh_tunnel_id Id of SSH Tunnel - String ssh_tunnel_id) async { - var path_ssh_tunnel_id = encodeParam(ssh_tunnel_id); + String sshTunnelId) async { + var pathSshTunnelId = encodeParam(sshTunnelId); SshTunnel responseHandler(dynamic json, String contentType) { return SshTunnel.fromResponse(json, contentType); } - return get(responseHandler, '/ssh_tunnel/$path_ssh_tunnel_id'); + return get(responseHandler, '/ssh_tunnel/$pathSshTunnelId'); } /// ### Update an SSH Tunnel /// /// PATCH /ssh_tunnel/{ssh_tunnel_id} -> SshTunnel - Future> update_ssh_tunnel( + Future> updateSshTunnel( /// @param {String} ssh_tunnel_id Id of SSH Tunnel - String ssh_tunnel_id, + String sshTunnelId, /// @param {WriteSshTunnel} body WriteSshTunnel body) async { - var path_ssh_tunnel_id = encodeParam(ssh_tunnel_id); + var pathSshTunnelId = encodeParam(sshTunnelId); SshTunnel responseHandler(dynamic json, String contentType) { return SshTunnel.fromResponse(json, contentType); } - return patch(responseHandler, '/ssh_tunnel/$path_ssh_tunnel_id', null, - body == null ? null : body.toJson()); + return patch( + responseHandler, '/ssh_tunnel/$pathSshTunnelId', null, body?.toJson()); } /// ### Delete an SSH Tunnel /// /// DELETE /ssh_tunnel/{ssh_tunnel_id} -> String - Future> delete_ssh_tunnel( + Future> deleteSshTunnel( /// @param {String} ssh_tunnel_id Id of SSH Tunnel - String ssh_tunnel_id) async { - var path_ssh_tunnel_id = encodeParam(ssh_tunnel_id); + String sshTunnelId) async { + var pathSshTunnelId = encodeParam(sshTunnelId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/ssh_tunnel/$path_ssh_tunnel_id'); + return delete(responseHandler, '/ssh_tunnel/$pathSshTunnelId'); } /// ### Test the SSH Tunnel /// /// GET /ssh_tunnel/{ssh_tunnel_id}/test -> SshTunnel - Future> test_ssh_tunnel( + Future> testSshTunnel( /// @param {String} ssh_tunnel_id Id of SSH Tunnel - String ssh_tunnel_id) async { - var path_ssh_tunnel_id = encodeParam(ssh_tunnel_id); + String sshTunnelId) async { + var pathSshTunnelId = encodeParam(sshTunnelId); SshTunnel responseHandler(dynamic json, String contentType) { return SshTunnel.fromResponse(json, contentType); } - return get(responseHandler, '/ssh_tunnel/$path_ssh_tunnel_id/test'); + return get(responseHandler, '/ssh_tunnel/$pathSshTunnelId/test'); } /// ### Get the SSH public key @@ -2842,7 +2805,7 @@ class LookerSDK extends APIMethods { /// Get the public key created for this instance to identify itself to a remote SSH server. /// /// GET /ssh_public_key -> SshPublicKey - Future> ssh_public_key() async { + Future> sshPublicKey() async { SshPublicKey responseHandler(dynamic json, String contentType) { return SshPublicKey.fromResponse(json, contentType); } @@ -2878,26 +2841,26 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /content_favorite/search -> List - Future>> search_content_favorites( + Future>> searchContentFavorites( { /// @param {int} id Match content favorite id(s) int id, /// @param {String} user_id Match user id(s).To create a list of multiple ids, use commas as separators - String user_id, + String userId, /// @param {String} content_metadata_id Match content metadata id(s).To create a list of multiple ids, use commas as separators - String content_metadata_id, + String contentMetadataId, /// @param {String} dashboard_id Match dashboard id(s).To create a list of multiple ids, use commas as separators - String dashboard_id, + String dashboardId, /// @param {String} look_id Match look id(s).To create a list of multiple ids, use commas as separators - String look_id, + String lookId, /// @param {String} board_id Match board id(s).To create a list of multiple ids, use commas as separators - String board_id, + String boardId, /// @param {int} limit Number of results to return. (used with offset) int limit, @@ -2912,7 +2875,7 @@ class LookerSDK extends APIMethods { String fields, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json .map( @@ -2922,61 +2885,60 @@ class LookerSDK extends APIMethods { return get(responseHandler, '/content_favorite/search', { 'id': id, - 'user_id': user_id, - 'content_metadata_id': content_metadata_id, - 'dashboard_id': dashboard_id, - 'look_id': look_id, - 'board_id': board_id, + 'user_id': userId, + 'content_metadata_id': contentMetadataId, + 'dashboard_id': dashboardId, + 'look_id': lookId, + 'board_id': boardId, 'limit': limit, 'offset': offset, 'sorts': sorts, 'fields': fields, - 'filter_or': filter_or + 'filter_or': filterOr }); } /// ### Get favorite content by its id /// /// GET /content_favorite/{content_favorite_id} -> ContentFavorite - Future> content_favorite( + Future> contentFavorite( /// @param {int} content_favorite_id Id of favorite content - int content_favorite_id, + int contentFavoriteId, { /// @param {String} fields Requested fields. String fields}) async { - var path_content_favorite_id = encodeParam(content_favorite_id); + var pathContentFavoriteId = encodeParam(contentFavoriteId); ContentFavorite responseHandler(dynamic json, String contentType) { return ContentFavorite.fromResponse(json, contentType); } - return get(responseHandler, '/content_favorite/$path_content_favorite_id', + return get(responseHandler, '/content_favorite/$pathContentFavoriteId', {'fields': fields}); } /// ### Delete favorite content /// /// DELETE /content_favorite/{content_favorite_id} -> String - Future> delete_content_favorite( + Future> deleteContentFavorite( /// @param {int} content_favorite_id Id of favorite content - int content_favorite_id) async { - var path_content_favorite_id = encodeParam(content_favorite_id); + int contentFavoriteId) async { + var pathContentFavoriteId = encodeParam(contentFavoriteId); String responseHandler(dynamic json, String contentType) { return json; } - return delete( - responseHandler, '/content_favorite/$path_content_favorite_id'); + return delete(responseHandler, '/content_favorite/$pathContentFavoriteId'); } /// ### Create favorite content /// /// POST /content_favorite -> ContentFavorite - Future> create_content_favorite( + Future> createContentFavorite( /// @param {WriteContentFavorite} body WriteContentFavorite body) async { @@ -2984,17 +2946,16 @@ class LookerSDK extends APIMethods { return ContentFavorite.fromResponse(json, contentType); } - return post(responseHandler, '/content_favorite', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/content_favorite', null, body?.toJson()); } /// ### Get information about all content metadata in a space. /// /// GET /content_metadata -> List - Future>> all_content_metadatas( + Future>> allContentMetadatas( /// @param {int} parent_id Parent space of content. - int parent_id, + int parentId, { /// @param {String} fields Requested fields. @@ -3006,57 +2967,57 @@ class LookerSDK extends APIMethods { } return get(responseHandler, '/content_metadata', - {'parent_id': parent_id, 'fields': fields}); + {'parent_id': parentId, 'fields': fields}); } /// ### Get information about an individual content metadata record. /// /// GET /content_metadata/{content_metadata_id} -> ContentMeta - Future> content_metadata( + Future> contentMetadata( /// @param {int} content_metadata_id Id of content metadata - int content_metadata_id, + int contentMetadataId, { /// @param {String} fields Requested fields. String fields}) async { - var path_content_metadata_id = encodeParam(content_metadata_id); + var pathContentMetadataId = encodeParam(contentMetadataId); ContentMeta responseHandler(dynamic json, String contentType) { return ContentMeta.fromResponse(json, contentType); } - return get(responseHandler, '/content_metadata/$path_content_metadata_id', + return get(responseHandler, '/content_metadata/$pathContentMetadataId', {'fields': fields}); } /// ### Move a piece of content. /// /// PATCH /content_metadata/{content_metadata_id} -> ContentMeta - Future> update_content_metadata( + Future> updateContentMetadata( /// @param {int} content_metadata_id Id of content metadata - int content_metadata_id, + int contentMetadataId, /// @param {WriteContentMeta} body WriteContentMeta body) async { - var path_content_metadata_id = encodeParam(content_metadata_id); + var pathContentMetadataId = encodeParam(contentMetadataId); ContentMeta responseHandler(dynamic json, String contentType) { return ContentMeta.fromResponse(json, contentType); } - return patch(responseHandler, '/content_metadata/$path_content_metadata_id', - null, body == null ? null : body.toJson()); + return patch(responseHandler, '/content_metadata/$pathContentMetadataId', + null, body?.toJson()); } /// ### All content metadata access records for a content metadata item. /// /// GET /content_metadata_access -> List - Future>> all_content_metadata_accesses( + Future>> allContentMetadataAccesses( /// @param {int} content_metadata_id Id of content metadata - int content_metadata_id, + int contentMetadataId, { /// @param {String} fields Requested fields. @@ -3070,20 +3031,20 @@ class LookerSDK extends APIMethods { } return get(responseHandler, '/content_metadata_access', - {'content_metadata_id': content_metadata_id, 'fields': fields}); + {'content_metadata_id': contentMetadataId, 'fields': fields}); } /// ### Create content metadata access. /// /// POST /content_metadata_access -> ContentMetaGroupUser - Future> create_content_metadata_access( + Future> createContentMetadataAccess( /// @param {ContentMetaGroupUser} body ContentMetaGroupUser body, { /// @param {bool} send_boards_notification_email Optionally sends notification email when granting access to a board. - bool send_boards_notification_email}) async { + bool sendBoardsNotificationEmail}) async { ContentMetaGroupUser responseHandler(dynamic json, String contentType) { return ContentMetaGroupUser.fromResponse(json, contentType); } @@ -3091,22 +3052,21 @@ class LookerSDK extends APIMethods { return post( responseHandler, '/content_metadata_access', - {'send_boards_notification_email': send_boards_notification_email}, - body == null ? null : body.toJson()); + {'send_boards_notification_email': sendBoardsNotificationEmail}, + body?.toJson()); } /// ### Update type of access for content metadata. /// /// PUT /content_metadata_access/{content_metadata_access_id} -> ContentMetaGroupUser - Future> update_content_metadata_access( + Future> updateContentMetadataAccess( /// @param {String} content_metadata_access_id Id of content metadata access - String content_metadata_access_id, + String contentMetadataAccessId, /// @param {ContentMetaGroupUser} body ContentMetaGroupUser body) async { - var path_content_metadata_access_id = - encodeParam(content_metadata_access_id); + var pathContentMetadataAccessId = encodeParam(contentMetadataAccessId); ContentMetaGroupUser responseHandler(dynamic json, String contentType) { return ContentMetaGroupUser.fromResponse(json, contentType); @@ -3114,27 +3074,26 @@ class LookerSDK extends APIMethods { return put( responseHandler, - '/content_metadata_access/$path_content_metadata_access_id', + '/content_metadata_access/$pathContentMetadataAccessId', null, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Remove content metadata access. /// /// DELETE /content_metadata_access/{content_metadata_access_id} -> String - Future> delete_content_metadata_access( + Future> deleteContentMetadataAccess( /// @param {int} content_metadata_access_id Id of content metadata access - int content_metadata_access_id) async { - var path_content_metadata_access_id = - encodeParam(content_metadata_access_id); + int contentMetadataAccessId) async { + var pathContentMetadataAccessId = encodeParam(contentMetadataAccessId); String responseHandler(dynamic json, String contentType) { return json; } return delete(responseHandler, - '/content_metadata_access/$path_content_metadata_access_id'); + '/content_metadata_access/$pathContentMetadataAccessId'); } /// ### Get an image representing the contents of a dashboard or look. @@ -3145,13 +3104,13 @@ class LookerSDK extends APIMethods { /// GET /content_thumbnail/{type}/{resource_id} -> String /// /// **Note**: Binary content may be returned by this method. - Future> content_thumbnail( + Future> contentThumbnail( /// @param {String} type Either dashboard or look String type, /// @param {String} resource_id ID of the dashboard or look to render - String resource_id, + String resourceId, { /// @param {String} reload Whether or not to refresh the rendered image with the latest content @@ -3165,16 +3124,14 @@ class LookerSDK extends APIMethods { /// @param {int} height The height of the image if format is supplied int height}) async { - var path_type = encodeParam(type); - var path_resource_id = encodeParam(resource_id); + var pathType = encodeParam(type); + var pathResourceId = encodeParam(resourceId); dynamic responseHandler(dynamic json, String contentType) { return json; } - return get( - responseHandler, - '/content_thumbnail/$path_type/$path_resource_id', + return get(responseHandler, '/content_thumbnail/$pathType/$pathResourceId', {'reload': reload, 'format': format, 'width': width, 'height': height}); } @@ -3184,7 +3141,7 @@ class LookerSDK extends APIMethods { /// Returns a list of errors found as well as metadata about the content validation run. /// /// GET /content_validation -> ContentValidation - Future> content_validation( + Future> contentValidation( { /// @param {String} fields Requested fields. @@ -3220,32 +3177,32 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /content_view/search -> List - Future>> search_content_views( + Future>> searchContentViews( { /// @param {String} view_count Match view count - String view_count, + String viewCount, /// @param {String} group_id Match Group Id - String group_id, + String groupId, /// @param {String} look_id Match look_id - String look_id, + String lookId, /// @param {String} dashboard_id Match dashboard_id - String dashboard_id, + String dashboardId, /// @param {String} content_metadata_id Match content metadata id - String content_metadata_id, + String contentMetadataId, /// @param {String} start_of_week_date Match start of week date (format is "YYYY-MM-DD") - String start_of_week_date, + String startOfWeekDate, /// @param {bool} all_time True if only all time view records should be returned - bool all_time, + bool allTime, /// @param {String} user_id Match user id - String user_id, + String userId, /// @param {String} fields Requested fields String fields, @@ -3260,7 +3217,7 @@ class LookerSDK extends APIMethods { String sorts, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => ContentView.fromResponse(i, contentType)) @@ -3268,19 +3225,19 @@ class LookerSDK extends APIMethods { } return get(responseHandler, '/content_view/search', { - 'view_count': view_count, - 'group_id': group_id, - 'look_id': look_id, - 'dashboard_id': dashboard_id, - 'content_metadata_id': content_metadata_id, - 'start_of_week_date': start_of_week_date, - 'all_time': all_time, - 'user_id': user_id, + 'view_count': viewCount, + 'group_id': groupId, + 'look_id': lookId, + 'dashboard_id': dashboardId, + 'content_metadata_id': contentMetadataId, + 'start_of_week_date': startOfWeekDate, + 'all_time': allTime, + 'user_id': userId, 'fields': fields, 'limit': limit, 'offset': offset, 'sorts': sorts, - 'filter_or': filter_or + 'filter_or': filterOr }); } @@ -3292,26 +3249,26 @@ class LookerSDK extends APIMethods { /// reflect the actual data displayed in the respective visualizations. /// /// GET /vector_thumbnail/{type}/{resource_id} -> String - Future> vector_thumbnail( + Future> vectorThumbnail( /// @param {String} type Either dashboard or look String type, /// @param {String} resource_id ID of the dashboard or look to render - String resource_id, + String resourceId, { /// @param {String} reload Whether or not to refresh the rendered image with the latest content String reload}) async { - var path_type = encodeParam(type); - var path_resource_id = encodeParam(resource_id); + var pathType = encodeParam(type); + var pathResourceId = encodeParam(resourceId); String responseHandler(dynamic json, String contentType) { return json; } - return get(responseHandler, - '/vector_thumbnail/$path_type/$path_resource_id', {'reload': reload}); + return get(responseHandler, '/vector_thumbnail/$pathType/$pathResourceId', + {'reload': reload}); } // #endregion Content: Manage Content @@ -3327,7 +3284,7 @@ class LookerSDK extends APIMethods { /// Find **deleted dashboards** with [search_dashboards()](#!/Dashboard/search_dashboards) /// /// GET /dashboards -> List - Future>> all_dashboards( + Future>> allDashboards( { /// @param {String} fields Requested fields. @@ -3357,7 +3314,7 @@ class LookerSDK extends APIMethods { /// You can **permanently delete** an existing dashboard with [delete_dashboard()](#!/Dashboard/delete_dashboard) /// /// POST /dashboards -> Dashboard - Future> create_dashboard( + Future> createDashboard( /// @param {WriteDashboard} body WriteDashboard body) async { @@ -3365,8 +3322,7 @@ class LookerSDK extends APIMethods { return Dashboard.fromResponse(json, contentType); } - return post(responseHandler, '/dashboards', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/dashboards', null, body?.toJson()); } /// ### Search Dashboards @@ -3400,7 +3356,7 @@ class LookerSDK extends APIMethods { /// Get a **single dashboard** by id with [dashboard()](#!/Dashboard/dashboard) /// /// GET /dashboards/search -> List - Future>> search_dashboards( + Future>> searchDashboards( { /// @param {String} id Match dashboard id. @@ -3416,28 +3372,28 @@ class LookerSDK extends APIMethods { String description, /// @param {String} content_favorite_id Filter on a content favorite id. - String content_favorite_id, + String contentFavoriteId, /// @param {String} folder_id Filter on a particular space. - String folder_id, + String folderId, /// @param {String} deleted Filter on dashboards deleted status. String deleted, /// @param {String} user_id Filter on dashboards created by a particular user. - String user_id, + String userId, /// @param {String} view_count Filter on a particular value of view_count - String view_count, + String viewCount, /// @param {String} content_metadata_id Filter on a content favorite id. - String content_metadata_id, + String contentMetadataId, /// @param {bool} curate Exclude items that exist only in personal spaces other than the users bool curate, /// @param {String} last_viewed_at Select dashboards based on when they were last viewed - String last_viewed_at, + String lastViewedAt, /// @param {String} fields Requested fields. String fields, @@ -3446,7 +3402,7 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page Results per page. - int per_page, + int perPage, /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) int limit, @@ -3458,7 +3414,7 @@ class LookerSDK extends APIMethods { String sorts, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Dashboard.fromResponse(i, contentType)) @@ -3470,21 +3426,21 @@ class LookerSDK extends APIMethods { 'slug': slug, 'title': title, 'description': description, - 'content_favorite_id': content_favorite_id, - 'folder_id': folder_id, + 'content_favorite_id': contentFavoriteId, + 'folder_id': folderId, 'deleted': deleted, - 'user_id': user_id, - 'view_count': view_count, - 'content_metadata_id': content_metadata_id, + 'user_id': userId, + 'view_count': viewCount, + 'content_metadata_id': contentMetadataId, 'curate': curate, - 'last_viewed_at': last_viewed_at, + 'last_viewed_at': lastViewedAt, 'fields': fields, 'page': page, - 'per_page': per_page, + 'per_page': perPage, 'limit': limit, 'offset': offset, 'sorts': sorts, - 'filter_or': filter_or + 'filter_or': filterOr }); } @@ -3502,22 +3458,22 @@ class LookerSDK extends APIMethods { /// **Unlink** a linked UDD by setting lookml_link_id to null with [update_dashboard()](#!/Dashboard/update_dashboard) /// /// POST /dashboards/{lookml_dashboard_id}/import/{space_id} -> Dashboard - Future> import_lookml_dashboard( + Future> importLookmlDashboard( /// @param {String} lookml_dashboard_id Id of LookML dashboard - String lookml_dashboard_id, + String lookmlDashboardId, /// @param {String} space_id Id of space to import the dashboard to - String space_id, + String spaceId, { /// @param {WriteDashboard} body WriteDashboard body, /// @param {bool} raw_locale If true, and this dashboard is localized, export it with the raw keys, not localized. - bool raw_locale}) async { - var path_lookml_dashboard_id = encodeParam(lookml_dashboard_id); - var path_space_id = encodeParam(space_id); + bool rawLocale}) async { + var pathLookmlDashboardId = encodeParam(lookmlDashboardId); + var pathSpaceId = encodeParam(spaceId); Dashboard responseHandler(dynamic json, String contentType) { return Dashboard.fromResponse(json, contentType); @@ -3525,9 +3481,9 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/dashboards/$path_lookml_dashboard_id/import/$path_space_id', - {'raw_locale': raw_locale}, - body == null ? null : body.toJson()); + '/dashboards/$pathLookmlDashboardId/import/$pathSpaceId', + {'raw_locale': rawLocale}, + body?.toJson()); } /// ### Update all linked dashboards to match the specified LookML dashboard. @@ -3541,25 +3497,25 @@ class LookerSDK extends APIMethods { /// To **link** or **unlink** a UDD set the `lookml_link_id` property with [update_dashboard()](#!/Dashboard/update_dashboard) /// /// PATCH /dashboards/{lookml_dashboard_id}/sync -> List - Future>> sync_lookml_dashboard( + Future>> syncLookmlDashboard( /// @param {String} lookml_dashboard_id Id of LookML dashboard, in the form 'model::dashboardname' - String lookml_dashboard_id, + String lookmlDashboardId, /// @param {WriteDashboard} body WriteDashboard body, { /// @param {bool} raw_locale If true, and this dashboard is localized, export it with the raw keys, not localized. - bool raw_locale}) async { - var path_lookml_dashboard_id = encodeParam(lookml_dashboard_id); + bool rawLocale}) async { + var pathLookmlDashboardId = encodeParam(lookmlDashboardId); List responseHandler(dynamic json, String contentType) { return json; } - return patch(responseHandler, '/dashboards/$path_lookml_dashboard_id/sync', - {'raw_locale': raw_locale}, body == null ? null : body.toJson()); + return patch(responseHandler, '/dashboards/$pathLookmlDashboardId/sync', + {'raw_locale': rawLocale}, body?.toJson()); } /// ### Get information about a dashboard @@ -3574,19 +3530,19 @@ class LookerSDK extends APIMethods { Future> dashboard( /// @param {String} dashboard_id Id of dashboard - String dashboard_id, + String dashboardId, { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_id = encodeParam(dashboard_id); + var pathDashboardId = encodeParam(dashboardId); Dashboard responseHandler(dynamic json, String contentType) { return Dashboard.fromResponse(json, contentType); } return get( - responseHandler, '/dashboards/$path_dashboard_id', {'fields': fields}); + responseHandler, '/dashboards/$pathDashboardId', {'fields': fields}); } /// ### Update a dashboard @@ -3601,21 +3557,21 @@ class LookerSDK extends APIMethods { /// response body for information about exactly which fields are missing or contain invalid data. /// /// PATCH /dashboards/{dashboard_id} -> Dashboard - Future> update_dashboard( + Future> updateDashboard( /// @param {String} dashboard_id Id of dashboard - String dashboard_id, + String dashboardId, /// @param {WriteDashboard} body WriteDashboard body) async { - var path_dashboard_id = encodeParam(dashboard_id); + var pathDashboardId = encodeParam(dashboardId); Dashboard responseHandler(dynamic json, String contentType) { return Dashboard.fromResponse(json, contentType); } - return patch(responseHandler, '/dashboards/$path_dashboard_id', null, - body == null ? null : body.toJson()); + return patch( + responseHandler, '/dashboards/$pathDashboardId', null, body?.toJson()); } /// ### Delete the dashboard with the specified id @@ -3627,17 +3583,17 @@ class LookerSDK extends APIMethods { /// Note: When a dashboard is deleted in the UI, it is soft deleted. Use this API call to permanently remove it, if desired. /// /// DELETE /dashboards/{dashboard_id} -> String - Future> delete_dashboard( + Future> deleteDashboard( /// @param {String} dashboard_id Id of dashboard - String dashboard_id) async { - var path_dashboard_id = encodeParam(dashboard_id); + String dashboardId) async { + var pathDashboardId = encodeParam(dashboardId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/dashboards/$path_dashboard_id'); + return delete(responseHandler, '/dashboards/$pathDashboardId'); } /// ### Get Aggregate Table LookML for Each Query on a Dahboard @@ -3646,19 +3602,19 @@ class LookerSDK extends APIMethods { /// /// GET /dashboards/aggregate_table_lookml/{dashboard_id} -> DashboardAggregateTableLookml Future> - dashboard_aggregate_table_lookml( + dashboardAggregateTableLookml( /// @param {String} dashboard_id Id of dashboard - String dashboard_id) async { - var path_dashboard_id = encodeParam(dashboard_id); + String dashboardId) async { + var pathDashboardId = encodeParam(dashboardId); DashboardAggregateTableLookml responseHandler( dynamic json, String contentType) { return DashboardAggregateTableLookml.fromResponse(json, contentType); } - return get(responseHandler, - '/dashboards/aggregate_table_lookml/$path_dashboard_id'); + return get( + responseHandler, '/dashboards/aggregate_table_lookml/$pathDashboardId'); } /// ### Get lookml of a UDD @@ -3666,17 +3622,17 @@ class LookerSDK extends APIMethods { /// Returns a JSON object that contains the dashboard id and the full lookml /// /// GET /dashboards/lookml/{dashboard_id} -> DashboardLookml - Future> dashboard_lookml( + Future> dashboardLookml( /// @param {String} dashboard_id Id of dashboard - String dashboard_id) async { - var path_dashboard_id = encodeParam(dashboard_id); + String dashboardId) async { + var pathDashboardId = encodeParam(dashboardId); DashboardLookml responseHandler(dynamic json, String contentType) { return DashboardLookml.fromResponse(json, contentType); } - return get(responseHandler, '/dashboards/lookml/$path_dashboard_id'); + return get(responseHandler, '/dashboards/lookml/$pathDashboardId'); } /// ### Move an existing dashboard @@ -3687,21 +3643,21 @@ class LookerSDK extends APIMethods { /// `dashboard_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. /// /// PATCH /dashboards/{dashboard_id}/move -> Dashboard - Future> move_dashboard( + Future> moveDashboard( /// @param {String} dashboard_id Dashboard id to move. - String dashboard_id, + String dashboardId, /// @param {String} folder_id Folder id to move to. - String folder_id) async { - var path_dashboard_id = encodeParam(dashboard_id); + String folderId) async { + var pathDashboardId = encodeParam(dashboardId); Dashboard responseHandler(dynamic json, String contentType) { return Dashboard.fromResponse(json, contentType); } - return patch(responseHandler, '/dashboards/$path_dashboard_id/move', - {'folder_id': folder_id}); + return patch(responseHandler, '/dashboards/$pathDashboardId/move', + {'folder_id': folderId}); } /// ### Copy an existing dashboard @@ -3715,22 +3671,22 @@ class LookerSDK extends APIMethods { /// or '(copy <# of copies>)' appended. /// /// POST /dashboards/{dashboard_id}/copy -> Dashboard - Future> copy_dashboard( + Future> copyDashboard( /// @param {String} dashboard_id Dashboard id to copy. - String dashboard_id, + String dashboardId, { /// @param {String} folder_id Folder id to copy to. - String folder_id}) async { - var path_dashboard_id = encodeParam(dashboard_id); + String folderId}) async { + var pathDashboardId = encodeParam(dashboardId); Dashboard responseHandler(dynamic json, String contentType) { return Dashboard.fromResponse(json, contentType); } - return post(responseHandler, '/dashboards/$path_dashboard_id/copy', - {'folder_id': folder_id}); + return post(responseHandler, '/dashboards/$pathDashboardId/copy', + {'folder_id': folderId}); } /// ### Search Dashboard Elements @@ -3759,14 +3715,14 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /dashboard_elements/search -> List - Future>> search_dashboard_elements( + Future>> searchDashboardElements( { /// @param {int} dashboard_id Select elements that refer to a given dashboard id - int dashboard_id, + int dashboardId, /// @param {int} look_id Select elements that refer to a given look id - int look_id, + int lookId, /// @param {String} title Match the title of element String title, @@ -3778,7 +3734,7 @@ class LookerSDK extends APIMethods { String fields, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or, + bool filterOr, /// @param {String} sorts Fields to sort by. Sortable fields: [:look_id, :dashboard_id, :deleted, :title] String sorts}) async { @@ -3790,12 +3746,12 @@ class LookerSDK extends APIMethods { } return get(responseHandler, '/dashboard_elements/search', { - 'dashboard_id': dashboard_id, - 'look_id': look_id, + 'dashboard_id': dashboardId, + 'look_id': lookId, 'title': title, 'deleted': deleted, 'fields': fields, - 'filter_or': filter_or, + 'filter_or': filterOr, 'sorts': sorts }); } @@ -3803,31 +3759,31 @@ class LookerSDK extends APIMethods { /// ### Get information about the dashboard element with a specific id. /// /// GET /dashboard_elements/{dashboard_element_id} -> DashboardElement - Future> dashboard_element( + Future> dashboardElement( /// @param {String} dashboard_element_id Id of dashboard element - String dashboard_element_id, + String dashboardElementId, { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_element_id = encodeParam(dashboard_element_id); + var pathDashboardElementId = encodeParam(dashboardElementId); DashboardElement responseHandler(dynamic json, String contentType) { return DashboardElement.fromResponse(json, contentType); } - return get(responseHandler, - '/dashboard_elements/$path_dashboard_element_id', {'fields': fields}); + return get(responseHandler, '/dashboard_elements/$pathDashboardElementId', + {'fields': fields}); } /// ### Update the dashboard element with a specific id. /// /// PATCH /dashboard_elements/{dashboard_element_id} -> DashboardElement - Future> update_dashboard_element( + Future> updateDashboardElement( /// @param {String} dashboard_element_id Id of dashboard element - String dashboard_element_id, + String dashboardElementId, /// @param {WriteDashboardElement} body WriteDashboardElement body, @@ -3835,48 +3791,45 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_element_id = encodeParam(dashboard_element_id); + var pathDashboardElementId = encodeParam(dashboardElementId); DashboardElement responseHandler(dynamic json, String contentType) { return DashboardElement.fromResponse(json, contentType); } - return patch( - responseHandler, - '/dashboard_elements/$path_dashboard_element_id', - {'fields': fields}, - body == null ? null : body.toJson()); + return patch(responseHandler, '/dashboard_elements/$pathDashboardElementId', + {'fields': fields}, body?.toJson()); } /// ### Delete a dashboard element with a specific id. /// /// DELETE /dashboard_elements/{dashboard_element_id} -> String - Future> delete_dashboard_element( + Future> deleteDashboardElement( /// @param {String} dashboard_element_id Id of dashboard element - String dashboard_element_id) async { - var path_dashboard_element_id = encodeParam(dashboard_element_id); + String dashboardElementId) async { + var pathDashboardElementId = encodeParam(dashboardElementId); String responseHandler(dynamic json, String contentType) { return json; } return delete( - responseHandler, '/dashboard_elements/$path_dashboard_element_id'); + responseHandler, '/dashboard_elements/$pathDashboardElementId'); } /// ### Get information about all the dashboard elements on a dashboard with a specific id. /// /// GET /dashboards/{dashboard_id}/dashboard_elements -> List - Future>> dashboard_dashboard_elements( + Future>> dashboardDashboardElements( /// @param {String} dashboard_id Id of dashboard - String dashboard_id, + String dashboardId, { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_id = encodeParam(dashboard_id); + var pathDashboardId = encodeParam(dashboardId); List responseHandler(dynamic json, String contentType) { return json @@ -3885,16 +3838,14 @@ class LookerSDK extends APIMethods { .toList(); } - return get( - responseHandler, - '/dashboards/$path_dashboard_id/dashboard_elements', - {'fields': fields}); + return get(responseHandler, + '/dashboards/$pathDashboardId/dashboard_elements', {'fields': fields}); } /// ### Create a dashboard element on the dashboard with a specific id. /// /// POST /dashboard_elements -> DashboardElement - Future> create_dashboard_element( + Future> createDashboardElement( /// @param {WriteDashboardElement} body WriteDashboardElement body, @@ -3907,37 +3858,37 @@ class LookerSDK extends APIMethods { } return post(responseHandler, '/dashboard_elements', {'fields': fields}, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Get information about the dashboard filters with a specific id. /// /// GET /dashboard_filters/{dashboard_filter_id} -> DashboardFilter - Future> dashboard_filter( + Future> dashboardFilter( /// @param {String} dashboard_filter_id Id of dashboard filters - String dashboard_filter_id, + String dashboardFilterId, { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_filter_id = encodeParam(dashboard_filter_id); + var pathDashboardFilterId = encodeParam(dashboardFilterId); DashboardFilter responseHandler(dynamic json, String contentType) { return DashboardFilter.fromResponse(json, contentType); } - return get(responseHandler, '/dashboard_filters/$path_dashboard_filter_id', + return get(responseHandler, '/dashboard_filters/$pathDashboardFilterId', {'fields': fields}); } /// ### Update the dashboard filter with a specific id. /// /// PATCH /dashboard_filters/{dashboard_filter_id} -> DashboardFilter - Future> update_dashboard_filter( + Future> updateDashboardFilter( /// @param {String} dashboard_filter_id Id of dashboard filter - String dashboard_filter_id, + String dashboardFilterId, /// @param {WriteDashboardFilter} body WriteDashboardFilter body, @@ -3945,48 +3896,44 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_filter_id = encodeParam(dashboard_filter_id); + var pathDashboardFilterId = encodeParam(dashboardFilterId); DashboardFilter responseHandler(dynamic json, String contentType) { return DashboardFilter.fromResponse(json, contentType); } - return patch( - responseHandler, - '/dashboard_filters/$path_dashboard_filter_id', - {'fields': fields}, - body == null ? null : body.toJson()); + return patch(responseHandler, '/dashboard_filters/$pathDashboardFilterId', + {'fields': fields}, body?.toJson()); } /// ### Delete a dashboard filter with a specific id. /// /// DELETE /dashboard_filters/{dashboard_filter_id} -> String - Future> delete_dashboard_filter( + Future> deleteDashboardFilter( /// @param {String} dashboard_filter_id Id of dashboard filter - String dashboard_filter_id) async { - var path_dashboard_filter_id = encodeParam(dashboard_filter_id); + String dashboardFilterId) async { + var pathDashboardFilterId = encodeParam(dashboardFilterId); String responseHandler(dynamic json, String contentType) { return json; } - return delete( - responseHandler, '/dashboard_filters/$path_dashboard_filter_id'); + return delete(responseHandler, '/dashboard_filters/$pathDashboardFilterId'); } /// ### Get information about all the dashboard filters on a dashboard with a specific id. /// /// GET /dashboards/{dashboard_id}/dashboard_filters -> List - Future>> dashboard_dashboard_filters( + Future>> dashboardDashboardFilters( /// @param {String} dashboard_id Id of dashboard - String dashboard_id, + String dashboardId, { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_id = encodeParam(dashboard_id); + var pathDashboardId = encodeParam(dashboardId); List responseHandler(dynamic json, String contentType) { return json @@ -3996,13 +3943,13 @@ class LookerSDK extends APIMethods { } return get(responseHandler, - '/dashboards/$path_dashboard_id/dashboard_filters', {'fields': fields}); + '/dashboards/$pathDashboardId/dashboard_filters', {'fields': fields}); } /// ### Create a dashboard filter on the dashboard with a specific id. /// /// POST /dashboard_filters -> DashboardFilter - Future> create_dashboard_filter( + Future> createDashboardFilter( /// @param {WriteCreateDashboardFilter} body WriteCreateDashboardFilter body, @@ -4015,22 +3962,22 @@ class LookerSDK extends APIMethods { } return post(responseHandler, '/dashboard_filters', {'fields': fields}, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Get information about the dashboard elements with a specific id. /// /// GET /dashboard_layout_components/{dashboard_layout_component_id} -> DashboardLayoutComponent - Future> dashboard_layout_component( + Future> dashboardLayoutComponent( /// @param {String} dashboard_layout_component_id Id of dashboard layout component - String dashboard_layout_component_id, + String dashboardLayoutComponentId, { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_layout_component_id = - encodeParam(dashboard_layout_component_id); + var pathDashboardLayoutComponentId = + encodeParam(dashboardLayoutComponentId); DashboardLayoutComponent responseHandler(dynamic json, String contentType) { return DashboardLayoutComponent.fromResponse(json, contentType); @@ -4038,17 +3985,17 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/dashboard_layout_components/$path_dashboard_layout_component_id', + '/dashboard_layout_components/$pathDashboardLayoutComponentId', {'fields': fields}); } /// ### Update the dashboard element with a specific id. /// /// PATCH /dashboard_layout_components/{dashboard_layout_component_id} -> DashboardLayoutComponent - Future> update_dashboard_layout_component( + Future> updateDashboardLayoutComponent( /// @param {String} dashboard_layout_component_id Id of dashboard layout component - String dashboard_layout_component_id, + String dashboardLayoutComponentId, /// @param {WriteDashboardLayoutComponent} body WriteDashboardLayoutComponent body, @@ -4056,8 +4003,8 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_layout_component_id = - encodeParam(dashboard_layout_component_id); + var pathDashboardLayoutComponentId = + encodeParam(dashboardLayoutComponentId); DashboardLayoutComponent responseHandler(dynamic json, String contentType) { return DashboardLayoutComponent.fromResponse(json, contentType); @@ -4065,24 +4012,24 @@ class LookerSDK extends APIMethods { return patch( responseHandler, - '/dashboard_layout_components/$path_dashboard_layout_component_id', + '/dashboard_layout_components/$pathDashboardLayoutComponentId', {'fields': fields}, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Get information about all the dashboard layout components for a dashboard layout with a specific id. /// /// GET /dashboard_layouts/{dashboard_layout_id}/dashboard_layout_components -> List Future>> - dashboard_layout_dashboard_layout_components( + dashboardLayoutDashboardLayoutComponents( /// @param {String} dashboard_layout_id Id of dashboard layout component - String dashboard_layout_id, + String dashboardLayoutId, { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_layout_id = encodeParam(dashboard_layout_id); + var pathDashboardLayoutId = encodeParam(dashboardLayoutId); List responseHandler( dynamic json, String contentType) { @@ -4094,38 +4041,38 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/dashboard_layouts/$path_dashboard_layout_id/dashboard_layout_components', + '/dashboard_layouts/$pathDashboardLayoutId/dashboard_layout_components', {'fields': fields}); } /// ### Get information about the dashboard layouts with a specific id. /// /// GET /dashboard_layouts/{dashboard_layout_id} -> DashboardLayout - Future> dashboard_layout( + Future> dashboardLayout( /// @param {String} dashboard_layout_id Id of dashboard layouts - String dashboard_layout_id, + String dashboardLayoutId, { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_layout_id = encodeParam(dashboard_layout_id); + var pathDashboardLayoutId = encodeParam(dashboardLayoutId); DashboardLayout responseHandler(dynamic json, String contentType) { return DashboardLayout.fromResponse(json, contentType); } - return get(responseHandler, '/dashboard_layouts/$path_dashboard_layout_id', + return get(responseHandler, '/dashboard_layouts/$pathDashboardLayoutId', {'fields': fields}); } /// ### Update the dashboard layout with a specific id. /// /// PATCH /dashboard_layouts/{dashboard_layout_id} -> DashboardLayout - Future> update_dashboard_layout( + Future> updateDashboardLayout( /// @param {String} dashboard_layout_id Id of dashboard layout - String dashboard_layout_id, + String dashboardLayoutId, /// @param {WriteDashboardLayout} body WriteDashboardLayout body, @@ -4133,48 +4080,44 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_layout_id = encodeParam(dashboard_layout_id); + var pathDashboardLayoutId = encodeParam(dashboardLayoutId); DashboardLayout responseHandler(dynamic json, String contentType) { return DashboardLayout.fromResponse(json, contentType); } - return patch( - responseHandler, - '/dashboard_layouts/$path_dashboard_layout_id', - {'fields': fields}, - body == null ? null : body.toJson()); + return patch(responseHandler, '/dashboard_layouts/$pathDashboardLayoutId', + {'fields': fields}, body?.toJson()); } /// ### Delete a dashboard layout with a specific id. /// /// DELETE /dashboard_layouts/{dashboard_layout_id} -> String - Future> delete_dashboard_layout( + Future> deleteDashboardLayout( /// @param {String} dashboard_layout_id Id of dashboard layout - String dashboard_layout_id) async { - var path_dashboard_layout_id = encodeParam(dashboard_layout_id); + String dashboardLayoutId) async { + var pathDashboardLayoutId = encodeParam(dashboardLayoutId); String responseHandler(dynamic json, String contentType) { return json; } - return delete( - responseHandler, '/dashboard_layouts/$path_dashboard_layout_id'); + return delete(responseHandler, '/dashboard_layouts/$pathDashboardLayoutId'); } /// ### Get information about all the dashboard elements on a dashboard with a specific id. /// /// GET /dashboards/{dashboard_id}/dashboard_layouts -> List - Future>> dashboard_dashboard_layouts( + Future>> dashboardDashboardLayouts( /// @param {String} dashboard_id Id of dashboard - String dashboard_id, + String dashboardId, { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_id = encodeParam(dashboard_id); + var pathDashboardId = encodeParam(dashboardId); List responseHandler(dynamic json, String contentType) { return json @@ -4184,13 +4127,13 @@ class LookerSDK extends APIMethods { } return get(responseHandler, - '/dashboards/$path_dashboard_id/dashboard_layouts', {'fields': fields}); + '/dashboards/$pathDashboardId/dashboard_layouts', {'fields': fields}); } /// ### Create a dashboard layout on the dashboard with a specific id. /// /// POST /dashboard_layouts -> DashboardLayout - Future> create_dashboard_layout( + Future> createDashboardLayout( /// @param {WriteDashboardLayout} body WriteDashboardLayout body, @@ -4203,7 +4146,7 @@ class LookerSDK extends APIMethods { } return post(responseHandler, '/dashboard_layouts', {'fields': fields}, - body == null ? null : body.toJson()); + body?.toJson()); } // #endregion Dashboard: Manage Dashboards @@ -4213,7 +4156,7 @@ class LookerSDK extends APIMethods { /// Perform a data action. The data action object can be obtained from query results, and used to perform an arbitrary action. /// /// POST /data_actions -> DataActionResponse - Future> perform_data_action( + Future> performDataAction( /// @param {DataActionRequest} body DataActionRequest body) async { @@ -4221,14 +4164,13 @@ class LookerSDK extends APIMethods { return DataActionResponse.fromResponse(json, contentType); } - return post(responseHandler, '/data_actions', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/data_actions', null, body?.toJson()); } /// For some data actions, the remote server may supply a form requesting further user input. This endpoint takes a data action, asks the remote server to generate a form for it, and returns that form to you for presentation to the user. /// /// POST /data_actions/form -> DataActionForm - Future> fetch_remote_data_action_form( + Future> fetchRemoteDataActionForm( /// @param {Map} body Map body) async { @@ -4246,7 +4188,7 @@ class LookerSDK extends APIMethods { /// ### Get information about all datagroups. /// /// GET /datagroups -> List - Future>> all_datagroups() async { + Future>> allDatagroups() async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Datagroup.fromResponse(i, contentType)) @@ -4262,34 +4204,34 @@ class LookerSDK extends APIMethods { Future> datagroup( /// @param {int} datagroup_id ID of datagroup. - int datagroup_id) async { - var path_datagroup_id = encodeParam(datagroup_id); + int datagroupId) async { + var pathDatagroupId = encodeParam(datagroupId); Datagroup responseHandler(dynamic json, String contentType) { return Datagroup.fromResponse(json, contentType); } - return get(responseHandler, '/datagroups/$path_datagroup_id'); + return get(responseHandler, '/datagroups/$pathDatagroupId'); } /// ### Update a datagroup using the specified params. /// /// PATCH /datagroups/{datagroup_id} -> Datagroup - Future> update_datagroup( + Future> updateDatagroup( /// @param {int} datagroup_id ID of datagroup. - int datagroup_id, + int datagroupId, /// @param {WriteDatagroup} body WriteDatagroup body) async { - var path_datagroup_id = encodeParam(datagroup_id); + var pathDatagroupId = encodeParam(datagroupId); Datagroup responseHandler(dynamic json, String contentType) { return Datagroup.fromResponse(json, contentType); } - return patch(responseHandler, '/datagroups/$path_datagroup_id', null, - body == null ? null : body.toJson()); + return patch( + responseHandler, '/datagroups/$pathDatagroupId', null, body?.toJson()); } // #endregion Datagroup: Manage Datagroups @@ -4299,7 +4241,7 @@ class LookerSDK extends APIMethods { /// ### Discover information about derived tables /// /// GET /derived_table/graph/model/{model} -> DependencyGraph - Future> graph_derived_tables_for_model( + Future> graphDerivedTablesForModel( /// @param {String} model The name of the Lookml model. String model, @@ -4310,20 +4252,20 @@ class LookerSDK extends APIMethods { /// @param {String} color Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error. String color}) async { - var path_model = encodeParam(model); + var pathModel = encodeParam(model); DependencyGraph responseHandler(dynamic json, String contentType) { return DependencyGraph.fromResponse(json, contentType); } - return get(responseHandler, '/derived_table/graph/model/$path_model', + return get(responseHandler, '/derived_table/graph/model/$pathModel', {'format': format, 'color': color}); } /// ### Get the subgraph representing this derived table and its dependencies. /// /// GET /derived_table/graph/view/{view} -> DependencyGraph - Future> graph_derived_tables_for_view( + Future> graphDerivedTablesForView( /// @param {String} view The derived table's view name. String view, @@ -4334,13 +4276,13 @@ class LookerSDK extends APIMethods { /// @param {String} workspace The model directory to look in, either `dev` or `production`. String workspace}) async { - var path_view = encodeParam(view); + var pathView = encodeParam(view); DependencyGraph responseHandler(dynamic json, String contentType) { return DependencyGraph.fromResponse(json, contentType); } - return get(responseHandler, '/derived_table/graph/view/$path_view', + return get(responseHandler, '/derived_table/graph/view/$pathView', {'models': models, 'workspace': workspace}); } @@ -4351,7 +4293,7 @@ class LookerSDK extends APIMethods { /// Search for folders by creator id, parent id, name, etc /// /// GET /folders/search -> List - Future>> search_folders( + Future>> searchFolders( { /// @param {String} fields Requested fields. @@ -4361,7 +4303,7 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page Results per page. - int per_page, + int perPage, /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) int limit, @@ -4379,16 +4321,16 @@ class LookerSDK extends APIMethods { int id, /// @param {String} parent_id Filter on a children of a particular folder. - String parent_id, + String parentId, /// @param {String} creator_id Filter on folder created by a particular user. - String creator_id, + String creatorId, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or, + bool filterOr, /// @param {bool} is_shared_root Match is shared root - bool is_shared_root}) async { + bool isSharedRoot}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Folder.fromResponse(i, contentType)) @@ -4398,16 +4340,16 @@ class LookerSDK extends APIMethods { return get(responseHandler, '/folders/search', { 'fields': fields, 'page': page, - 'per_page': per_page, + 'per_page': perPage, 'limit': limit, 'offset': offset, 'sorts': sorts, 'name': name, 'id': id, - 'parent_id': parent_id, - 'creator_id': creator_id, - 'filter_or': filter_or, - 'is_shared_root': is_shared_root + 'parent_id': parentId, + 'creator_id': creatorId, + 'filter_or': filterOr, + 'is_shared_root': isSharedRoot }); } @@ -4417,55 +4359,55 @@ class LookerSDK extends APIMethods { Future> folder( /// @param {String} folder_id Id of folder - String folder_id, + String folderId, { /// @param {String} fields Requested fields. String fields}) async { - var path_folder_id = encodeParam(folder_id); + var pathFolderId = encodeParam(folderId); Folder responseHandler(dynamic json, String contentType) { return Folder.fromResponse(json, contentType); } - return get(responseHandler, '/folders/$path_folder_id', {'fields': fields}); + return get(responseHandler, '/folders/$pathFolderId', {'fields': fields}); } /// ### Update the folder with a specific id. /// /// PATCH /folders/{folder_id} -> Folder - Future> update_folder( + Future> updateFolder( /// @param {String} folder_id Id of folder - String folder_id, + String folderId, /// @param {UpdateFolder} body UpdateFolder body) async { - var path_folder_id = encodeParam(folder_id); + var pathFolderId = encodeParam(folderId); Folder responseHandler(dynamic json, String contentType) { return Folder.fromResponse(json, contentType); } - return patch(responseHandler, '/folders/$path_folder_id', null, - body == null ? null : body.toJson()); + return patch( + responseHandler, '/folders/$pathFolderId', null, body?.toJson()); } /// ### Delete the folder with a specific id including any children folders. /// **DANGER** this will delete all looks and dashboards in the folder. /// /// DELETE /folders/{folder_id} -> String - Future> delete_folder( + Future> deleteFolder( /// @param {String} folder_id Id of folder - String folder_id) async { - var path_folder_id = encodeParam(folder_id); + String folderId) async { + var pathFolderId = encodeParam(folderId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/folders/$path_folder_id'); + return delete(responseHandler, '/folders/$pathFolderId'); } /// ### Get information about all folders. @@ -4476,7 +4418,7 @@ class LookerSDK extends APIMethods { /// In API 4.0+, all personal folders will be returned. /// /// GET /folders -> List - Future>> all_folders( + Future>> allFolders( { /// @param {String} fields Requested fields. @@ -4496,7 +4438,7 @@ class LookerSDK extends APIMethods { /// returns 404 Not Found. /// /// POST /folders -> Folder - Future> create_folder( + Future> createFolder( /// @param {CreateFolder} body CreateFolder body) async { @@ -4504,17 +4446,16 @@ class LookerSDK extends APIMethods { return Folder.fromResponse(json, contentType); } - return post( - responseHandler, '/folders', null, body == null ? null : body.toJson()); + return post(responseHandler, '/folders', null, body?.toJson()); } /// ### Get the children of a folder. /// /// GET /folders/{folder_id}/children -> List - Future>> folder_children( + Future>> folderChildren( /// @param {String} folder_id Id of folder - String folder_id, + String folderId, { /// @param {String} fields Requested fields. @@ -4524,11 +4465,11 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page Results per page. - int per_page, + int perPage, /// @param {String} sorts Fields to sort by. String sorts}) async { - var path_folder_id = encodeParam(folder_id); + var pathFolderId = encodeParam(folderId); List responseHandler(dynamic json, String contentType) { return json @@ -4536,17 +4477,17 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/folders/$path_folder_id/children', - {'fields': fields, 'page': page, 'per_page': per_page, 'sorts': sorts}); + return get(responseHandler, '/folders/$pathFolderId/children', + {'fields': fields, 'page': page, 'per_page': perPage, 'sorts': sorts}); } /// ### Search the children of a folder /// /// GET /folders/{folder_id}/children/search -> List - Future>> folder_children_search( + Future>> folderChildrenSearch( /// @param {String} folder_id Id of folder - String folder_id, + String folderId, { /// @param {String} fields Requested fields. @@ -4557,7 +4498,7 @@ class LookerSDK extends APIMethods { /// @param {String} name Match folder name. String name}) async { - var path_folder_id = encodeParam(folder_id); + var pathFolderId = encodeParam(folderId); List responseHandler(dynamic json, String contentType) { return json @@ -4565,43 +4506,43 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/folders/$path_folder_id/children/search', + return get(responseHandler, '/folders/$pathFolderId/children/search', {'fields': fields, 'sorts': sorts, 'name': name}); } /// ### Get the parent of a folder /// /// GET /folders/{folder_id}/parent -> Folder - Future> folder_parent( + Future> folderParent( /// @param {String} folder_id Id of folder - String folder_id, + String folderId, { /// @param {String} fields Requested fields. String fields}) async { - var path_folder_id = encodeParam(folder_id); + var pathFolderId = encodeParam(folderId); Folder responseHandler(dynamic json, String contentType) { return Folder.fromResponse(json, contentType); } return get( - responseHandler, '/folders/$path_folder_id/parent', {'fields': fields}); + responseHandler, '/folders/$pathFolderId/parent', {'fields': fields}); } /// ### Get the ancestors of a folder /// /// GET /folders/{folder_id}/ancestors -> List - Future>> folder_ancestors( + Future>> folderAncestors( /// @param {String} folder_id Id of folder - String folder_id, + String folderId, { /// @param {String} fields Requested fields. String fields}) async { - var path_folder_id = encodeParam(folder_id); + var pathFolderId = encodeParam(folderId); List responseHandler(dynamic json, String contentType) { return json @@ -4609,7 +4550,7 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/folders/$path_folder_id/ancestors', + return get(responseHandler, '/folders/$pathFolderId/ancestors', {'fields': fields}); } @@ -4618,15 +4559,15 @@ class LookerSDK extends APIMethods { /// In API 4.0+, all looks in a folder will be returned, excluding looks in the trash. /// /// GET /folders/{folder_id}/looks -> List - Future>> folder_looks( + Future>> folderLooks( /// @param {String} folder_id Id of folder - String folder_id, + String folderId, { /// @param {String} fields Requested fields. String fields}) async { - var path_folder_id = encodeParam(folder_id); + var pathFolderId = encodeParam(folderId); List responseHandler(dynamic json, String contentType) { return json @@ -4635,21 +4576,21 @@ class LookerSDK extends APIMethods { } return get( - responseHandler, '/folders/$path_folder_id/looks', {'fields': fields}); + responseHandler, '/folders/$pathFolderId/looks', {'fields': fields}); } /// ### Get the dashboards in a folder /// /// GET /folders/{folder_id}/dashboards -> List - Future>> folder_dashboards( + Future>> folderDashboards( /// @param {String} folder_id Id of folder - String folder_id, + String folderId, { /// @param {String} fields Requested fields. String fields}) async { - var path_folder_id = encodeParam(folder_id); + var pathFolderId = encodeParam(folderId); List responseHandler(dynamic json, String contentType) { return json @@ -4657,7 +4598,7 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/folders/$path_folder_id/dashboards', + return get(responseHandler, '/folders/$pathFolderId/dashboards', {'fields': fields}); } @@ -4668,7 +4609,7 @@ class LookerSDK extends APIMethods { /// ### Get information about all groups. /// /// GET /groups -> List - Future>> all_groups( + Future>> allGroups( { /// @param {String} fields Requested fields. @@ -4678,7 +4619,7 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page Results per page. - int per_page, + int perPage, /// @param {String} sorts Fields to sort by. String sorts, @@ -4687,10 +4628,10 @@ class LookerSDK extends APIMethods { DelimList ids, /// @param {int} content_metadata_id Id of content metadata to which groups must have access. - int content_metadata_id, + int contentMetadataId, /// @param {bool} can_add_to_content_metadata Select only groups that either can/cannot be given access to content. - bool can_add_to_content_metadata}) async { + bool canAddToContentMetadata}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Group.fromResponse(i, contentType)) @@ -4700,18 +4641,18 @@ class LookerSDK extends APIMethods { return get(responseHandler, '/groups', { 'fields': fields, 'page': page, - 'per_page': per_page, + 'per_page': perPage, 'sorts': sorts, 'ids': ids, - 'content_metadata_id': content_metadata_id, - 'can_add_to_content_metadata': can_add_to_content_metadata + 'content_metadata_id': contentMetadataId, + 'can_add_to_content_metadata': canAddToContentMetadata }); } /// ### Creates a new group (admin only). /// /// POST /groups -> Group - Future> create_group( + Future> createGroup( /// @param {WriteGroup} body WriteGroup body, @@ -4723,8 +4664,7 @@ class LookerSDK extends APIMethods { return Group.fromResponse(json, contentType); } - return post(responseHandler, '/groups', {'fields': fields}, - body == null ? null : body.toJson()); + return post(responseHandler, '/groups', {'fields': fields}, body?.toJson()); } /// ### Search groups @@ -4753,7 +4693,7 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /groups/search -> List - Future>> search_groups( + Future>> searchGroups( { /// @param {String} fields Requested fields. @@ -4769,7 +4709,7 @@ class LookerSDK extends APIMethods { String sorts, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or, + bool filterOr, /// @param {int} id Match group id. int id, @@ -4778,13 +4718,13 @@ class LookerSDK extends APIMethods { String name, /// @param {String} external_group_id Match group external_group_id. - String external_group_id, + String externalGroupId, /// @param {bool} externally_managed Match group externally_managed. - bool externally_managed, + bool externallyManaged, /// @param {bool} externally_orphaned Match group externally_orphaned. - bool externally_orphaned}) async { + bool externallyOrphaned}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Group.fromResponse(i, contentType)) @@ -4796,12 +4736,12 @@ class LookerSDK extends APIMethods { 'limit': limit, 'offset': offset, 'sorts': sorts, - 'filter_or': filter_or, + 'filter_or': filterOr, 'id': id, 'name': name, - 'external_group_id': external_group_id, - 'externally_managed': externally_managed, - 'externally_orphaned': externally_orphaned + 'external_group_id': externalGroupId, + 'externally_managed': externallyManaged, + 'externally_orphaned': externallyOrphaned }); } @@ -4831,7 +4771,7 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /groups/search/with_roles -> List - Future>> search_groups_with_roles( + Future>> searchGroupsWithRoles( { /// @param {String} fields Requested fields. @@ -4847,7 +4787,7 @@ class LookerSDK extends APIMethods { String sorts, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or, + bool filterOr, /// @param {int} id Match group id. int id, @@ -4856,13 +4796,13 @@ class LookerSDK extends APIMethods { String name, /// @param {String} external_group_id Match group external_group_id. - String external_group_id, + String externalGroupId, /// @param {bool} externally_managed Match group externally_managed. - bool externally_managed, + bool externallyManaged, /// @param {bool} externally_orphaned Match group externally_orphaned. - bool externally_orphaned}) async { + bool externallyOrphaned}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => GroupSearch.fromResponse(i, contentType)) @@ -4874,12 +4814,12 @@ class LookerSDK extends APIMethods { 'limit': limit, 'offset': offset, 'sorts': sorts, - 'filter_or': filter_or, + 'filter_or': filterOr, 'id': id, 'name': name, - 'external_group_id': external_group_id, - 'externally_managed': externally_managed, - 'externally_orphaned': externally_orphaned + 'external_group_id': externalGroupId, + 'externally_managed': externallyManaged, + 'externally_orphaned': externallyOrphaned }); } @@ -4910,7 +4850,7 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /groups/search/with_hierarchy -> List - Future>> search_groups_with_hierarchy( + Future>> searchGroupsWithHierarchy( { /// @param {String} fields Requested fields. @@ -4926,7 +4866,7 @@ class LookerSDK extends APIMethods { String sorts, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or, + bool filterOr, /// @param {int} id Match group id. int id, @@ -4935,13 +4875,13 @@ class LookerSDK extends APIMethods { String name, /// @param {String} external_group_id Match group external_group_id. - String external_group_id, + String externalGroupId, /// @param {bool} externally_managed Match group externally_managed. - bool externally_managed, + bool externallyManaged, /// @param {bool} externally_orphaned Match group externally_orphaned. - bool externally_orphaned}) async { + bool externallyOrphaned}) async { List responseHandler(dynamic json, String contentType) { return json .map( @@ -4954,12 +4894,12 @@ class LookerSDK extends APIMethods { 'limit': limit, 'offset': offset, 'sorts': sorts, - 'filter_or': filter_or, + 'filter_or': filterOr, 'id': id, 'name': name, - 'external_group_id': external_group_id, - 'externally_managed': externally_managed, - 'externally_orphaned': externally_orphaned + 'external_group_id': externalGroupId, + 'externally_managed': externallyManaged, + 'externally_orphaned': externallyOrphaned }); } @@ -4969,27 +4909,27 @@ class LookerSDK extends APIMethods { Future> group( /// @param {int} group_id Id of group - int group_id, + int groupId, { /// @param {String} fields Requested fields. String fields}) async { - var path_group_id = encodeParam(group_id); + var pathGroupId = encodeParam(groupId); Group responseHandler(dynamic json, String contentType) { return Group.fromResponse(json, contentType); } - return get(responseHandler, '/groups/$path_group_id', {'fields': fields}); + return get(responseHandler, '/groups/$pathGroupId', {'fields': fields}); } /// ### Updates the a group (admin only). /// /// PATCH /groups/{group_id} -> Group - Future> update_group( + Future> updateGroup( /// @param {int} group_id Id of group - int group_id, + int groupId, /// @param {WriteGroup} body WriteGroup body, @@ -4997,44 +4937,44 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_group_id = encodeParam(group_id); + var pathGroupId = encodeParam(groupId); Group responseHandler(dynamic json, String contentType) { return Group.fromResponse(json, contentType); } - return patch(responseHandler, '/groups/$path_group_id', {'fields': fields}, - body == null ? null : body.toJson()); + return patch(responseHandler, '/groups/$pathGroupId', {'fields': fields}, + body?.toJson()); } /// ### Deletes a group (admin only). /// /// DELETE /groups/{group_id} -> String - Future> delete_group( + Future> deleteGroup( /// @param {int} group_id Id of group - int group_id) async { - var path_group_id = encodeParam(group_id); + int groupId) async { + var pathGroupId = encodeParam(groupId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/groups/$path_group_id'); + return delete(responseHandler, '/groups/$pathGroupId'); } /// ### Get information about all the groups in a group /// /// GET /groups/{group_id}/groups -> List - Future>> all_group_groups( + Future>> allGroupGroups( /// @param {int} group_id Id of group - int group_id, + int groupId, { /// @param {String} fields Requested fields. String fields}) async { - var path_group_id = encodeParam(group_id); + var pathGroupId = encodeParam(groupId); List responseHandler(dynamic json, String contentType) { return json @@ -5043,36 +4983,36 @@ class LookerSDK extends APIMethods { } return get( - responseHandler, '/groups/$path_group_id/groups', {'fields': fields}); + responseHandler, '/groups/$pathGroupId/groups', {'fields': fields}); } /// ### Adds a new group to a group. /// /// POST /groups/{group_id}/groups -> Group - Future> add_group_group( + Future> addGroupGroup( /// @param {int} group_id Id of group - int group_id, + int groupId, /// @param {GroupIdForGroupInclusion} body GroupIdForGroupInclusion body) async { - var path_group_id = encodeParam(group_id); + var pathGroupId = encodeParam(groupId); Group responseHandler(dynamic json, String contentType) { return Group.fromResponse(json, contentType); } - return post(responseHandler, '/groups/$path_group_id/groups', null, - body == null ? null : body.toJson()); + return post( + responseHandler, '/groups/$pathGroupId/groups', null, body?.toJson()); } /// ### Get information about all the users directly included in a group. /// /// GET /groups/{group_id}/users -> List - Future>> all_group_users( + Future>> allGroupUsers( /// @param {int} group_id Id of group - int group_id, + int groupId, { /// @param {String} fields Requested fields. @@ -5082,74 +5022,73 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page Results per page. - int per_page, + int perPage, /// @param {String} sorts Fields to sort by. String sorts}) async { - var path_group_id = encodeParam(group_id); + var pathGroupId = encodeParam(groupId); List responseHandler(dynamic json, String contentType) { return json.map((i) => User.fromResponse(i, contentType)).toList(); } - return get(responseHandler, '/groups/$path_group_id/users', - {'fields': fields, 'page': page, 'per_page': per_page, 'sorts': sorts}); + return get(responseHandler, '/groups/$pathGroupId/users', + {'fields': fields, 'page': page, 'per_page': perPage, 'sorts': sorts}); } /// ### Adds a new user to a group. /// /// POST /groups/{group_id}/users -> User - Future> add_group_user( + Future> addGroupUser( /// @param {int} group_id Id of group - int group_id, + int groupId, /// @param {GroupIdForGroupUserInclusion} body GroupIdForGroupUserInclusion body) async { - var path_group_id = encodeParam(group_id); + var pathGroupId = encodeParam(groupId); User responseHandler(dynamic json, String contentType) { return User.fromResponse(json, contentType); } - return post(responseHandler, '/groups/$path_group_id/users', null, - body == null ? null : body.toJson()); + return post( + responseHandler, '/groups/$pathGroupId/users', null, body?.toJson()); } /// ### Removes a user from a group. /// /// DELETE /groups/{group_id}/users/{user_id} -> void - Future> delete_group_user( + Future> deleteGroupUser( /// @param {int} group_id Id of group - int group_id, + int groupId, /// @param {int} user_id Id of user to remove from group - int user_id) async { - var path_group_id = encodeParam(group_id); - var path_user_id = encodeParam(user_id); + int userId) async { + var pathGroupId = encodeParam(groupId); + var pathUserId = encodeParam(userId); void responseHandler(dynamic json, String contentType) {} - return delete( - responseHandler, '/groups/$path_group_id/users/$path_user_id'); + return delete(responseHandler, '/groups/$pathGroupId/users/$pathUserId'); } /// ### Removes a group from a group. /// /// DELETE /groups/{group_id}/groups/{deleting_group_id} -> void - Future> delete_group_from_group( + Future> deleteGroupFromGroup( /// @param {int} group_id Id of group - int group_id, + int groupId, /// @param {int} deleting_group_id Id of group to delete - int deleting_group_id) async { - var path_group_id = encodeParam(group_id); - var path_deleting_group_id = encodeParam(deleting_group_id); + int deletingGroupId) async { + var pathGroupId = encodeParam(groupId); + var pathDeletingGroupId = encodeParam(deletingGroupId); void responseHandler(dynamic json, String contentType) {} - return delete(responseHandler, - '/groups/$path_group_id/groups/$path_deleting_group_id'); + return delete( + responseHandler, '/groups/$pathGroupId/groups/$pathDeletingGroupId'); } /// ### Set the value of a user attribute for a group. @@ -5157,19 +5096,18 @@ class LookerSDK extends APIMethods { /// For information about how user attribute values are calculated, see [Set User Attribute Group Values](#!/UserAttribute/set_user_attribute_group_values). /// /// PATCH /groups/{group_id}/attribute_values/{user_attribute_id} -> UserAttributeGroupValue - Future> - update_user_attribute_group_value( + Future> updateUserAttributeGroupValue( - /// @param {int} group_id Id of group - int group_id, + /// @param {int} group_id Id of group + int groupId, - /// @param {int} user_attribute_id Id of user attribute - int user_attribute_id, + /// @param {int} user_attribute_id Id of user attribute + int userAttributeId, - /// @param {UserAttributeGroupValue} body - UserAttributeGroupValue body) async { - var path_group_id = encodeParam(group_id); - var path_user_attribute_id = encodeParam(user_attribute_id); + /// @param {UserAttributeGroupValue} body + UserAttributeGroupValue body) async { + var pathGroupId = encodeParam(groupId); + var pathUserAttributeId = encodeParam(userAttributeId); UserAttributeGroupValue responseHandler(dynamic json, String contentType) { return UserAttributeGroupValue.fromResponse(json, contentType); @@ -5177,27 +5115,27 @@ class LookerSDK extends APIMethods { return patch( responseHandler, - '/groups/$path_group_id/attribute_values/$path_user_attribute_id', + '/groups/$pathGroupId/attribute_values/$pathUserAttributeId', null, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Remove a user attribute value from a group. /// /// DELETE /groups/{group_id}/attribute_values/{user_attribute_id} -> void - Future> delete_user_attribute_group_value( + Future> deleteUserAttributeGroupValue( /// @param {int} group_id Id of group - int group_id, + int groupId, /// @param {int} user_attribute_id Id of user attribute - int user_attribute_id) async { - var path_group_id = encodeParam(group_id); - var path_user_attribute_id = encodeParam(user_attribute_id); + int userAttributeId) async { + var pathGroupId = encodeParam(groupId); + var pathUserAttributeId = encodeParam(userAttributeId); void responseHandler(dynamic json, String contentType) {} return delete(responseHandler, - '/groups/$path_group_id/attribute_values/$path_user_attribute_id'); + '/groups/$pathGroupId/attribute_values/$pathUserAttributeId'); } // #endregion Group: Manage Groups @@ -5207,7 +5145,7 @@ class LookerSDK extends APIMethods { /// ### Get information about the primary homepage's sections. /// /// GET /primary_homepage_sections -> List - Future>> all_primary_homepage_sections( + Future>> allPrimaryHomepageSections( { /// @param {String} fields Requested fields. @@ -5230,7 +5168,7 @@ class LookerSDK extends APIMethods { /// ### Get information about all Integration Hubs. /// /// GET /integration_hubs -> List - Future>> all_integration_hubs( + Future>> allIntegrationHubs( { /// @param {String} fields Requested fields. @@ -5250,7 +5188,7 @@ class LookerSDK extends APIMethods { /// This API is rate limited to prevent it from being used for SSRF attacks /// /// POST /integration_hubs -> IntegrationHub - Future> create_integration_hub( + Future> createIntegrationHub( /// @param {WriteIntegrationHub} body WriteIntegrationHub body, @@ -5263,27 +5201,27 @@ class LookerSDK extends APIMethods { } return post(responseHandler, '/integration_hubs', {'fields': fields}, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Get information about a Integration Hub. /// /// GET /integration_hubs/{integration_hub_id} -> IntegrationHub - Future> integration_hub( + Future> integrationHub( /// @param {int} integration_hub_id Id of Integration Hub - int integration_hub_id, + int integrationHubId, { /// @param {String} fields Requested fields. String fields}) async { - var path_integration_hub_id = encodeParam(integration_hub_id); + var pathIntegrationHubId = encodeParam(integrationHubId); IntegrationHub responseHandler(dynamic json, String contentType) { return IntegrationHub.fromResponse(json, contentType); } - return get(responseHandler, '/integration_hubs/$path_integration_hub_id', + return get(responseHandler, '/integration_hubs/$pathIntegrationHubId', {'fields': fields}); } @@ -5292,10 +5230,10 @@ class LookerSDK extends APIMethods { /// This API is rate limited to prevent it from being used for SSRF attacks /// /// PATCH /integration_hubs/{integration_hub_id} -> IntegrationHub - Future> update_integration_hub( + Future> updateIntegrationHub( /// @param {int} integration_hub_id Id of Integration Hub - int integration_hub_id, + int integrationHubId, /// @param {WriteIntegrationHub} body WriteIntegrationHub body, @@ -5303,61 +5241,60 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_integration_hub_id = encodeParam(integration_hub_id); + var pathIntegrationHubId = encodeParam(integrationHubId); IntegrationHub responseHandler(dynamic json, String contentType) { return IntegrationHub.fromResponse(json, contentType); } - return patch(responseHandler, '/integration_hubs/$path_integration_hub_id', - {'fields': fields}, body == null ? null : body.toJson()); + return patch(responseHandler, '/integration_hubs/$pathIntegrationHubId', + {'fields': fields}, body?.toJson()); } /// ### Delete a Integration Hub. /// /// DELETE /integration_hubs/{integration_hub_id} -> String - Future> delete_integration_hub( + Future> deleteIntegrationHub( /// @param {int} integration_hub_id Id of integration_hub - int integration_hub_id) async { - var path_integration_hub_id = encodeParam(integration_hub_id); + int integrationHubId) async { + var pathIntegrationHubId = encodeParam(integrationHubId); String responseHandler(dynamic json, String contentType) { return json; } - return delete( - responseHandler, '/integration_hubs/$path_integration_hub_id'); + return delete(responseHandler, '/integration_hubs/$pathIntegrationHubId'); } /// Accepts the legal agreement for a given integration hub. This only works for integration hubs that have legal_agreement_required set to true and legal_agreement_signed set to false. /// /// POST /integration_hubs/{integration_hub_id}/accept_legal_agreement -> IntegrationHub - Future> accept_integration_hub_legal_agreement( + Future> acceptIntegrationHubLegalAgreement( /// @param {int} integration_hub_id Id of integration_hub - int integration_hub_id) async { - var path_integration_hub_id = encodeParam(integration_hub_id); + int integrationHubId) async { + var pathIntegrationHubId = encodeParam(integrationHubId); IntegrationHub responseHandler(dynamic json, String contentType) { return IntegrationHub.fromResponse(json, contentType); } return post(responseHandler, - '/integration_hubs/$path_integration_hub_id/accept_legal_agreement'); + '/integration_hubs/$pathIntegrationHubId/accept_legal_agreement'); } /// ### Get information about all Integrations. /// /// GET /integrations -> List - Future>> all_integrations( + Future>> allIntegrations( { /// @param {String} fields Requested fields. String fields, /// @param {String} integration_hub_id Filter to a specific provider - String integration_hub_id}) async { + String integrationHubId}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Integration.fromResponse(i, contentType)) @@ -5365,7 +5302,7 @@ class LookerSDK extends APIMethods { } return get(responseHandler, '/integrations', - {'fields': fields, 'integration_hub_id': integration_hub_id}); + {'fields': fields, 'integration_hub_id': integrationHubId}); } /// ### Get information about a Integration. @@ -5374,28 +5311,28 @@ class LookerSDK extends APIMethods { Future> integration( /// @param {String} integration_id Id of integration - String integration_id, + String integrationId, { /// @param {String} fields Requested fields. String fields}) async { - var path_integration_id = encodeParam(integration_id); + var pathIntegrationId = encodeParam(integrationId); Integration responseHandler(dynamic json, String contentType) { return Integration.fromResponse(json, contentType); } - return get(responseHandler, '/integrations/$path_integration_id', + return get(responseHandler, '/integrations/$pathIntegrationId', {'fields': fields}); } /// ### Update parameters on a Integration. /// /// PATCH /integrations/{integration_id} -> Integration - Future> update_integration( + Future> updateIntegration( /// @param {String} integration_id Id of integration - String integration_id, + String integrationId, /// @param {WriteIntegration} body WriteIntegration body, @@ -5403,51 +5340,51 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_integration_id = encodeParam(integration_id); + var pathIntegrationId = encodeParam(integrationId); Integration responseHandler(dynamic json, String contentType) { return Integration.fromResponse(json, contentType); } - return patch(responseHandler, '/integrations/$path_integration_id', - {'fields': fields}, body == null ? null : body.toJson()); + return patch(responseHandler, '/integrations/$pathIntegrationId', + {'fields': fields}, body?.toJson()); } /// Returns the Integration form for presentation to the user. /// /// POST /integrations/{integration_id}/form -> DataActionForm - Future> fetch_integration_form( + Future> fetchIntegrationForm( /// @param {String} integration_id Id of integration - String integration_id, + String integrationId, { /// @param {Map} body Map body}) async { - var path_integration_id = encodeParam(integration_id); + var pathIntegrationId = encodeParam(integrationId); DataActionForm responseHandler(dynamic json, String contentType) { return DataActionForm.fromResponse(json, contentType); } return post( - responseHandler, '/integrations/$path_integration_id/form', null, body); + responseHandler, '/integrations/$pathIntegrationId/form', null, body); } /// Tests the integration to make sure all the settings are working. /// /// POST /integrations/{integration_id}/test -> IntegrationTestResult - Future> test_integration( + Future> testIntegration( /// @param {String} integration_id Id of integration - String integration_id) async { - var path_integration_id = encodeParam(integration_id); + String integrationId) async { + var pathIntegrationId = encodeParam(integrationId); IntegrationTestResult responseHandler(dynamic json, String contentType) { return IntegrationTestResult.fromResponse(json, contentType); } - return post(responseHandler, '/integrations/$path_integration_id/test'); + return post(responseHandler, '/integrations/$pathIntegrationId/test'); } // #endregion Integration: Manage Integrations @@ -5463,7 +5400,7 @@ class LookerSDK extends APIMethods { /// Find **soft-deleted looks** with [search_looks()](#!/Look/search_looks) /// /// GET /looks -> List - Future>> all_looks( + Future>> allLooks( { /// @param {String} fields Requested fields. @@ -5484,7 +5421,7 @@ class LookerSDK extends APIMethods { /// in the call to `create_look()`. /// /// POST /looks -> LookWithQuery - Future> create_look( + Future> createLook( /// @param {WriteLookWithQuery} body WriteLookWithQuery body, @@ -5496,8 +5433,7 @@ class LookerSDK extends APIMethods { return LookWithQuery.fromResponse(json, contentType); } - return post(responseHandler, '/looks', {'fields': fields}, - body == null ? null : body.toJson()); + return post(responseHandler, '/looks', {'fields': fields}, body?.toJson()); } /// ### Search Looks @@ -5529,7 +5465,7 @@ class LookerSDK extends APIMethods { /// Get a **single look** by id with [look(id)](#!/Look/look) /// /// GET /looks/search -> List - Future>> search_looks( + Future>> searchLooks( { /// @param {String} id Match look id. @@ -5542,28 +5478,28 @@ class LookerSDK extends APIMethods { String description, /// @param {String} content_favorite_id Select looks with a particular content favorite id - String content_favorite_id, + String contentFavoriteId, /// @param {String} folder_id Select looks in a particular folder. - String folder_id, + String folderId, /// @param {String} user_id Select looks created by a particular user. - String user_id, + String userId, /// @param {String} view_count Select looks with particular view_count value - String view_count, + String viewCount, /// @param {bool} deleted Select soft-deleted looks bool deleted, /// @param {int} query_id Select looks that reference a particular query by query_id - int query_id, + int queryId, /// @param {bool} curate Exclude items that exist only in personal spaces other than the users bool curate, /// @param {String} last_viewed_at Select looks based on when they were last viewed - String last_viewed_at, + String lastViewedAt, /// @param {String} fields Requested fields. String fields, @@ -5572,7 +5508,7 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page Results per page. - int per_page, + int perPage, /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) int limit, @@ -5584,7 +5520,7 @@ class LookerSDK extends APIMethods { String sorts, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json.map((i) => Look.fromResponse(i, contentType)).toList(); } @@ -5593,21 +5529,21 @@ class LookerSDK extends APIMethods { 'id': id, 'title': title, 'description': description, - 'content_favorite_id': content_favorite_id, - 'folder_id': folder_id, - 'user_id': user_id, - 'view_count': view_count, + 'content_favorite_id': contentFavoriteId, + 'folder_id': folderId, + 'user_id': userId, + 'view_count': viewCount, 'deleted': deleted, - 'query_id': query_id, + 'query_id': queryId, 'curate': curate, - 'last_viewed_at': last_viewed_at, + 'last_viewed_at': lastViewedAt, 'fields': fields, 'page': page, - 'per_page': per_page, + 'per_page': perPage, 'limit': limit, 'offset': offset, 'sorts': sorts, - 'filter_or': filter_or + 'filter_or': filterOr }); } @@ -5619,18 +5555,18 @@ class LookerSDK extends APIMethods { Future> look( /// @param {String} look_id Id of look - String look_id, + String lookId, { /// @param {String} fields Requested fields. String fields}) async { - var path_look_id = encodeParam(look_id); + var pathLookId = encodeParam(lookId); LookWithQuery responseHandler(dynamic json, String contentType) { return LookWithQuery.fromResponse(json, contentType); } - return get(responseHandler, '/looks/$path_look_id', {'fields': fields}); + return get(responseHandler, '/looks/$pathLookId', {'fields': fields}); } /// ### Modify a Look @@ -5655,10 +5591,10 @@ class LookerSDK extends APIMethods { /// database and destroyed. There is no "undo" for `delete_look()`. /// /// PATCH /looks/{look_id} -> LookWithQuery - Future> update_look( + Future> updateLook( /// @param {String} look_id Id of look - String look_id, + String lookId, /// @param {WriteLookWithQuery} body WriteLookWithQuery body, @@ -5666,14 +5602,14 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_look_id = encodeParam(look_id); + var pathLookId = encodeParam(lookId); LookWithQuery responseHandler(dynamic json, String contentType) { return LookWithQuery.fromResponse(json, contentType); } - return patch(responseHandler, '/looks/$path_look_id', {'fields': fields}, - body == null ? null : body.toJson()); + return patch(responseHandler, '/looks/$pathLookId', {'fields': fields}, + body?.toJson()); } /// ### Permanently Delete a Look @@ -5685,17 +5621,17 @@ class LookerSDK extends APIMethods { /// For information about soft-delete (which can be undone) see [update_look()](#!/Look/update_look). /// /// DELETE /looks/{look_id} -> String - Future> delete_look( + Future> deleteLook( /// @param {String} look_id Id of look - String look_id) async { - var path_look_id = encodeParam(look_id); + String lookId) async { + var pathLookId = encodeParam(lookId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/looks/$path_look_id'); + return delete(responseHandler, '/looks/$pathLookId'); } /// ### Run a Look @@ -5720,71 +5656,70 @@ class LookerSDK extends APIMethods { /// GET /looks/{look_id}/run/{result_format} -> String /// /// **Note**: Binary content may be returned by this method. - Future> run_look( + Future> runLook( /// @param {String} look_id Id of look - String look_id, + String lookId, /// @param {String} result_format Format of result - String result_format, + String resultFormat, { /// @param {int} limit Row limit (may override the limit in the saved query). int limit, /// @param {bool} apply_formatting Apply model-specified formatting to each result. - bool apply_formatting, + bool applyFormatting, /// @param {bool} apply_vis Apply visualization options to results. - bool apply_vis, + bool applyVis, /// @param {bool} cache Get results from cache if available. bool cache, /// @param {int} image_width Render width for image formats. - int image_width, + int imageWidth, /// @param {int} image_height Render height for image formats. - int image_height, + int imageHeight, /// @param {bool} generate_drill_links Generate drill links (only applicable to 'json_detail' format. - bool generate_drill_links, + bool generateDrillLinks, /// @param {bool} force_production Force use of production models even if the user is in development mode. - bool force_production, + bool forceProduction, /// @param {bool} cache_only Retrieve any results from cache even if the results have expired. - bool cache_only, + bool cacheOnly, /// @param {String} path_prefix Prefix to use for drill links (url encoded). - String path_prefix, + String pathPrefix, /// @param {bool} rebuild_pdts Rebuild PDTS used in query. - bool rebuild_pdts, + bool rebuildPdts, /// @param {bool} server_table_calcs Perform table calculations on query results - bool server_table_calcs}) async { - var path_look_id = encodeParam(look_id); - var path_result_format = encodeParam(result_format); + bool serverTableCalcs}) async { + var pathLookId = encodeParam(lookId); + var pathResultFormat = encodeParam(resultFormat); dynamic responseHandler(dynamic json, String contentType) { return json; } - return get( - responseHandler, '/looks/$path_look_id/run/$path_result_format', { + return get(responseHandler, '/looks/$pathLookId/run/$pathResultFormat', { 'limit': limit, - 'apply_formatting': apply_formatting, - 'apply_vis': apply_vis, + 'apply_formatting': applyFormatting, + 'apply_vis': applyVis, 'cache': cache, - 'image_width': image_width, - 'image_height': image_height, - 'generate_drill_links': generate_drill_links, - 'force_production': force_production, - 'cache_only': cache_only, - 'path_prefix': path_prefix, - 'rebuild_pdts': rebuild_pdts, - 'server_table_calcs': server_table_calcs + 'image_width': imageWidth, + 'image_height': imageHeight, + 'generate_drill_links': generateDrillLinks, + 'force_production': forceProduction, + 'cache_only': cacheOnly, + 'path_prefix': pathPrefix, + 'rebuild_pdts': rebuildPdts, + 'server_table_calcs': serverTableCalcs }); } @@ -5797,22 +5732,22 @@ class LookerSDK extends APIMethods { /// `look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. /// /// POST /looks/{look_id}/copy -> LookWithQuery - Future> copy_look( + Future> copyLook( /// @param {String} look_id Look id to copy. - String look_id, + String lookId, { /// @param {String} folder_id Folder id to copy to. - String folder_id}) async { - var path_look_id = encodeParam(look_id); + String folderId}) async { + var pathLookId = encodeParam(lookId); LookWithQuery responseHandler(dynamic json, String contentType) { return LookWithQuery.fromResponse(json, contentType); } return post( - responseHandler, '/looks/$path_look_id/copy', {'folder_id': folder_id}); + responseHandler, '/looks/$pathLookId/copy', {'folder_id': folderId}); } /// ### Move an existing look @@ -5823,21 +5758,21 @@ class LookerSDK extends APIMethods { /// `look_id` and `folder_id` must already exist, and `folder_id` must be different from the current `folder_id` of the dashboard. /// /// PATCH /looks/{look_id}/move -> LookWithQuery - Future> move_look( + Future> moveLook( /// @param {String} look_id Look id to move. - String look_id, + String lookId, /// @param {String} folder_id Folder id to move to. - String folder_id) async { - var path_look_id = encodeParam(look_id); + String folderId) async { + var pathLookId = encodeParam(lookId); LookWithQuery responseHandler(dynamic json, String contentType) { return LookWithQuery.fromResponse(json, contentType); } return patch( - responseHandler, '/looks/$path_look_id/move', {'folder_id': folder_id}); + responseHandler, '/looks/$pathLookId/move', {'folder_id': folderId}); } // #endregion Look: Run and Manage Looks @@ -5847,7 +5782,7 @@ class LookerSDK extends APIMethods { /// ### Get information about all lookml models. /// /// GET /lookml_models -> List - Future>> all_lookml_models( + Future>> allLookmlModels( { /// @param {String} fields Requested fields. @@ -5871,7 +5806,7 @@ class LookerSDK extends APIMethods { /// ### Create a lookml model using the specified configuration. /// /// POST /lookml_models -> LookmlModel - Future> create_lookml_model( + Future> createLookmlModel( /// @param {WriteLookmlModel} body WriteLookmlModel body) async { @@ -5879,83 +5814,82 @@ class LookerSDK extends APIMethods { return LookmlModel.fromResponse(json, contentType); } - return post(responseHandler, '/lookml_models', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/lookml_models', null, body?.toJson()); } /// ### Get information about a lookml model. /// /// GET /lookml_models/{lookml_model_name} -> LookmlModel - Future> lookml_model( + Future> lookmlModel( /// @param {String} lookml_model_name Name of lookml model. - String lookml_model_name, + String lookmlModelName, { /// @param {String} fields Requested fields. String fields}) async { - var path_lookml_model_name = encodeParam(lookml_model_name); + var pathLookmlModelName = encodeParam(lookmlModelName); LookmlModel responseHandler(dynamic json, String contentType) { return LookmlModel.fromResponse(json, contentType); } - return get(responseHandler, '/lookml_models/$path_lookml_model_name', + return get(responseHandler, '/lookml_models/$pathLookmlModelName', {'fields': fields}); } /// ### Update a lookml model using the specified configuration. /// /// PATCH /lookml_models/{lookml_model_name} -> LookmlModel - Future> update_lookml_model( + Future> updateLookmlModel( /// @param {String} lookml_model_name Name of lookml model. - String lookml_model_name, + String lookmlModelName, /// @param {WriteLookmlModel} body WriteLookmlModel body) async { - var path_lookml_model_name = encodeParam(lookml_model_name); + var pathLookmlModelName = encodeParam(lookmlModelName); LookmlModel responseHandler(dynamic json, String contentType) { return LookmlModel.fromResponse(json, contentType); } - return patch(responseHandler, '/lookml_models/$path_lookml_model_name', - null, body == null ? null : body.toJson()); + return patch(responseHandler, '/lookml_models/$pathLookmlModelName', null, + body?.toJson()); } /// ### Delete a lookml model. /// /// DELETE /lookml_models/{lookml_model_name} -> String - Future> delete_lookml_model( + Future> deleteLookmlModel( /// @param {String} lookml_model_name Name of lookml model. - String lookml_model_name) async { - var path_lookml_model_name = encodeParam(lookml_model_name); + String lookmlModelName) async { + var pathLookmlModelName = encodeParam(lookmlModelName); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/lookml_models/$path_lookml_model_name'); + return delete(responseHandler, '/lookml_models/$pathLookmlModelName'); } /// ### Get information about a lookml model explore. /// /// GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> LookmlModelExplore - Future> lookml_model_explore( + Future> lookmlModelExplore( /// @param {String} lookml_model_name Name of lookml model. - String lookml_model_name, + String lookmlModelName, /// @param {String} explore_name Name of explore. - String explore_name, + String exploreName, { /// @param {String} fields Requested fields. String fields}) async { - var path_lookml_model_name = encodeParam(lookml_model_name); - var path_explore_name = encodeParam(explore_name); + var pathLookmlModelName = encodeParam(lookmlModelName); + var pathExploreName = encodeParam(exploreName); LookmlModelExplore responseHandler(dynamic json, String contentType) { return LookmlModelExplore.fromResponse(json, contentType); @@ -5963,7 +5897,7 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/lookml_models/$path_lookml_model_name/explores/$path_explore_name', + '/lookml_models/$pathLookmlModelName/explores/$pathExploreName', {'fields': fields}); } @@ -5992,16 +5926,16 @@ class LookerSDK extends APIMethods { /// ``` /// /// GET /models/{model_name}/views/{view_name}/fields/{field_name}/suggestions -> ModelFieldSuggestions - Future> model_fieldname_suggestions( + Future> modelFieldnameSuggestions( /// @param {String} model_name Name of model - String model_name, + String modelName, /// @param {String} view_name Name of view - String view_name, + String viewName, /// @param {String} field_name Name of field to use for suggestions - String field_name, + String fieldName, { /// @param {String} term Search term pattern (evaluated as as `%term%`) @@ -6009,9 +5943,9 @@ class LookerSDK extends APIMethods { /// @param {Map} filters Suggestion filters with field name keys and comparison expressions Map filters}) async { - var path_model_name = encodeParam(model_name); - var path_view_name = encodeParam(view_name); - var path_field_name = encodeParam(field_name); + var pathModelName = encodeParam(modelName); + var pathViewName = encodeParam(viewName); + var pathFieldName = encodeParam(fieldName); ModelFieldSuggestions responseHandler(dynamic json, String contentType) { return ModelFieldSuggestions.fromResponse(json, contentType); @@ -6019,24 +5953,24 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/models/$path_model_name/views/$path_view_name/fields/$path_field_name/suggestions', + '/models/$pathModelName/views/$pathViewName/fields/$pathFieldName/suggestions', {'term': term, 'filters': filters}); } /// ### Get a single model /// /// GET /models/{model_name} -> Model - Future> get_model( + Future> getModel( /// @param {String} model_name Name of model - String model_name) async { - var path_model_name = encodeParam(model_name); + String modelName) async { + var pathModelName = encodeParam(modelName); Model responseHandler(dynamic json, String contentType) { return Model.fromResponse(json, contentType); } - return get(responseHandler, '/models/$path_model_name'); + return get(responseHandler, '/models/$pathModelName'); } /// ### List databases available to this connection @@ -6050,17 +5984,17 @@ class LookerSDK extends APIMethods { /// multiple databases. /// /// GET /connections/{connection_name}/databases -> List - Future>> connection_databases( + Future>> connectionDatabases( /// @param {String} connection_name Name of connection - String connection_name) async { - var path_connection_name = encodeParam(connection_name); + String connectionName) async { + var pathConnectionName = encodeParam(connectionName); List responseHandler(dynamic json, String contentType) { return json; } - return get(responseHandler, '/connections/$path_connection_name/databases'); + return get(responseHandler, '/connections/$pathConnectionName/databases'); } /// ### Retrieve metadata features for this connection @@ -6068,31 +6002,31 @@ class LookerSDK extends APIMethods { /// Returns a list of feature names with `true` (available) or `false` (not available) /// /// GET /connections/{connection_name}/features -> ConnectionFeatures - Future> connection_features( + Future> connectionFeatures( /// @param {String} connection_name Name of connection - String connection_name, + String connectionName, { /// @param {String} fields Requested fields. String fields}) async { - var path_connection_name = encodeParam(connection_name); + var pathConnectionName = encodeParam(connectionName); ConnectionFeatures responseHandler(dynamic json, String contentType) { return ConnectionFeatures.fromResponse(json, contentType); } - return get(responseHandler, '/connections/$path_connection_name/features', + return get(responseHandler, '/connections/$pathConnectionName/features', {'fields': fields}); } /// ### Get the list of schemas and tables for a connection /// /// GET /connections/{connection_name}/schemas -> List - Future>> connection_schemas( + Future>> connectionSchemas( /// @param {String} connection_name Name of connection - String connection_name, + String connectionName, { /// @param {String} database For dialects that support multiple databases, optionally identify which to use @@ -6103,7 +6037,7 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_connection_name = encodeParam(connection_name); + var pathConnectionName = encodeParam(connectionName); List responseHandler(dynamic json, String contentType) { return json @@ -6111,7 +6045,7 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/connections/$path_connection_name/schemas', + return get(responseHandler, '/connections/$pathConnectionName/schemas', {'database': database, 'cache': cache, 'fields': fields}); } @@ -6123,17 +6057,17 @@ class LookerSDK extends APIMethods { /// For dialects that do **not** support multiple databases, **do not use** the database parameter /// /// GET /connections/{connection_name}/tables -> List - Future>> connection_tables( + Future>> connectionTables( /// @param {String} connection_name Name of connection - String connection_name, + String connectionName, { /// @param {String} database Optional. Name of database to use for the query, only if applicable String database, /// @param {String} schema_name Optional. Return only tables for this schema - String schema_name, + String schemaName, /// @param {bool} cache True to fetch from cache, false to load fresh bool cache, @@ -6142,11 +6076,11 @@ class LookerSDK extends APIMethods { String fields, /// @param {String} table_filter Optional. Return tables with names that contain this value - String table_filter, + String tableFilter, /// @param {int} table_limit Optional. Return tables up to the table_limit - int table_limit}) async { - var path_connection_name = encodeParam(connection_name); + int tableLimit}) async { + var pathConnectionName = encodeParam(connectionName); List responseHandler(dynamic json, String contentType) { return json @@ -6154,43 +6088,43 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/connections/$path_connection_name/tables', { + return get(responseHandler, '/connections/$pathConnectionName/tables', { 'database': database, - 'schema_name': schema_name, + 'schema_name': schemaName, 'cache': cache, 'fields': fields, - 'table_filter': table_filter, - 'table_limit': table_limit + 'table_filter': tableFilter, + 'table_limit': tableLimit }); } /// ### Get the columns (and therefore also the tables) in a specific schema /// /// GET /connections/{connection_name}/columns -> List - Future>> connection_columns( + Future>> connectionColumns( /// @param {String} connection_name Name of connection - String connection_name, + String connectionName, { /// @param {String} database For dialects that support multiple databases, optionally identify which to use String database, /// @param {String} schema_name Name of schema to use. - String schema_name, + String schemaName, /// @param {bool} cache True to fetch from cache, false to load fresh bool cache, /// @param {int} table_limit limits the tables per schema returned - int table_limit, + int tableLimit, /// @param {String} table_names only fetch columns for a given (comma-separated) list of tables - String table_names, + String tableNames, /// @param {String} fields Requested fields. String fields}) async { - var path_connection_name = encodeParam(connection_name); + var pathConnectionName = encodeParam(connectionName); List responseHandler(dynamic json, String contentType) { return json @@ -6198,12 +6132,12 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/connections/$path_connection_name/columns', { + return get(responseHandler, '/connections/$pathConnectionName/columns', { 'database': database, - 'schema_name': schema_name, + 'schema_name': schemaName, 'cache': cache, - 'table_limit': table_limit, - 'table_names': table_names, + 'table_limit': tableLimit, + 'table_names': tableNames, 'fields': fields }); } @@ -6213,18 +6147,18 @@ class LookerSDK extends APIMethods { /// **Note**: `column_name` must be a valid column name. It is not a search pattern. /// /// GET /connections/{connection_name}/search_columns -> List - Future>> connection_search_columns( + Future>> connectionSearchColumns( /// @param {String} connection_name Name of connection - String connection_name, + String connectionName, { /// @param {String} column_name Column name to find - String column_name, + String columnName, /// @param {String} fields Requested fields. String fields}) async { - var path_connection_name = encodeParam(connection_name); + var pathConnectionName = encodeParam(connectionName); List responseHandler(dynamic json, String contentType) { return json @@ -6234,8 +6168,8 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/connections/$path_connection_name/search_columns', - {'column_name': column_name, 'fields': fields}); + '/connections/$pathConnectionName/search_columns', + {'column_name': columnName, 'fields': fields}); } /// ### Connection cost estimating @@ -6245,10 +6179,10 @@ class LookerSDK extends APIMethods { /// **Note**: If the connection's dialect has no support for cost estimates, an error will be returned /// /// POST /connections/{connection_name}/cost_estimate -> CostEstimate - Future> connection_cost_estimate( + Future> connectionCostEstimate( /// @param {String} connection_name Name of connection - String connection_name, + String connectionName, /// @param {CreateCostEstimate} body CreateCostEstimate body, @@ -6256,7 +6190,7 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_connection_name = encodeParam(connection_name); + var pathConnectionName = encodeParam(connectionName); CostEstimate responseHandler(dynamic json, String contentType) { return CostEstimate.fromResponse(json, contentType); @@ -6264,9 +6198,9 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/connections/$path_connection_name/cost_estimate', + '/connections/$pathConnectionName/cost_estimate', {'fields': fields}, - body == null ? null : body.toJson()); + body?.toJson()); } // #endregion Metadata: Connection Metadata Features @@ -6282,21 +6216,21 @@ class LookerSDK extends APIMethods { /// 2. The project will then write out a lockfile including each remote_dependency with its resolved ref. /// /// POST /projects/{project_id}/manifest/lock_all -> String - Future> lock_all( + Future> lockAll( /// @param {String} project_id Id of project - String project_id, + String projectId, { /// @param {String} fields Requested fields String fields}) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); dynamic responseHandler(dynamic json, String contentType) { return json; } - return post(responseHandler, '/projects/$path_project_id/manifest/lock_all', + return post(responseHandler, '/projects/$pathProjectId/manifest/lock_all', {'fields': fields}); } @@ -6305,11 +6239,11 @@ class LookerSDK extends APIMethods { /// Returns a list of git branches in the project repository /// /// GET /projects/{project_id}/git_branches -> List - Future>> all_git_branches( + Future>> allGitBranches( /// @param {String} project_id Project Id - String project_id) async { - var path_project_id = encodeParam(project_id); + String projectId) async { + var pathProjectId = encodeParam(projectId); List responseHandler(dynamic json, String contentType) { return json @@ -6317,7 +6251,7 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/projects/$path_project_id/git_branches'); + return get(responseHandler, '/projects/$pathProjectId/git_branches'); } /// ### Get the Current Git Branch @@ -6325,17 +6259,17 @@ class LookerSDK extends APIMethods { /// Returns the git branch currently checked out in the given project repository /// /// GET /projects/{project_id}/git_branch -> GitBranch - Future> git_branch( + Future> gitBranch( /// @param {String} project_id Project Id - String project_id) async { - var path_project_id = encodeParam(project_id); + String projectId) async { + var pathProjectId = encodeParam(projectId); GitBranch responseHandler(dynamic json, String contentType) { return GitBranch.fromResponse(json, contentType); } - return get(responseHandler, '/projects/$path_project_id/git_branch'); + return get(responseHandler, '/projects/$pathProjectId/git_branch'); } /// ### Checkout and/or reset --hard an existing Git Branch @@ -6349,21 +6283,21 @@ class LookerSDK extends APIMethods { /// **DANGER** hard reset will be force pushed to the remote. Unsaved changes and commits may be permanently lost. /// /// PUT /projects/{project_id}/git_branch -> GitBranch - Future> update_git_branch( + Future> updateGitBranch( /// @param {String} project_id Project Id - String project_id, + String projectId, /// @param {WriteGitBranch} body WriteGitBranch body) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); GitBranch responseHandler(dynamic json, String contentType) { return GitBranch.fromResponse(json, contentType); } - return put(responseHandler, '/projects/$path_project_id/git_branch', null, - body == null ? null : body.toJson()); + return put(responseHandler, '/projects/$pathProjectId/git_branch', null, + body?.toJson()); } /// ### Create and Checkout a Git Branch @@ -6376,21 +6310,21 @@ class LookerSDK extends APIMethods { /// If no ref is specified, HEAD of the current branch will be used as the start point for the new branch. /// /// POST /projects/{project_id}/git_branch -> GitBranch - Future> create_git_branch( + Future> createGitBranch( /// @param {String} project_id Project Id - String project_id, + String projectId, /// @param {WriteGitBranch} body WriteGitBranch body) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); GitBranch responseHandler(dynamic json, String contentType) { return GitBranch.fromResponse(json, contentType); } - return post(responseHandler, '/projects/$path_project_id/git_branch', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/projects/$pathProjectId/git_branch', null, + body?.toJson()); } /// ### Get the specified Git Branch @@ -6398,22 +6332,22 @@ class LookerSDK extends APIMethods { /// Returns the git branch specified in branch_name path param if it exists in the given project repository /// /// GET /projects/{project_id}/git_branch/{branch_name} -> GitBranch - Future> find_git_branch( + Future> findGitBranch( /// @param {String} project_id Project Id - String project_id, + String projectId, /// @param {String} branch_name Branch Name - String branch_name) async { - var path_project_id = encodeParam(project_id); - var path_branch_name = encodeParam(branch_name); + String branchName) async { + var pathProjectId = encodeParam(projectId); + var pathBranchName = encodeParam(branchName); GitBranch responseHandler(dynamic json, String contentType) { return GitBranch.fromResponse(json, contentType); } - return get(responseHandler, - '/projects/$path_project_id/git_branch/$path_branch_name'); + return get( + responseHandler, '/projects/$pathProjectId/git_branch/$pathBranchName'); } /// ### Delete the specified Git Branch @@ -6421,22 +6355,22 @@ class LookerSDK extends APIMethods { /// Delete git branch specified in branch_name path param from local and remote of specified project repository /// /// DELETE /projects/{project_id}/git_branch/{branch_name} -> String - Future> delete_git_branch( + Future> deleteGitBranch( /// @param {String} project_id Project Id - String project_id, + String projectId, /// @param {String} branch_name Branch Name - String branch_name) async { - var path_project_id = encodeParam(project_id); - var path_branch_name = encodeParam(branch_name); + String branchName) async { + var pathProjectId = encodeParam(projectId); + var pathBranchName = encodeParam(branchName); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, - '/projects/$path_project_id/git_branch/$path_branch_name'); + return delete( + responseHandler, '/projects/$pathProjectId/git_branch/$pathBranchName'); } /// ### Deploy a Remote Branch or Ref to Production @@ -6450,10 +6384,10 @@ class LookerSDK extends APIMethods { /// Can only specify either a branch or a ref. /// /// POST /projects/{project_id}/deploy_ref_to_production -> String - Future> deploy_ref_to_production( + Future> deployRefToProduction( /// @param {String} project_id Id of project - String project_id, + String projectId, { /// @param {String} branch Branch to deploy to production @@ -6461,7 +6395,7 @@ class LookerSDK extends APIMethods { /// @param {String} ref Ref to deploy to production String ref}) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); dynamic responseHandler(dynamic json, String contentType) { return json; @@ -6469,7 +6403,7 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/projects/$path_project_id/deploy_ref_to_production', + '/projects/$pathProjectId/deploy_ref_to_production', {'branch': branch, 'ref': ref}); } @@ -6487,18 +6421,18 @@ class LookerSDK extends APIMethods { /// 3. Pull the production branch into the production project. /// /// POST /projects/{project_id}/deploy_to_production -> String - Future> deploy_to_production( + Future> deployToProduction( /// @param {String} project_id Id of project - String project_id) async { - var path_project_id = encodeParam(project_id); + String projectId) async { + var pathProjectId = encodeParam(projectId); dynamic responseHandler(dynamic json, String contentType) { return json; } return post( - responseHandler, '/projects/$path_project_id/deploy_to_production'); + responseHandler, '/projects/$pathProjectId/deploy_to_production'); } /// ### Reset a project to the revision of the project that is in production. @@ -6506,18 +6440,18 @@ class LookerSDK extends APIMethods { /// **DANGER** this will delete any changes that have not been pushed to a remote repository. /// /// POST /projects/{project_id}/reset_to_production -> String - Future> reset_project_to_production( + Future> resetProjectToProduction( /// @param {String} project_id Id of project - String project_id) async { - var path_project_id = encodeParam(project_id); + String projectId) async { + var pathProjectId = encodeParam(projectId); dynamic responseHandler(dynamic json, String contentType) { return json; } return post( - responseHandler, '/projects/$path_project_id/reset_to_production'); + responseHandler, '/projects/$pathProjectId/reset_to_production'); } /// ### Reset a project development branch to the revision of the project that is on the remote. @@ -6525,17 +6459,17 @@ class LookerSDK extends APIMethods { /// **DANGER** this will delete any changes that have not been pushed to a remote repository. /// /// POST /projects/{project_id}/reset_to_remote -> String - Future> reset_project_to_remote( + Future> resetProjectToRemote( /// @param {String} project_id Id of project - String project_id) async { - var path_project_id = encodeParam(project_id); + String projectId) async { + var pathProjectId = encodeParam(projectId); dynamic responseHandler(dynamic json, String contentType) { return json; } - return post(responseHandler, '/projects/$path_project_id/reset_to_remote'); + return post(responseHandler, '/projects/$pathProjectId/reset_to_remote'); } /// ### Get All Projects @@ -6543,7 +6477,7 @@ class LookerSDK extends APIMethods { /// Returns all projects visible to the current user /// /// GET /projects -> List - Future>> all_projects( + Future>> allProjects( { /// @param {String} fields Requested fields @@ -6566,7 +6500,7 @@ class LookerSDK extends APIMethods { /// `git_remote_url` is not allowed. To configure Git for the newly created project, follow the instructions in `update_project`. /// /// POST /projects -> Project - Future> create_project( + Future> createProject( /// @param {WriteProject} body WriteProject body) async { @@ -6574,8 +6508,7 @@ class LookerSDK extends APIMethods { return Project.fromResponse(json, contentType); } - return post(responseHandler, '/projects', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/projects', null, body?.toJson()); } /// ### Get A Project @@ -6586,19 +6519,18 @@ class LookerSDK extends APIMethods { Future> project( /// @param {String} project_id Project Id - String project_id, + String projectId, { /// @param {String} fields Requested fields String fields}) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); Project responseHandler(dynamic json, String contentType) { return Project.fromResponse(json, contentType); } - return get( - responseHandler, '/projects/$path_project_id', {'fields': fields}); + return get(responseHandler, '/projects/$pathProjectId', {'fields': fields}); } /// ### Update Project Configuration @@ -6625,10 +6557,10 @@ class LookerSDK extends APIMethods { /// 1. Call `update_project` setting `git_remote_url` to null and `git_service_name` to "bare". /// /// PATCH /projects/{project_id} -> Project - Future> update_project( + Future> updateProject( /// @param {String} project_id Project Id - String project_id, + String projectId, /// @param {WriteProject} body WriteProject body, @@ -6636,14 +6568,14 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields String fields}) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); Project responseHandler(dynamic json, String contentType) { return Project.fromResponse(json, contentType); } - return patch(responseHandler, '/projects/$path_project_id', - {'fields': fields}, body == null ? null : body.toJson()); + return patch(responseHandler, '/projects/$pathProjectId', + {'fields': fields}, body?.toJson()); } /// ### Get A Projects Manifest object @@ -6654,14 +6586,14 @@ class LookerSDK extends APIMethods { Future> manifest( /// @param {String} project_id Project Id - String project_id) async { - var path_project_id = encodeParam(project_id); + String projectId) async { + var pathProjectId = encodeParam(projectId); Manifest responseHandler(dynamic json, String contentType) { return Manifest.fromResponse(json, contentType); } - return get(responseHandler, '/projects/$path_project_id/manifest'); + return get(responseHandler, '/projects/$pathProjectId/manifest'); } /// ### Git Deploy Key @@ -6669,17 +6601,17 @@ class LookerSDK extends APIMethods { /// Returns the ssh public key previously created for a project's git repository. /// /// GET /projects/{project_id}/git/deploy_key -> String - Future> git_deploy_key( + Future> gitDeployKey( /// @param {String} project_id Project Id - String project_id) async { - var path_project_id = encodeParam(project_id); + String projectId) async { + var pathProjectId = encodeParam(projectId); String responseHandler(dynamic json, String contentType) { return json; } - return get(responseHandler, '/projects/$path_project_id/git/deploy_key'); + return get(responseHandler, '/projects/$pathProjectId/git/deploy_key'); } /// ### Create Git Deploy Key @@ -6693,17 +6625,17 @@ class LookerSDK extends APIMethods { /// validate and accept git requests from the Looker server. /// /// POST /projects/{project_id}/git/deploy_key -> String - Future> create_git_deploy_key( + Future> createGitDeployKey( /// @param {String} project_id Project Id - String project_id) async { - var path_project_id = encodeParam(project_id); + String projectId) async { + var pathProjectId = encodeParam(projectId); String responseHandler(dynamic json, String contentType) { return json; } - return post(responseHandler, '/projects/$path_project_id/git/deploy_key'); + return post(responseHandler, '/projects/$pathProjectId/git/deploy_key'); } /// ### Get Cached Project Validation Results @@ -6720,21 +6652,21 @@ class LookerSDK extends APIMethods { /// reflect the current state of the project. /// /// GET /projects/{project_id}/validate -> ProjectValidationCache - Future> project_validation_results( + Future> projectValidationResults( /// @param {String} project_id Project Id - String project_id, + String projectId, { /// @param {String} fields Requested fields String fields}) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); ProjectValidationCache responseHandler(dynamic json, String contentType) { return ProjectValidationCache.fromResponse(json, contentType); } - return get(responseHandler, '/projects/$path_project_id/validate', + return get(responseHandler, '/projects/$pathProjectId/validate', {'fields': fields}); } @@ -6749,21 +6681,21 @@ class LookerSDK extends APIMethods { /// the most recent project validation (without recomputing), use `project_validation_results(project_id)` /// /// POST /projects/{project_id}/validate -> ProjectValidation - Future> validate_project( + Future> validateProject( /// @param {String} project_id Project Id - String project_id, + String projectId, { /// @param {String} fields Requested fields String fields}) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); ProjectValidation responseHandler(dynamic json, String contentType) { return ProjectValidation.fromResponse(json, contentType); } - return post(responseHandler, '/projects/$path_project_id/validate', + return post(responseHandler, '/projects/$pathProjectId/validate', {'fields': fields}); } @@ -6772,21 +6704,21 @@ class LookerSDK extends APIMethods { /// Returns information about the state of the project files in the currently selected workspace /// /// GET /projects/{project_id}/current_workspace -> ProjectWorkspace - Future> project_workspace( + Future> projectWorkspace( /// @param {String} project_id Project Id - String project_id, + String projectId, { /// @param {String} fields Requested fields String fields}) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); ProjectWorkspace responseHandler(dynamic json, String contentType) { return ProjectWorkspace.fromResponse(json, contentType); } - return get(responseHandler, '/projects/$path_project_id/current_workspace', + return get(responseHandler, '/projects/$pathProjectId/current_workspace', {'fields': fields}); } @@ -6795,15 +6727,15 @@ class LookerSDK extends APIMethods { /// Returns a list of the files in the project /// /// GET /projects/{project_id}/files -> List - Future>> all_project_files( + Future>> allProjectFiles( /// @param {String} project_id Project Id - String project_id, + String projectId, { /// @param {String} fields Requested fields String fields}) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); List responseHandler(dynamic json, String contentType) { return json @@ -6811,8 +6743,8 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/projects/$path_project_id/files', - {'fields': fields}); + return get( + responseHandler, '/projects/$pathProjectId/files', {'fields': fields}); } /// ### Get Project File Info @@ -6820,25 +6752,25 @@ class LookerSDK extends APIMethods { /// Returns information about a file in the project /// /// GET /projects/{project_id}/files/file -> ProjectFile - Future> project_file( + Future> projectFile( /// @param {String} project_id Project Id - String project_id, + String projectId, /// @param {String} file_id File Id - String file_id, + String fileId, { /// @param {String} fields Requested fields String fields}) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); ProjectFile responseHandler(dynamic json, String contentType) { return ProjectFile.fromResponse(json, contentType); } - return get(responseHandler, '/projects/$path_project_id/files/file', - {'file_id': file_id, 'fields': fields}); + return get(responseHandler, '/projects/$pathProjectId/files/file', + {'file_id': fileId, 'fields': fields}); } /// ### Get All Git Connection Tests @@ -6853,15 +6785,15 @@ class LookerSDK extends APIMethods { /// For example, a late-stage test for write access is meaningless if connecting to the git server (an early test) is failing. /// /// GET /projects/{project_id}/git_connection_tests -> List - Future>> all_git_connection_tests( + Future>> allGitConnectionTests( /// @param {String} project_id Project Id - String project_id, + String projectId, { /// @param {String} remote_url (Optional: leave blank for root project) The remote url for remote dependency to test. - String remote_url}) async { - var path_project_id = encodeParam(project_id); + String remoteUrl}) async { + var pathProjectId = encodeParam(projectId); List responseHandler(dynamic json, String contentType) { return json @@ -6870,10 +6802,8 @@ class LookerSDK extends APIMethods { .toList(); } - return get( - responseHandler, - '/projects/$path_project_id/git_connection_tests', - {'remote_url': remote_url}); + return get(responseHandler, '/projects/$pathProjectId/git_connection_tests', + {'remote_url': remoteUrl}); } /// ### Run a git connection test @@ -6885,22 +6815,22 @@ class LookerSDK extends APIMethods { /// Tests should be run in the order they are returned by [Get All Git Connection Tests](#!/Project/all_git_connection_tests). /// /// GET /projects/{project_id}/git_connection_tests/{test_id} -> GitConnectionTestResult - Future> run_git_connection_test( + Future> runGitConnectionTest( /// @param {String} project_id Project Id - String project_id, + String projectId, /// @param {String} test_id Test Id - String test_id, + String testId, { /// @param {String} remote_url (Optional: leave blank for root project) The remote url for remote dependency to test. - String remote_url, + String remoteUrl, /// @param {String} use_production (Optional: leave blank for dev credentials) Whether to use git production credentials. - String use_production}) async { - var path_project_id = encodeParam(project_id); - var path_test_id = encodeParam(test_id); + String useProduction}) async { + var pathProjectId = encodeParam(projectId); + var pathTestId = encodeParam(testId); GitConnectionTestResult responseHandler(dynamic json, String contentType) { return GitConnectionTestResult.fromResponse(json, contentType); @@ -6908,8 +6838,8 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/projects/$path_project_id/git_connection_tests/$path_test_id', - {'remote_url': remote_url, 'use_production': use_production}); + '/projects/$pathProjectId/git_connection_tests/$pathTestId', + {'remote_url': remoteUrl, 'use_production': useProduction}); } /// ### Get All LookML Tests @@ -6919,15 +6849,15 @@ class LookerSDK extends APIMethods { /// Call [Run LookML Test](#!/Project/run_lookml_test) to execute tests. /// /// GET /projects/{project_id}/lookml_tests -> List - Future>> all_lookml_tests( + Future>> allLookmlTests( /// @param {String} project_id Project Id - String project_id, + String projectId, { /// @param {String} file_id File Id - String file_id}) async { - var path_project_id = encodeParam(project_id); + String fileId}) async { + var pathProjectId = encodeParam(projectId); List responseHandler(dynamic json, String contentType) { return json @@ -6935,8 +6865,8 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/projects/$path_project_id/lookml_tests', - {'file_id': file_id}); + return get(responseHandler, '/projects/$pathProjectId/lookml_tests', + {'file_id': fileId}); } /// ### Run LookML Tests @@ -6944,21 +6874,21 @@ class LookerSDK extends APIMethods { /// Runs all tests in the project, optionally filtered by file, test, and/or model. /// /// GET /projects/{project_id}/lookml_tests/run -> List - Future>> run_lookml_test( + Future>> runLookmlTest( /// @param {String} project_id Project Id - String project_id, + String projectId, { /// @param {String} file_id File Name - String file_id, + String fileId, /// @param {String} test Test Name String test, /// @param {String} model Model Name String model}) async { - var path_project_id = encodeParam(project_id); + var pathProjectId = encodeParam(projectId); List responseHandler(dynamic json, String contentType) { return json @@ -6967,8 +6897,8 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/projects/$path_project_id/lookml_tests/run', - {'file_id': file_id, 'test': test, 'model': model}); + return get(responseHandler, '/projects/$pathProjectId/lookml_tests/run', + {'file_id': fileId, 'test': test, 'model': model}); } /// ### Creates a tag for the most recent commit, or a specific ref is a SHA is provided @@ -6976,24 +6906,24 @@ class LookerSDK extends APIMethods { /// This is an internal-only, undocumented route. /// /// POST /projects/{project_id}/tag -> Project - Future> tag_ref( + Future> tagRef( /// @param {String} project_id Project Id - String project_id, + String projectId, /// @param {WriteProject} body WriteProject body, { /// @param {String} commit_sha (Optional): Commit Sha to Tag - String commit_sha, + String commitSha, /// @param {String} tag_name Tag Name - String tag_name, + String tagName, /// @param {String} tag_message (Optional): Tag Message - String tag_message}) async { - var path_project_id = encodeParam(project_id); + String tagMessage}) async { + var pathProjectId = encodeParam(projectId); Project responseHandler(dynamic json, String contentType) { return Project.fromResponse(json, contentType); @@ -7001,13 +6931,13 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/projects/$path_project_id/tag', + '/projects/$pathProjectId/tag', { - 'commit_sha': commit_sha, - 'tag_name': tag_name, - 'tag_message': tag_message + 'commit_sha': commitSha, + 'tag_name': tagName, + 'tag_message': tagMessage }, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Configure Repository Credential for a remote dependency @@ -7018,18 +6948,18 @@ class LookerSDK extends APIMethods { /// `credential_id` is required. /// /// PUT /projects/{root_project_id}/credential/{credential_id} -> RepositoryCredential - Future> update_repository_credential( + Future> updateRepositoryCredential( /// @param {String} root_project_id Root Project Id - String root_project_id, + String rootProjectId, /// @param {String} credential_id Credential Id - String credential_id, + String credentialId, /// @param {WriteRepositoryCredential} body WriteRepositoryCredential body) async { - var path_root_project_id = encodeParam(root_project_id); - var path_credential_id = encodeParam(credential_id); + var pathRootProjectId = encodeParam(rootProjectId); + var pathCredentialId = encodeParam(credentialId); RepositoryCredential responseHandler(dynamic json, String contentType) { return RepositoryCredential.fromResponse(json, contentType); @@ -7037,9 +6967,9 @@ class LookerSDK extends APIMethods { return put( responseHandler, - '/projects/$path_root_project_id/credential/$path_credential_id', + '/projects/$pathRootProjectId/credential/$pathCredentialId', null, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Repository Credential for a remote dependency @@ -7050,22 +6980,22 @@ class LookerSDK extends APIMethods { /// `credential_id` is required. /// /// DELETE /projects/{root_project_id}/credential/{credential_id} -> String - Future> delete_repository_credential( + Future> deleteRepositoryCredential( /// @param {String} root_project_id Root Project Id - String root_project_id, + String rootProjectId, /// @param {String} credential_id Credential Id - String credential_id) async { - var path_root_project_id = encodeParam(root_project_id); - var path_credential_id = encodeParam(credential_id); + String credentialId) async { + var pathRootProjectId = encodeParam(rootProjectId); + var pathCredentialId = encodeParam(credentialId); String responseHandler(dynamic json, String contentType) { return json; } return delete(responseHandler, - '/projects/$path_root_project_id/credential/$path_credential_id'); + '/projects/$pathRootProjectId/credential/$pathCredentialId'); } /// ### Get all Repository Credentials for a project @@ -7073,12 +7003,11 @@ class LookerSDK extends APIMethods { /// `root_project_id` is required. /// /// GET /projects/{root_project_id}/credentials -> List - Future>> - get_all_repository_credentials( + Future>> getAllRepositoryCredentials( - /// @param {String} root_project_id Root Project Id - String root_project_id) async { - var path_root_project_id = encodeParam(root_project_id); + /// @param {String} root_project_id Root Project Id + String rootProjectId) async { + var pathRootProjectId = encodeParam(rootProjectId); List responseHandler( dynamic json, String contentType) { @@ -7088,7 +7017,7 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/projects/$path_root_project_id/credentials'); + return get(responseHandler, '/projects/$pathRootProjectId/credentials'); } // #endregion Project: Manage Projects @@ -7103,7 +7032,7 @@ class LookerSDK extends APIMethods { /// After the query task status reaches "Complete", use [query_task_results(query_task_id)](#!/Query/query_task_results) to fetch the results of the query. /// /// POST /query_tasks -> QueryTask - Future> create_query_task( + Future> createQueryTask( /// @param {WriteCreateQueryTask} body WriteCreateQueryTask body, @@ -7113,37 +7042,37 @@ class LookerSDK extends APIMethods { int limit, /// @param {bool} apply_formatting Apply model-specified formatting to each result. - bool apply_formatting, + bool applyFormatting, /// @param {bool} apply_vis Apply visualization options to results. - bool apply_vis, + bool applyVis, /// @param {bool} cache Get results from cache if available. bool cache, /// @param {int} image_width Render width for image formats. - int image_width, + int imageWidth, /// @param {int} image_height Render height for image formats. - int image_height, + int imageHeight, /// @param {bool} generate_drill_links Generate drill links (only applicable to 'json_detail' format. - bool generate_drill_links, + bool generateDrillLinks, /// @param {bool} force_production Force use of production models even if the user is in development mode. - bool force_production, + bool forceProduction, /// @param {bool} cache_only Retrieve any results from cache even if the results have expired. - bool cache_only, + bool cacheOnly, /// @param {String} path_prefix Prefix to use for drill links (url encoded). - String path_prefix, + String pathPrefix, /// @param {bool} rebuild_pdts Rebuild PDTS used in query. - bool rebuild_pdts, + bool rebuildPdts, /// @param {bool} server_table_calcs Perform table calculations on query results - bool server_table_calcs, + bool serverTableCalcs, /// @param {String} fields Requested fields String fields}) async { @@ -7156,20 +7085,20 @@ class LookerSDK extends APIMethods { '/query_tasks', { 'limit': limit, - 'apply_formatting': apply_formatting, - 'apply_vis': apply_vis, + 'apply_formatting': applyFormatting, + 'apply_vis': applyVis, 'cache': cache, - 'image_width': image_width, - 'image_height': image_height, - 'generate_drill_links': generate_drill_links, - 'force_production': force_production, - 'cache_only': cache_only, - 'path_prefix': path_prefix, - 'rebuild_pdts': rebuild_pdts, - 'server_table_calcs': server_table_calcs, + 'image_width': imageWidth, + 'image_height': imageHeight, + 'generate_drill_links': generateDrillLinks, + 'force_production': forceProduction, + 'cache_only': cacheOnly, + 'path_prefix': pathPrefix, + 'rebuild_pdts': rebuildPdts, + 'server_table_calcs': serverTableCalcs, 'fields': fields }, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Fetch results of multiple async queries @@ -7181,16 +7110,16 @@ class LookerSDK extends APIMethods { /// If the user making the API request does not have sufficient privileges to view a Query Task result, the result will have a status of 'missing' /// /// GET /query_tasks/multi_results -> Map - Future>> query_task_multi_results( + Future>> queryTaskMultiResults( /// @param {DelimList} query_task_ids List of Query Task IDs - DelimList query_task_ids) async { + DelimList queryTaskIds) async { Map responseHandler(dynamic json, String contentType) { return json; } return get(responseHandler, '/query_tasks/multi_results', - {'query_task_ids': query_task_ids}); + {'query_task_ids': queryTaskIds}); } /// ### Get Query Task details @@ -7202,22 +7131,22 @@ class LookerSDK extends APIMethods { /// Use [create_query_task()](#!/Query/create_query_task) to create an async query task. /// /// GET /query_tasks/{query_task_id} -> QueryTask - Future> query_task( + Future> queryTask( /// @param {String} query_task_id ID of the Query Task - String query_task_id, + String queryTaskId, { /// @param {String} fields Requested fields. String fields}) async { - var path_query_task_id = encodeParam(query_task_id); + var pathQueryTaskId = encodeParam(queryTaskId); QueryTask responseHandler(dynamic json, String contentType) { return QueryTask.fromResponse(json, contentType); } - return get(responseHandler, '/query_tasks/$path_query_task_id', - {'fields': fields}); + return get( + responseHandler, '/query_tasks/$pathQueryTaskId', {'fields': fields}); } /// ### Get Async Query Results @@ -7245,17 +7174,17 @@ class LookerSDK extends APIMethods { /// These data formats can only carry row data, and error info is not row data. /// /// GET /query_tasks/{query_task_id}/results -> String - Future> query_task_results( + Future> queryTaskResults( /// @param {String} query_task_id ID of the Query Task - String query_task_id) async { - var path_query_task_id = encodeParam(query_task_id); + String queryTaskId) async { + var pathQueryTaskId = encodeParam(queryTaskId); dynamic responseHandler(dynamic json, String contentType) { return json; } - return get(responseHandler, '/query_tasks/$path_query_task_id/results'); + return get(responseHandler, '/query_tasks/$pathQueryTaskId/results'); } /// ### Get a previously created query by id. @@ -7280,18 +7209,18 @@ class LookerSDK extends APIMethods { Future> query( /// @param {int} query_id Id of query - int query_id, + int queryId, { /// @param {String} fields Requested fields. String fields}) async { - var path_query_id = encodeParam(query_id); + var pathQueryId = encodeParam(queryId); Query responseHandler(dynamic json, String contentType) { return Query.fromResponse(json, contentType); } - return get(responseHandler, '/queries/$path_query_id', {'fields': fields}); + return get(responseHandler, '/queries/$pathQueryId', {'fields': fields}); } /// ### Get the query for a given query slug. @@ -7313,7 +7242,7 @@ class LookerSDK extends APIMethods { /// 'aogBgL6o3cKK1jN3RoZl5s' is the slug. /// /// GET /queries/slug/{slug} -> Query - Future> query_for_slug( + Future> queryForSlug( /// @param {String} slug Slug of query String slug, @@ -7321,13 +7250,13 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_slug = encodeParam(slug); + var pathSlug = encodeParam(slug); Query responseHandler(dynamic json, String contentType) { return Query.fromResponse(json, contentType); } - return get(responseHandler, '/queries/slug/$path_slug', {'fields': fields}); + return get(responseHandler, '/queries/slug/$pathSlug', {'fields': fields}); } /// ### Create a query. @@ -7340,7 +7269,7 @@ class LookerSDK extends APIMethods { /// The query parameters are passed as json in the body of the request. /// /// POST /queries -> Query - Future> create_query( + Future> createQuery( /// @param {WriteQuery} body WriteQuery body, @@ -7352,8 +7281,8 @@ class LookerSDK extends APIMethods { return Query.fromResponse(json, contentType); } - return post(responseHandler, '/queries', {'fields': fields}, - body == null ? null : body.toJson()); + return post( + responseHandler, '/queries', {'fields': fields}, body?.toJson()); } /// ### Run a saved query. @@ -7381,74 +7310,73 @@ class LookerSDK extends APIMethods { /// GET /queries/{query_id}/run/{result_format} -> String /// /// **Note**: Binary content may be returned by this method. - Future> run_query( + Future> runQuery( /// @param {int} query_id Id of query - int query_id, + int queryId, /// @param {String} result_format Format of result - String result_format, + String resultFormat, { /// @param {int} limit Row limit (may override the limit in the saved query). int limit, /// @param {bool} apply_formatting Apply model-specified formatting to each result. - bool apply_formatting, + bool applyFormatting, /// @param {bool} apply_vis Apply visualization options to results. - bool apply_vis, + bool applyVis, /// @param {bool} cache Get results from cache if available. bool cache, /// @param {int} image_width Render width for image formats. - int image_width, + int imageWidth, /// @param {int} image_height Render height for image formats. - int image_height, + int imageHeight, /// @param {bool} generate_drill_links Generate drill links (only applicable to 'json_detail' format. - bool generate_drill_links, + bool generateDrillLinks, /// @param {bool} force_production Force use of production models even if the user is in development mode. - bool force_production, + bool forceProduction, /// @param {bool} cache_only Retrieve any results from cache even if the results have expired. - bool cache_only, + bool cacheOnly, /// @param {String} path_prefix Prefix to use for drill links (url encoded). - String path_prefix, + String pathPrefix, /// @param {bool} rebuild_pdts Rebuild PDTS used in query. - bool rebuild_pdts, + bool rebuildPdts, /// @param {bool} server_table_calcs Perform table calculations on query results - bool server_table_calcs, + bool serverTableCalcs, /// @param {String} source Specifies the source of this call. String source}) async { - var path_query_id = encodeParam(query_id); - var path_result_format = encodeParam(result_format); + var pathQueryId = encodeParam(queryId); + var pathResultFormat = encodeParam(resultFormat); dynamic responseHandler(dynamic json, String contentType) { return json; } - return get( - responseHandler, '/queries/$path_query_id/run/$path_result_format', { + return get(responseHandler, '/queries/$pathQueryId/run/$pathResultFormat', { 'limit': limit, - 'apply_formatting': apply_formatting, - 'apply_vis': apply_vis, + 'apply_formatting': applyFormatting, + 'apply_vis': applyVis, 'cache': cache, - 'image_width': image_width, - 'image_height': image_height, - 'generate_drill_links': generate_drill_links, - 'force_production': force_production, - 'cache_only': cache_only, - 'path_prefix': path_prefix, - 'rebuild_pdts': rebuild_pdts, - 'server_table_calcs': server_table_calcs, + 'image_width': imageWidth, + 'image_height': imageHeight, + 'generate_drill_links': generateDrillLinks, + 'force_production': forceProduction, + 'cache_only': cacheOnly, + 'path_prefix': pathPrefix, + 'rebuild_pdts': rebuildPdts, + 'server_table_calcs': serverTableCalcs, 'source': source }); } @@ -7507,10 +7435,10 @@ class LookerSDK extends APIMethods { /// POST /queries/run/{result_format} -> String /// /// **Note**: Binary content may be returned by this method. - Future> run_inline_query( + Future> runInlineQuery( /// @param {String} result_format Format of result - String result_format, + String resultFormat, /// @param {WriteQuery} body WriteQuery body, @@ -7520,38 +7448,38 @@ class LookerSDK extends APIMethods { int limit, /// @param {bool} apply_formatting Apply model-specified formatting to each result. - bool apply_formatting, + bool applyFormatting, /// @param {bool} apply_vis Apply visualization options to results. - bool apply_vis, + bool applyVis, /// @param {bool} cache Get results from cache if available. bool cache, /// @param {int} image_width Render width for image formats. - int image_width, + int imageWidth, /// @param {int} image_height Render height for image formats. - int image_height, + int imageHeight, /// @param {bool} generate_drill_links Generate drill links (only applicable to 'json_detail' format. - bool generate_drill_links, + bool generateDrillLinks, /// @param {bool} force_production Force use of production models even if the user is in development mode. - bool force_production, + bool forceProduction, /// @param {bool} cache_only Retrieve any results from cache even if the results have expired. - bool cache_only, + bool cacheOnly, /// @param {String} path_prefix Prefix to use for drill links (url encoded). - String path_prefix, + String pathPrefix, /// @param {bool} rebuild_pdts Rebuild PDTS used in query. - bool rebuild_pdts, + bool rebuildPdts, /// @param {bool} server_table_calcs Perform table calculations on query results - bool server_table_calcs}) async { - var path_result_format = encodeParam(result_format); + bool serverTableCalcs}) async { + var pathResultFormat = encodeParam(resultFormat); dynamic responseHandler(dynamic json, String contentType) { return json; @@ -7559,22 +7487,22 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/queries/run/$path_result_format', + '/queries/run/$pathResultFormat', { 'limit': limit, - 'apply_formatting': apply_formatting, - 'apply_vis': apply_vis, + 'apply_formatting': applyFormatting, + 'apply_vis': applyVis, 'cache': cache, - 'image_width': image_width, - 'image_height': image_height, - 'generate_drill_links': generate_drill_links, - 'force_production': force_production, - 'cache_only': cache_only, - 'path_prefix': path_prefix, - 'rebuild_pdts': rebuild_pdts, - 'server_table_calcs': server_table_calcs + 'image_width': imageWidth, + 'image_height': imageHeight, + 'generate_drill_links': generateDrillLinks, + 'force_production': forceProduction, + 'cache_only': cacheOnly, + 'path_prefix': pathPrefix, + 'rebuild_pdts': rebuildPdts, + 'server_table_calcs': serverTableCalcs }, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Run an URL encoded query. @@ -7633,26 +7561,26 @@ class LookerSDK extends APIMethods { /// GET /queries/models/{model_name}/views/{view_name}/run/{result_format} -> String /// /// **Note**: Binary content may be returned by this method. - Future> run_url_encoded_query( + Future> runUrlEncodedQuery( /// @param {String} model_name Model name - String model_name, + String modelName, /// @param {String} view_name View name - String view_name, + String viewName, /// @param {String} result_format Format of result - String result_format) async { - var path_model_name = encodeParam(model_name); - var path_view_name = encodeParam(view_name); - var path_result_format = encodeParam(result_format); + String resultFormat) async { + var pathModelName = encodeParam(modelName); + var pathViewName = encodeParam(viewName); + var pathResultFormat = encodeParam(resultFormat); dynamic responseHandler(dynamic json, String contentType) { return json; } return get(responseHandler, - '/queries/models/$path_model_name/views/$path_view_name/run/$path_result_format'); + '/queries/models/$pathModelName/views/$pathViewName/run/$pathResultFormat'); } /// ### Get Merge Query @@ -7660,21 +7588,21 @@ class LookerSDK extends APIMethods { /// Returns a merge query object given its id. /// /// GET /merge_queries/{merge_query_id} -> MergeQuery - Future> merge_query( + Future> mergeQuery( /// @param {String} merge_query_id Merge Query Id - String merge_query_id, + String mergeQueryId, { /// @param {String} fields Requested fields String fields}) async { - var path_merge_query_id = encodeParam(merge_query_id); + var pathMergeQueryId = encodeParam(mergeQueryId); MergeQuery responseHandler(dynamic json, String contentType) { return MergeQuery.fromResponse(json, contentType); } - return get(responseHandler, '/merge_queries/$path_merge_query_id', + return get(responseHandler, '/merge_queries/$pathMergeQueryId', {'fields': fields}); } @@ -7697,7 +7625,7 @@ class LookerSDK extends APIMethods { /// change to the contents of a merge query will produce a new object with a new id. /// /// POST /merge_queries -> MergeQuery - Future> create_merge_query( + Future> createMergeQuery( { /// @param {WriteMergeQuery} body @@ -7709,14 +7637,14 @@ class LookerSDK extends APIMethods { return MergeQuery.fromResponse(json, contentType); } - return post(responseHandler, '/merge_queries', {'fields': fields}, - body == null ? null : body.toJson()); + return post( + responseHandler, '/merge_queries', {'fields': fields}, body?.toJson()); } /// Get information about all running queries. /// /// GET /running_queries -> List - Future>> all_running_queries() async { + Future>> allRunningQueries() async { List responseHandler(dynamic json, String contentType) { return json .map( @@ -7730,33 +7658,33 @@ class LookerSDK extends APIMethods { /// Kill a query with a specific query_task_id. /// /// DELETE /running_queries/{query_task_id} -> String - Future> kill_query( + Future> killQuery( /// @param {String} query_task_id Query task id. - String query_task_id) async { - var path_query_task_id = encodeParam(query_task_id); + String queryTaskId) async { + var pathQueryTaskId = encodeParam(queryTaskId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/running_queries/$path_query_task_id'); + return delete(responseHandler, '/running_queries/$pathQueryTaskId'); } /// Get a SQL Runner query. /// /// GET /sql_queries/{slug} -> SqlQuery - Future> sql_query( + Future> sqlQuery( /// @param {String} slug slug of query String slug) async { - var path_slug = encodeParam(slug); + var pathSlug = encodeParam(slug); SqlQuery responseHandler(dynamic json, String contentType) { return SqlQuery.fromResponse(json, contentType); } - return get(responseHandler, '/sql_queries/$path_slug'); + return get(responseHandler, '/sql_queries/$pathSlug'); } /// ### Create a SQL Runner Query @@ -7764,7 +7692,7 @@ class LookerSDK extends APIMethods { /// Either the `connection_name` or `model_name` parameter MUST be provided. /// /// POST /sql_queries -> SqlQuery - Future> create_sql_query( + Future> createSqlQuery( /// @param {SqlQueryCreate} body SqlQueryCreate body) async { @@ -7772,8 +7700,7 @@ class LookerSDK extends APIMethods { return SqlQuery.fromResponse(json, contentType); } - return post(responseHandler, '/sql_queries', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/sql_queries', null, body?.toJson()); } /// Execute a SQL Runner query in a given result_format. @@ -7781,27 +7708,25 @@ class LookerSDK extends APIMethods { /// POST /sql_queries/{slug}/run/{result_format} -> String /// /// **Note**: Binary content may be returned by this method. - Future> run_sql_query( + Future> runSqlQuery( /// @param {String} slug slug of query String slug, /// @param {String} result_format Format of result, options are: ["inline_json", "json", "json_detail", "json_fe", "csv", "html", "md", "txt", "xlsx", "gsxml", "json_label"] - String result_format, + String resultFormat, { /// @param {String} download Defaults to false. If set to true, the HTTP response will have content-disposition and other headers set to make the HTTP response behave as a downloadable attachment instead of as inline content. String download}) async { - var path_slug = encodeParam(slug); - var path_result_format = encodeParam(result_format); + var pathSlug = encodeParam(slug); + var pathResultFormat = encodeParam(resultFormat); dynamic responseHandler(dynamic json, String contentType) { return json; } - return post( - responseHandler, - '/sql_queries/$path_slug/run/$path_result_format', + return post(responseHandler, '/sql_queries/$pathSlug/run/$pathResultFormat', {'download': download}); } @@ -7816,13 +7741,13 @@ class LookerSDK extends APIMethods { /// Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). /// /// POST /render_tasks/looks/{look_id}/{result_format} -> RenderTask - Future> create_look_render_task( + Future> createLookRenderTask( /// @param {int} look_id Id of look to render - int look_id, + int lookId, /// @param {String} result_format Output type: png, or jpg - String result_format, + String resultFormat, /// @param {int} width Output width in pixels int width, @@ -7833,8 +7758,8 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_look_id = encodeParam(look_id); - var path_result_format = encodeParam(result_format); + var pathLookId = encodeParam(lookId); + var pathResultFormat = encodeParam(resultFormat); RenderTask responseHandler(dynamic json, String contentType) { return RenderTask.fromResponse(json, contentType); @@ -7842,7 +7767,7 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/render_tasks/looks/$path_look_id/$path_result_format', + '/render_tasks/looks/$pathLookId/$pathResultFormat', {'width': width, 'height': height, 'fields': fields}); } @@ -7853,13 +7778,13 @@ class LookerSDK extends APIMethods { /// Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). /// /// POST /render_tasks/queries/{query_id}/{result_format} -> RenderTask - Future> create_query_render_task( + Future> createQueryRenderTask( /// @param {int} query_id Id of the query to render - int query_id, + int queryId, /// @param {String} result_format Output type: png or jpg - String result_format, + String resultFormat, /// @param {int} width Output width in pixels int width, @@ -7870,8 +7795,8 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_query_id = encodeParam(query_id); - var path_result_format = encodeParam(result_format); + var pathQueryId = encodeParam(queryId); + var pathResultFormat = encodeParam(resultFormat); RenderTask responseHandler(dynamic json, String contentType) { return RenderTask.fromResponse(json, contentType); @@ -7879,7 +7804,7 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/render_tasks/queries/$path_query_id/$path_result_format', + '/render_tasks/queries/$pathQueryId/$pathResultFormat', {'width': width, 'height': height, 'fields': fields}); } @@ -7890,13 +7815,13 @@ class LookerSDK extends APIMethods { /// Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). /// /// POST /render_tasks/dashboards/{dashboard_id}/{result_format} -> RenderTask - Future> create_dashboard_render_task( + Future> createDashboardRenderTask( /// @param {String} dashboard_id Id of dashboard to render. The ID can be a LookML dashboard also. - String dashboard_id, + String dashboardId, /// @param {String} result_format Output type: pdf, png, or jpg - String result_format, + String resultFormat, /// @param {CreateDashboardRenderTask} body CreateDashboardRenderTask body, @@ -7912,15 +7837,15 @@ class LookerSDK extends APIMethods { String fields, /// @param {String} pdf_paper_size Paper size for pdf. Value can be one of: ["letter","legal","tabloid","a0","a1","a2","a3","a4","a5"] - String pdf_paper_size, + String pdfPaperSize, /// @param {bool} pdf_landscape Whether to render pdf in landscape paper orientation - bool pdf_landscape, + bool pdfLandscape, /// @param {bool} long_tables Whether or not to expand table vis to full length - bool long_tables}) async { - var path_dashboard_id = encodeParam(dashboard_id); - var path_result_format = encodeParam(result_format); + bool longTables}) async { + var pathDashboardId = encodeParam(dashboardId); + var pathResultFormat = encodeParam(resultFormat); RenderTask responseHandler(dynamic json, String contentType) { return RenderTask.fromResponse(json, contentType); @@ -7928,16 +7853,16 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/render_tasks/dashboards/$path_dashboard_id/$path_result_format', + '/render_tasks/dashboards/$pathDashboardId/$pathResultFormat', { 'width': width, 'height': height, 'fields': fields, - 'pdf_paper_size': pdf_paper_size, - 'pdf_landscape': pdf_landscape, - 'long_tables': long_tables + 'pdf_paper_size': pdfPaperSize, + 'pdf_landscape': pdfLandscape, + 'long_tables': longTables }, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Get information about a render task. @@ -7947,22 +7872,22 @@ class LookerSDK extends APIMethods { /// Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). /// /// GET /render_tasks/{render_task_id} -> RenderTask - Future> render_task( + Future> renderTask( /// @param {String} render_task_id Id of render task - String render_task_id, + String renderTaskId, { /// @param {String} fields Requested fields. String fields}) async { - var path_render_task_id = encodeParam(render_task_id); + var pathRenderTaskId = encodeParam(renderTaskId); RenderTask responseHandler(dynamic json, String contentType) { return RenderTask.fromResponse(json, contentType); } - return get(responseHandler, '/render_tasks/$path_render_task_id', - {'fields': fields}); + return get( + responseHandler, '/render_tasks/$pathRenderTaskId', {'fields': fields}); } /// ### Get the document or image produced by a completed render task. @@ -7987,17 +7912,17 @@ class LookerSDK extends APIMethods { /// /// **Note**: Binary content is returned by this method. /// - Future> render_task_results( + Future> renderTaskResults( /// @param {String} render_task_id Id of render task - String render_task_id) async { - var path_render_task_id = encodeParam(render_task_id); + String renderTaskId) async { + var pathRenderTaskId = encodeParam(renderTaskId); dynamic responseHandler(dynamic json, String contentType) { return json; } - return get(responseHandler, '/render_tasks/$path_render_task_id/results'); + return get(responseHandler, '/render_tasks/$pathRenderTaskId/results'); } /// ### Create a new task to render a dashboard element to an image. @@ -8007,13 +7932,13 @@ class LookerSDK extends APIMethods { /// Once the render task is complete, you can download the resulting document or image using [Get Render Task Results](#!/RenderTask/get_render_task_results). /// /// POST /render_tasks/dashboard_elements/{dashboard_element_id}/{result_format} -> RenderTask - Future> create_dashboard_element_render_task( + Future> createDashboardElementRenderTask( /// @param {String} dashboard_element_id Id of dashboard element to render: UDD dashboard element would be numeric and LookML dashboard element would be model_name::dashboard_title::lookml_link_id - String dashboard_element_id, + String dashboardElementId, /// @param {String} result_format Output type: png or jpg - String result_format, + String resultFormat, /// @param {int} width Output width in pixels int width, @@ -8024,8 +7949,8 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_element_id = encodeParam(dashboard_element_id); - var path_result_format = encodeParam(result_format); + var pathDashboardElementId = encodeParam(dashboardElementId); + var pathResultFormat = encodeParam(resultFormat); RenderTask responseHandler(dynamic json, String contentType) { return RenderTask.fromResponse(json, contentType); @@ -8033,7 +7958,7 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/render_tasks/dashboard_elements/$path_dashboard_element_id/$path_result_format', + '/render_tasks/dashboard_elements/$pathDashboardElementId/$pathResultFormat', {'width': width, 'height': height, 'fields': fields}); } @@ -8065,7 +7990,7 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /model_sets/search -> List - Future>> search_model_sets( + Future>> searchModelSets( { /// @param {String} fields Requested fields. @@ -8087,13 +8012,13 @@ class LookerSDK extends APIMethods { String name, /// @param {bool} all_access Match model sets by all_access status. - bool all_access, + bool allAccess, /// @param {bool} built_in Match model sets by built_in status. - bool built_in, + bool builtIn, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression. - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => ModelSet.fromResponse(i, contentType)) @@ -8107,73 +8032,73 @@ class LookerSDK extends APIMethods { 'sorts': sorts, 'id': id, 'name': name, - 'all_access': all_access, - 'built_in': built_in, - 'filter_or': filter_or + 'all_access': allAccess, + 'built_in': builtIn, + 'filter_or': filterOr }); } /// ### Get information about the model set with a specific id. /// /// GET /model_sets/{model_set_id} -> ModelSet - Future> model_set( + Future> modelSet( /// @param {int} model_set_id Id of model set - int model_set_id, + int modelSetId, { /// @param {String} fields Requested fields. String fields}) async { - var path_model_set_id = encodeParam(model_set_id); + var pathModelSetId = encodeParam(modelSetId); ModelSet responseHandler(dynamic json, String contentType) { return ModelSet.fromResponse(json, contentType); } return get( - responseHandler, '/model_sets/$path_model_set_id', {'fields': fields}); + responseHandler, '/model_sets/$pathModelSetId', {'fields': fields}); } /// ### Update information about the model set with a specific id. /// /// PATCH /model_sets/{model_set_id} -> ModelSet - Future> update_model_set( + Future> updateModelSet( /// @param {int} model_set_id id of model set - int model_set_id, + int modelSetId, /// @param {WriteModelSet} body WriteModelSet body) async { - var path_model_set_id = encodeParam(model_set_id); + var pathModelSetId = encodeParam(modelSetId); ModelSet responseHandler(dynamic json, String contentType) { return ModelSet.fromResponse(json, contentType); } - return patch(responseHandler, '/model_sets/$path_model_set_id', null, - body == null ? null : body.toJson()); + return patch( + responseHandler, '/model_sets/$pathModelSetId', null, body?.toJson()); } /// ### Delete the model set with a specific id. /// /// DELETE /model_sets/{model_set_id} -> String - Future> delete_model_set( + Future> deleteModelSet( /// @param {int} model_set_id id of model set - int model_set_id) async { - var path_model_set_id = encodeParam(model_set_id); + int modelSetId) async { + var pathModelSetId = encodeParam(modelSetId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/model_sets/$path_model_set_id'); + return delete(responseHandler, '/model_sets/$pathModelSetId'); } /// ### Get information about all model sets. /// /// GET /model_sets -> List - Future>> all_model_sets( + Future>> allModelSets( { /// @param {String} fields Requested fields. @@ -8190,7 +8115,7 @@ class LookerSDK extends APIMethods { /// ### Create a model set with the specified information. Model sets are used by Roles. /// /// POST /model_sets -> ModelSet - Future> create_model_set( + Future> createModelSet( /// @param {WriteModelSet} body WriteModelSet body) async { @@ -8198,14 +8123,13 @@ class LookerSDK extends APIMethods { return ModelSet.fromResponse(json, contentType); } - return post(responseHandler, '/model_sets', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/model_sets', null, body?.toJson()); } /// ### Get all supported permissions. /// /// GET /permissions -> List - Future>> all_permissions() async { + Future>> allPermissions() async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Permission.fromResponse(i, contentType)) @@ -8239,7 +8163,7 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /permission_sets/search -> List - Future>> search_permission_sets( + Future>> searchPermissionSets( { /// @param {String} fields Requested fields. @@ -8261,13 +8185,13 @@ class LookerSDK extends APIMethods { String name, /// @param {bool} all_access Match permission sets by all_access status. - bool all_access, + bool allAccess, /// @param {bool} built_in Match permission sets by built_in status. - bool built_in, + bool builtIn, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression. - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => PermissionSet.fromResponse(i, contentType)) @@ -8281,73 +8205,73 @@ class LookerSDK extends APIMethods { 'sorts': sorts, 'id': id, 'name': name, - 'all_access': all_access, - 'built_in': built_in, - 'filter_or': filter_or + 'all_access': allAccess, + 'built_in': builtIn, + 'filter_or': filterOr }); } /// ### Get information about the permission set with a specific id. /// /// GET /permission_sets/{permission_set_id} -> PermissionSet - Future> permission_set( + Future> permissionSet( /// @param {int} permission_set_id Id of permission set - int permission_set_id, + int permissionSetId, { /// @param {String} fields Requested fields. String fields}) async { - var path_permission_set_id = encodeParam(permission_set_id); + var pathPermissionSetId = encodeParam(permissionSetId); PermissionSet responseHandler(dynamic json, String contentType) { return PermissionSet.fromResponse(json, contentType); } - return get(responseHandler, '/permission_sets/$path_permission_set_id', + return get(responseHandler, '/permission_sets/$pathPermissionSetId', {'fields': fields}); } /// ### Update information about the permission set with a specific id. /// /// PATCH /permission_sets/{permission_set_id} -> PermissionSet - Future> update_permission_set( + Future> updatePermissionSet( /// @param {int} permission_set_id id of permission set - int permission_set_id, + int permissionSetId, /// @param {WritePermissionSet} body WritePermissionSet body) async { - var path_permission_set_id = encodeParam(permission_set_id); + var pathPermissionSetId = encodeParam(permissionSetId); PermissionSet responseHandler(dynamic json, String contentType) { return PermissionSet.fromResponse(json, contentType); } - return patch(responseHandler, '/permission_sets/$path_permission_set_id', - null, body == null ? null : body.toJson()); + return patch(responseHandler, '/permission_sets/$pathPermissionSetId', null, + body?.toJson()); } /// ### Delete the permission set with a specific id. /// /// DELETE /permission_sets/{permission_set_id} -> String - Future> delete_permission_set( + Future> deletePermissionSet( /// @param {int} permission_set_id Id of permission set - int permission_set_id) async { - var path_permission_set_id = encodeParam(permission_set_id); + int permissionSetId) async { + var pathPermissionSetId = encodeParam(permissionSetId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/permission_sets/$path_permission_set_id'); + return delete(responseHandler, '/permission_sets/$pathPermissionSetId'); } /// ### Get information about all permission sets. /// /// GET /permission_sets -> List - Future>> all_permission_sets( + Future>> allPermissionSets( { /// @param {String} fields Requested fields. @@ -8364,7 +8288,7 @@ class LookerSDK extends APIMethods { /// ### Create a permission set with the specified information. Permission sets are used by Roles. /// /// POST /permission_sets -> PermissionSet - Future> create_permission_set( + Future> createPermissionSet( /// @param {WritePermissionSet} body WritePermissionSet body) async { @@ -8372,14 +8296,13 @@ class LookerSDK extends APIMethods { return PermissionSet.fromResponse(json, contentType); } - return post(responseHandler, '/permission_sets', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/permission_sets', null, body?.toJson()); } /// ### Get information about all roles. /// /// GET /roles -> List - Future>> all_roles( + Future>> allRoles( { /// @param {String} fields Requested fields. @@ -8397,7 +8320,7 @@ class LookerSDK extends APIMethods { /// ### Create a role with the specified information. /// /// POST /roles -> Role - Future> create_role( + Future> createRole( /// @param {WriteRole} body WriteRole body) async { @@ -8405,8 +8328,7 @@ class LookerSDK extends APIMethods { return Role.fromResponse(json, contentType); } - return post( - responseHandler, '/roles', null, body == null ? null : body.toJson()); + return post(responseHandler, '/roles', null, body?.toJson()); } /// ### Search roles @@ -8435,7 +8357,7 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /roles/search -> List - Future>> search_roles( + Future>> searchRoles( { /// @param {String} fields Requested fields. @@ -8457,10 +8379,10 @@ class LookerSDK extends APIMethods { String name, /// @param {bool} built_in Match roles by built_in status. - bool built_in, + bool builtIn, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression. - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json.map((i) => Role.fromResponse(i, contentType)).toList(); } @@ -8472,8 +8394,8 @@ class LookerSDK extends APIMethods { 'sorts': sorts, 'id': id, 'name': name, - 'built_in': built_in, - 'filter_or': filter_or + 'built_in': builtIn, + 'filter_or': filterOr }); } @@ -8504,7 +8426,7 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /roles/search/with_user_count -> List - Future>> search_roles_with_user_count( + Future>> searchRolesWithUserCount( { /// @param {String} fields Requested fields. @@ -8526,10 +8448,10 @@ class LookerSDK extends APIMethods { String name, /// @param {bool} built_in Match roles by built_in status. - bool built_in, + bool builtIn, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression. - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => RoleSearch.fromResponse(i, contentType)) @@ -8543,8 +8465,8 @@ class LookerSDK extends APIMethods { 'sorts': sorts, 'id': id, 'name': name, - 'built_in': built_in, - 'filter_or': filter_or + 'built_in': builtIn, + 'filter_or': filterOr }); } @@ -8554,64 +8476,63 @@ class LookerSDK extends APIMethods { Future> role( /// @param {int} role_id id of role - int role_id) async { - var path_role_id = encodeParam(role_id); + int roleId) async { + var pathRoleId = encodeParam(roleId); Role responseHandler(dynamic json, String contentType) { return Role.fromResponse(json, contentType); } - return get(responseHandler, '/roles/$path_role_id'); + return get(responseHandler, '/roles/$pathRoleId'); } /// ### Update information about the role with a specific id. /// /// PATCH /roles/{role_id} -> Role - Future> update_role( + Future> updateRole( /// @param {int} role_id id of role - int role_id, + int roleId, /// @param {WriteRole} body WriteRole body) async { - var path_role_id = encodeParam(role_id); + var pathRoleId = encodeParam(roleId); Role responseHandler(dynamic json, String contentType) { return Role.fromResponse(json, contentType); } - return patch(responseHandler, '/roles/$path_role_id', null, - body == null ? null : body.toJson()); + return patch(responseHandler, '/roles/$pathRoleId', null, body?.toJson()); } /// ### Delete the role with a specific id. /// /// DELETE /roles/{role_id} -> String - Future> delete_role( + Future> deleteRole( /// @param {int} role_id id of role - int role_id) async { - var path_role_id = encodeParam(role_id); + int roleId) async { + var pathRoleId = encodeParam(roleId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/roles/$path_role_id'); + return delete(responseHandler, '/roles/$pathRoleId'); } /// ### Get information about all the groups with the role that has a specific id. /// /// GET /roles/{role_id}/groups -> List - Future>> role_groups( + Future>> roleGroups( /// @param {int} role_id id of role - int role_id, + int roleId, { /// @param {String} fields Requested fields. String fields}) async { - var path_role_id = encodeParam(role_id); + var pathRoleId = encodeParam(roleId); List responseHandler(dynamic json, String contentType) { return json @@ -8620,20 +8541,20 @@ class LookerSDK extends APIMethods { } return get( - responseHandler, '/roles/$path_role_id/groups', {'fields': fields}); + responseHandler, '/roles/$pathRoleId/groups', {'fields': fields}); } /// ### Set all groups for a role, removing all existing group associations from that role. /// /// PUT /roles/{role_id}/groups -> List - Future>> set_role_groups( + Future>> setRoleGroups( /// @param {int} role_id Id of Role - int role_id, + int roleId, /// @param {List} body List body) async { - var path_role_id = encodeParam(role_id); + var pathRoleId = encodeParam(roleId); List responseHandler(dynamic json, String contentType) { return json @@ -8641,50 +8562,50 @@ class LookerSDK extends APIMethods { .toList(); } - return put(responseHandler, '/roles/$path_role_id/groups', null, body); + return put(responseHandler, '/roles/$pathRoleId/groups', null, body); } /// ### Get information about all the users with the role that has a specific id. /// /// GET /roles/{role_id}/users -> List - Future>> role_users( + Future>> roleUsers( /// @param {int} role_id id of user - int role_id, + int roleId, { /// @param {String} fields Requested fields. String fields, /// @param {bool} direct_association_only Get only users associated directly with the role: exclude those only associated through groups. - bool direct_association_only}) async { - var path_role_id = encodeParam(role_id); + bool directAssociationOnly}) async { + var pathRoleId = encodeParam(roleId); List responseHandler(dynamic json, String contentType) { return json.map((i) => User.fromResponse(i, contentType)).toList(); } - return get(responseHandler, '/roles/$path_role_id/users', - {'fields': fields, 'direct_association_only': direct_association_only}); + return get(responseHandler, '/roles/$pathRoleId/users', + {'fields': fields, 'direct_association_only': directAssociationOnly}); } /// ### Set all the users of the role with a specific id. /// /// PUT /roles/{role_id}/users -> List - Future>> set_role_users( + Future>> setRoleUsers( /// @param {int} role_id id of role - int role_id, + int roleId, /// @param {List} body List body) async { - var path_role_id = encodeParam(role_id); + var pathRoleId = encodeParam(roleId); List responseHandler(dynamic json, String contentType) { return json.map((i) => User.fromResponse(i, contentType)).toList(); } - return put(responseHandler, '/roles/$path_role_id/users', null, body); + return put(responseHandler, '/roles/$pathRoleId/users', null, body); } // #endregion Role: Manage Roles @@ -8696,15 +8617,15 @@ class LookerSDK extends APIMethods { /// Returns scheduled plans owned by the caller for a given space id. /// /// GET /scheduled_plans/space/{space_id} -> List - Future>> scheduled_plans_for_space( + Future>> scheduledPlansForSpace( /// @param {int} space_id Space Id - int space_id, + int spaceId, { /// @param {String} fields Requested fields. String fields}) async { - var path_space_id = encodeParam(space_id); + var pathSpaceId = encodeParam(spaceId); List responseHandler(dynamic json, String contentType) { return json @@ -8712,7 +8633,7 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/scheduled_plans/space/$path_space_id', + return get(responseHandler, '/scheduled_plans/space/$pathSpaceId', {'fields': fields}); } @@ -8721,21 +8642,21 @@ class LookerSDK extends APIMethods { /// Admins can fetch information about other users' Scheduled Plans. /// /// GET /scheduled_plans/{scheduled_plan_id} -> ScheduledPlan - Future> scheduled_plan( + Future> scheduledPlan( /// @param {int} scheduled_plan_id Scheduled Plan Id - int scheduled_plan_id, + int scheduledPlanId, { /// @param {String} fields Requested fields. String fields}) async { - var path_scheduled_plan_id = encodeParam(scheduled_plan_id); + var pathScheduledPlanId = encodeParam(scheduledPlanId); ScheduledPlan responseHandler(dynamic json, String contentType) { return ScheduledPlan.fromResponse(json, contentType); } - return get(responseHandler, '/scheduled_plans/$path_scheduled_plan_id', + return get(responseHandler, '/scheduled_plans/$pathScheduledPlanId', {'fields': fields}); } @@ -8783,21 +8704,21 @@ class LookerSDK extends APIMethods { /// Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. /// /// PATCH /scheduled_plans/{scheduled_plan_id} -> ScheduledPlan - Future> update_scheduled_plan( + Future> updateScheduledPlan( /// @param {int} scheduled_plan_id Scheduled Plan Id - int scheduled_plan_id, + int scheduledPlanId, /// @param {WriteScheduledPlan} body WriteScheduledPlan body) async { - var path_scheduled_plan_id = encodeParam(scheduled_plan_id); + var pathScheduledPlanId = encodeParam(scheduledPlanId); ScheduledPlan responseHandler(dynamic json, String contentType) { return ScheduledPlan.fromResponse(json, contentType); } - return patch(responseHandler, '/scheduled_plans/$path_scheduled_plan_id', - null, body == null ? null : body.toJson()); + return patch(responseHandler, '/scheduled_plans/$pathScheduledPlanId', null, + body?.toJson()); } /// ### Delete a Scheduled Plan @@ -8807,17 +8728,17 @@ class LookerSDK extends APIMethods { /// This delete cannot be undone. /// /// DELETE /scheduled_plans/{scheduled_plan_id} -> String - Future> delete_scheduled_plan( + Future> deleteScheduledPlan( /// @param {int} scheduled_plan_id Scheduled Plan Id - int scheduled_plan_id) async { - var path_scheduled_plan_id = encodeParam(scheduled_plan_id); + int scheduledPlanId) async { + var pathScheduledPlanId = encodeParam(scheduledPlanId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/scheduled_plans/$path_scheduled_plan_id'); + return delete(responseHandler, '/scheduled_plans/$pathScheduledPlanId'); } /// ### List All Scheduled Plans @@ -8833,17 +8754,17 @@ class LookerSDK extends APIMethods { /// The caller must have `see_schedules` permission to see other users' scheduled plans. /// /// GET /scheduled_plans -> List - Future>> all_scheduled_plans( + Future>> allScheduledPlans( { /// @param {int} user_id Return scheduled plans belonging to this user_id. If not provided, returns scheduled plans owned by the caller. - int user_id, + int userId, /// @param {String} fields Comma delimited list of field names. If provided, only the fields specified will be included in the response String fields, /// @param {bool} all_users Return scheduled plans belonging to all users (caller needs see_schedules permission) - bool all_users}) async { + bool allUsers}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => ScheduledPlan.fromResponse(i, contentType)) @@ -8851,7 +8772,7 @@ class LookerSDK extends APIMethods { } return get(responseHandler, '/scheduled_plans', - {'user_id': user_id, 'fields': fields, 'all_users': all_users}); + {'user_id': userId, 'fields': fields, 'all_users': allUsers}); } /// ### Create a Scheduled Plan @@ -8914,7 +8835,7 @@ class LookerSDK extends APIMethods { /// Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. /// /// POST /scheduled_plans -> ScheduledPlan - Future> create_scheduled_plan( + Future> createScheduledPlan( /// @param {WriteScheduledPlan} body WriteScheduledPlan body) async { @@ -8922,8 +8843,7 @@ class LookerSDK extends APIMethods { return ScheduledPlan.fromResponse(json, contentType); } - return post(responseHandler, '/scheduled_plans', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/scheduled_plans', null, body?.toJson()); } /// ### Run a Scheduled Plan Immediately @@ -8965,7 +8885,7 @@ class LookerSDK extends APIMethods { /// Valid formats vary by destination type and source object. `wysiwyg_pdf` is only valid for dashboards, for example. /// /// POST /scheduled_plans/run_once -> ScheduledPlan - Future> scheduled_plan_run_once( + Future> scheduledPlanRunOnce( /// @param {WriteScheduledPlan} body WriteScheduledPlan body) async { @@ -8973,8 +8893,8 @@ class LookerSDK extends APIMethods { return ScheduledPlan.fromResponse(json, contentType); } - return post(responseHandler, '/scheduled_plans/run_once', null, - body == null ? null : body.toJson()); + return post( + responseHandler, '/scheduled_plans/run_once', null, body?.toJson()); } /// ### Get Scheduled Plans for a Look @@ -8990,21 +8910,21 @@ class LookerSDK extends APIMethods { /// The caller must have `see_schedules` permission to see other users' scheduled plans. /// /// GET /scheduled_plans/look/{look_id} -> List - Future>> scheduled_plans_for_look( + Future>> scheduledPlansForLook( /// @param {int} look_id Look Id - int look_id, + int lookId, { /// @param {int} user_id User Id (default is requesting user if not specified) - int user_id, + int userId, /// @param {String} fields Requested fields. String fields, /// @param {bool} all_users Return scheduled plans belonging to all users for the look - bool all_users}) async { - var path_look_id = encodeParam(look_id); + bool allUsers}) async { + var pathLookId = encodeParam(lookId); List responseHandler(dynamic json, String contentType) { return json @@ -9012,8 +8932,8 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/scheduled_plans/look/$path_look_id', - {'user_id': user_id, 'fields': fields, 'all_users': all_users}); + return get(responseHandler, '/scheduled_plans/look/$pathLookId', + {'user_id': userId, 'fields': fields, 'all_users': allUsers}); } /// ### Get Scheduled Plans for a Dashboard @@ -9029,21 +8949,21 @@ class LookerSDK extends APIMethods { /// The caller must have `see_schedules` permission to see other users' scheduled plans. /// /// GET /scheduled_plans/dashboard/{dashboard_id} -> List - Future>> scheduled_plans_for_dashboard( + Future>> scheduledPlansForDashboard( /// @param {int} dashboard_id Dashboard Id - int dashboard_id, + int dashboardId, { /// @param {int} user_id User Id (default is requesting user if not specified) - int user_id, + int userId, /// @param {bool} all_users Return scheduled plans belonging to all users for the dashboard - bool all_users, + bool allUsers, /// @param {String} fields Requested fields. String fields}) async { - var path_dashboard_id = encodeParam(dashboard_id); + var pathDashboardId = encodeParam(dashboardId); List responseHandler(dynamic json, String contentType) { return json @@ -9051,8 +8971,8 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/scheduled_plans/dashboard/$path_dashboard_id', - {'user_id': user_id, 'all_users': all_users, 'fields': fields}); + return get(responseHandler, '/scheduled_plans/dashboard/$pathDashboardId', + {'user_id': userId, 'all_users': allUsers, 'fields': fields}); } /// ### Get Scheduled Plans for a LookML Dashboard @@ -9068,21 +8988,21 @@ class LookerSDK extends APIMethods { /// The caller must have `see_schedules` permission to see other users' scheduled plans. /// /// GET /scheduled_plans/lookml_dashboard/{lookml_dashboard_id} -> List - Future>> scheduled_plans_for_lookml_dashboard( + Future>> scheduledPlansForLookmlDashboard( /// @param {String} lookml_dashboard_id LookML Dashboard Id - String lookml_dashboard_id, + String lookmlDashboardId, { /// @param {int} user_id User Id (default is requesting user if not specified) - int user_id, + int userId, /// @param {String} fields Requested fields. String fields, /// @param {bool} all_users Return scheduled plans belonging to all users for the dashboard - bool all_users}) async { - var path_lookml_dashboard_id = encodeParam(lookml_dashboard_id); + bool allUsers}) async { + var pathLookmlDashboardId = encodeParam(lookmlDashboardId); List responseHandler(dynamic json, String contentType) { return json @@ -9092,8 +9012,8 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/scheduled_plans/lookml_dashboard/$path_lookml_dashboard_id', - {'user_id': user_id, 'fields': fields, 'all_users': all_users}); + '/scheduled_plans/lookml_dashboard/$pathLookmlDashboardId', + {'user_id': userId, 'fields': fields, 'all_users': allUsers}); } /// ### Run a Scheduled Plan By Id Immediately @@ -9145,25 +9065,22 @@ class LookerSDK extends APIMethods { /// This API is rate limited to prevent it from being used for relay spam or DoS attacks /// /// POST /scheduled_plans/{scheduled_plan_id}/run_once -> ScheduledPlan - Future> scheduled_plan_run_once_by_id( + Future> scheduledPlanRunOnceById( /// @param {int} scheduled_plan_id Id of schedule plan to copy and run - int scheduled_plan_id, + int scheduledPlanId, { /// @param {WriteScheduledPlan} body WriteScheduledPlan body}) async { - var path_scheduled_plan_id = encodeParam(scheduled_plan_id); + var pathScheduledPlanId = encodeParam(scheduledPlanId); ScheduledPlan responseHandler(dynamic json, String contentType) { return ScheduledPlan.fromResponse(json, contentType); } - return post( - responseHandler, - '/scheduled_plans/$path_scheduled_plan_id/run_once', - null, - body == null ? null : body.toJson()); + return post(responseHandler, + '/scheduled_plans/$pathScheduledPlanId/run_once', null, body?.toJson()); } // #endregion ScheduledPlan: Manage Scheduled Plans @@ -9205,7 +9122,7 @@ class LookerSDK extends APIMethods { /// API sessions, be sure to select the dev workspace after each login. /// /// PATCH /session -> ApiSession - Future> update_session( + Future> updateSession( /// @param {WriteApiSession} body WriteApiSession body) async { @@ -9213,8 +9130,7 @@ class LookerSDK extends APIMethods { return ApiSession.fromResponse(json, contentType); } - return patch( - responseHandler, '/session', null, body == null ? null : body.toJson()); + return patch(responseHandler, '/session', null, body?.toJson()); } // #endregion Session: Session Information @@ -9230,7 +9146,7 @@ class LookerSDK extends APIMethods { /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. /// /// GET /themes -> List - Future>> all_themes( + Future>> allThemes( { /// @param {String} fields Requested fields. @@ -9261,7 +9177,7 @@ class LookerSDK extends APIMethods { /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. /// /// POST /themes -> Theme - Future> create_theme( + Future> createTheme( /// @param {WriteTheme} body WriteTheme body) async { @@ -9269,8 +9185,7 @@ class LookerSDK extends APIMethods { return Theme.fromResponse(json, contentType); } - return post( - responseHandler, '/themes', null, body == null ? null : body.toJson()); + return post(responseHandler, '/themes', null, body?.toJson()); } /// ### Search all themes for matching criteria. @@ -9313,7 +9228,7 @@ class LookerSDK extends APIMethods { /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. /// /// GET /themes/search -> List - Future>> search_themes( + Future>> searchThemes( { /// @param {int} id Match theme id. @@ -9323,10 +9238,10 @@ class LookerSDK extends APIMethods { String name, /// @param {DateTime} begin_at Timestamp for activation. - DateTime begin_at, + DateTime beginAt, /// @param {DateTime} end_at Timestamp for expiration. - DateTime end_at, + DateTime endAt, /// @param {int} limit Number of results to return (used with `offset`). int limit, @@ -9341,7 +9256,7 @@ class LookerSDK extends APIMethods { String fields, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or}) async { + bool filterOr}) async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Theme.fromResponse(i, contentType)) @@ -9351,13 +9266,13 @@ class LookerSDK extends APIMethods { return get(responseHandler, '/themes/search', { 'id': id, 'name': name, - 'begin_at': begin_at, - 'end_at': end_at, + 'begin_at': beginAt, + 'end_at': endAt, 'limit': limit, 'offset': offset, 'sorts': sorts, 'fields': fields, - 'filter_or': filter_or + 'filter_or': filterOr }); } @@ -9370,7 +9285,7 @@ class LookerSDK extends APIMethods { /// The optional `ts` parameter can specify a different timestamp than "now." If specified, it returns the default theme at the time indicated. /// /// GET /themes/default -> Theme - Future> default_theme( + Future> defaultTheme( { /// @param {DateTime} ts Timestamp representing the target datetime for the active period. Defaults to 'now' @@ -9395,7 +9310,7 @@ class LookerSDK extends APIMethods { /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. /// /// PUT /themes/default -> Theme - Future> set_default_theme( + Future> setDefaultTheme( /// @param {String} name Name of theme to set as default String name) async { @@ -9417,7 +9332,7 @@ class LookerSDK extends APIMethods { /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. /// /// GET /themes/active -> List - Future>> active_themes( + Future>> activeThemes( { /// @param {String} name Name of theme @@ -9446,7 +9361,7 @@ class LookerSDK extends APIMethods { /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. /// /// GET /themes/theme_or_default -> Theme - Future> theme_or_default( + Future> themeOrDefault( /// @param {String} name Name of theme String name, @@ -9471,7 +9386,7 @@ class LookerSDK extends APIMethods { /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. /// /// POST /themes/validate -> ValidationError - Future> validate_theme( + Future> validateTheme( /// @param {WriteTheme} body WriteTheme body) async { @@ -9479,8 +9394,7 @@ class LookerSDK extends APIMethods { return ValidationError.fromResponse(json, contentType); } - return post(responseHandler, '/themes/validate', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/themes/validate', null, body?.toJson()); } /// ### Get a theme by ID @@ -9493,18 +9407,18 @@ class LookerSDK extends APIMethods { Future> theme( /// @param {int} theme_id Id of theme - int theme_id, + int themeId, { /// @param {String} fields Requested fields. String fields}) async { - var path_theme_id = encodeParam(theme_id); + var pathThemeId = encodeParam(themeId); Theme responseHandler(dynamic json, String contentType) { return Theme.fromResponse(json, contentType); } - return get(responseHandler, '/themes/$path_theme_id', {'fields': fields}); + return get(responseHandler, '/themes/$pathThemeId', {'fields': fields}); } /// ### Update the theme by id. @@ -9512,21 +9426,20 @@ class LookerSDK extends APIMethods { /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. /// /// PATCH /themes/{theme_id} -> Theme - Future> update_theme( + Future> updateTheme( /// @param {int} theme_id Id of theme - int theme_id, + int themeId, /// @param {WriteTheme} body WriteTheme body) async { - var path_theme_id = encodeParam(theme_id); + var pathThemeId = encodeParam(themeId); Theme responseHandler(dynamic json, String contentType) { return Theme.fromResponse(json, contentType); } - return patch(responseHandler, '/themes/$path_theme_id', null, - body == null ? null : body.toJson()); + return patch(responseHandler, '/themes/$pathThemeId', null, body?.toJson()); } /// ### Delete a specific theme by id @@ -9540,17 +9453,17 @@ class LookerSDK extends APIMethods { /// **Note**: Custom themes needs to be enabled by Looker. Unless custom themes are enabled, only the automatically generated default theme can be used. Please contact your Account Manager or help.looker.com to update your license for this feature. /// /// DELETE /themes/{theme_id} -> String - Future> delete_theme( + Future> deleteTheme( /// @param {String} theme_id Id of theme - String theme_id) async { - var path_theme_id = encodeParam(theme_id); + String themeId) async { + var pathThemeId = encodeParam(themeId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/themes/$path_theme_id'); + return delete(responseHandler, '/themes/$pathThemeId'); } // #endregion Theme: Manage Themes @@ -9583,7 +9496,7 @@ class LookerSDK extends APIMethods { /// Boolean search params accept only "true" and "false" as values. /// /// GET /credentials_email/search -> List - Future>> search_credentials_email( + Future>> searchCredentialsEmail( { /// @param {String} fields Requested fields. @@ -9608,7 +9521,7 @@ class LookerSDK extends APIMethods { String emails, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression. - bool filter_or}) async { + bool filterOr}) async { List responseHandler( dynamic json, String contentType) { return json @@ -9625,7 +9538,7 @@ class LookerSDK extends APIMethods { 'id': id, 'email': email, 'emails': emails, - 'filter_or': filter_or + 'filter_or': filterOr }); } @@ -9647,7 +9560,7 @@ class LookerSDK extends APIMethods { /// ### Get information about all users. /// /// GET /users -> List - Future>> all_users( + Future>> allUsers( { /// @param {String} fields Requested fields. @@ -9657,7 +9570,7 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page DEPRECATED. Use limit and offset instead. Return N rows of data per page - int per_page, + int perPage, /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) int limit, @@ -9677,7 +9590,7 @@ class LookerSDK extends APIMethods { return get(responseHandler, '/users', { 'fields': fields, 'page': page, - 'per_page': per_page, + 'per_page': perPage, 'limit': limit, 'offset': offset, 'sorts': sorts, @@ -9688,7 +9601,7 @@ class LookerSDK extends APIMethods { /// ### Create a user with the specified information. /// /// POST /users -> User - Future> create_user( + Future> createUser( { /// @param {WriteUser} body @@ -9700,8 +9613,7 @@ class LookerSDK extends APIMethods { return User.fromResponse(json, contentType); } - return post(responseHandler, '/users', {'fields': fields}, - body == null ? null : body.toJson()); + return post(responseHandler, '/users', {'fields': fields}, body?.toJson()); } /// ### Search users @@ -9736,7 +9648,7 @@ class LookerSDK extends APIMethods { /// names of other users who are members of the same group as the user. /// /// GET /users/search -> List - Future>> search_users( + Future>> searchUsers( { /// @param {String} fields Include only these fields in the response @@ -9746,7 +9658,7 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page DEPRECATED. Use limit and offset instead. Return N rows of data per page - int per_page, + int perPage, /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) int limit, @@ -9761,31 +9673,31 @@ class LookerSDK extends APIMethods { String id, /// @param {String} first_name Match First name. - String first_name, + String firstName, /// @param {String} last_name Match Last name. - String last_name, + String lastName, /// @param {bool} verified_looker_employee Search for user accounts associated with Looker employees - bool verified_looker_employee, + bool verifiedLookerEmployee, /// @param {bool} embed_user Search for only embed users - bool embed_user, + bool embedUser, /// @param {String} email Search for the user with this email address String email, /// @param {bool} is_disabled Search for disabled user accounts - bool is_disabled, + bool isDisabled, /// @param {bool} filter_or Combine given search criteria in a boolean OR expression - bool filter_or, + bool filterOr, /// @param {String} content_metadata_id Search for users who have access to this content_metadata item - String content_metadata_id, + String contentMetadataId, /// @param {String} group_id Search for users who are direct members of this group - String group_id}) async { + String groupId}) async { List responseHandler(dynamic json, String contentType) { return json.map((i) => User.fromResponse(i, contentType)).toList(); } @@ -9793,20 +9705,20 @@ class LookerSDK extends APIMethods { return get(responseHandler, '/users/search', { 'fields': fields, 'page': page, - 'per_page': per_page, + 'per_page': perPage, 'limit': limit, 'offset': offset, 'sorts': sorts, 'id': id, - 'first_name': first_name, - 'last_name': last_name, - 'verified_looker_employee': verified_looker_employee, - 'embed_user': embed_user, + 'first_name': firstName, + 'last_name': lastName, + 'verified_looker_employee': verifiedLookerEmployee, + 'embed_user': embedUser, 'email': email, - 'is_disabled': is_disabled, - 'filter_or': filter_or, - 'content_metadata_id': content_metadata_id, - 'group_id': group_id + 'is_disabled': isDisabled, + 'filter_or': filterOr, + 'content_metadata_id': contentMetadataId, + 'group_id': groupId }); } @@ -9818,7 +9730,7 @@ class LookerSDK extends APIMethods { /// Any additional search params will be combined into a logical AND expression. /// /// GET /users/search/names/{pattern} -> List - Future>> search_users_names( + Future>> searchUsersNames( /// @param {String} pattern Pattern to match String pattern, @@ -9831,7 +9743,7 @@ class LookerSDK extends APIMethods { int page, /// @param {int} per_page DEPRECATED. Use limit and offset instead. Return N rows of data per page - int per_page, + int perPage, /// @param {int} limit Number of results to return. (used with offset and takes priority over page and per_page) int limit, @@ -9846,38 +9758,38 @@ class LookerSDK extends APIMethods { int id, /// @param {String} first_name Match First name - String first_name, + String firstName, /// @param {String} last_name Match Last name - String last_name, + String lastName, /// @param {bool} verified_looker_employee Match Verified Looker employee - bool verified_looker_employee, + bool verifiedLookerEmployee, /// @param {String} email Match Email Address String email, /// @param {bool} is_disabled Include or exclude disabled accounts in the results - bool is_disabled}) async { - var path_pattern = encodeParam(pattern); + bool isDisabled}) async { + var pathPattern = encodeParam(pattern); List responseHandler(dynamic json, String contentType) { return json.map((i) => User.fromResponse(i, contentType)).toList(); } - return get(responseHandler, '/users/search/names/$path_pattern', { + return get(responseHandler, '/users/search/names/$pathPattern', { 'fields': fields, 'page': page, - 'per_page': per_page, + 'per_page': perPage, 'limit': limit, 'offset': offset, 'sorts': sorts, 'id': id, - 'first_name': first_name, - 'last_name': last_name, - 'verified_looker_employee': verified_looker_employee, + 'first_name': firstName, + 'last_name': lastName, + 'verified_looker_employee': verifiedLookerEmployee, 'email': email, - 'is_disabled': is_disabled + 'is_disabled': isDisabled }); } @@ -9891,27 +9803,27 @@ class LookerSDK extends APIMethods { Future> user( /// @param {int} user_id Id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); User responseHandler(dynamic json, String contentType) { return User.fromResponse(json, contentType); } - return get(responseHandler, '/users/$path_user_id', {'fields': fields}); + return get(responseHandler, '/users/$pathUserId', {'fields': fields}); } /// ### Update information about the user with a specific id. /// /// PATCH /users/{user_id} -> User - Future> update_user( + Future> updateUser( /// @param {int} user_id Id of user - int user_id, + int userId, /// @param {WriteUser} body WriteUser body, @@ -9919,14 +9831,14 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); User responseHandler(dynamic json, String contentType) { return User.fromResponse(json, contentType); } - return patch(responseHandler, '/users/$path_user_id', {'fields': fields}, - body == null ? null : body.toJson()); + return patch(responseHandler, '/users/$pathUserId', {'fields': fields}, + body?.toJson()); } /// ### Delete the user with a specific id. @@ -9934,17 +9846,17 @@ class LookerSDK extends APIMethods { /// **DANGER** this will delete the user and all looks and other information owned by the user. /// /// DELETE /users/{user_id} -> String - Future> delete_user( + Future> deleteUser( /// @param {int} user_id Id of user - int user_id) async { - var path_user_id = encodeParam(user_id); + int userId) async { + var pathUserId = encodeParam(userId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/users/$path_user_id'); + return delete(responseHandler, '/users/$pathUserId'); } /// ### Get information about the user with a credential of given type with specific id. @@ -9977,19 +9889,19 @@ class LookerSDK extends APIMethods { /// **NOTE**: The 'api' credential type was only used with the legacy Looker query API and is no longer supported. The credential type for API you are currently looking at is 'api3'. /// /// GET /users/credential/{credential_type}/{credential_id} -> User - Future> user_for_credential( + Future> userForCredential( /// @param {String} credential_type Type name of credential - String credential_type, + String credentialType, /// @param {String} credential_id Id of credential - String credential_id, + String credentialId, { /// @param {String} fields Requested fields. String fields}) async { - var path_credential_type = encodeParam(credential_type); - var path_credential_id = encodeParam(credential_id); + var pathCredentialType = encodeParam(credentialType); + var pathCredentialId = encodeParam(credentialId); User responseHandler(dynamic json, String contentType) { return User.fromResponse(json, contentType); @@ -9997,38 +9909,38 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/users/credential/$path_credential_type/$path_credential_id', + '/users/credential/$pathCredentialType/$pathCredentialId', {'fields': fields}); } /// ### Email/password login information for the specified user. /// /// GET /users/{user_id}/credentials_email -> CredentialsEmail - Future> user_credentials_email( + Future> userCredentialsEmail( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CredentialsEmail responseHandler(dynamic json, String contentType) { return CredentialsEmail.fromResponse(json, contentType); } - return get(responseHandler, '/users/$path_user_id/credentials_email', + return get(responseHandler, '/users/$pathUserId/credentials_email', {'fields': fields}); } /// ### Email/password login information for the specified user. /// /// POST /users/{user_id}/credentials_email -> CredentialsEmail - Future> create_user_credentials_email( + Future> createUserCredentialsEmail( /// @param {int} user_id id of user - int user_id, + int userId, /// @param {WriteCredentialsEmail} body WriteCredentialsEmail body, @@ -10036,23 +9948,23 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CredentialsEmail responseHandler(dynamic json, String contentType) { return CredentialsEmail.fromResponse(json, contentType); } - return post(responseHandler, '/users/$path_user_id/credentials_email', - {'fields': fields}, body == null ? null : body.toJson()); + return post(responseHandler, '/users/$pathUserId/credentials_email', + {'fields': fields}, body?.toJson()); } /// ### Email/password login information for the specified user. /// /// PATCH /users/{user_id}/credentials_email -> CredentialsEmail - Future> update_user_credentials_email( + Future> updateUserCredentialsEmail( /// @param {int} user_id id of user - int user_id, + int userId, /// @param {WriteCredentialsEmail} body WriteCredentialsEmail body, @@ -10060,60 +9972,60 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CredentialsEmail responseHandler(dynamic json, String contentType) { return CredentialsEmail.fromResponse(json, contentType); } - return patch(responseHandler, '/users/$path_user_id/credentials_email', - {'fields': fields}, body == null ? null : body.toJson()); + return patch(responseHandler, '/users/$pathUserId/credentials_email', + {'fields': fields}, body?.toJson()); } /// ### Email/password login information for the specified user. /// /// DELETE /users/{user_id}/credentials_email -> String - Future> delete_user_credentials_email( + Future> deleteUserCredentialsEmail( /// @param {int} user_id id of user - int user_id) async { - var path_user_id = encodeParam(user_id); + int userId) async { + var pathUserId = encodeParam(userId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/users/$path_user_id/credentials_email'); + return delete(responseHandler, '/users/$pathUserId/credentials_email'); } /// ### Two-factor login information for the specified user. /// /// GET /users/{user_id}/credentials_totp -> CredentialsTotp - Future> user_credentials_totp( + Future> userCredentialsTotp( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CredentialsTotp responseHandler(dynamic json, String contentType) { return CredentialsTotp.fromResponse(json, contentType); } - return get(responseHandler, '/users/$path_user_id/credentials_totp', + return get(responseHandler, '/users/$pathUserId/credentials_totp', {'fields': fields}); } /// ### Two-factor login information for the specified user. /// /// POST /users/{user_id}/credentials_totp -> CredentialsTotp - Future> create_user_credentials_totp( + Future> createUserCredentialsTotp( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {CredentialsTotp} body @@ -10121,196 +10033,196 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CredentialsTotp responseHandler(dynamic json, String contentType) { return CredentialsTotp.fromResponse(json, contentType); } - return post(responseHandler, '/users/$path_user_id/credentials_totp', - {'fields': fields}, body == null ? null : body.toJson()); + return post(responseHandler, '/users/$pathUserId/credentials_totp', + {'fields': fields}, body?.toJson()); } /// ### Two-factor login information for the specified user. /// /// DELETE /users/{user_id}/credentials_totp -> String - Future> delete_user_credentials_totp( + Future> deleteUserCredentialsTotp( /// @param {int} user_id id of user - int user_id) async { - var path_user_id = encodeParam(user_id); + int userId) async { + var pathUserId = encodeParam(userId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/users/$path_user_id/credentials_totp'); + return delete(responseHandler, '/users/$pathUserId/credentials_totp'); } /// ### LDAP login information for the specified user. /// /// GET /users/{user_id}/credentials_ldap -> CredentialsLDAP - Future> user_credentials_ldap( + Future> userCredentialsLdap( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CredentialsLDAP responseHandler(dynamic json, String contentType) { return CredentialsLDAP.fromResponse(json, contentType); } - return get(responseHandler, '/users/$path_user_id/credentials_ldap', + return get(responseHandler, '/users/$pathUserId/credentials_ldap', {'fields': fields}); } /// ### LDAP login information for the specified user. /// /// DELETE /users/{user_id}/credentials_ldap -> String - Future> delete_user_credentials_ldap( + Future> deleteUserCredentialsLdap( /// @param {int} user_id id of user - int user_id) async { - var path_user_id = encodeParam(user_id); + int userId) async { + var pathUserId = encodeParam(userId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/users/$path_user_id/credentials_ldap'); + return delete(responseHandler, '/users/$pathUserId/credentials_ldap'); } /// ### Google authentication login information for the specified user. /// /// GET /users/{user_id}/credentials_google -> CredentialsGoogle - Future> user_credentials_google( + Future> userCredentialsGoogle( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CredentialsGoogle responseHandler(dynamic json, String contentType) { return CredentialsGoogle.fromResponse(json, contentType); } - return get(responseHandler, '/users/$path_user_id/credentials_google', + return get(responseHandler, '/users/$pathUserId/credentials_google', {'fields': fields}); } /// ### Google authentication login information for the specified user. /// /// DELETE /users/{user_id}/credentials_google -> String - Future> delete_user_credentials_google( + Future> deleteUserCredentialsGoogle( /// @param {int} user_id id of user - int user_id) async { - var path_user_id = encodeParam(user_id); + int userId) async { + var pathUserId = encodeParam(userId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/users/$path_user_id/credentials_google'); + return delete(responseHandler, '/users/$pathUserId/credentials_google'); } /// ### Saml authentication login information for the specified user. /// /// GET /users/{user_id}/credentials_saml -> CredentialsSaml - Future> user_credentials_saml( + Future> userCredentialsSaml( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CredentialsSaml responseHandler(dynamic json, String contentType) { return CredentialsSaml.fromResponse(json, contentType); } - return get(responseHandler, '/users/$path_user_id/credentials_saml', + return get(responseHandler, '/users/$pathUserId/credentials_saml', {'fields': fields}); } /// ### Saml authentication login information for the specified user. /// /// DELETE /users/{user_id}/credentials_saml -> String - Future> delete_user_credentials_saml( + Future> deleteUserCredentialsSaml( /// @param {int} user_id id of user - int user_id) async { - var path_user_id = encodeParam(user_id); + int userId) async { + var pathUserId = encodeParam(userId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/users/$path_user_id/credentials_saml'); + return delete(responseHandler, '/users/$pathUserId/credentials_saml'); } /// ### OpenID Connect (OIDC) authentication login information for the specified user. /// /// GET /users/{user_id}/credentials_oidc -> CredentialsOIDC - Future> user_credentials_oidc( + Future> userCredentialsOidc( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CredentialsOIDC responseHandler(dynamic json, String contentType) { return CredentialsOIDC.fromResponse(json, contentType); } - return get(responseHandler, '/users/$path_user_id/credentials_oidc', + return get(responseHandler, '/users/$pathUserId/credentials_oidc', {'fields': fields}); } /// ### OpenID Connect (OIDC) authentication login information for the specified user. /// /// DELETE /users/{user_id}/credentials_oidc -> String - Future> delete_user_credentials_oidc( + Future> deleteUserCredentialsOidc( /// @param {int} user_id id of user - int user_id) async { - var path_user_id = encodeParam(user_id); + int userId) async { + var pathUserId = encodeParam(userId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/users/$path_user_id/credentials_oidc'); + return delete(responseHandler, '/users/$pathUserId/credentials_oidc'); } /// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. /// /// GET /users/{user_id}/credentials_api3/{credentials_api3_id} -> CredentialsApi3 - Future> user_credentials_api3( + Future> userCredentialsApi3( /// @param {int} user_id Id of user - int user_id, + int userId, /// @param {int} credentials_api3_id Id of API 3 Credential - int credentials_api3_id, + int credentialsApi3Id, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); - var path_credentials_api3_id = encodeParam(credentials_api3_id); + var pathUserId = encodeParam(userId); + var pathCredentialsApi3Id = encodeParam(credentialsApi3Id); CredentialsApi3 responseHandler(dynamic json, String contentType) { return CredentialsApi3.fromResponse(json, contentType); @@ -10318,43 +10230,43 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/users/$path_user_id/credentials_api3/$path_credentials_api3_id', + '/users/$pathUserId/credentials_api3/$pathCredentialsApi3Id', {'fields': fields}); } /// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. /// /// DELETE /users/{user_id}/credentials_api3/{credentials_api3_id} -> String - Future> delete_user_credentials_api3( + Future> deleteUserCredentialsApi3( /// @param {int} user_id id of user - int user_id, + int userId, /// @param {int} credentials_api3_id id of API 3 Credential - int credentials_api3_id) async { - var path_user_id = encodeParam(user_id); - var path_credentials_api3_id = encodeParam(credentials_api3_id); + int credentialsApi3Id) async { + var pathUserId = encodeParam(userId); + var pathCredentialsApi3Id = encodeParam(credentialsApi3Id); String responseHandler(dynamic json, String contentType) { return json; } return delete(responseHandler, - '/users/$path_user_id/credentials_api3/$path_credentials_api3_id'); + '/users/$pathUserId/credentials_api3/$pathCredentialsApi3Id'); } /// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. /// /// GET /users/{user_id}/credentials_api3 -> List - Future>> all_user_credentials_api3s( + Future>> allUserCredentialsApi3s( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); List responseHandler(dynamic json, String contentType) { return json @@ -10363,47 +10275,47 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/users/$path_user_id/credentials_api3', + return get(responseHandler, '/users/$pathUserId/credentials_api3', {'fields': fields}); } /// ### API 3 login information for the specified user. This is for the newer API keys that can be added for any user. /// /// POST /users/{user_id}/credentials_api3 -> CreateCredentialsApi3 - Future> create_user_credentials_api3( + Future> createUserCredentialsApi3( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CreateCredentialsApi3 responseHandler(dynamic json, String contentType) { return CreateCredentialsApi3.fromResponse(json, contentType); } - return post(responseHandler, '/users/$path_user_id/credentials_api3', + return post(responseHandler, '/users/$pathUserId/credentials_api3', {'fields': fields}); } /// ### Embed login information for the specified user. /// /// GET /users/{user_id}/credentials_embed/{credentials_embed_id} -> CredentialsEmbed - Future> user_credentials_embed( + Future> userCredentialsEmbed( /// @param {int} user_id Id of user - int user_id, + int userId, /// @param {int} credentials_embed_id Id of Embedding Credential - int credentials_embed_id, + int credentialsEmbedId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); - var path_credentials_embed_id = encodeParam(credentials_embed_id); + var pathUserId = encodeParam(userId); + var pathCredentialsEmbedId = encodeParam(credentialsEmbedId); CredentialsEmbed responseHandler(dynamic json, String contentType) { return CredentialsEmbed.fromResponse(json, contentType); @@ -10411,43 +10323,43 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/users/$path_user_id/credentials_embed/$path_credentials_embed_id', + '/users/$pathUserId/credentials_embed/$pathCredentialsEmbedId', {'fields': fields}); } /// ### Embed login information for the specified user. /// /// DELETE /users/{user_id}/credentials_embed/{credentials_embed_id} -> String - Future> delete_user_credentials_embed( + Future> deleteUserCredentialsEmbed( /// @param {int} user_id id of user - int user_id, + int userId, /// @param {int} credentials_embed_id id of Embedding Credential - int credentials_embed_id) async { - var path_user_id = encodeParam(user_id); - var path_credentials_embed_id = encodeParam(credentials_embed_id); + int credentialsEmbedId) async { + var pathUserId = encodeParam(userId); + var pathCredentialsEmbedId = encodeParam(credentialsEmbedId); String responseHandler(dynamic json, String contentType) { return json; } return delete(responseHandler, - '/users/$path_user_id/credentials_embed/$path_credentials_embed_id'); + '/users/$pathUserId/credentials_embed/$pathCredentialsEmbedId'); } /// ### Embed login information for the specified user. /// /// GET /users/{user_id}/credentials_embed -> List - Future>> all_user_credentials_embeds( + Future>> allUserCredentialsEmbeds( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); List responseHandler(dynamic json, String contentType) { return json @@ -10456,106 +10368,106 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/users/$path_user_id/credentials_embed', + return get(responseHandler, '/users/$pathUserId/credentials_embed', {'fields': fields}); } /// ### Looker Openid login information for the specified user. Used by Looker Analysts. /// /// GET /users/{user_id}/credentials_looker_openid -> CredentialsLookerOpenid - Future> user_credentials_looker_openid( + Future> userCredentialsLookerOpenid( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); CredentialsLookerOpenid responseHandler(dynamic json, String contentType) { return CredentialsLookerOpenid.fromResponse(json, contentType); } - return get(responseHandler, - '/users/$path_user_id/credentials_looker_openid', {'fields': fields}); + return get(responseHandler, '/users/$pathUserId/credentials_looker_openid', + {'fields': fields}); } /// ### Looker Openid login information for the specified user. Used by Looker Analysts. /// /// DELETE /users/{user_id}/credentials_looker_openid -> String - Future> delete_user_credentials_looker_openid( + Future> deleteUserCredentialsLookerOpenid( /// @param {int} user_id id of user - int user_id) async { - var path_user_id = encodeParam(user_id); + int userId) async { + var pathUserId = encodeParam(userId); String responseHandler(dynamic json, String contentType) { return json; } return delete( - responseHandler, '/users/$path_user_id/credentials_looker_openid'); + responseHandler, '/users/$pathUserId/credentials_looker_openid'); } /// ### Web login session for the specified user. /// /// GET /users/{user_id}/sessions/{session_id} -> Session - Future> user_session( + Future> userSession( /// @param {int} user_id Id of user - int user_id, + int userId, /// @param {int} session_id Id of Web Login Session - int session_id, + int sessionId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); - var path_session_id = encodeParam(session_id); + var pathUserId = encodeParam(userId); + var pathSessionId = encodeParam(sessionId); Session responseHandler(dynamic json, String contentType) { return Session.fromResponse(json, contentType); } - return get(responseHandler, - '/users/$path_user_id/sessions/$path_session_id', {'fields': fields}); + return get(responseHandler, '/users/$pathUserId/sessions/$pathSessionId', + {'fields': fields}); } /// ### Web login session for the specified user. /// /// DELETE /users/{user_id}/sessions/{session_id} -> String - Future> delete_user_session( + Future> deleteUserSession( /// @param {int} user_id id of user - int user_id, + int userId, /// @param {int} session_id id of Web Login Session - int session_id) async { - var path_user_id = encodeParam(user_id); - var path_session_id = encodeParam(session_id); + int sessionId) async { + var pathUserId = encodeParam(userId); + var pathSessionId = encodeParam(sessionId); String responseHandler(dynamic json, String contentType) { return json; } return delete( - responseHandler, '/users/$path_user_id/sessions/$path_session_id'); + responseHandler, '/users/$pathUserId/sessions/$pathSessionId'); } /// ### Web login session for the specified user. /// /// GET /users/{user_id}/sessions -> List - Future>> all_user_sessions( + Future>> allUserSessions( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); List responseHandler(dynamic json, String contentType) { return json @@ -10564,7 +10476,7 @@ class LookerSDK extends APIMethods { } return get( - responseHandler, '/users/$path_user_id/sessions', {'fields': fields}); + responseHandler, '/users/$pathUserId/sessions', {'fields': fields}); } /// ### Create a password reset token. @@ -10578,19 +10490,18 @@ class LookerSDK extends APIMethods { /// This method can be called with an empty body. /// /// POST /users/{user_id}/credentials_email/password_reset -> CredentialsEmail - Future> - create_user_credentials_email_password_reset( + Future> createUserCredentialsEmailPasswordReset( - /// @param {int} user_id Id of user - int user_id, - { + /// @param {int} user_id Id of user + int userId, + { - /// @param {bool} expires Expiring token. - bool expires, + /// @param {bool} expires Expiring token. + bool expires, - /// @param {String} fields Requested fields. - String fields}) async { - var path_user_id = encodeParam(user_id); + /// @param {String} fields Requested fields. + String fields}) async { + var pathUserId = encodeParam(userId); CredentialsEmail responseHandler(dynamic json, String contentType) { return CredentialsEmail.fromResponse(json, contentType); @@ -10598,41 +10509,41 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/users/$path_user_id/credentials_email/password_reset', + '/users/$pathUserId/credentials_email/password_reset', {'expires': expires, 'fields': fields}); } /// ### Get information about roles of a given user /// /// GET /users/{user_id}/roles -> List - Future>> user_roles( + Future>> userRoles( /// @param {int} user_id id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields, /// @param {bool} direct_association_only Get only roles associated directly with the user: exclude those only associated through groups. - bool direct_association_only}) async { - var path_user_id = encodeParam(user_id); + bool directAssociationOnly}) async { + var pathUserId = encodeParam(userId); List responseHandler(dynamic json, String contentType) { return json.map((i) => Role.fromResponse(i, contentType)).toList(); } - return get(responseHandler, '/users/$path_user_id/roles', - {'fields': fields, 'direct_association_only': direct_association_only}); + return get(responseHandler, '/users/$pathUserId/roles', + {'fields': fields, 'direct_association_only': directAssociationOnly}); } /// ### Set roles of the user with a specific id. /// /// PUT /users/{user_id}/roles -> List - Future>> set_user_roles( + Future>> setUserRoles( /// @param {int} user_id id of user - int user_id, + int userId, /// @param {List} body List body, @@ -10640,14 +10551,14 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); List responseHandler(dynamic json, String contentType) { return json.map((i) => Role.fromResponse(i, contentType)).toList(); } - return put(responseHandler, '/users/$path_user_id/roles', - {'fields': fields}, body); + return put( + responseHandler, '/users/$pathUserId/roles', {'fields': fields}, body); } /// ### Get user attribute values for a given user. @@ -10668,24 +10579,24 @@ class LookerSDK extends APIMethods { /// The value of all hidden user attributes will be blank. /// /// GET /users/{user_id}/attribute_values -> List - Future>> user_attribute_user_values( + Future>> userAttributeUserValues( /// @param {int} user_id Id of user - int user_id, + int userId, { /// @param {String} fields Requested fields. String fields, /// @param {DelimList} user_attribute_ids Specific user attributes to request. Omit or leave blank to request all user attributes. - DelimList user_attribute_ids, + DelimList userAttributeIds, /// @param {bool} all_values If true, returns all values in the search path instead of just the first value found. Useful for debugging group precedence. - bool all_values, + bool allValues, /// @param {bool} include_unset If true, returns an empty record for each requested attribute that has no user, group, or default value. - bool include_unset}) async { - var path_user_id = encodeParam(user_id); + bool includeUnset}) async { + var pathUserId = encodeParam(userId); List responseHandler( dynamic json, String contentType) { @@ -10695,11 +10606,11 @@ class LookerSDK extends APIMethods { .toList(); } - return get(responseHandler, '/users/$path_user_id/attribute_values', { + return get(responseHandler, '/users/$pathUserId/attribute_values', { 'fields': fields, - 'user_attribute_ids': user_attribute_ids, - 'all_values': all_values, - 'include_unset': include_unset + 'user_attribute_ids': userAttributeIds, + 'all_values': allValues, + 'include_unset': includeUnset }); } @@ -10708,18 +10619,18 @@ class LookerSDK extends APIMethods { /// Per-user user attribute values take precedence over group or default values. /// /// PATCH /users/{user_id}/attribute_values/{user_attribute_id} -> UserAttributeWithValue - Future> set_user_attribute_user_value( + Future> setUserAttributeUserValue( /// @param {int} user_id Id of user - int user_id, + int userId, /// @param {int} user_attribute_id Id of user attribute - int user_attribute_id, + int userAttributeId, /// @param {WriteUserAttributeWithValue} body WriteUserAttributeWithValue body) async { - var path_user_id = encodeParam(user_id); - var path_user_attribute_id = encodeParam(user_attribute_id); + var pathUserId = encodeParam(userId); + var pathUserAttributeId = encodeParam(userAttributeId); UserAttributeWithValue responseHandler(dynamic json, String contentType) { return UserAttributeWithValue.fromResponse(json, contentType); @@ -10727,9 +10638,9 @@ class LookerSDK extends APIMethods { return patch( responseHandler, - '/users/$path_user_id/attribute_values/$path_user_attribute_id', + '/users/$pathUserId/attribute_values/$pathUserAttributeId', null, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Delete a user attribute value from a user's account settings. @@ -10740,19 +10651,19 @@ class LookerSDK extends APIMethods { /// information about how user attribute values are resolved. /// /// DELETE /users/{user_id}/attribute_values/{user_attribute_id} -> void - Future> delete_user_attribute_user_value( + Future> deleteUserAttributeUserValue( /// @param {int} user_id Id of user - int user_id, + int userId, /// @param {int} user_attribute_id Id of user attribute - int user_attribute_id) async { - var path_user_id = encodeParam(user_id); - var path_user_attribute_id = encodeParam(user_attribute_id); + int userAttributeId) async { + var pathUserId = encodeParam(userId); + var pathUserAttributeId = encodeParam(userAttributeId); void responseHandler(dynamic json, String contentType) {} return delete(responseHandler, - '/users/$path_user_id/attribute_values/$path_user_attribute_id'); + '/users/$pathUserId/attribute_values/$pathUserAttributeId'); } /// ### Send a password reset token. @@ -10764,16 +10675,15 @@ class LookerSDK extends APIMethods { /// This method can be called with an empty body. /// /// POST /users/{user_id}/credentials_email/send_password_reset -> CredentialsEmail - Future> - send_user_credentials_email_password_reset( + Future> sendUserCredentialsEmailPasswordReset( - /// @param {int} user_id Id of user - int user_id, - { + /// @param {int} user_id Id of user + int userId, + { - /// @param {String} fields Requested fields. - String fields}) async { - var path_user_id = encodeParam(user_id); + /// @param {String} fields Requested fields. + String fields}) async { + var pathUserId = encodeParam(userId); CredentialsEmail responseHandler(dynamic json, String contentType) { return CredentialsEmail.fromResponse(json, contentType); @@ -10781,7 +10691,7 @@ class LookerSDK extends APIMethods { return post( responseHandler, - '/users/$path_user_id/credentials_email/send_password_reset', + '/users/$pathUserId/credentials_email/send_password_reset', {'fields': fields}); } @@ -10793,10 +10703,10 @@ class LookerSDK extends APIMethods { /// The user's 'is_disabled' status must be true. /// /// POST /users/{user_id}/update_emails -> User - Future> wipeout_user_emails( + Future> wipeoutUserEmails( /// @param {int} user_id Id of user - int user_id, + int userId, /// @param {UserEmailOnly} body UserEmailOnly body, @@ -10804,20 +10714,20 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_user_id = encodeParam(user_id); + var pathUserId = encodeParam(userId); User responseHandler(dynamic json, String contentType) { return User.fromResponse(json, contentType); } - return post(responseHandler, '/users/$path_user_id/update_emails', - {'fields': fields}, body == null ? null : body.toJson()); + return post(responseHandler, '/users/$pathUserId/update_emails', + {'fields': fields}, body?.toJson()); } /// Create an embed user from an external user ID /// /// POST /users/embed_user -> UserPublic - Future> create_embed_user( + Future> createEmbedUser( /// @param {CreateEmbedUserRequest} body CreateEmbedUserRequest body) async { @@ -10825,8 +10735,7 @@ class LookerSDK extends APIMethods { return UserPublic.fromResponse(json, contentType); } - return post(responseHandler, '/users/embed_user', null, - body == null ? null : body.toJson()); + return post(responseHandler, '/users/embed_user', null, body?.toJson()); } // #endregion User: Manage Users @@ -10836,7 +10745,7 @@ class LookerSDK extends APIMethods { /// ### Get information about all user attributes. /// /// GET /user_attributes -> List - Future>> all_user_attributes( + Future>> allUserAttributes( { /// @param {String} fields Requested fields. @@ -10866,7 +10775,7 @@ class LookerSDK extends APIMethods { /// user attribute will fail with a 422 error. /// /// POST /user_attributes -> UserAttribute - Future> create_user_attribute( + Future> createUserAttribute( /// @param {WriteUserAttribute} body WriteUserAttribute body, @@ -10879,37 +10788,37 @@ class LookerSDK extends APIMethods { } return post(responseHandler, '/user_attributes', {'fields': fields}, - body == null ? null : body.toJson()); + body?.toJson()); } /// ### Get information about a user attribute. /// /// GET /user_attributes/{user_attribute_id} -> UserAttribute - Future> user_attribute( + Future> userAttribute( /// @param {int} user_attribute_id Id of user attribute - int user_attribute_id, + int userAttributeId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_attribute_id = encodeParam(user_attribute_id); + var pathUserAttributeId = encodeParam(userAttributeId); UserAttribute responseHandler(dynamic json, String contentType) { return UserAttribute.fromResponse(json, contentType); } - return get(responseHandler, '/user_attributes/$path_user_attribute_id', + return get(responseHandler, '/user_attributes/$pathUserAttributeId', {'fields': fields}); } /// ### Update a user attribute definition. /// /// PATCH /user_attributes/{user_attribute_id} -> UserAttribute - Future> update_user_attribute( + Future> updateUserAttribute( /// @param {int} user_attribute_id Id of user attribute - int user_attribute_id, + int userAttributeId, /// @param {WriteUserAttribute} body WriteUserAttribute body, @@ -10917,30 +10826,30 @@ class LookerSDK extends APIMethods { /// @param {String} fields Requested fields. String fields}) async { - var path_user_attribute_id = encodeParam(user_attribute_id); + var pathUserAttributeId = encodeParam(userAttributeId); UserAttribute responseHandler(dynamic json, String contentType) { return UserAttribute.fromResponse(json, contentType); } - return patch(responseHandler, '/user_attributes/$path_user_attribute_id', - {'fields': fields}, body == null ? null : body.toJson()); + return patch(responseHandler, '/user_attributes/$pathUserAttributeId', + {'fields': fields}, body?.toJson()); } /// ### Delete a user attribute (admin only). /// /// DELETE /user_attributes/{user_attribute_id} -> String - Future> delete_user_attribute( + Future> deleteUserAttribute( /// @param {int} user_attribute_id Id of user_attribute - int user_attribute_id) async { - var path_user_attribute_id = encodeParam(user_attribute_id); + int userAttributeId) async { + var pathUserAttributeId = encodeParam(userAttributeId); String responseHandler(dynamic json, String contentType) { return json; } - return delete(responseHandler, '/user_attributes/$path_user_attribute_id'); + return delete(responseHandler, '/user_attributes/$pathUserAttributeId'); } /// ### Returns all values of a user attribute defined by user groups, in precedence order. @@ -10953,15 +10862,15 @@ class LookerSDK extends APIMethods { /// /// GET /user_attributes/{user_attribute_id}/group_values -> List Future>> - all_user_attribute_group_values( + allUserAttributeGroupValues( /// @param {int} user_attribute_id Id of user attribute - int user_attribute_id, + int userAttributeId, { /// @param {String} fields Requested fields. String fields}) async { - var path_user_attribute_id = encodeParam(user_attribute_id); + var pathUserAttributeId = encodeParam(userAttributeId); List responseHandler( dynamic json, String contentType) { @@ -10973,7 +10882,7 @@ class LookerSDK extends APIMethods { return get( responseHandler, - '/user_attributes/$path_user_attribute_id/group_values', + '/user_attributes/$pathUserAttributeId/group_values', {'fields': fields}); } @@ -11000,14 +10909,14 @@ class LookerSDK extends APIMethods { /// /// POST /user_attributes/{user_attribute_id}/group_values -> List Future>> - set_user_attribute_group_values( + setUserAttributeGroupValues( /// @param {int} user_attribute_id Id of user attribute - int user_attribute_id, + int userAttributeId, /// @param {List} body List body) async { - var path_user_attribute_id = encodeParam(user_attribute_id); + var pathUserAttributeId = encodeParam(userAttributeId); List responseHandler( dynamic json, String contentType) { @@ -11018,7 +10927,7 @@ class LookerSDK extends APIMethods { } return post(responseHandler, - '/user_attributes/$path_user_attribute_id/group_values', null, body); + '/user_attributes/$pathUserAttributeId/group_values', null, body); } // #endregion UserAttribute: Manage User Attributes @@ -11030,7 +10939,7 @@ class LookerSDK extends APIMethods { /// Returns all workspaces available to the calling user. /// /// GET /workspaces -> List - Future>> all_workspaces() async { + Future>> allWorkspaces() async { List responseHandler(dynamic json, String contentType) { return json .map((i) => Workspace.fromResponse(i, contentType)) @@ -11074,14 +10983,14 @@ class LookerSDK extends APIMethods { Future> workspace( /// @param {String} workspace_id Id of the workspace - String workspace_id) async { - var path_workspace_id = encodeParam(workspace_id); + String workspaceId) async { + var pathWorkspaceId = encodeParam(workspaceId); Workspace responseHandler(dynamic json, String contentType) { return Workspace.fromResponse(json, contentType); } - return get(responseHandler, '/workspaces/$path_workspace_id'); + return get(responseHandler, '/workspaces/$pathWorkspaceId'); } // #endregion Workspace: Manage Workspaces diff --git a/dart/looker_sdk/lib/src/sdk/models.dart b/dart/looker_sdk/lib/src/sdk/models.dart index 646e3e091..b22a862a8 100644 --- a/dart/looker_sdk/lib/src/sdk/models.dart +++ b/dart/looker_sdk/lib/src/sdk/models.dart @@ -50,9 +50,7 @@ class AccessToken { String get accessToken { if (!_accessTokenSet && _apiMapResponse.containsKey('access_token')) { - _accessToken = _apiMapResponse['access_token'] == null - ? null - : _apiMapResponse['access_token'].toString(); + _accessToken = _apiMapResponse['access_token']?.toString(); _accessTokenSet = true; } return _accessToken; @@ -67,9 +65,7 @@ class AccessToken { String get tokenType { if (!_tokenTypeSet && _apiMapResponse.containsKey('token_type')) { - _tokenType = _apiMapResponse['token_type'] == null - ? null - : _apiMapResponse['token_type'].toString(); + _tokenType = _apiMapResponse['token_type']?.toString(); _tokenTypeSet = true; } return _tokenType; @@ -99,9 +95,7 @@ class AccessToken { String get refreshToken { if (!_refreshTokenSet && _apiMapResponse.containsKey('refresh_token')) { - _refreshToken = _apiMapResponse['refresh_token'] == null - ? null - : _apiMapResponse['refresh_token'].toString(); + _refreshToken = _apiMapResponse['refresh_token']?.toString(); _refreshTokenSet = true; } return _refreshToken; @@ -272,9 +266,7 @@ class Alert { String get cron { if (!_cronSet && _apiMapResponse.containsKey('cron')) { - _cron = _apiMapResponse['cron'] == null - ? null - : _apiMapResponse['cron'].toString(); + _cron = _apiMapResponse['cron']?.toString(); _cronSet = true; } return _cron; @@ -289,9 +281,7 @@ class Alert { String get customTitle { if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { - _customTitle = _apiMapResponse['custom_title'] == null - ? null - : _apiMapResponse['custom_title'].toString(); + _customTitle = _apiMapResponse['custom_title']?.toString(); _customTitleSet = true; } return _customTitle; @@ -322,9 +312,7 @@ class Alert { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -435,9 +423,7 @@ class Alert { String get disabledReason { if (!_disabledReasonSet && _apiMapResponse.containsKey('disabled_reason')) { - _disabledReason = _apiMapResponse['disabled_reason'] == null - ? null - : _apiMapResponse['disabled_reason'].toString(); + _disabledReason = _apiMapResponse['disabled_reason']?.toString(); _disabledReasonSet = true; } return _disabledReason; @@ -487,9 +473,7 @@ class Alert { if (!_investigativeContentIdSet && _apiMapResponse.containsKey('investigative_content_id')) { _investigativeContentId = - _apiMapResponse['investigative_content_id'] == null - ? null - : _apiMapResponse['investigative_content_id'].toString(); + _apiMapResponse['investigative_content_id']?.toString(); _investigativeContentIdSet = true; } return _investigativeContentId; @@ -506,9 +490,7 @@ class Alert { if (!_investigativeContentTitleSet && _apiMapResponse.containsKey('investigative_content_title')) { _investigativeContentTitle = - _apiMapResponse['investigative_content_title'] == null - ? null - : _apiMapResponse['investigative_content_title'].toString(); + _apiMapResponse['investigative_content_title']?.toString(); _investigativeContentTitleSet = true; } return _investigativeContentTitle; @@ -524,9 +506,7 @@ class Alert { String get lookmlDashboardId { if (!_lookmlDashboardIdSet && _apiMapResponse.containsKey('lookml_dashboard_id')) { - _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null - ? null - : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id']?.toString(); _lookmlDashboardIdSet = true; } return _lookmlDashboardId; @@ -541,9 +521,7 @@ class Alert { String get lookmlLinkId { if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { - _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null - ? null - : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkId = _apiMapResponse['lookml_link_id']?.toString(); _lookmlLinkIdSet = true; } return _lookmlLinkId; @@ -574,9 +552,7 @@ class Alert { String get ownerDisplayName { if (!_ownerDisplayNameSet && _apiMapResponse.containsKey('owner_display_name')) { - _ownerDisplayName = _apiMapResponse['owner_display_name'] == null - ? null - : _apiMapResponse['owner_display_name'].toString(); + _ownerDisplayName = _apiMapResponse['owner_display_name']?.toString(); _ownerDisplayNameSet = true; } return _ownerDisplayName; @@ -650,9 +626,8 @@ class Alert { var json = {}; if (_appliedDashboardFiltersSet || _apiMapResponse.containsKey('applied_dashboard_filters')) { - json['applied_dashboard_filters'] = appliedDashboardFilters == null - ? null - : appliedDashboardFilters.map((i) => i.toJson()).toList(); + json['applied_dashboard_filters'] = + appliedDashboardFilters?.map((i) => i.toJson())?.toList(); } if (_comparisonTypeSet || _apiMapResponse.containsKey('comparison_type')) { json['comparison_type'] = @@ -672,12 +647,10 @@ class Alert { json['description'] = description; } if (_destinationsSet || _apiMapResponse.containsKey('destinations')) { - json['destinations'] = destinations == null - ? null - : destinations.map((i) => i.toJson()).toList(); + json['destinations'] = destinations?.map((i) => i.toJson())?.toList(); } if (_fieldSet || _apiMapResponse.containsKey('field')) { - json['field'] = field == null ? null : field.toJson(); + json['field'] = field?.toJson(); } if (_followedSet || _apiMapResponse.containsKey('followed')) { json['followed'] = followed; @@ -730,9 +703,7 @@ class Alert { } if (_timeSeriesConditionStateSet || _apiMapResponse.containsKey('time_series_condition_state')) { - json['time_series_condition_state'] = timeSeriesConditionState == null - ? null - : timeSeriesConditionState.toJson(); + json['time_series_condition_state'] = timeSeriesConditionState?.toJson(); } return json; } @@ -759,9 +730,7 @@ class AlertAppliedDashboardFilter { String get filterTitle { if (!_filterTitleSet && _apiMapResponse.containsKey('filter_title')) { - _filterTitle = _apiMapResponse['filter_title'] == null - ? null - : _apiMapResponse['filter_title'].toString(); + _filterTitle = _apiMapResponse['filter_title']?.toString(); _filterTitleSet = true; } return _filterTitle; @@ -776,9 +745,7 @@ class AlertAppliedDashboardFilter { String get fieldName { if (!_fieldNameSet && _apiMapResponse.containsKey('field_name')) { - _fieldName = _apiMapResponse['field_name'] == null - ? null - : _apiMapResponse['field_name'].toString(); + _fieldName = _apiMapResponse['field_name']?.toString(); _fieldNameSet = true; } return _fieldName; @@ -793,9 +760,7 @@ class AlertAppliedDashboardFilter { String get filterValue { if (!_filterValueSet && _apiMapResponse.containsKey('filter_value')) { - _filterValue = _apiMapResponse['filter_value'] == null - ? null - : _apiMapResponse['filter_value'].toString(); + _filterValue = _apiMapResponse['filter_value']?.toString(); _filterValueSet = true; } return _filterValue; @@ -811,9 +776,7 @@ class AlertAppliedDashboardFilter { String get filterDescription { if (!_filterDescriptionSet && _apiMapResponse.containsKey('filter_description')) { - _filterDescription = _apiMapResponse['filter_description'] == null - ? null - : _apiMapResponse['filter_description'].toString(); + _filterDescription = _apiMapResponse['filter_description']?.toString(); _filterDescriptionSet = true; } return _filterDescription; @@ -885,9 +848,8 @@ class AlertConditionState { String get previousTimeSeriesId { if (!_previousTimeSeriesIdSet && _apiMapResponse.containsKey('previous_time_series_id')) { - _previousTimeSeriesId = _apiMapResponse['previous_time_series_id'] == null - ? null - : _apiMapResponse['previous_time_series_id'].toString(); + _previousTimeSeriesId = + _apiMapResponse['previous_time_series_id']?.toString(); _previousTimeSeriesIdSet = true; } return _previousTimeSeriesId; @@ -903,9 +865,8 @@ class AlertConditionState { String get latestTimeSeriesId { if (!_latestTimeSeriesIdSet && _apiMapResponse.containsKey('latest_time_series_id')) { - _latestTimeSeriesId = _apiMapResponse['latest_time_series_id'] == null - ? null - : _apiMapResponse['latest_time_series_id'].toString(); + _latestTimeSeriesId = + _apiMapResponse['latest_time_series_id']?.toString(); _latestTimeSeriesIdSet = true; } return _latestTimeSeriesId; @@ -994,9 +955,7 @@ class AlertDestination { String get emailAddress { if (!_emailAddressSet && _apiMapResponse.containsKey('email_address')) { - _emailAddress = _apiMapResponse['email_address'] == null - ? null - : _apiMapResponse['email_address'].toString(); + _emailAddress = _apiMapResponse['email_address']?.toString(); _emailAddressSet = true; } return _emailAddress; @@ -1013,9 +972,7 @@ class AlertDestination { if (!_actionHubIntegrationIdSet && _apiMapResponse.containsKey('action_hub_integration_id')) { _actionHubIntegrationId = - _apiMapResponse['action_hub_integration_id'] == null - ? null - : _apiMapResponse['action_hub_integration_id'].toString(); + _apiMapResponse['action_hub_integration_id']?.toString(); _actionHubIntegrationIdSet = true; } return _actionHubIntegrationId; @@ -1032,9 +989,7 @@ class AlertDestination { if (!_actionHubFormParamsJsonSet && _apiMapResponse.containsKey('action_hub_form_params_json')) { _actionHubFormParamsJson = - _apiMapResponse['action_hub_form_params_json'] == null - ? null - : _apiMapResponse['action_hub_form_params_json'].toString(); + _apiMapResponse['action_hub_form_params_json']?.toString(); _actionHubFormParamsJsonSet = true; } return _actionHubFormParamsJson; @@ -1111,9 +1066,7 @@ class AlertField { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -1128,9 +1081,7 @@ class AlertField { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -1196,8 +1147,7 @@ class AlertField { json['name'] = name; } if (_filterSet || _apiMapResponse.containsKey('filter')) { - json['filter'] = - filter == null ? null : filter.map((i) => i.toJson()).toList(); + json['filter'] = filter?.map((i) => i.toJson())?.toList(); } return json; } @@ -1221,9 +1171,7 @@ class AlertFieldFilter { String get fieldName { if (!_fieldNameSet && _apiMapResponse.containsKey('field_name')) { - _fieldName = _apiMapResponse['field_name'] == null - ? null - : _apiMapResponse['field_name'].toString(); + _fieldName = _apiMapResponse['field_name']?.toString(); _fieldNameSet = true; } return _fieldName; @@ -1253,9 +1201,7 @@ class AlertFieldFilter { String get filterValue { if (!_filterValueSet && _apiMapResponse.containsKey('filter_value')) { - _filterValue = _apiMapResponse['filter_value'] == null - ? null - : _apiMapResponse['filter_value'].toString(); + _filterValue = _apiMapResponse['filter_value']?.toString(); _filterValueSet = true; } return _filterValue; @@ -1361,9 +1307,7 @@ class AlertPatch { String get disabledReason { if (!_disabledReasonSet && _apiMapResponse.containsKey('disabled_reason')) { - _disabledReason = _apiMapResponse['disabled_reason'] == null - ? null - : _apiMapResponse['disabled_reason'].toString(); + _disabledReason = _apiMapResponse['disabled_reason']?.toString(); _disabledReasonSet = true; } return _disabledReason; @@ -1511,9 +1455,7 @@ class ApiSession { String get workspaceId { if (!_workspaceIdSet && _apiMapResponse.containsKey('workspace_id')) { - _workspaceId = _apiMapResponse['workspace_id'] == null - ? null - : _apiMapResponse['workspace_id'].toString(); + _workspaceId = _apiMapResponse['workspace_id']?.toString(); _workspaceIdSet = true; } return _workspaceId; @@ -1605,9 +1547,8 @@ class ApiVersion { String get lookerReleaseVersion { if (!_lookerReleaseVersionSet && _apiMapResponse.containsKey('looker_release_version')) { - _lookerReleaseVersion = _apiMapResponse['looker_release_version'] == null - ? null - : _apiMapResponse['looker_release_version'].toString(); + _lookerReleaseVersion = + _apiMapResponse['looker_release_version']?.toString(); _lookerReleaseVersionSet = true; } return _lookerReleaseVersion; @@ -1659,9 +1600,7 @@ class ApiVersion { String get apiServerUrl { if (!_apiServerUrlSet && _apiMapResponse.containsKey('api_server_url')) { - _apiServerUrl = _apiMapResponse['api_server_url'] == null - ? null - : _apiMapResponse['api_server_url'].toString(); + _apiServerUrl = _apiMapResponse['api_server_url']?.toString(); _apiServerUrlSet = true; } return _apiServerUrl; @@ -1676,9 +1615,7 @@ class ApiVersion { String get webServerUrl { if (!_webServerUrlSet && _apiMapResponse.containsKey('web_server_url')) { - _webServerUrl = _apiMapResponse['web_server_url'] == null - ? null - : _apiMapResponse['web_server_url'].toString(); + _webServerUrl = _apiMapResponse['web_server_url']?.toString(); _webServerUrlSet = true; } return _webServerUrl; @@ -1722,14 +1659,12 @@ class ApiVersion { json['looker_release_version'] = lookerReleaseVersion; } if (_currentVersionSet || _apiMapResponse.containsKey('current_version')) { - json['current_version'] = - currentVersion == null ? null : currentVersion.toJson(); + json['current_version'] = currentVersion?.toJson(); } if (_supportedVersionsSet || _apiMapResponse.containsKey('supported_versions')) { - json['supported_versions'] = supportedVersions == null - ? null - : supportedVersions.map((i) => i.toJson()).toList(); + json['supported_versions'] = + supportedVersions?.map((i) => i.toJson())?.toList(); } if (_apiServerUrlSet || _apiMapResponse.containsKey('api_server_url')) { json['api_server_url'] = apiServerUrl; @@ -1762,9 +1697,7 @@ class ApiVersionElement { String get version { if (!_versionSet && _apiMapResponse.containsKey('version')) { - _version = _apiMapResponse['version'] == null - ? null - : _apiMapResponse['version'].toString(); + _version = _apiMapResponse['version']?.toString(); _versionSet = true; } return _version; @@ -1779,9 +1712,7 @@ class ApiVersionElement { String get fullVersion { if (!_fullVersionSet && _apiMapResponse.containsKey('full_version')) { - _fullVersion = _apiMapResponse['full_version'] == null - ? null - : _apiMapResponse['full_version'].toString(); + _fullVersion = _apiMapResponse['full_version']?.toString(); _fullVersionSet = true; } return _fullVersion; @@ -1796,9 +1727,7 @@ class ApiVersionElement { String get status { if (!_statusSet && _apiMapResponse.containsKey('status')) { - _status = _apiMapResponse['status'] == null - ? null - : _apiMapResponse['status'].toString(); + _status = _apiMapResponse['status']?.toString(); _statusSet = true; } return _status; @@ -1813,9 +1742,7 @@ class ApiVersionElement { String get swaggerUrl { if (!_swaggerUrlSet && _apiMapResponse.containsKey('swagger_url')) { - _swaggerUrl = _apiMapResponse['swagger_url'] == null - ? null - : _apiMapResponse['swagger_url'].toString(); + _swaggerUrl = _apiMapResponse['swagger_url']?.toString(); _swaggerUrlSet = true; } return _swaggerUrl; @@ -1915,9 +1842,7 @@ class BackupConfiguration { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -1933,9 +1858,7 @@ class BackupConfiguration { String get customS3Bucket { if (!_customS3BucketSet && _apiMapResponse.containsKey('custom_s3_bucket')) { - _customS3Bucket = _apiMapResponse['custom_s3_bucket'] == null - ? null - : _apiMapResponse['custom_s3_bucket'].toString(); + _customS3Bucket = _apiMapResponse['custom_s3_bucket']?.toString(); _customS3BucketSet = true; } return _customS3Bucket; @@ -1951,9 +1874,8 @@ class BackupConfiguration { String get customS3BucketRegion { if (!_customS3BucketRegionSet && _apiMapResponse.containsKey('custom_s3_bucket_region')) { - _customS3BucketRegion = _apiMapResponse['custom_s3_bucket_region'] == null - ? null - : _apiMapResponse['custom_s3_bucket_region'].toString(); + _customS3BucketRegion = + _apiMapResponse['custom_s3_bucket_region']?.toString(); _customS3BucketRegionSet = true; } return _customS3BucketRegion; @@ -1968,9 +1890,7 @@ class BackupConfiguration { String get customS3Key { if (!_customS3KeySet && _apiMapResponse.containsKey('custom_s3_key')) { - _customS3Key = _apiMapResponse['custom_s3_key'] == null - ? null - : _apiMapResponse['custom_s3_key'].toString(); + _customS3Key = _apiMapResponse['custom_s3_key']?.toString(); _customS3KeySet = true; } return _customS3Key; @@ -1986,9 +1906,7 @@ class BackupConfiguration { String get customS3Secret { if (!_customS3SecretSet && _apiMapResponse.containsKey('custom_s3_secret')) { - _customS3Secret = _apiMapResponse['custom_s3_secret'] == null - ? null - : _apiMapResponse['custom_s3_secret'].toString(); + _customS3Secret = _apiMapResponse['custom_s3_secret']?.toString(); _customS3SecretSet = true; } return _customS3Secret; @@ -2003,9 +1921,7 @@ class BackupConfiguration { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -2180,9 +2096,7 @@ class Board { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -2231,9 +2145,8 @@ class Board { List get sectionOrder { if (!_sectionOrderSet && _apiMapResponse.containsKey('section_order')) { - _sectionOrder = _apiMapResponse['section_order'] == null - ? null - : _apiMapResponse['section_order'].map((i) => i as int).toList(); + _sectionOrder = + _apiMapResponse['section_order']?.map((i) => i as int)?.toList(); _sectionOrderSet = true; } return _sectionOrder; @@ -2248,9 +2161,7 @@ class Board { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -2344,20 +2255,16 @@ class Board { json['content_metadata_id'] = contentMetadataId; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { - json['deleted_at'] = - deletedAt == null ? null : deletedAt.toIso8601String(); + json['deleted_at'] = deletedAt?.toIso8601String(); } if (_descriptionSet || _apiMapResponse.containsKey('description')) { json['description'] = description; } if (_boardSectionsSet || _apiMapResponse.containsKey('board_sections')) { - json['board_sections'] = boardSections == null - ? null - : boardSections.map((i) => i.toJson()).toList(); + json['board_sections'] = boardSections?.map((i) => i.toJson())?.toList(); } if (_idSet || _apiMapResponse.containsKey('id')) { json['id'] = id; @@ -2369,8 +2276,7 @@ class Board { json['title'] = title; } if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { - json['updated_at'] = - updatedAt == null ? null : updatedAt.toIso8601String(); + json['updated_at'] = updatedAt?.toIso8601String(); } if (_userIdSet || _apiMapResponse.containsKey('user_id')) { json['user_id'] = userId; @@ -2471,9 +2377,7 @@ class BoardItem { String get contentCreatedBy { if (!_contentCreatedBySet && _apiMapResponse.containsKey('content_created_by')) { - _contentCreatedBy = _apiMapResponse['content_created_by'] == null - ? null - : _apiMapResponse['content_created_by'].toString(); + _contentCreatedBy = _apiMapResponse['content_created_by']?.toString(); _contentCreatedBySet = true; } return _contentCreatedBy; @@ -2521,9 +2425,7 @@ class BoardItem { String get contentUpdatedAt { if (!_contentUpdatedAtSet && _apiMapResponse.containsKey('content_updated_at')) { - _contentUpdatedAt = _apiMapResponse['content_updated_at'] == null - ? null - : _apiMapResponse['content_updated_at'].toString(); + _contentUpdatedAt = _apiMapResponse['content_updated_at']?.toString(); _contentUpdatedAtSet = true; } return _contentUpdatedAt; @@ -2539,9 +2441,7 @@ class BoardItem { String get customDescription { if (!_customDescriptionSet && _apiMapResponse.containsKey('custom_description')) { - _customDescription = _apiMapResponse['custom_description'] == null - ? null - : _apiMapResponse['custom_description'].toString(); + _customDescription = _apiMapResponse['custom_description']?.toString(); _customDescriptionSet = true; } return _customDescription; @@ -2556,9 +2456,7 @@ class BoardItem { String get customTitle { if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { - _customTitle = _apiMapResponse['custom_title'] == null - ? null - : _apiMapResponse['custom_title'].toString(); + _customTitle = _apiMapResponse['custom_title']?.toString(); _customTitleSet = true; } return _customTitle; @@ -2573,9 +2471,7 @@ class BoardItem { String get customUrl { if (!_customUrlSet && _apiMapResponse.containsKey('custom_url')) { - _customUrl = _apiMapResponse['custom_url'] == null - ? null - : _apiMapResponse['custom_url'].toString(); + _customUrl = _apiMapResponse['custom_url']?.toString(); _customUrlSet = true; } return _customUrl; @@ -2605,9 +2501,7 @@ class BoardItem { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -2668,9 +2562,7 @@ class BoardItem { String get imageUrl { if (!_imageUrlSet && _apiMapResponse.containsKey('image_url')) { - _imageUrl = _apiMapResponse['image_url'] == null - ? null - : _apiMapResponse['image_url'].toString(); + _imageUrl = _apiMapResponse['image_url']?.toString(); _imageUrlSet = true; } return _imageUrl; @@ -2685,9 +2577,7 @@ class BoardItem { String get location { if (!_locationSet && _apiMapResponse.containsKey('location')) { - _location = _apiMapResponse['location'] == null - ? null - : _apiMapResponse['location'].toString(); + _location = _apiMapResponse['location']?.toString(); _locationSet = true; } return _location; @@ -2702,9 +2592,7 @@ class BoardItem { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -2720,9 +2608,7 @@ class BoardItem { String get lookmlDashboardId { if (!_lookmlDashboardIdSet && _apiMapResponse.containsKey('lookml_dashboard_id')) { - _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null - ? null - : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id']?.toString(); _lookmlDashboardIdSet = true; } return _lookmlDashboardId; @@ -2752,9 +2638,7 @@ class BoardItem { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -2769,9 +2653,7 @@ class BoardItem { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -2988,9 +2870,7 @@ class BoardSection { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -3054,9 +2934,8 @@ class BoardSection { List get itemOrder { if (!_itemOrderSet && _apiMapResponse.containsKey('item_order')) { - _itemOrder = _apiMapResponse['item_order'] == null - ? null - : _apiMapResponse['item_order'].map((i) => i as int).toList(); + _itemOrder = + _apiMapResponse['item_order']?.map((i) => i as int)?.toList(); _itemOrderSet = true; } return _itemOrder; @@ -3072,11 +2951,9 @@ class BoardSection { List get visibleItemOrder { if (!_visibleItemOrderSet && _apiMapResponse.containsKey('visible_item_order')) { - _visibleItemOrder = _apiMapResponse['visible_item_order'] == null - ? null - : _apiMapResponse['visible_item_order'] - .map((i) => i as int) - .toList(); + _visibleItemOrder = _apiMapResponse['visible_item_order'] + ?.map((i) => i as int) + ?.toList(); _visibleItemOrderSet = true; } return _visibleItemOrder; @@ -3091,9 +2968,7 @@ class BoardSection { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -3153,12 +3028,10 @@ class BoardSection { json['can'] = can; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { - json['deleted_at'] = - deletedAt == null ? null : deletedAt.toIso8601String(); + json['deleted_at'] = deletedAt?.toIso8601String(); } if (_descriptionSet || _apiMapResponse.containsKey('description')) { json['description'] = description; @@ -3167,9 +3040,7 @@ class BoardSection { json['board_id'] = boardId; } if (_boardItemsSet || _apiMapResponse.containsKey('board_items')) { - json['board_items'] = boardItems == null - ? null - : boardItems.map((i) => i.toJson()).toList(); + json['board_items'] = boardItems?.map((i) => i.toJson())?.toList(); } if (_idSet || _apiMapResponse.containsKey('id')) { json['id'] = id; @@ -3185,8 +3056,7 @@ class BoardSection { json['title'] = title; } if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { - json['updated_at'] = - updatedAt == null ? null : updatedAt.toIso8601String(); + json['updated_at'] = updatedAt?.toIso8601String(); } return json; } @@ -3253,9 +3123,7 @@ class ColorCollection { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -3270,9 +3138,7 @@ class ColorCollection { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -3382,21 +3248,18 @@ class ColorCollection { } if (_categoricalPalettesSet || _apiMapResponse.containsKey('categoricalPalettes')) { - json['categoricalPalettes'] = categoricalPalettes == null - ? null - : categoricalPalettes.map((i) => i.toJson()).toList(); + json['categoricalPalettes'] = + categoricalPalettes?.map((i) => i.toJson())?.toList(); } if (_sequentialPalettesSet || _apiMapResponse.containsKey('sequentialPalettes')) { - json['sequentialPalettes'] = sequentialPalettes == null - ? null - : sequentialPalettes.map((i) => i.toJson()).toList(); + json['sequentialPalettes'] = + sequentialPalettes?.map((i) => i.toJson())?.toList(); } if (_divergingPalettesSet || _apiMapResponse.containsKey('divergingPalettes')) { - json['divergingPalettes'] = divergingPalettes == null - ? null - : divergingPalettes.map((i) => i.toJson()).toList(); + json['divergingPalettes'] = + divergingPalettes?.map((i) => i.toJson())?.toList(); } return json; } @@ -3417,9 +3280,7 @@ class ColorStop { String get color { if (!_colorSet && _apiMapResponse.containsKey('color')) { - _color = _apiMapResponse['color'] == null - ? null - : _apiMapResponse['color'].toString(); + _color = _apiMapResponse['color']?.toString(); _colorSet = true; } return _color; @@ -3503,9 +3364,7 @@ class ColumnSearch { String get schemaName { if (!_schemaNameSet && _apiMapResponse.containsKey('schema_name')) { - _schemaName = _apiMapResponse['schema_name'] == null - ? null - : _apiMapResponse['schema_name'].toString(); + _schemaName = _apiMapResponse['schema_name']?.toString(); _schemaNameSet = true; } return _schemaName; @@ -3520,9 +3379,7 @@ class ColumnSearch { String get tableName { if (!_tableNameSet && _apiMapResponse.containsKey('table_name')) { - _tableName = _apiMapResponse['table_name'] == null - ? null - : _apiMapResponse['table_name'].toString(); + _tableName = _apiMapResponse['table_name']?.toString(); _tableNameSet = true; } return _tableName; @@ -3537,9 +3394,7 @@ class ColumnSearch { String get columnName { if (!_columnNameSet && _apiMapResponse.containsKey('column_name')) { - _columnName = _apiMapResponse['column_name'] == null - ? null - : _apiMapResponse['column_name'].toString(); + _columnName = _apiMapResponse['column_name']?.toString(); _columnNameSet = true; } return _columnName; @@ -3554,9 +3409,7 @@ class ColumnSearch { String get dataType { if (!_dataTypeSet && _apiMapResponse.containsKey('data_type')) { - _dataType = _apiMapResponse['data_type'] == null - ? null - : _apiMapResponse['data_type'].toString(); + _dataType = _apiMapResponse['data_type']?.toString(); _dataTypeSet = true; } return _dataType; @@ -3668,9 +3521,7 @@ class Command { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -3685,9 +3536,7 @@ class Command { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -3703,9 +3552,7 @@ class Command { String get linkedContentId { if (!_linkedContentIdSet && _apiMapResponse.containsKey('linked_content_id')) { - _linkedContentId = _apiMapResponse['linked_content_id'] == null - ? null - : _apiMapResponse['linked_content_id'].toString(); + _linkedContentId = _apiMapResponse['linked_content_id']?.toString(); _linkedContentIdSet = true; } return _linkedContentId; @@ -3787,34 +3634,34 @@ class Command { /// This property informs the check what kind of comparison we are performing. Only certain condition types are valid for time series alerts. For details, refer to [Setting Alert Conditions](https://docs.looker.com/sharing-and-publishing/creating-alerts#setting_alert_conditions) Valid values are: "EQUAL_TO", "GREATER_THAN", "GREATER_THAN_OR_EQUAL_TO", "LESS_THAN", "LESS_THAN_OR_EQUAL_TO", "INCREASES_BY", "DECREASES_BY", "CHANGES_BY". (Enum defined in Alert) enum ComparisonType { - EQUALTO, - GREATERTHAN, - GREATERTHANOREQUALTO, - LESSTHAN, - LESSTHANOREQUALTO, - INCREASESBY, - DECREASESBY, - CHANGESBY + equalTo, + greaterThan, + greaterThanOrEqualTo, + lessThan, + lessThanOrEqualTo, + increasesBy, + decreasesBy, + changesBy } class ComparisonTypeMapper { static String toStringValue(ComparisonType e) { switch (e) { - case ComparisonType.EQUALTO: + case ComparisonType.equalTo: return 'EQUAL_TO'; - case ComparisonType.GREATERTHAN: + case ComparisonType.greaterThan: return 'GREATER_THAN'; - case ComparisonType.GREATERTHANOREQUALTO: + case ComparisonType.greaterThanOrEqualTo: return 'GREATER_THAN_OR_EQUAL_TO'; - case ComparisonType.LESSTHAN: + case ComparisonType.lessThan: return 'LESS_THAN'; - case ComparisonType.LESSTHANOREQUALTO: + case ComparisonType.lessThanOrEqualTo: return 'LESS_THAN_OR_EQUAL_TO'; - case ComparisonType.INCREASESBY: + case ComparisonType.increasesBy: return 'INCREASES_BY'; - case ComparisonType.DECREASESBY: + case ComparisonType.decreasesBy: return 'DECREASES_BY'; - case ComparisonType.CHANGESBY: + case ComparisonType.changesBy: return 'CHANGES_BY'; default: @@ -3824,28 +3671,28 @@ class ComparisonTypeMapper { static ComparisonType fromStringValue(String s) { if (s == 'EQUAL_TO') { - return ComparisonType.EQUALTO; + return ComparisonType.equalTo; } if (s == 'GREATER_THAN') { - return ComparisonType.GREATERTHAN; + return ComparisonType.greaterThan; } if (s == 'GREATER_THAN_OR_EQUAL_TO') { - return ComparisonType.GREATERTHANOREQUALTO; + return ComparisonType.greaterThanOrEqualTo; } if (s == 'LESS_THAN') { - return ComparisonType.LESSTHAN; + return ComparisonType.lessThan; } if (s == 'LESS_THAN_OR_EQUAL_TO') { - return ComparisonType.LESSTHANOREQUALTO; + return ComparisonType.lessThanOrEqualTo; } if (s == 'INCREASES_BY') { - return ComparisonType.INCREASESBY; + return ComparisonType.increasesBy; } if (s == 'DECREASES_BY') { - return ComparisonType.DECREASESBY; + return ComparisonType.decreasesBy; } if (s == 'CHANGES_BY') { - return ComparisonType.CHANGESBY; + return ComparisonType.changesBy; } return null; } @@ -3908,9 +3755,7 @@ class ConnectionFeatures { String get dialectName { if (!_dialectNameSet && _apiMapResponse.containsKey('dialect_name')) { - _dialectName = _apiMapResponse['dialect_name'] == null - ? null - : _apiMapResponse['dialect_name'].toString(); + _dialectName = _apiMapResponse['dialect_name']?.toString(); _dialectNameSet = true; } return _dialectName; @@ -4315,9 +4160,7 @@ class ContentFavorite { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -4435,10 +4278,10 @@ class ContentFavorite { json['dashboard_id'] = dashboardId; } if (_lookSet || _apiMapResponse.containsKey('look')) { - json['look'] = look == null ? null : look.toJson(); + json['look'] = look?.toJson(); } if (_dashboardSet || _apiMapResponse.containsKey('dashboard')) { - json['dashboard'] = dashboard == null ? null : dashboard.toJson(); + json['dashboard'] = dashboard?.toJson(); } if (_boardIdSet || _apiMapResponse.containsKey('board_id')) { json['board_id'] = boardId; @@ -4519,9 +4362,7 @@ class ContentMeta { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -4551,9 +4392,7 @@ class ContentMeta { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -4568,9 +4407,7 @@ class ContentMeta { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -4585,9 +4422,7 @@ class ContentMeta { String get folderId { if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { - _folderId = _apiMapResponse['folder_id'] == null - ? null - : _apiMapResponse['folder_id'].toString(); + _folderId = _apiMapResponse['folder_id']?.toString(); _folderIdSet = true; } return _folderId; @@ -4602,9 +4437,7 @@ class ContentMeta { String get contentType { if (!_contentTypeSet && _apiMapResponse.containsKey('content_type')) { - _contentType = _apiMapResponse['content_type'] == null - ? null - : _apiMapResponse['content_type'].toString(); + _contentType = _apiMapResponse['content_type']?.toString(); _contentTypeSet = true; } return _contentType; @@ -4649,9 +4482,7 @@ class ContentMeta { String get slug { if (!_slugSet && _apiMapResponse.containsKey('slug')) { - _slug = _apiMapResponse['slug'] == null - ? null - : _apiMapResponse['slug'].toString(); + _slug = _apiMapResponse['slug']?.toString(); _slugSet = true; } return _slug; @@ -4770,9 +4601,7 @@ class ContentMetaGroupUser { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -4788,9 +4617,7 @@ class ContentMetaGroupUser { String get contentMetadataId { if (!_contentMetadataIdSet && _apiMapResponse.containsKey('content_metadata_id')) { - _contentMetadataId = _apiMapResponse['content_metadata_id'] == null - ? null - : _apiMapResponse['content_metadata_id'].toString(); + _contentMetadataId = _apiMapResponse['content_metadata_id']?.toString(); _contentMetadataIdSet = true; } return _contentMetadataId; @@ -5094,9 +4921,8 @@ class ContentValidation { var json = {}; if (_contentWithErrorsSet || _apiMapResponse.containsKey('content_with_errors')) { - json['content_with_errors'] = contentWithErrors == null - ? null - : contentWithErrors.map((i) => i.toJson()).toList(); + json['content_with_errors'] = + contentWithErrors?.map((i) => i.toJson())?.toList(); } if (_computationTimeSet || _apiMapResponse.containsKey('computation_time')) { @@ -5169,9 +4995,7 @@ class ContentValidationAlert { String get lookmlDashboardId { if (!_lookmlDashboardIdSet && _apiMapResponse.containsKey('lookml_dashboard_id')) { - _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null - ? null - : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id']?.toString(); _lookmlDashboardIdSet = true; } return _lookmlDashboardId; @@ -5186,9 +5010,7 @@ class ContentValidationAlert { String get lookmlLinkId { if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { - _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null - ? null - : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkId = _apiMapResponse['lookml_link_id']?.toString(); _lookmlLinkIdSet = true; } return _lookmlLinkId; @@ -5203,9 +5025,7 @@ class ContentValidationAlert { String get customTitle { if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { - _customTitle = _apiMapResponse['custom_title'] == null - ? null - : _apiMapResponse['custom_title'].toString(); + _customTitle = _apiMapResponse['custom_title']?.toString(); _customTitleSet = true; } return _customTitle; @@ -5285,9 +5105,7 @@ class ContentValidationDashboard { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -5302,9 +5120,7 @@ class ContentValidationDashboard { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -5335,9 +5151,7 @@ class ContentValidationDashboard { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -5352,9 +5166,7 @@ class ContentValidationDashboard { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -5400,7 +5212,7 @@ class ContentValidationDashboard { json['id'] = id; } if (_folderSet || _apiMapResponse.containsKey('folder')) { - json['folder'] = folder == null ? null : folder.toJson(); + json['folder'] = folder?.toJson(); } if (_titleSet || _apiMapResponse.containsKey('title')) { json['title'] = title; @@ -5463,9 +5275,7 @@ class ContentValidationDashboardElement { String get bodyText { if (!_bodyTextSet && _apiMapResponse.containsKey('body_text')) { - _bodyText = _apiMapResponse['body_text'] == null - ? null - : _apiMapResponse['body_text'].toString(); + _bodyText = _apiMapResponse['body_text']?.toString(); _bodyTextSet = true; } return _bodyText; @@ -5480,9 +5290,7 @@ class ContentValidationDashboardElement { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -5497,9 +5305,7 @@ class ContentValidationDashboardElement { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -5514,9 +5320,7 @@ class ContentValidationDashboardElement { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -5531,9 +5335,7 @@ class ContentValidationDashboardElement { String get noteDisplay { if (!_noteDisplaySet && _apiMapResponse.containsKey('note_display')) { - _noteDisplay = _apiMapResponse['note_display'] == null - ? null - : _apiMapResponse['note_display'].toString(); + _noteDisplay = _apiMapResponse['note_display']?.toString(); _noteDisplaySet = true; } return _noteDisplay; @@ -5548,9 +5350,7 @@ class ContentValidationDashboardElement { String get noteState { if (!_noteStateSet && _apiMapResponse.containsKey('note_state')) { - _noteState = _apiMapResponse['note_state'] == null - ? null - : _apiMapResponse['note_state'].toString(); + _noteState = _apiMapResponse['note_state']?.toString(); _noteStateSet = true; } return _noteState; @@ -5565,9 +5365,7 @@ class ContentValidationDashboardElement { String get noteText { if (!_noteTextSet && _apiMapResponse.containsKey('note_text')) { - _noteText = _apiMapResponse['note_text'] == null - ? null - : _apiMapResponse['note_text'].toString(); + _noteText = _apiMapResponse['note_text']?.toString(); _noteTextSet = true; } return _noteText; @@ -5583,9 +5381,7 @@ class ContentValidationDashboardElement { String get noteTextAsHtml { if (!_noteTextAsHtmlSet && _apiMapResponse.containsKey('note_text_as_html')) { - _noteTextAsHtml = _apiMapResponse['note_text_as_html'] == null - ? null - : _apiMapResponse['note_text_as_html'].toString(); + _noteTextAsHtml = _apiMapResponse['note_text_as_html']?.toString(); _noteTextAsHtmlSet = true; } return _noteTextAsHtml; @@ -5615,9 +5411,7 @@ class ContentValidationDashboardElement { String get subtitleText { if (!_subtitleTextSet && _apiMapResponse.containsKey('subtitle_text')) { - _subtitleText = _apiMapResponse['subtitle_text'] == null - ? null - : _apiMapResponse['subtitle_text'].toString(); + _subtitleText = _apiMapResponse['subtitle_text']?.toString(); _subtitleTextSet = true; } return _subtitleText; @@ -5632,9 +5426,7 @@ class ContentValidationDashboardElement { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -5664,9 +5456,7 @@ class ContentValidationDashboardElement { String get titleText { if (!_titleTextSet && _apiMapResponse.containsKey('title_text')) { - _titleText = _apiMapResponse['title_text'] == null - ? null - : _apiMapResponse['title_text'].toString(); + _titleText = _apiMapResponse['title_text']?.toString(); _titleTextSet = true; } return _titleText; @@ -5681,9 +5471,7 @@ class ContentValidationDashboardElement { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -5805,9 +5593,7 @@ class ContentValidationDashboardFilter { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -5822,9 +5608,7 @@ class ContentValidationDashboardFilter { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -5839,9 +5623,7 @@ class ContentValidationDashboardFilter { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -5856,9 +5638,7 @@ class ContentValidationDashboardFilter { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -5873,9 +5653,7 @@ class ContentValidationDashboardFilter { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -5890,9 +5668,7 @@ class ContentValidationDashboardFilter { String get defaultValue { if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { - _defaultValue = _apiMapResponse['default_value'] == null - ? null - : _apiMapResponse['default_value'].toString(); + _defaultValue = _apiMapResponse['default_value']?.toString(); _defaultValueSet = true; } return _defaultValue; @@ -5907,9 +5683,7 @@ class ContentValidationDashboardFilter { String get model { if (!_modelSet && _apiMapResponse.containsKey('model')) { - _model = _apiMapResponse['model'] == null - ? null - : _apiMapResponse['model'].toString(); + _model = _apiMapResponse['model']?.toString(); _modelSet = true; } return _model; @@ -5924,9 +5698,7 @@ class ContentValidationDashboardFilter { String get explore { if (!_exploreSet && _apiMapResponse.containsKey('explore')) { - _explore = _apiMapResponse['explore'] == null - ? null - : _apiMapResponse['explore'].toString(); + _explore = _apiMapResponse['explore']?.toString(); _exploreSet = true; } return _explore; @@ -5941,9 +5713,7 @@ class ContentValidationDashboardFilter { String get dimension { if (!_dimensionSet && _apiMapResponse.containsKey('dimension')) { - _dimension = _apiMapResponse['dimension'] == null - ? null - : _apiMapResponse['dimension'].toString(); + _dimension = _apiMapResponse['dimension']?.toString(); _dimensionSet = true; } return _dimension; @@ -6037,9 +5807,7 @@ class ContentValidationError { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -6054,9 +5822,7 @@ class ContentValidationError { String get fieldName { if (!_fieldNameSet && _apiMapResponse.containsKey('field_name')) { - _fieldName = _apiMapResponse['field_name'] == null - ? null - : _apiMapResponse['field_name'].toString(); + _fieldName = _apiMapResponse['field_name']?.toString(); _fieldNameSet = true; } return _fieldName; @@ -6071,9 +5837,7 @@ class ContentValidationError { String get modelName { if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { - _modelName = _apiMapResponse['model_name'] == null - ? null - : _apiMapResponse['model_name'].toString(); + _modelName = _apiMapResponse['model_name']?.toString(); _modelNameSet = true; } return _modelName; @@ -6088,9 +5852,7 @@ class ContentValidationError { String get exploreName { if (!_exploreNameSet && _apiMapResponse.containsKey('explore_name')) { - _exploreName = _apiMapResponse['explore_name'] == null - ? null - : _apiMapResponse['explore_name'].toString(); + _exploreName = _apiMapResponse['explore_name']?.toString(); _exploreNameSet = true; } return _exploreName; @@ -6178,9 +5940,7 @@ class ContentValidationFolder { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -6195,9 +5955,7 @@ class ContentValidationFolder { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -6267,9 +6025,7 @@ class ContentValidationLook { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -6284,9 +6040,7 @@ class ContentValidationLook { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -6301,9 +6055,7 @@ class ContentValidationLook { String get shortUrl { if (!_shortUrlSet && _apiMapResponse.containsKey('short_url')) { - _shortUrl = _apiMapResponse['short_url'] == null - ? null - : _apiMapResponse['short_url'].toString(); + _shortUrl = _apiMapResponse['short_url']?.toString(); _shortUrlSet = true; } return _shortUrl; @@ -6368,7 +6120,7 @@ class ContentValidationLook { json['short_url'] = shortUrl; } if (_folderSet || _apiMapResponse.containsKey('folder')) { - json['folder'] = folder == null ? null : folder.toJson(); + json['folder'] = folder?.toJson(); } return json; } @@ -6392,9 +6144,7 @@ class ContentValidationLookMLDashboard { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -6409,9 +6159,7 @@ class ContentValidationLookMLDashboard { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -6426,9 +6174,7 @@ class ContentValidationLookMLDashboard { String get spaceId { if (!_spaceIdSet && _apiMapResponse.containsKey('space_id')) { - _spaceId = _apiMapResponse['space_id'] == null - ? null - : _apiMapResponse['space_id'].toString(); + _spaceId = _apiMapResponse['space_id']?.toString(); _spaceIdSet = true; } return _spaceId; @@ -6495,9 +6241,7 @@ class ContentValidationLookMLDashboardElement { String get lookmlLinkId { if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { - _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null - ? null - : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkId = _apiMapResponse['lookml_link_id']?.toString(); _lookmlLinkIdSet = true; } return _lookmlLinkId; @@ -6512,9 +6256,7 @@ class ContentValidationLookMLDashboardElement { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -6581,9 +6323,7 @@ class ContentValidationScheduledPlan { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -6598,9 +6338,7 @@ class ContentValidationScheduledPlan { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -6860,9 +6598,7 @@ class ContentValidatorError { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -6902,42 +6638,35 @@ class ContentValidatorError { Map toJson() { var json = {}; if (_lookSet || _apiMapResponse.containsKey('look')) { - json['look'] = look == null ? null : look.toJson(); + json['look'] = look?.toJson(); } if (_dashboardSet || _apiMapResponse.containsKey('dashboard')) { - json['dashboard'] = dashboard == null ? null : dashboard.toJson(); + json['dashboard'] = dashboard?.toJson(); } if (_dashboardElementSet || _apiMapResponse.containsKey('dashboard_element')) { - json['dashboard_element'] = - dashboardElement == null ? null : dashboardElement.toJson(); + json['dashboard_element'] = dashboardElement?.toJson(); } if (_dashboardFilterSet || _apiMapResponse.containsKey('dashboard_filter')) { - json['dashboard_filter'] = - dashboardFilter == null ? null : dashboardFilter.toJson(); + json['dashboard_filter'] = dashboardFilter?.toJson(); } if (_scheduledPlanSet || _apiMapResponse.containsKey('scheduled_plan')) { - json['scheduled_plan'] = - scheduledPlan == null ? null : scheduledPlan.toJson(); + json['scheduled_plan'] = scheduledPlan?.toJson(); } if (_alertSet || _apiMapResponse.containsKey('alert')) { - json['alert'] = alert == null ? null : alert.toJson(); + json['alert'] = alert?.toJson(); } if (_lookmlDashboardSet || _apiMapResponse.containsKey('lookml_dashboard')) { - json['lookml_dashboard'] = - lookmlDashboard == null ? null : lookmlDashboard.toJson(); + json['lookml_dashboard'] = lookmlDashboard?.toJson(); } if (_lookmlDashboardElementSet || _apiMapResponse.containsKey('lookml_dashboard_element')) { - json['lookml_dashboard_element'] = lookmlDashboardElement == null - ? null - : lookmlDashboardElement.toJson(); + json['lookml_dashboard_element'] = lookmlDashboardElement?.toJson(); } if (_errorsSet || _apiMapResponse.containsKey('errors')) { - json['errors'] = - errors == null ? null : errors.map((i) => i.toJson()).toList(); + json['errors'] = errors?.map((i) => i.toJson())?.toList(); } if (_idSet || _apiMapResponse.containsKey('id')) { json['id'] = id; @@ -7021,9 +6750,7 @@ class ContentView { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -7053,9 +6780,7 @@ class ContentView { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -7146,9 +6871,7 @@ class ContentView { String get lastViewedAt { if (!_lastViewedAtSet && _apiMapResponse.containsKey('last_viewed_at')) { - _lastViewedAt = _apiMapResponse['last_viewed_at'] == null - ? null - : _apiMapResponse['last_viewed_at'].toString(); + _lastViewedAt = _apiMapResponse['last_viewed_at']?.toString(); _lastViewedAtSet = true; } return _lastViewedAt; @@ -7164,9 +6887,7 @@ class ContentView { String get startOfWeekDate { if (!_startOfWeekDateSet && _apiMapResponse.containsKey('start_of_week_date')) { - _startOfWeekDate = _apiMapResponse['start_of_week_date'] == null - ? null - : _apiMapResponse['start_of_week_date'].toString(); + _startOfWeekDate = _apiMapResponse['start_of_week_date']?.toString(); _startOfWeekDateSet = true; } return _startOfWeekDate; @@ -7268,9 +6989,7 @@ class ContinuousPalette { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -7285,9 +7004,7 @@ class ContinuousPalette { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -7302,9 +7019,7 @@ class ContinuousPalette { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -7372,8 +7087,7 @@ class ContinuousPalette { json['type'] = type; } if (_stopsSet || _apiMapResponse.containsKey('stops')) { - json['stops'] = - stops == null ? null : stops.map((i) => i.toJson()).toList(); + json['stops'] = stops?.map((i) => i.toJson())?.toList(); } return json; } @@ -7430,9 +7144,7 @@ class CostEstimate { String get costUnit { if (!_costUnitSet && _apiMapResponse.containsKey('cost_unit')) { - _costUnit = _apiMapResponse['cost_unit'] == null - ? null - : _apiMapResponse['cost_unit'].toString(); + _costUnit = _apiMapResponse['cost_unit']?.toString(); _costUnitSet = true; } return _costUnit; @@ -7447,9 +7159,7 @@ class CostEstimate { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -7517,9 +7227,7 @@ class CreateCostEstimate { String get sql { if (!_sqlSet && _apiMapResponse.containsKey('sql')) { - _sql = _apiMapResponse['sql'] == null - ? null - : _apiMapResponse['sql'].toString(); + _sql = _apiMapResponse['sql']?.toString(); _sqlSet = true; } return _sql; @@ -7628,9 +7336,7 @@ class CreateCredentialsApi3 { String get clientId { if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { - _clientId = _apiMapResponse['client_id'] == null - ? null - : _apiMapResponse['client_id'].toString(); + _clientId = _apiMapResponse['client_id']?.toString(); _clientIdSet = true; } return _clientId; @@ -7645,9 +7351,7 @@ class CreateCredentialsApi3 { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -7677,9 +7381,7 @@ class CreateCredentialsApi3 { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -7694,9 +7396,7 @@ class CreateCredentialsApi3 { String get clientSecret { if (!_clientSecretSet && _apiMapResponse.containsKey('client_secret')) { - _clientSecret = _apiMapResponse['client_secret'] == null - ? null - : _apiMapResponse['client_secret'].toString(); + _clientSecret = _apiMapResponse['client_secret']?.toString(); _clientSecretSet = true; } return _clientSecret; @@ -7711,9 +7411,7 @@ class CreateCredentialsApi3 { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -7834,9 +7532,7 @@ class CreateDashboardFilter { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -7851,9 +7547,7 @@ class CreateDashboardFilter { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -7868,9 +7562,7 @@ class CreateDashboardFilter { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -7885,9 +7577,7 @@ class CreateDashboardFilter { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -7902,9 +7592,7 @@ class CreateDashboardFilter { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -7919,9 +7607,7 @@ class CreateDashboardFilter { String get defaultValue { if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { - _defaultValue = _apiMapResponse['default_value'] == null - ? null - : _apiMapResponse['default_value'].toString(); + _defaultValue = _apiMapResponse['default_value']?.toString(); _defaultValueSet = true; } return _defaultValue; @@ -7936,9 +7622,7 @@ class CreateDashboardFilter { String get model { if (!_modelSet && _apiMapResponse.containsKey('model')) { - _model = _apiMapResponse['model'] == null - ? null - : _apiMapResponse['model'].toString(); + _model = _apiMapResponse['model']?.toString(); _modelSet = true; } return _model; @@ -7953,9 +7637,7 @@ class CreateDashboardFilter { String get explore { if (!_exploreSet && _apiMapResponse.containsKey('explore')) { - _explore = _apiMapResponse['explore'] == null - ? null - : _apiMapResponse['explore'].toString(); + _explore = _apiMapResponse['explore']?.toString(); _exploreSet = true; } return _explore; @@ -7970,9 +7652,7 @@ class CreateDashboardFilter { String get dimension { if (!_dimensionSet && _apiMapResponse.containsKey('dimension')) { - _dimension = _apiMapResponse['dimension'] == null - ? null - : _apiMapResponse['dimension'].toString(); + _dimension = _apiMapResponse['dimension']?.toString(); _dimensionSet = true; } return _dimension; @@ -8018,11 +7698,9 @@ class CreateDashboardFilter { List get listensToFilters { if (!_listensToFiltersSet && _apiMapResponse.containsKey('listens_to_filters')) { - _listensToFilters = _apiMapResponse['listens_to_filters'] == null - ? null - : _apiMapResponse['listens_to_filters'] - .map((i) => i as String) - .toList(); + _listensToFilters = _apiMapResponse['listens_to_filters'] + ?.map((i) => i as String) + ?.toList(); _listensToFiltersSet = true; } return _listensToFilters; @@ -8174,9 +7852,7 @@ class CreateDashboardRenderTask { String get dashboardFilters { if (!_dashboardFiltersSet && _apiMapResponse.containsKey('dashboard_filters')) { - _dashboardFilters = _apiMapResponse['dashboard_filters'] == null - ? null - : _apiMapResponse['dashboard_filters'].toString(); + _dashboardFilters = _apiMapResponse['dashboard_filters']?.toString(); _dashboardFiltersSet = true; } return _dashboardFilters; @@ -8191,9 +7867,7 @@ class CreateDashboardRenderTask { String get dashboardStyle { if (!_dashboardStyleSet && _apiMapResponse.containsKey('dashboard_style')) { - _dashboardStyle = _apiMapResponse['dashboard_style'] == null - ? null - : _apiMapResponse['dashboard_style'].toString(); + _dashboardStyle = _apiMapResponse['dashboard_style']?.toString(); _dashboardStyleSet = true; } return _dashboardStyle; @@ -8254,9 +7928,7 @@ class CreateEmbedUserRequest { String get externalUserId { if (!_externalUserIdSet && _apiMapResponse.containsKey('external_user_id')) { - _externalUserId = _apiMapResponse['external_user_id'] == null - ? null - : _apiMapResponse['external_user_id'].toString(); + _externalUserId = _apiMapResponse['external_user_id']?.toString(); _externalUserIdSet = true; } return _externalUserId; @@ -8317,9 +7989,7 @@ class CreateFolder { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -8334,9 +8004,7 @@ class CreateFolder { String get parentId { if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { - _parentId = _apiMapResponse['parent_id'] == null - ? null - : _apiMapResponse['parent_id'].toString(); + _parentId = _apiMapResponse['parent_id']?.toString(); _parentIdSet = true; } return _parentId; @@ -8410,9 +8078,7 @@ class CreateOAuthApplicationUserStateRequest { String get userId { if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { - _userId = _apiMapResponse['user_id'] == null - ? null - : _apiMapResponse['user_id'].toString(); + _userId = _apiMapResponse['user_id']?.toString(); _userIdSet = true; } return _userId; @@ -8426,9 +8092,7 @@ class CreateOAuthApplicationUserStateRequest { String get oauthApplicationId { if (!_oauthApplicationIdSet && _apiMapResponse.containsKey('oauth_application_id')) { - _oauthApplicationId = _apiMapResponse['oauth_application_id'] == null - ? null - : _apiMapResponse['oauth_application_id'].toString(); + _oauthApplicationId = _apiMapResponse['oauth_application_id']?.toString(); _oauthApplicationIdSet = true; } return _oauthApplicationId; @@ -8441,9 +8105,7 @@ class CreateOAuthApplicationUserStateRequest { String get accessToken { if (!_accessTokenSet && _apiMapResponse.containsKey('access_token')) { - _accessToken = _apiMapResponse['access_token'] == null - ? null - : _apiMapResponse['access_token'].toString(); + _accessToken = _apiMapResponse['access_token']?.toString(); _accessTokenSet = true; } return _accessToken; @@ -8472,9 +8134,7 @@ class CreateOAuthApplicationUserStateRequest { String get refreshToken { if (!_refreshTokenSet && _apiMapResponse.containsKey('refresh_token')) { - _refreshToken = _apiMapResponse['refresh_token'] == null - ? null - : _apiMapResponse['refresh_token'].toString(); + _refreshToken = _apiMapResponse['refresh_token']?.toString(); _refreshTokenSet = true; } return _refreshToken; @@ -8542,18 +8202,15 @@ class CreateOAuthApplicationUserStateRequest { } if (_accessTokenExpiresAtSet || _apiMapResponse.containsKey('access_token_expires_at')) { - json['access_token_expires_at'] = accessTokenExpiresAt == null - ? null - : accessTokenExpiresAt.toIso8601String(); + json['access_token_expires_at'] = accessTokenExpiresAt?.toIso8601String(); } if (_refreshTokenSet || _apiMapResponse.containsKey('refresh_token')) { json['refresh_token'] = refreshToken; } if (_refreshTokenExpiresAtSet || _apiMapResponse.containsKey('refresh_token_expires_at')) { - json['refresh_token_expires_at'] = refreshTokenExpiresAt == null - ? null - : refreshTokenExpiresAt.toIso8601String(); + json['refresh_token_expires_at'] = + refreshTokenExpiresAt?.toIso8601String(); } return json; } @@ -8716,9 +8373,7 @@ class CreateQueryTask { String get source { if (!_sourceSet && _apiMapResponse.containsKey('source')) { - _source = _apiMapResponse['source'] == null - ? null - : _apiMapResponse['source'].toString(); + _source = _apiMapResponse['source']?.toString(); _sourceSet = true; } return _source; @@ -8748,9 +8403,7 @@ class CreateQueryTask { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -8765,9 +8418,7 @@ class CreateQueryTask { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -8891,9 +8542,7 @@ class CredentialsApi3 { String get clientId { if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { - _clientId = _apiMapResponse['client_id'] == null - ? null - : _apiMapResponse['client_id'].toString(); + _clientId = _apiMapResponse['client_id']?.toString(); _clientIdSet = true; } return _clientId; @@ -8908,9 +8557,7 @@ class CredentialsApi3 { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -8940,9 +8587,7 @@ class CredentialsApi3 { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -8957,9 +8602,7 @@ class CredentialsApi3 { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -9077,9 +8720,7 @@ class CredentialsEmail { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -9094,9 +8735,7 @@ class CredentialsEmail { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -9143,9 +8782,7 @@ class CredentialsEmail { String get loggedInAt { if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { - _loggedInAt = _apiMapResponse['logged_in_at'] == null - ? null - : _apiMapResponse['logged_in_at'].toString(); + _loggedInAt = _apiMapResponse['logged_in_at']?.toString(); _loggedInAtSet = true; } return _loggedInAt; @@ -9161,9 +8798,7 @@ class CredentialsEmail { String get passwordResetUrl { if (!_passwordResetUrlSet && _apiMapResponse.containsKey('password_reset_url')) { - _passwordResetUrl = _apiMapResponse['password_reset_url'] == null - ? null - : _apiMapResponse['password_reset_url'].toString(); + _passwordResetUrl = _apiMapResponse['password_reset_url']?.toString(); _passwordResetUrlSet = true; } return _passwordResetUrl; @@ -9178,9 +8813,7 @@ class CredentialsEmail { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -9195,9 +8828,7 @@ class CredentialsEmail { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -9212,9 +8843,7 @@ class CredentialsEmail { String get userUrl { if (!_userUrlSet && _apiMapResponse.containsKey('user_url')) { - _userUrl = _apiMapResponse['user_url'] == null - ? null - : _apiMapResponse['user_url'].toString(); + _userUrl = _apiMapResponse['user_url']?.toString(); _userUrlSet = true; } return _userUrl; @@ -9344,9 +8973,7 @@ class CredentialsEmailSearch { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -9361,9 +8988,7 @@ class CredentialsEmailSearch { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -9410,9 +9035,7 @@ class CredentialsEmailSearch { String get loggedInAt { if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { - _loggedInAt = _apiMapResponse['logged_in_at'] == null - ? null - : _apiMapResponse['logged_in_at'].toString(); + _loggedInAt = _apiMapResponse['logged_in_at']?.toString(); _loggedInAtSet = true; } return _loggedInAt; @@ -9428,9 +9051,7 @@ class CredentialsEmailSearch { String get passwordResetUrl { if (!_passwordResetUrlSet && _apiMapResponse.containsKey('password_reset_url')) { - _passwordResetUrl = _apiMapResponse['password_reset_url'] == null - ? null - : _apiMapResponse['password_reset_url'].toString(); + _passwordResetUrl = _apiMapResponse['password_reset_url']?.toString(); _passwordResetUrlSet = true; } return _passwordResetUrl; @@ -9445,9 +9066,7 @@ class CredentialsEmailSearch { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -9462,9 +9081,7 @@ class CredentialsEmailSearch { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -9479,9 +9096,7 @@ class CredentialsEmailSearch { String get userUrl { if (!_userUrlSet && _apiMapResponse.containsKey('user_url')) { - _userUrl = _apiMapResponse['user_url'] == null - ? null - : _apiMapResponse['user_url'].toString(); + _userUrl = _apiMapResponse['user_url']?.toString(); _userUrlSet = true; } return _userUrl; @@ -9608,9 +9223,7 @@ class CredentialsEmbed { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -9626,9 +9239,7 @@ class CredentialsEmbed { String get externalGroupId { if (!_externalGroupIdSet && _apiMapResponse.containsKey('external_group_id')) { - _externalGroupId = _apiMapResponse['external_group_id'] == null - ? null - : _apiMapResponse['external_group_id'].toString(); + _externalGroupId = _apiMapResponse['external_group_id']?.toString(); _externalGroupIdSet = true; } return _externalGroupId; @@ -9644,9 +9255,7 @@ class CredentialsEmbed { String get externalUserId { if (!_externalUserIdSet && _apiMapResponse.containsKey('external_user_id')) { - _externalUserId = _apiMapResponse['external_user_id'] == null - ? null - : _apiMapResponse['external_user_id'].toString(); + _externalUserId = _apiMapResponse['external_user_id']?.toString(); _externalUserIdSet = true; } return _externalUserId; @@ -9691,9 +9300,7 @@ class CredentialsEmbed { String get loggedInAt { if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { - _loggedInAt = _apiMapResponse['logged_in_at'] == null - ? null - : _apiMapResponse['logged_in_at'].toString(); + _loggedInAt = _apiMapResponse['logged_in_at']?.toString(); _loggedInAtSet = true; } return _loggedInAt; @@ -9708,9 +9315,7 @@ class CredentialsEmbed { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -9725,9 +9330,7 @@ class CredentialsEmbed { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -9849,9 +9452,7 @@ class CredentialsGoogle { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -9866,9 +9467,7 @@ class CredentialsGoogle { String get domain { if (!_domainSet && _apiMapResponse.containsKey('domain')) { - _domain = _apiMapResponse['domain'] == null - ? null - : _apiMapResponse['domain'].toString(); + _domain = _apiMapResponse['domain']?.toString(); _domainSet = true; } return _domain; @@ -9883,9 +9482,7 @@ class CredentialsGoogle { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -9900,9 +9497,7 @@ class CredentialsGoogle { String get googleUserId { if (!_googleUserIdSet && _apiMapResponse.containsKey('google_user_id')) { - _googleUserId = _apiMapResponse['google_user_id'] == null - ? null - : _apiMapResponse['google_user_id'].toString(); + _googleUserId = _apiMapResponse['google_user_id']?.toString(); _googleUserIdSet = true; } return _googleUserId; @@ -9932,9 +9527,7 @@ class CredentialsGoogle { String get loggedInAt { if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { - _loggedInAt = _apiMapResponse['logged_in_at'] == null - ? null - : _apiMapResponse['logged_in_at'].toString(); + _loggedInAt = _apiMapResponse['logged_in_at']?.toString(); _loggedInAtSet = true; } return _loggedInAt; @@ -9949,9 +9542,7 @@ class CredentialsGoogle { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -9966,9 +9557,7 @@ class CredentialsGoogle { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -10089,9 +9678,7 @@ class CredentialsLDAP { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -10106,9 +9693,7 @@ class CredentialsLDAP { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -10138,9 +9723,7 @@ class CredentialsLDAP { String get ldapDn { if (!_ldapDnSet && _apiMapResponse.containsKey('ldap_dn')) { - _ldapDn = _apiMapResponse['ldap_dn'] == null - ? null - : _apiMapResponse['ldap_dn'].toString(); + _ldapDn = _apiMapResponse['ldap_dn']?.toString(); _ldapDnSet = true; } return _ldapDn; @@ -10155,9 +9738,7 @@ class CredentialsLDAP { String get ldapId { if (!_ldapIdSet && _apiMapResponse.containsKey('ldap_id')) { - _ldapId = _apiMapResponse['ldap_id'] == null - ? null - : _apiMapResponse['ldap_id'].toString(); + _ldapId = _apiMapResponse['ldap_id']?.toString(); _ldapIdSet = true; } return _ldapId; @@ -10172,9 +9753,7 @@ class CredentialsLDAP { String get loggedInAt { if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { - _loggedInAt = _apiMapResponse['logged_in_at'] == null - ? null - : _apiMapResponse['logged_in_at'].toString(); + _loggedInAt = _apiMapResponse['logged_in_at']?.toString(); _loggedInAtSet = true; } return _loggedInAt; @@ -10189,9 +9768,7 @@ class CredentialsLDAP { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -10206,9 +9783,7 @@ class CredentialsLDAP { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -10329,9 +9904,7 @@ class CredentialsLookerOpenid { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -10346,9 +9919,7 @@ class CredentialsLookerOpenid { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -10378,9 +9949,7 @@ class CredentialsLookerOpenid { String get loggedInAt { if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { - _loggedInAt = _apiMapResponse['logged_in_at'] == null - ? null - : _apiMapResponse['logged_in_at'].toString(); + _loggedInAt = _apiMapResponse['logged_in_at']?.toString(); _loggedInAtSet = true; } return _loggedInAt; @@ -10395,9 +9964,7 @@ class CredentialsLookerOpenid { String get loggedInIp { if (!_loggedInIpSet && _apiMapResponse.containsKey('logged_in_ip')) { - _loggedInIp = _apiMapResponse['logged_in_ip'] == null - ? null - : _apiMapResponse['logged_in_ip'].toString(); + _loggedInIp = _apiMapResponse['logged_in_ip']?.toString(); _loggedInIpSet = true; } return _loggedInIp; @@ -10412,9 +9979,7 @@ class CredentialsLookerOpenid { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -10429,9 +9994,7 @@ class CredentialsLookerOpenid { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -10446,9 +10009,7 @@ class CredentialsLookerOpenid { String get userUrl { if (!_userUrlSet && _apiMapResponse.containsKey('user_url')) { - _userUrl = _apiMapResponse['user_url'] == null - ? null - : _apiMapResponse['user_url'].toString(); + _userUrl = _apiMapResponse['user_url']?.toString(); _userUrlSet = true; } return _userUrl; @@ -10566,9 +10127,7 @@ class CredentialsOIDC { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -10583,9 +10142,7 @@ class CredentialsOIDC { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -10615,9 +10172,7 @@ class CredentialsOIDC { String get loggedInAt { if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { - _loggedInAt = _apiMapResponse['logged_in_at'] == null - ? null - : _apiMapResponse['logged_in_at'].toString(); + _loggedInAt = _apiMapResponse['logged_in_at']?.toString(); _loggedInAtSet = true; } return _loggedInAt; @@ -10632,9 +10187,7 @@ class CredentialsOIDC { String get oidcUserId { if (!_oidcUserIdSet && _apiMapResponse.containsKey('oidc_user_id')) { - _oidcUserId = _apiMapResponse['oidc_user_id'] == null - ? null - : _apiMapResponse['oidc_user_id'].toString(); + _oidcUserId = _apiMapResponse['oidc_user_id']?.toString(); _oidcUserIdSet = true; } return _oidcUserId; @@ -10649,9 +10202,7 @@ class CredentialsOIDC { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -10666,9 +10217,7 @@ class CredentialsOIDC { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -10783,9 +10332,7 @@ class CredentialsSaml { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -10800,9 +10347,7 @@ class CredentialsSaml { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -10832,9 +10377,7 @@ class CredentialsSaml { String get loggedInAt { if (!_loggedInAtSet && _apiMapResponse.containsKey('logged_in_at')) { - _loggedInAt = _apiMapResponse['logged_in_at'] == null - ? null - : _apiMapResponse['logged_in_at'].toString(); + _loggedInAt = _apiMapResponse['logged_in_at']?.toString(); _loggedInAtSet = true; } return _loggedInAt; @@ -10849,9 +10392,7 @@ class CredentialsSaml { String get samlUserId { if (!_samlUserIdSet && _apiMapResponse.containsKey('saml_user_id')) { - _samlUserId = _apiMapResponse['saml_user_id'] == null - ? null - : _apiMapResponse['saml_user_id'].toString(); + _samlUserId = _apiMapResponse['saml_user_id']?.toString(); _samlUserIdSet = true; } return _samlUserId; @@ -10866,9 +10407,7 @@ class CredentialsSaml { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -10883,9 +10422,7 @@ class CredentialsSaml { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -10995,9 +10532,7 @@ class CredentialsTotp { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -11027,9 +10562,7 @@ class CredentialsTotp { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -11059,9 +10592,7 @@ class CredentialsTotp { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -11158,9 +10689,7 @@ class CustomWelcomeEmail { String get content { if (!_contentSet && _apiMapResponse.containsKey('content')) { - _content = _apiMapResponse['content'] == null - ? null - : _apiMapResponse['content'].toString(); + _content = _apiMapResponse['content']?.toString(); _contentSet = true; } return _content; @@ -11175,9 +10704,7 @@ class CustomWelcomeEmail { String get subject { if (!_subjectSet && _apiMapResponse.containsKey('subject')) { - _subject = _apiMapResponse['subject'] == null - ? null - : _apiMapResponse['subject'].toString(); + _subject = _apiMapResponse['subject']?.toString(); _subjectSet = true; } return _subject; @@ -11192,9 +10719,7 @@ class CustomWelcomeEmail { String get header { if (!_headerSet && _apiMapResponse.containsKey('header')) { - _header = _apiMapResponse['header'] == null - ? null - : _apiMapResponse['header'].toString(); + _header = _apiMapResponse['header']?.toString(); _headerSet = true; } return _header; @@ -11446,9 +10971,7 @@ class Dashboard { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -11478,9 +11001,7 @@ class Dashboard { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -11511,9 +11032,7 @@ class Dashboard { String get queryTimezone { if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { - _queryTimezone = _apiMapResponse['query_timezone'] == null - ? null - : _apiMapResponse['query_timezone'].toString(); + _queryTimezone = _apiMapResponse['query_timezone']?.toString(); _queryTimezoneSet = true; } return _queryTimezone; @@ -11544,9 +11063,7 @@ class Dashboard { String get refreshInterval { if (!_refreshIntervalSet && _apiMapResponse.containsKey('refresh_interval')) { - _refreshInterval = _apiMapResponse['refresh_interval'] == null - ? null - : _apiMapResponse['refresh_interval'].toString(); + _refreshInterval = _apiMapResponse['refresh_interval']?.toString(); _refreshIntervalSet = true; } return _refreshInterval; @@ -11593,9 +11110,7 @@ class Dashboard { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -11625,9 +11140,7 @@ class Dashboard { String get slug { if (!_slugSet && _apiMapResponse.containsKey('slug')) { - _slug = _apiMapResponse['slug'] == null - ? null - : _apiMapResponse['slug'].toString(); + _slug = _apiMapResponse['slug']?.toString(); _slugSet = true; } return _slug; @@ -11643,9 +11156,7 @@ class Dashboard { String get preferredViewer { if (!_preferredViewerSet && _apiMapResponse.containsKey('preferred_viewer')) { - _preferredViewer = _apiMapResponse['preferred_viewer'] == null - ? null - : _apiMapResponse['preferred_viewer'].toString(); + _preferredViewer = _apiMapResponse['preferred_viewer']?.toString(); _preferredViewerSet = true; } return _preferredViewer; @@ -11679,9 +11190,7 @@ class Dashboard { String get backgroundColor { if (!_backgroundColorSet && _apiMapResponse.containsKey('background_color')) { - _backgroundColor = _apiMapResponse['background_color'] == null - ? null - : _apiMapResponse['background_color'].toString(); + _backgroundColor = _apiMapResponse['background_color']?.toString(); _backgroundColorSet = true; } return _backgroundColor; @@ -11839,9 +11348,7 @@ class Dashboard { String get editUri { if (!_editUriSet && _apiMapResponse.containsKey('edit_uri')) { - _editUri = _apiMapResponse['edit_uri'] == null - ? null - : _apiMapResponse['edit_uri'].toString(); + _editUri = _apiMapResponse['edit_uri']?.toString(); _editUriSet = true; } return _editUri; @@ -11955,9 +11462,7 @@ class Dashboard { String get lastUpdaterName { if (!_lastUpdaterNameSet && _apiMapResponse.containsKey('last_updater_name')) { - _lastUpdaterName = _apiMapResponse['last_updater_name'] == null - ? null - : _apiMapResponse['last_updater_name'].toString(); + _lastUpdaterName = _apiMapResponse['last_updater_name']?.toString(); _lastUpdaterNameSet = true; } return _lastUpdaterName; @@ -11972,9 +11477,7 @@ class Dashboard { String get userName { if (!_userNameSet && _apiMapResponse.containsKey('user_name')) { - _userName = _apiMapResponse['user_name'] == null - ? null - : _apiMapResponse['user_name'].toString(); + _userName = _apiMapResponse['user_name']?.toString(); _userNameSet = true; } return _userName; @@ -11990,9 +11493,7 @@ class Dashboard { String get loadConfiguration { if (!_loadConfigurationSet && _apiMapResponse.containsKey('load_configuration')) { - _loadConfiguration = _apiMapResponse['load_configuration'] == null - ? null - : _apiMapResponse['load_configuration'].toString(); + _loadConfiguration = _apiMapResponse['load_configuration']?.toString(); _loadConfigurationSet = true; } return _loadConfiguration; @@ -12007,9 +11508,7 @@ class Dashboard { String get lookmlLinkId { if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { - _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null - ? null - : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkId = _apiMapResponse['lookml_link_id']?.toString(); _lookmlLinkIdSet = true; } return _lookmlLinkId; @@ -12055,9 +11554,7 @@ class Dashboard { String get folderId { if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { - _folderId = _apiMapResponse['folder_id'] == null - ? null - : _apiMapResponse['folder_id'].toString(); + _folderId = _apiMapResponse['folder_id']?.toString(); _folderIdSet = true; } return _folderId; @@ -12073,9 +11570,7 @@ class Dashboard { String get textTileTextColor { if (!_textTileTextColorSet && _apiMapResponse.containsKey('text_tile_text_color')) { - _textTileTextColor = _apiMapResponse['text_tile_text_color'] == null - ? null - : _apiMapResponse['text_tile_text_color'].toString(); + _textTileTextColor = _apiMapResponse['text_tile_text_color']?.toString(); _textTileTextColorSet = true; } return _textTileTextColor; @@ -12091,9 +11586,8 @@ class Dashboard { String get tileBackgroundColor { if (!_tileBackgroundColorSet && _apiMapResponse.containsKey('tile_background_color')) { - _tileBackgroundColor = _apiMapResponse['tile_background_color'] == null - ? null - : _apiMapResponse['tile_background_color'].toString(); + _tileBackgroundColor = + _apiMapResponse['tile_background_color']?.toString(); _tileBackgroundColorSet = true; } return _tileBackgroundColor; @@ -12108,9 +11602,7 @@ class Dashboard { String get tileTextColor { if (!_tileTextColorSet && _apiMapResponse.containsKey('tile_text_color')) { - _tileTextColor = _apiMapResponse['tile_text_color'] == null - ? null - : _apiMapResponse['tile_text_color'].toString(); + _tileTextColor = _apiMapResponse['tile_text_color']?.toString(); _tileTextColorSet = true; } return _tileTextColor; @@ -12125,9 +11617,7 @@ class Dashboard { String get titleColor { if (!_titleColorSet && _apiMapResponse.containsKey('title_color')) { - _titleColor = _apiMapResponse['title_color'] == null - ? null - : _apiMapResponse['title_color'].toString(); + _titleColor = _apiMapResponse['title_color']?.toString(); _titleColorSet = true; } return _titleColor; @@ -12173,9 +11663,7 @@ class Dashboard { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -12234,7 +11722,7 @@ class Dashboard { json['id'] = id; } if (_modelSet || _apiMapResponse.containsKey('model')) { - json['model'] = model == null ? null : model.toJson(); + json['model'] = model?.toJson(); } if (_queryTimezoneSet || _apiMapResponse.containsKey('query_timezone')) { json['query_timezone'] = queryTimezone; @@ -12251,7 +11739,7 @@ class Dashboard { json['refresh_interval_to_i'] = refreshIntervalToI; } if (_folderSet || _apiMapResponse.containsKey('folder')) { - json['folder'] = folder == null ? null : folder.toJson(); + json['folder'] = folder?.toJson(); } if (_titleSet || _apiMapResponse.containsKey('title')) { json['title'] = title; @@ -12277,8 +11765,7 @@ class Dashboard { json['background_color'] = backgroundColor; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } if (_crossfilterEnabledSet || _apiMapResponse.containsKey('crossfilter_enabled')) { @@ -12286,28 +11773,24 @@ class Dashboard { } if (_dashboardElementsSet || _apiMapResponse.containsKey('dashboard_elements')) { - json['dashboard_elements'] = dashboardElements == null - ? null - : dashboardElements.map((i) => i.toJson()).toList(); + json['dashboard_elements'] = + dashboardElements?.map((i) => i.toJson())?.toList(); } if (_dashboardFiltersSet || _apiMapResponse.containsKey('dashboard_filters')) { - json['dashboard_filters'] = dashboardFilters == null - ? null - : dashboardFilters.map((i) => i.toJson()).toList(); + json['dashboard_filters'] = + dashboardFilters?.map((i) => i.toJson())?.toList(); } if (_dashboardLayoutsSet || _apiMapResponse.containsKey('dashboard_layouts')) { - json['dashboard_layouts'] = dashboardLayouts == null - ? null - : dashboardLayouts.map((i) => i.toJson()).toList(); + json['dashboard_layouts'] = + dashboardLayouts?.map((i) => i.toJson())?.toList(); } if (_deletedSet || _apiMapResponse.containsKey('deleted')) { json['deleted'] = deleted; } if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { - json['deleted_at'] = - deletedAt == null ? null : deletedAt.toIso8601String(); + json['deleted_at'] = deletedAt?.toIso8601String(); } if (_deleterIdSet || _apiMapResponse.containsKey('deleter_id')) { json['deleter_id'] = deleterId; @@ -12323,16 +11806,13 @@ class Dashboard { json['filters_bar_collapsed'] = filtersBarCollapsed; } if (_lastAccessedAtSet || _apiMapResponse.containsKey('last_accessed_at')) { - json['last_accessed_at'] = - lastAccessedAt == null ? null : lastAccessedAt.toIso8601String(); + json['last_accessed_at'] = lastAccessedAt?.toIso8601String(); } if (_lastViewedAtSet || _apiMapResponse.containsKey('last_viewed_at')) { - json['last_viewed_at'] = - lastViewedAt == null ? null : lastViewedAt.toIso8601String(); + json['last_viewed_at'] = lastViewedAt?.toIso8601String(); } if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { - json['updated_at'] = - updatedAt == null ? null : updatedAt.toIso8601String(); + json['updated_at'] = updatedAt?.toIso8601String(); } if (_lastUpdaterIdSet || _apiMapResponse.containsKey('last_updater_id')) { json['last_updater_id'] = lastUpdaterId; @@ -12378,7 +11858,7 @@ class Dashboard { json['view_count'] = viewCount; } if (_appearanceSet || _apiMapResponse.containsKey('appearance')) { - json['appearance'] = appearance == null ? null : appearance.toJson(); + json['appearance'] = appearance?.toJson(); } if (_urlSet || _apiMapResponse.containsKey('url')) { json['url'] = url; @@ -12402,9 +11882,7 @@ class DashboardAggregateTableLookml { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -12420,9 +11898,8 @@ class DashboardAggregateTableLookml { String get aggregateTableLookml { if (!_aggregateTableLookmlSet && _apiMapResponse.containsKey('aggregate_table_lookml')) { - _aggregateTableLookml = _apiMapResponse['aggregate_table_lookml'] == null - ? null - : _apiMapResponse['aggregate_table_lookml'].toString(); + _aggregateTableLookml = + _apiMapResponse['aggregate_table_lookml']?.toString(); _aggregateTableLookmlSet = true; } return _aggregateTableLookml; @@ -12519,9 +11996,8 @@ class DashboardAppearance { String get pageBackgroundColor { if (!_pageBackgroundColorSet && _apiMapResponse.containsKey('page_background_color')) { - _pageBackgroundColor = _apiMapResponse['page_background_color'] == null - ? null - : _apiMapResponse['page_background_color'].toString(); + _pageBackgroundColor = + _apiMapResponse['page_background_color']?.toString(); _pageBackgroundColorSet = true; } return _pageBackgroundColor; @@ -12537,9 +12013,7 @@ class DashboardAppearance { String get tileTitleAlignment { if (!_tileTitleAlignmentSet && _apiMapResponse.containsKey('tile_title_alignment')) { - _tileTitleAlignment = _apiMapResponse['tile_title_alignment'] == null - ? null - : _apiMapResponse['tile_title_alignment'].toString(); + _tileTitleAlignment = _apiMapResponse['tile_title_alignment']?.toString(); _tileTitleAlignmentSet = true; } return _tileTitleAlignment; @@ -12571,9 +12045,8 @@ class DashboardAppearance { String get tileBackgroundColor { if (!_tileBackgroundColorSet && _apiMapResponse.containsKey('tile_background_color')) { - _tileBackgroundColor = _apiMapResponse['tile_background_color'] == null - ? null - : _apiMapResponse['tile_background_color'].toString(); + _tileBackgroundColor = + _apiMapResponse['tile_background_color']?.toString(); _tileBackgroundColorSet = true; } return _tileBackgroundColor; @@ -12603,9 +12076,7 @@ class DashboardAppearance { String get keyColor { if (!_keyColorSet && _apiMapResponse.containsKey('key_color')) { - _keyColor = _apiMapResponse['key_color'] == null - ? null - : _apiMapResponse['key_color'].toString(); + _keyColor = _apiMapResponse['key_color']?.toString(); _keyColorSet = true; } return _keyColor; @@ -12778,9 +12249,7 @@ class DashboardBase { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -12810,9 +12279,7 @@ class DashboardBase { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -12843,9 +12310,7 @@ class DashboardBase { String get queryTimezone { if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { - _queryTimezone = _apiMapResponse['query_timezone'] == null - ? null - : _apiMapResponse['query_timezone'].toString(); + _queryTimezone = _apiMapResponse['query_timezone']?.toString(); _queryTimezoneSet = true; } return _queryTimezone; @@ -12876,9 +12341,7 @@ class DashboardBase { String get refreshInterval { if (!_refreshIntervalSet && _apiMapResponse.containsKey('refresh_interval')) { - _refreshInterval = _apiMapResponse['refresh_interval'] == null - ? null - : _apiMapResponse['refresh_interval'].toString(); + _refreshInterval = _apiMapResponse['refresh_interval']?.toString(); _refreshIntervalSet = true; } return _refreshInterval; @@ -12925,9 +12388,7 @@ class DashboardBase { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -12957,9 +12418,7 @@ class DashboardBase { String get slug { if (!_slugSet && _apiMapResponse.containsKey('slug')) { - _slug = _apiMapResponse['slug'] == null - ? null - : _apiMapResponse['slug'].toString(); + _slug = _apiMapResponse['slug']?.toString(); _slugSet = true; } return _slug; @@ -12975,9 +12434,7 @@ class DashboardBase { String get preferredViewer { if (!_preferredViewerSet && _apiMapResponse.containsKey('preferred_viewer')) { - _preferredViewer = _apiMapResponse['preferred_viewer'] == null - ? null - : _apiMapResponse['preferred_viewer'].toString(); + _preferredViewer = _apiMapResponse['preferred_viewer']?.toString(); _preferredViewerSet = true; } return _preferredViewer; @@ -13037,7 +12494,7 @@ class DashboardBase { json['id'] = id; } if (_modelSet || _apiMapResponse.containsKey('model')) { - json['model'] = model == null ? null : model.toJson(); + json['model'] = model?.toJson(); } if (_queryTimezoneSet || _apiMapResponse.containsKey('query_timezone')) { json['query_timezone'] = queryTimezone; @@ -13054,7 +12511,7 @@ class DashboardBase { json['refresh_interval_to_i'] = refreshIntervalToI; } if (_folderSet || _apiMapResponse.containsKey('folder')) { - json['folder'] = folder == null ? null : folder.toJson(); + json['folder'] = folder?.toJson(); } if (_titleSet || _apiMapResponse.containsKey('title')) { json['title'] = title; @@ -13181,9 +12638,7 @@ class DashboardElement { String get bodyText { if (!_bodyTextSet && _apiMapResponse.containsKey('body_text')) { - _bodyText = _apiMapResponse['body_text'] == null - ? null - : _apiMapResponse['body_text'].toString(); + _bodyText = _apiMapResponse['body_text']?.toString(); _bodyTextSet = true; } return _bodyText; @@ -13199,9 +12654,7 @@ class DashboardElement { String get bodyTextAsHtml { if (!_bodyTextAsHtmlSet && _apiMapResponse.containsKey('body_text_as_html')) { - _bodyTextAsHtml = _apiMapResponse['body_text_as_html'] == null - ? null - : _apiMapResponse['body_text_as_html'].toString(); + _bodyTextAsHtml = _apiMapResponse['body_text_as_html']?.toString(); _bodyTextAsHtmlSet = true; } return _bodyTextAsHtml; @@ -13216,9 +12669,7 @@ class DashboardElement { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -13233,9 +12684,7 @@ class DashboardElement { String get editUri { if (!_editUriSet && _apiMapResponse.containsKey('edit_uri')) { - _editUri = _apiMapResponse['edit_uri'] == null - ? null - : _apiMapResponse['edit_uri'].toString(); + _editUri = _apiMapResponse['edit_uri']?.toString(); _editUriSet = true; } return _editUri; @@ -13250,9 +12699,7 @@ class DashboardElement { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -13283,9 +12730,7 @@ class DashboardElement { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -13300,9 +12745,7 @@ class DashboardElement { String get lookmlLinkId { if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { - _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null - ? null - : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkId = _apiMapResponse['lookml_link_id']?.toString(); _lookmlLinkIdSet = true; } return _lookmlLinkId; @@ -13317,9 +12760,7 @@ class DashboardElement { String get mergeResultId { if (!_mergeResultIdSet && _apiMapResponse.containsKey('merge_result_id')) { - _mergeResultId = _apiMapResponse['merge_result_id'] == null - ? null - : _apiMapResponse['merge_result_id'].toString(); + _mergeResultId = _apiMapResponse['merge_result_id']?.toString(); _mergeResultIdSet = true; } return _mergeResultId; @@ -13334,9 +12775,7 @@ class DashboardElement { String get noteDisplay { if (!_noteDisplaySet && _apiMapResponse.containsKey('note_display')) { - _noteDisplay = _apiMapResponse['note_display'] == null - ? null - : _apiMapResponse['note_display'].toString(); + _noteDisplay = _apiMapResponse['note_display']?.toString(); _noteDisplaySet = true; } return _noteDisplay; @@ -13351,9 +12790,7 @@ class DashboardElement { String get noteState { if (!_noteStateSet && _apiMapResponse.containsKey('note_state')) { - _noteState = _apiMapResponse['note_state'] == null - ? null - : _apiMapResponse['note_state'].toString(); + _noteState = _apiMapResponse['note_state']?.toString(); _noteStateSet = true; } return _noteState; @@ -13368,9 +12805,7 @@ class DashboardElement { String get noteText { if (!_noteTextSet && _apiMapResponse.containsKey('note_text')) { - _noteText = _apiMapResponse['note_text'] == null - ? null - : _apiMapResponse['note_text'].toString(); + _noteText = _apiMapResponse['note_text']?.toString(); _noteTextSet = true; } return _noteText; @@ -13386,9 +12821,7 @@ class DashboardElement { String get noteTextAsHtml { if (!_noteTextAsHtmlSet && _apiMapResponse.containsKey('note_text_as_html')) { - _noteTextAsHtml = _apiMapResponse['note_text_as_html'] == null - ? null - : _apiMapResponse['note_text_as_html'].toString(); + _noteTextAsHtml = _apiMapResponse['note_text_as_html']?.toString(); _noteTextAsHtmlSet = true; } return _noteTextAsHtml; @@ -13435,9 +12868,7 @@ class DashboardElement { String get refreshInterval { if (!_refreshIntervalSet && _apiMapResponse.containsKey('refresh_interval')) { - _refreshInterval = _apiMapResponse['refresh_interval'] == null - ? null - : _apiMapResponse['refresh_interval'].toString(); + _refreshInterval = _apiMapResponse['refresh_interval']?.toString(); _refreshIntervalSet = true; } return _refreshInterval; @@ -13499,9 +12930,7 @@ class DashboardElement { String get subtitleText { if (!_subtitleTextSet && _apiMapResponse.containsKey('subtitle_text')) { - _subtitleText = _apiMapResponse['subtitle_text'] == null - ? null - : _apiMapResponse['subtitle_text'].toString(); + _subtitleText = _apiMapResponse['subtitle_text']?.toString(); _subtitleTextSet = true; } return _subtitleText; @@ -13516,9 +12945,7 @@ class DashboardElement { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -13548,9 +12975,7 @@ class DashboardElement { String get titleText { if (!_titleTextSet && _apiMapResponse.containsKey('title_text')) { - _titleText = _apiMapResponse['title_text'] == null - ? null - : _apiMapResponse['title_text'].toString(); + _titleText = _apiMapResponse['title_text']?.toString(); _titleTextSet = true; } return _titleText; @@ -13565,9 +12990,7 @@ class DashboardElement { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -13598,9 +13021,7 @@ class DashboardElement { String get titleTextAsHtml { if (!_titleTextAsHtmlSet && _apiMapResponse.containsKey('title_text_as_html')) { - _titleTextAsHtml = _apiMapResponse['title_text_as_html'] == null - ? null - : _apiMapResponse['title_text_as_html'].toString(); + _titleTextAsHtml = _apiMapResponse['title_text_as_html']?.toString(); _titleTextAsHtmlSet = true; } return _titleTextAsHtml; @@ -13616,9 +13037,8 @@ class DashboardElement { String get subtitleTextAsHtml { if (!_subtitleTextAsHtmlSet && _apiMapResponse.containsKey('subtitle_text_as_html')) { - _subtitleTextAsHtml = _apiMapResponse['subtitle_text_as_html'] == null - ? null - : _apiMapResponse['subtitle_text_as_html'].toString(); + _subtitleTextAsHtml = + _apiMapResponse['subtitle_text_as_html']?.toString(); _subtitleTextAsHtmlSet = true; } return _subtitleTextAsHtml; @@ -13677,7 +13097,7 @@ class DashboardElement { json['id'] = id; } if (_lookSet || _apiMapResponse.containsKey('look')) { - json['look'] = look == null ? null : look.toJson(); + json['look'] = look?.toJson(); } if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { json['look_id'] = lookId; @@ -13702,7 +13122,7 @@ class DashboardElement { json['note_text_as_html'] = noteTextAsHtml; } if (_querySet || _apiMapResponse.containsKey('query')) { - json['query'] = query == null ? null : query.toJson(); + json['query'] = query?.toJson(); } if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { json['query_id'] = queryId; @@ -13716,7 +13136,7 @@ class DashboardElement { json['refresh_interval_to_i'] = refreshIntervalToI; } if (_resultMakerSet || _apiMapResponse.containsKey('result_maker')) { - json['result_maker'] = resultMaker == null ? null : resultMaker.toJson(); + json['result_maker'] = resultMaker?.toJson(); } if (_resultMakerIdSet || _apiMapResponse.containsKey('result_maker_id')) { json['result_maker_id'] = resultMakerId; @@ -13823,9 +13243,7 @@ class DashboardFilter { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -13840,9 +13258,7 @@ class DashboardFilter { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -13857,9 +13273,7 @@ class DashboardFilter { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -13874,9 +13288,7 @@ class DashboardFilter { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -13891,9 +13303,7 @@ class DashboardFilter { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -13908,9 +13318,7 @@ class DashboardFilter { String get defaultValue { if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { - _defaultValue = _apiMapResponse['default_value'] == null - ? null - : _apiMapResponse['default_value'].toString(); + _defaultValue = _apiMapResponse['default_value']?.toString(); _defaultValueSet = true; } return _defaultValue; @@ -13925,9 +13333,7 @@ class DashboardFilter { String get model { if (!_modelSet && _apiMapResponse.containsKey('model')) { - _model = _apiMapResponse['model'] == null - ? null - : _apiMapResponse['model'].toString(); + _model = _apiMapResponse['model']?.toString(); _modelSet = true; } return _model; @@ -13942,9 +13348,7 @@ class DashboardFilter { String get explore { if (!_exploreSet && _apiMapResponse.containsKey('explore')) { - _explore = _apiMapResponse['explore'] == null - ? null - : _apiMapResponse['explore'].toString(); + _explore = _apiMapResponse['explore']?.toString(); _exploreSet = true; } return _explore; @@ -13959,9 +13363,7 @@ class DashboardFilter { String get dimension { if (!_dimensionSet && _apiMapResponse.containsKey('dimension')) { - _dimension = _apiMapResponse['dimension'] == null - ? null - : _apiMapResponse['dimension'].toString(); + _dimension = _apiMapResponse['dimension']?.toString(); _dimensionSet = true; } return _dimension; @@ -14007,11 +13409,9 @@ class DashboardFilter { List get listensToFilters { if (!_listensToFiltersSet && _apiMapResponse.containsKey('listens_to_filters')) { - _listensToFilters = _apiMapResponse['listens_to_filters'] == null - ? null - : _apiMapResponse['listens_to_filters'] - .map((i) => i as String) - .toList(); + _listensToFilters = _apiMapResponse['listens_to_filters'] + ?.map((i) => i as String) + ?.toList(); _listensToFiltersSet = true; } return _listensToFilters; @@ -14204,9 +13604,7 @@ class DashboardLayout { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -14221,9 +13619,7 @@ class DashboardLayout { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -14238,9 +13634,7 @@ class DashboardLayout { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -14315,9 +13709,7 @@ class DashboardLayout { String get dashboardTitle { if (!_dashboardTitleSet && _apiMapResponse.containsKey('dashboard_title')) { - _dashboardTitle = _apiMapResponse['dashboard_title'] == null - ? null - : _apiMapResponse['dashboard_title'].toString(); + _dashboardTitle = _apiMapResponse['dashboard_title']?.toString(); _dashboardTitleSet = true; } return _dashboardTitle; @@ -14407,9 +13799,8 @@ class DashboardLayout { } if (_dashboardLayoutComponentsSet || _apiMapResponse.containsKey('dashboard_layout_components')) { - json['dashboard_layout_components'] = dashboardLayoutComponents == null - ? null - : dashboardLayoutComponents.map((i) => i.toJson()).toList(); + json['dashboard_layout_components'] = + dashboardLayoutComponents?.map((i) => i.toJson())?.toList(); } return json; } @@ -14475,9 +13866,7 @@ class DashboardLayoutComponent { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -14493,9 +13882,7 @@ class DashboardLayoutComponent { String get dashboardLayoutId { if (!_dashboardLayoutIdSet && _apiMapResponse.containsKey('dashboard_layout_id')) { - _dashboardLayoutId = _apiMapResponse['dashboard_layout_id'] == null - ? null - : _apiMapResponse['dashboard_layout_id'].toString(); + _dashboardLayoutId = _apiMapResponse['dashboard_layout_id']?.toString(); _dashboardLayoutIdSet = true; } return _dashboardLayoutId; @@ -14511,9 +13898,7 @@ class DashboardLayoutComponent { String get dashboardElementId { if (!_dashboardElementIdSet && _apiMapResponse.containsKey('dashboard_element_id')) { - _dashboardElementId = _apiMapResponse['dashboard_element_id'] == null - ? null - : _apiMapResponse['dashboard_element_id'].toString(); + _dashboardElementId = _apiMapResponse['dashboard_element_id']?.toString(); _dashboardElementIdSet = true; } return _dashboardElementId; @@ -14603,9 +13988,7 @@ class DashboardLayoutComponent { String get elementTitle { if (!_elementTitleSet && _apiMapResponse.containsKey('element_title')) { - _elementTitle = _apiMapResponse['element_title'] == null - ? null - : _apiMapResponse['element_title'].toString(); + _elementTitle = _apiMapResponse['element_title']?.toString(); _elementTitleSet = true; } return _elementTitle; @@ -14636,9 +14019,7 @@ class DashboardLayoutComponent { String get visType { if (!_visTypeSet && _apiMapResponse.containsKey('vis_type')) { - _visType = _apiMapResponse['vis_type'] == null - ? null - : _apiMapResponse['vis_type'].toString(); + _visType = _apiMapResponse['vis_type']?.toString(); _visTypeSet = true; } return _visType; @@ -14735,9 +14116,7 @@ class DashboardLookml { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -14752,9 +14131,7 @@ class DashboardLookml { String get lookml { if (!_lookmlSet && _apiMapResponse.containsKey('lookml')) { - _lookml = _apiMapResponse['lookml'] == null - ? null - : _apiMapResponse['lookml'].toString(); + _lookml = _apiMapResponse['lookml']?.toString(); _lookmlSet = true; } return _lookml; @@ -14879,11 +14256,10 @@ class DataActionForm { Map toJson() { var json = {}; if (_stateSet || _apiMapResponse.containsKey('state')) { - json['state'] = state == null ? null : state.toJson(); + json['state'] = state?.toJson(); } if (_fieldsSet || _apiMapResponse.containsKey('fields')) { - json['fields'] = - fields == null ? null : fields.map((i) => i.toJson()).toList(); + json['fields'] = fields?.map((i) => i.toJson())?.toList(); } return json; } @@ -14925,9 +14301,7 @@ class DataActionFormField { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -14942,9 +14316,7 @@ class DataActionFormField { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -14959,9 +14331,7 @@ class DataActionFormField { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -14976,9 +14346,7 @@ class DataActionFormField { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -14993,9 +14361,7 @@ class DataActionFormField { String get defaultValue { if (!_defaultValueSet && _apiMapResponse.containsKey('default')) { - _defaultValue = _apiMapResponse['default'] == null - ? null - : _apiMapResponse['default'].toString(); + _defaultValue = _apiMapResponse['default']?.toString(); _defaultValueSet = true; } return _defaultValue; @@ -15010,9 +14376,7 @@ class DataActionFormField { String get oauthUrl { if (!_oauthUrlSet && _apiMapResponse.containsKey('oauth_url')) { - _oauthUrl = _apiMapResponse['oauth_url'] == null - ? null - : _apiMapResponse['oauth_url'].toString(); + _oauthUrl = _apiMapResponse['oauth_url']?.toString(); _oauthUrlSet = true; } return _oauthUrl; @@ -15126,8 +14490,7 @@ class DataActionFormField { json['required'] = required; } if (_optionsSet || _apiMapResponse.containsKey('options')) { - json['options'] = - options == null ? null : options.map((i) => i.toJson()).toList(); + json['options'] = options?.map((i) => i.toJson())?.toList(); } return json; } @@ -15148,9 +14511,7 @@ class DataActionFormSelectOption { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -15165,9 +14526,7 @@ class DataActionFormSelectOption { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -15319,9 +14678,7 @@ class DataActionResponse { String get webhookId { if (!_webhookIdSet && _apiMapResponse.containsKey('webhook_id')) { - _webhookId = _apiMapResponse['webhook_id'] == null - ? null - : _apiMapResponse['webhook_id'].toString(); + _webhookId = _apiMapResponse['webhook_id']?.toString(); _webhookIdSet = true; } return _webhookId; @@ -15383,9 +14740,7 @@ class DataActionResponse { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -15435,8 +14790,7 @@ class DataActionResponse { } if (_validationErrorsSet || _apiMapResponse.containsKey('validation_errors')) { - json['validation_errors'] = - validationErrors == null ? null : validationErrors.toJson(); + json['validation_errors'] = validationErrors?.toJson(); } if (_messageSet || _apiMapResponse.containsKey('message')) { json['message'] = message; @@ -15460,9 +14814,7 @@ class DataActionUserState { String get data { if (!_dataSet && _apiMapResponse.containsKey('data')) { - _data = _apiMapResponse['data'] == null - ? null - : _apiMapResponse['data'].toString(); + _data = _apiMapResponse['data']?.toString(); _dataSet = true; } return _data; @@ -15610,9 +14962,7 @@ class Datagroup { String get modelName { if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { - _modelName = _apiMapResponse['model_name'] == null - ? null - : _apiMapResponse['model_name'].toString(); + _modelName = _apiMapResponse['model_name']?.toString(); _modelNameSet = true; } return _modelName; @@ -15627,9 +14977,7 @@ class Datagroup { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -15675,9 +15023,7 @@ class Datagroup { String get triggerError { if (!_triggerErrorSet && _apiMapResponse.containsKey('trigger_error')) { - _triggerError = _apiMapResponse['trigger_error'] == null - ? null - : _apiMapResponse['trigger_error'].toString(); + _triggerError = _apiMapResponse['trigger_error']?.toString(); _triggerErrorSet = true; } return _triggerError; @@ -15692,9 +15038,7 @@ class Datagroup { String get triggerValue { if (!_triggerValueSet && _apiMapResponse.containsKey('trigger_value')) { - _triggerValue = _apiMapResponse['trigger_value'] == null - ? null - : _apiMapResponse['trigger_value'].toString(); + _triggerValue = _apiMapResponse['trigger_value']?.toString(); _triggerValueSet = true; } return _triggerValue; @@ -15931,9 +15275,7 @@ class DBConnection { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -15998,9 +15340,7 @@ class DBConnection { String get host { if (!_hostSet && _apiMapResponse.containsKey('host')) { - _host = _apiMapResponse['host'] == null - ? null - : _apiMapResponse['host'].toString(); + _host = _apiMapResponse['host']?.toString(); _hostSet = true; } return _host; @@ -16015,9 +15355,7 @@ class DBConnection { String get port { if (!_portSet && _apiMapResponse.containsKey('port')) { - _port = _apiMapResponse['port'] == null - ? null - : _apiMapResponse['port'].toString(); + _port = _apiMapResponse['port']?.toString(); _portSet = true; } return _port; @@ -16032,9 +15370,7 @@ class DBConnection { String get username { if (!_usernameSet && _apiMapResponse.containsKey('username')) { - _username = _apiMapResponse['username'] == null - ? null - : _apiMapResponse['username'].toString(); + _username = _apiMapResponse['username']?.toString(); _usernameSet = true; } return _username; @@ -16049,9 +15385,7 @@ class DBConnection { String get password { if (!_passwordSet && _apiMapResponse.containsKey('password')) { - _password = _apiMapResponse['password'] == null - ? null - : _apiMapResponse['password'].toString(); + _password = _apiMapResponse['password']?.toString(); _passwordSet = true; } return _password; @@ -16081,9 +15415,7 @@ class DBConnection { String get certificate { if (!_certificateSet && _apiMapResponse.containsKey('certificate')) { - _certificate = _apiMapResponse['certificate'] == null - ? null - : _apiMapResponse['certificate'].toString(); + _certificate = _apiMapResponse['certificate']?.toString(); _certificateSet = true; } return _certificate; @@ -16098,9 +15430,7 @@ class DBConnection { String get fileType { if (!_fileTypeSet && _apiMapResponse.containsKey('file_type')) { - _fileType = _apiMapResponse['file_type'] == null - ? null - : _apiMapResponse['file_type'].toString(); + _fileType = _apiMapResponse['file_type']?.toString(); _fileTypeSet = true; } return _fileType; @@ -16115,9 +15445,7 @@ class DBConnection { String get database { if (!_databaseSet && _apiMapResponse.containsKey('database')) { - _database = _apiMapResponse['database'] == null - ? null - : _apiMapResponse['database'].toString(); + _database = _apiMapResponse['database']?.toString(); _databaseSet = true; } return _database; @@ -16132,9 +15460,7 @@ class DBConnection { String get dbTimezone { if (!_dbTimezoneSet && _apiMapResponse.containsKey('db_timezone')) { - _dbTimezone = _apiMapResponse['db_timezone'] == null - ? null - : _apiMapResponse['db_timezone'].toString(); + _dbTimezone = _apiMapResponse['db_timezone']?.toString(); _dbTimezoneSet = true; } return _dbTimezone; @@ -16149,9 +15475,7 @@ class DBConnection { String get queryTimezone { if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { - _queryTimezone = _apiMapResponse['query_timezone'] == null - ? null - : _apiMapResponse['query_timezone'].toString(); + _queryTimezone = _apiMapResponse['query_timezone']?.toString(); _queryTimezoneSet = true; } return _queryTimezone; @@ -16166,9 +15490,7 @@ class DBConnection { String get schema { if (!_schemaSet && _apiMapResponse.containsKey('schema')) { - _schema = _apiMapResponse['schema'] == null - ? null - : _apiMapResponse['schema'].toString(); + _schema = _apiMapResponse['schema']?.toString(); _schemaSet = true; } return _schema; @@ -16199,9 +15521,8 @@ class DBConnection { String get maxBillingGigabytes { if (!_maxBillingGigabytesSet && _apiMapResponse.containsKey('max_billing_gigabytes')) { - _maxBillingGigabytes = _apiMapResponse['max_billing_gigabytes'] == null - ? null - : _apiMapResponse['max_billing_gigabytes'].toString(); + _maxBillingGigabytes = + _apiMapResponse['max_billing_gigabytes']?.toString(); _maxBillingGigabytesSet = true; } return _maxBillingGigabytes; @@ -16246,9 +15567,7 @@ class DBConnection { String get tmpDbName { if (!_tmpDbNameSet && _apiMapResponse.containsKey('tmp_db_name')) { - _tmpDbName = _apiMapResponse['tmp_db_name'] == null - ? null - : _apiMapResponse['tmp_db_name'].toString(); + _tmpDbName = _apiMapResponse['tmp_db_name']?.toString(); _tmpDbNameSet = true; } return _tmpDbName; @@ -16264,9 +15583,8 @@ class DBConnection { String get jdbcAdditionalParams { if (!_jdbcAdditionalParamsSet && _apiMapResponse.containsKey('jdbc_additional_params')) { - _jdbcAdditionalParams = _apiMapResponse['jdbc_additional_params'] == null - ? null - : _apiMapResponse['jdbc_additional_params'].toString(); + _jdbcAdditionalParams = + _apiMapResponse['jdbc_additional_params']?.toString(); _jdbcAdditionalParamsSet = true; } return _jdbcAdditionalParams; @@ -16296,9 +15614,7 @@ class DBConnection { String get dialectName { if (!_dialectNameSet && _apiMapResponse.containsKey('dialect_name')) { - _dialectName = _apiMapResponse['dialect_name'] == null - ? null - : _apiMapResponse['dialect_name'].toString(); + _dialectName = _apiMapResponse['dialect_name']?.toString(); _dialectNameSet = true; } return _dialectName; @@ -16313,9 +15629,7 @@ class DBConnection { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -16330,9 +15644,7 @@ class DBConnection { String get userId { if (!_userIdSet && _apiMapResponse.containsKey('user_id')) { - _userId = _apiMapResponse['user_id'] == null - ? null - : _apiMapResponse['user_id'].toString(); + _userId = _apiMapResponse['user_id']?.toString(); _userIdSet = true; } return _userId; @@ -16379,11 +15691,9 @@ class DBConnection { List get userAttributeFields { if (!_userAttributeFieldsSet && _apiMapResponse.containsKey('user_attribute_fields')) { - _userAttributeFields = _apiMapResponse['user_attribute_fields'] == null - ? null - : _apiMapResponse['user_attribute_fields'] - .map((i) => i as String) - .toList(); + _userAttributeFields = _apiMapResponse['user_attribute_fields'] + ?.map((i) => i as String) + ?.toList(); _userAttributeFieldsSet = true; } return _userAttributeFields; @@ -16399,9 +15709,7 @@ class DBConnection { String get maintenanceCron { if (!_maintenanceCronSet && _apiMapResponse.containsKey('maintenance_cron')) { - _maintenanceCron = _apiMapResponse['maintenance_cron'] == null - ? null - : _apiMapResponse['maintenance_cron'].toString(); + _maintenanceCron = _apiMapResponse['maintenance_cron']?.toString(); _maintenanceCronSet = true; } return _maintenanceCron; @@ -16416,9 +15724,7 @@ class DBConnection { String get lastRegenAt { if (!_lastRegenAtSet && _apiMapResponse.containsKey('last_regen_at')) { - _lastRegenAt = _apiMapResponse['last_regen_at'] == null - ? null - : _apiMapResponse['last_regen_at'].toString(); + _lastRegenAt = _apiMapResponse['last_regen_at']?.toString(); _lastRegenAtSet = true; } return _lastRegenAt; @@ -16433,9 +15739,7 @@ class DBConnection { String get lastReapAt { if (!_lastReapAtSet && _apiMapResponse.containsKey('last_reap_at')) { - _lastReapAt = _apiMapResponse['last_reap_at'] == null - ? null - : _apiMapResponse['last_reap_at'].toString(); + _lastReapAt = _apiMapResponse['last_reap_at']?.toString(); _lastReapAtSet = true; } return _lastReapAt; @@ -16485,9 +15789,7 @@ class DBConnection { if (!_afterConnectStatementsSet && _apiMapResponse.containsKey('after_connect_statements')) { _afterConnectStatements = - _apiMapResponse['after_connect_statements'] == null - ? null - : _apiMapResponse['after_connect_statements'].toString(); + _apiMapResponse['after_connect_statements']?.toString(); _afterConnectStatementsSet = true; } return _afterConnectStatements; @@ -16534,9 +15836,7 @@ class DBConnection { String get tunnelId { if (!_tunnelIdSet && _apiMapResponse.containsKey('tunnel_id')) { - _tunnelId = _apiMapResponse['tunnel_id'] == null - ? null - : _apiMapResponse['tunnel_id'].toString(); + _tunnelId = _apiMapResponse['tunnel_id']?.toString(); _tunnelIdSet = true; } return _tunnelId; @@ -16645,11 +15945,10 @@ class DBConnection { json['name'] = name; } if (_dialectSet || _apiMapResponse.containsKey('dialect')) { - json['dialect'] = dialect == null ? null : dialect.toJson(); + json['dialect'] = dialect?.toJson(); } if (_snippetsSet || _apiMapResponse.containsKey('snippets')) { - json['snippets'] = - snippets == null ? null : snippets.map((i) => i.toJson()).toList(); + json['snippets'] = snippets?.map((i) => i.toJson())?.toList(); } if (_pdtsEnabledSet || _apiMapResponse.containsKey('pdts_enabled')) { json['pdts_enabled'] = pdtsEnabled; @@ -16754,8 +16053,7 @@ class DBConnection { } if (_pdtContextOverrideSet || _apiMapResponse.containsKey('pdt_context_override')) { - json['pdt_context_override'] = - pdtContextOverride == null ? null : pdtContextOverride.toJson(); + json['pdt_context_override'] = pdtContextOverride?.toJson(); } if (_managedSet || _apiMapResponse.containsKey('managed')) { json['managed'] = managed; @@ -16821,9 +16119,7 @@ class DBConnectionBase { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -16919,11 +16215,10 @@ class DBConnectionBase { json['name'] = name; } if (_dialectSet || _apiMapResponse.containsKey('dialect')) { - json['dialect'] = dialect == null ? null : dialect.toJson(); + json['dialect'] = dialect?.toJson(); } if (_snippetsSet || _apiMapResponse.containsKey('snippets')) { - json['snippets'] = - snippets == null ? null : snippets.map((i) => i.toJson()).toList(); + json['snippets'] = snippets?.map((i) => i.toJson())?.toList(); } if (_pdtsEnabledSet || _apiMapResponse.containsKey('pdts_enabled')) { json['pdts_enabled'] = pdtsEnabled; @@ -16977,9 +16272,7 @@ class DBConnectionOverride { String get context { if (!_contextSet && _apiMapResponse.containsKey('context')) { - _context = _apiMapResponse['context'] == null - ? null - : _apiMapResponse['context'].toString(); + _context = _apiMapResponse['context']?.toString(); _contextSet = true; } return _context; @@ -16994,9 +16287,7 @@ class DBConnectionOverride { String get host { if (!_hostSet && _apiMapResponse.containsKey('host')) { - _host = _apiMapResponse['host'] == null - ? null - : _apiMapResponse['host'].toString(); + _host = _apiMapResponse['host']?.toString(); _hostSet = true; } return _host; @@ -17011,9 +16302,7 @@ class DBConnectionOverride { String get port { if (!_portSet && _apiMapResponse.containsKey('port')) { - _port = _apiMapResponse['port'] == null - ? null - : _apiMapResponse['port'].toString(); + _port = _apiMapResponse['port']?.toString(); _portSet = true; } return _port; @@ -17028,9 +16317,7 @@ class DBConnectionOverride { String get username { if (!_usernameSet && _apiMapResponse.containsKey('username')) { - _username = _apiMapResponse['username'] == null - ? null - : _apiMapResponse['username'].toString(); + _username = _apiMapResponse['username']?.toString(); _usernameSet = true; } return _username; @@ -17045,9 +16332,7 @@ class DBConnectionOverride { String get password { if (!_passwordSet && _apiMapResponse.containsKey('password')) { - _password = _apiMapResponse['password'] == null - ? null - : _apiMapResponse['password'].toString(); + _password = _apiMapResponse['password']?.toString(); _passwordSet = true; } return _password; @@ -17077,9 +16362,7 @@ class DBConnectionOverride { String get certificate { if (!_certificateSet && _apiMapResponse.containsKey('certificate')) { - _certificate = _apiMapResponse['certificate'] == null - ? null - : _apiMapResponse['certificate'].toString(); + _certificate = _apiMapResponse['certificate']?.toString(); _certificateSet = true; } return _certificate; @@ -17094,9 +16377,7 @@ class DBConnectionOverride { String get fileType { if (!_fileTypeSet && _apiMapResponse.containsKey('file_type')) { - _fileType = _apiMapResponse['file_type'] == null - ? null - : _apiMapResponse['file_type'].toString(); + _fileType = _apiMapResponse['file_type']?.toString(); _fileTypeSet = true; } return _fileType; @@ -17111,9 +16392,7 @@ class DBConnectionOverride { String get database { if (!_databaseSet && _apiMapResponse.containsKey('database')) { - _database = _apiMapResponse['database'] == null - ? null - : _apiMapResponse['database'].toString(); + _database = _apiMapResponse['database']?.toString(); _databaseSet = true; } return _database; @@ -17128,9 +16407,7 @@ class DBConnectionOverride { String get schema { if (!_schemaSet && _apiMapResponse.containsKey('schema')) { - _schema = _apiMapResponse['schema'] == null - ? null - : _apiMapResponse['schema'].toString(); + _schema = _apiMapResponse['schema']?.toString(); _schemaSet = true; } return _schema; @@ -17146,9 +16423,8 @@ class DBConnectionOverride { String get jdbcAdditionalParams { if (!_jdbcAdditionalParamsSet && _apiMapResponse.containsKey('jdbc_additional_params')) { - _jdbcAdditionalParams = _apiMapResponse['jdbc_additional_params'] == null - ? null - : _apiMapResponse['jdbc_additional_params'].toString(); + _jdbcAdditionalParams = + _apiMapResponse['jdbc_additional_params']?.toString(); _jdbcAdditionalParamsSet = true; } return _jdbcAdditionalParams; @@ -17165,9 +16441,7 @@ class DBConnectionOverride { if (!_afterConnectStatementsSet && _apiMapResponse.containsKey('after_connect_statements')) { _afterConnectStatements = - _apiMapResponse['after_connect_statements'] == null - ? null - : _apiMapResponse['after_connect_statements'].toString(); + _apiMapResponse['after_connect_statements']?.toString(); _afterConnectStatementsSet = true; } return _afterConnectStatements; @@ -17288,9 +16562,7 @@ class DBConnectionTestResult { String get connectionString { if (!_connectionStringSet && _apiMapResponse.containsKey('connection_string')) { - _connectionString = _apiMapResponse['connection_string'] == null - ? null - : _apiMapResponse['connection_string'].toString(); + _connectionString = _apiMapResponse['connection_string']?.toString(); _connectionStringSet = true; } return _connectionString; @@ -17305,9 +16577,7 @@ class DBConnectionTestResult { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -17322,9 +16592,7 @@ class DBConnectionTestResult { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -17339,9 +16607,7 @@ class DBConnectionTestResult { String get status { if (!_statusSet && _apiMapResponse.containsKey('status')) { - _status = _apiMapResponse['status'] == null - ? null - : _apiMapResponse['status'].toString(); + _status = _apiMapResponse['status']?.toString(); _statusSet = true; } return _status; @@ -17421,9 +16687,7 @@ class DelegateOauthTest { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -17439,9 +16703,8 @@ class DelegateOauthTest { String get installationTargetId { if (!_installationTargetIdSet && _apiMapResponse.containsKey('installation_target_id')) { - _installationTargetId = _apiMapResponse['installation_target_id'] == null - ? null - : _apiMapResponse['installation_target_id'].toString(); + _installationTargetId = + _apiMapResponse['installation_target_id']?.toString(); _installationTargetIdSet = true; } return _installationTargetId; @@ -17539,9 +16802,7 @@ class DependencyGraph { String get graphText { if (!_graphTextSet && _apiMapResponse.containsKey('graph_text')) { - _graphText = _apiMapResponse['graph_text'] == null - ? null - : _apiMapResponse['graph_text'].toString(); + _graphText = _apiMapResponse['graph_text']?.toString(); _graphTextSet = true; } return _graphText; @@ -17625,14 +16886,14 @@ class DependencyStatusMapper { } /// Type of destination that the alert will be sent to Valid values are: "EMAIL", "ACTION_HUB". (Enum defined in AlertDestination) -enum DestinationType { EMAIL, ACTIONHUB } +enum DestinationType { email, actionHub } class DestinationTypeMapper { static String toStringValue(DestinationType e) { switch (e) { - case DestinationType.EMAIL: + case DestinationType.email: return 'EMAIL'; - case DestinationType.ACTIONHUB: + case DestinationType.actionHub: return 'ACTION_HUB'; default: @@ -17642,10 +16903,10 @@ class DestinationTypeMapper { static DestinationType fromStringValue(String s) { if (s == 'EMAIL') { - return DestinationType.EMAIL; + return DestinationType.email; } if (s == 'ACTION_HUB') { - return DestinationType.ACTIONHUB; + return DestinationType.actionHub; } return null; } @@ -17699,9 +16960,7 @@ class Dialect { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -17716,9 +16975,7 @@ class Dialect { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -17751,9 +17008,7 @@ class Dialect { if (!_persistentTableIndexesSet && _apiMapResponse.containsKey('persistent_table_indexes')) { _persistentTableIndexes = - _apiMapResponse['persistent_table_indexes'] == null - ? null - : _apiMapResponse['persistent_table_indexes'].toString(); + _apiMapResponse['persistent_table_indexes']?.toString(); _persistentTableIndexesSet = true; } return _persistentTableIndexes; @@ -17770,9 +17025,7 @@ class Dialect { if (!_persistentTableSortkeysSet && _apiMapResponse.containsKey('persistent_table_sortkeys')) { _persistentTableSortkeys = - _apiMapResponse['persistent_table_sortkeys'] == null - ? null - : _apiMapResponse['persistent_table_sortkeys'].toString(); + _apiMapResponse['persistent_table_sortkeys']?.toString(); _persistentTableSortkeysSet = true; } return _persistentTableSortkeys; @@ -17789,9 +17042,7 @@ class Dialect { if (!_persistentTableDistkeySet && _apiMapResponse.containsKey('persistent_table_distkey')) { _persistentTableDistkey = - _apiMapResponse['persistent_table_distkey'] == null - ? null - : _apiMapResponse['persistent_table_distkey'].toString(); + _apiMapResponse['persistent_table_distkey']?.toString(); _persistentTableDistkeySet = true; } return _persistentTableDistkey; @@ -17840,11 +17091,9 @@ class Dialect { List get connectionTests { if (!_connectionTestsSet && _apiMapResponse.containsKey('connection_tests')) { - _connectionTests = _apiMapResponse['connection_tests'] == null - ? null - : _apiMapResponse['connection_tests'] - .map((i) => i as String) - .toList(); + _connectionTests = _apiMapResponse['connection_tests'] + ?.map((i) => i as String) + ?.toList(); _connectionTestsSet = true; } return _connectionTests; @@ -18052,9 +17301,7 @@ class DialectInfo { if (!_defaultMaxConnectionsSet && _apiMapResponse.containsKey('default_max_connections')) { _defaultMaxConnections = - _apiMapResponse['default_max_connections'] == null - ? null - : _apiMapResponse['default_max_connections'].toString(); + _apiMapResponse['default_max_connections']?.toString(); _defaultMaxConnectionsSet = true; } return _defaultMaxConnections; @@ -18069,9 +17316,7 @@ class DialectInfo { String get defaultPort { if (!_defaultPortSet && _apiMapResponse.containsKey('default_port')) { - _defaultPort = _apiMapResponse['default_port'] == null - ? null - : _apiMapResponse['default_port'].toString(); + _defaultPort = _apiMapResponse['default_port']?.toString(); _defaultPortSet = true; } return _defaultPort; @@ -18101,9 +17346,7 @@ class DialectInfo { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -18120,9 +17363,7 @@ class DialectInfo { if (!_labelForDatabaseEquivalentSet && _apiMapResponse.containsKey('label_for_database_equivalent')) { _labelForDatabaseEquivalent = - _apiMapResponse['label_for_database_equivalent'] == null - ? null - : _apiMapResponse['label_for_database_equivalent'].toString(); + _apiMapResponse['label_for_database_equivalent']?.toString(); _labelForDatabaseEquivalentSet = true; } return _labelForDatabaseEquivalent; @@ -18137,9 +17378,7 @@ class DialectInfo { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -18220,8 +17459,7 @@ class DialectInfo { } if (_supportedOptionsSet || _apiMapResponse.containsKey('supported_options')) { - json['supported_options'] = - supportedOptions == null ? null : supportedOptions.toJson(); + json['supported_options'] = supportedOptions?.toJson(); } return json; } @@ -18619,9 +17857,7 @@ class DiscretePalette { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -18636,9 +17872,7 @@ class DiscretePalette { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -18653,9 +17887,7 @@ class DiscretePalette { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -18670,9 +17902,8 @@ class DiscretePalette { List get colors { if (!_colorsSet && _apiMapResponse.containsKey('colors')) { - _colors = _apiMapResponse['colors'] == null - ? null - : _apiMapResponse['colors'].map((i) => i as String).toList(); + _colors = + _apiMapResponse['colors']?.map((i) => i as String)?.toList(); _colorsSet = true; } return _colors; @@ -18745,9 +17976,7 @@ class EmbedParams { String get targetUrl { if (!_targetUrlSet && _apiMapResponse.containsKey('target_url')) { - _targetUrl = _apiMapResponse['target_url'] == null - ? null - : _apiMapResponse['target_url'].toString(); + _targetUrl = _apiMapResponse['target_url']?.toString(); _targetUrlSet = true; } return _targetUrl; @@ -18858,9 +18087,7 @@ class EmbedSecret { String get algorithm { if (!_algorithmSet && _apiMapResponse.containsKey('algorithm')) { - _algorithm = _apiMapResponse['algorithm'] == null - ? null - : _apiMapResponse['algorithm'].toString(); + _algorithm = _apiMapResponse['algorithm']?.toString(); _algorithmSet = true; } return _algorithm; @@ -18875,9 +18102,7 @@ class EmbedSecret { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -18922,9 +18147,7 @@ class EmbedSecret { String get secret { if (!_secretSet && _apiMapResponse.containsKey('secret')) { - _secret = _apiMapResponse['secret'] == null - ? null - : _apiMapResponse['secret'].toString(); + _secret = _apiMapResponse['secret']?.toString(); _secretSet = true; } return _secret; @@ -19048,9 +18271,7 @@ class EmbedSsoParams { String get targetUrl { if (!_targetUrlSet && _apiMapResponse.containsKey('target_url')) { - _targetUrl = _apiMapResponse['target_url'] == null - ? null - : _apiMapResponse['target_url'].toString(); + _targetUrl = _apiMapResponse['target_url']?.toString(); _targetUrlSet = true; } return _targetUrl; @@ -19097,9 +18318,7 @@ class EmbedSsoParams { String get externalUserId { if (!_externalUserIdSet && _apiMapResponse.containsKey('external_user_id')) { - _externalUserId = _apiMapResponse['external_user_id'] == null - ? null - : _apiMapResponse['external_user_id'].toString(); + _externalUserId = _apiMapResponse['external_user_id']?.toString(); _externalUserIdSet = true; } return _externalUserId; @@ -19114,9 +18333,7 @@ class EmbedSsoParams { String get firstName { if (!_firstNameSet && _apiMapResponse.containsKey('first_name')) { - _firstName = _apiMapResponse['first_name'] == null - ? null - : _apiMapResponse['first_name'].toString(); + _firstName = _apiMapResponse['first_name']?.toString(); _firstNameSet = true; } return _firstName; @@ -19131,9 +18348,7 @@ class EmbedSsoParams { String get lastName { if (!_lastNameSet && _apiMapResponse.containsKey('last_name')) { - _lastName = _apiMapResponse['last_name'] == null - ? null - : _apiMapResponse['last_name'].toString(); + _lastName = _apiMapResponse['last_name']?.toString(); _lastNameSet = true; } return _lastName; @@ -19148,9 +18363,7 @@ class EmbedSsoParams { String get userTimezone { if (!_userTimezoneSet && _apiMapResponse.containsKey('user_timezone')) { - _userTimezone = _apiMapResponse['user_timezone'] == null - ? null - : _apiMapResponse['user_timezone'].toString(); + _userTimezone = _apiMapResponse['user_timezone']?.toString(); _userTimezoneSet = true; } return _userTimezone; @@ -19165,11 +18378,9 @@ class EmbedSsoParams { List get permissions { if (!_permissionsSet && _apiMapResponse.containsKey('permissions')) { - _permissions = _apiMapResponse['permissions'] == null - ? null - : _apiMapResponse['permissions'] - .map((i) => i as String) - .toList(); + _permissions = _apiMapResponse['permissions'] + ?.map((i) => i as String) + ?.toList(); _permissionsSet = true; } return _permissions; @@ -19184,9 +18395,8 @@ class EmbedSsoParams { List get models { if (!_modelsSet && _apiMapResponse.containsKey('models')) { - _models = _apiMapResponse['models'] == null - ? null - : _apiMapResponse['models'].map((i) => i as String).toList(); + _models = + _apiMapResponse['models']?.map((i) => i as String)?.toList(); _modelsSet = true; } return _models; @@ -19201,9 +18411,8 @@ class EmbedSsoParams { List get groupIds { if (!_groupIdsSet && _apiMapResponse.containsKey('group_ids')) { - _groupIds = _apiMapResponse['group_ids'] == null - ? null - : _apiMapResponse['group_ids'].map((i) => i as int).toList(); + _groupIds = + _apiMapResponse['group_ids']?.map((i) => i as int)?.toList(); _groupIdsSet = true; } return _groupIds; @@ -19219,9 +18428,7 @@ class EmbedSsoParams { String get externalGroupId { if (!_externalGroupIdSet && _apiMapResponse.containsKey('external_group_id')) { - _externalGroupId = _apiMapResponse['external_group_id'] == null - ? null - : _apiMapResponse['external_group_id'].toString(); + _externalGroupId = _apiMapResponse['external_group_id']?.toString(); _externalGroupIdSet = true; } return _externalGroupId; @@ -19347,9 +18554,7 @@ class EmbedUrlResponse { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -19410,9 +18615,7 @@ class Error { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -19428,9 +18631,7 @@ class Error { String get documentationUrl { if (!_documentationUrlSet && _apiMapResponse.containsKey('documentation_url')) { - _documentationUrl = _apiMapResponse['documentation_url'] == null - ? null - : _apiMapResponse['documentation_url'].toString(); + _documentationUrl = _apiMapResponse['documentation_url']?.toString(); _documentationUrlSet = true; } return _documentationUrl; @@ -19539,9 +18740,7 @@ class ExternalOauthApplication { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -19556,9 +18755,7 @@ class ExternalOauthApplication { String get clientId { if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { - _clientId = _apiMapResponse['client_id'] == null - ? null - : _apiMapResponse['client_id'].toString(); + _clientId = _apiMapResponse['client_id']?.toString(); _clientIdSet = true; } return _clientId; @@ -19573,9 +18770,7 @@ class ExternalOauthApplication { String get clientSecret { if (!_clientSecretSet && _apiMapResponse.containsKey('client_secret')) { - _clientSecret = _apiMapResponse['client_secret'] == null - ? null - : _apiMapResponse['client_secret'].toString(); + _clientSecret = _apiMapResponse['client_secret']?.toString(); _clientSecretSet = true; } return _clientSecret; @@ -19590,9 +18785,7 @@ class ExternalOauthApplication { String get dialectName { if (!_dialectNameSet && _apiMapResponse.containsKey('dialect_name')) { - _dialectName = _apiMapResponse['dialect_name'] == null - ? null - : _apiMapResponse['dialect_name'].toString(); + _dialectName = _apiMapResponse['dialect_name']?.toString(); _dialectNameSet = true; } return _dialectName; @@ -19667,8 +18860,7 @@ class ExternalOauthApplication { json['dialect_name'] = dialectName; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } return json; } @@ -19764,9 +18956,7 @@ class Folder { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -19781,9 +18971,7 @@ class Folder { String get parentId { if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { - _parentId = _apiMapResponse['parent_id'] == null - ? null - : _apiMapResponse['parent_id'].toString(); + _parentId = _apiMapResponse['parent_id']?.toString(); _parentIdSet = true; } return _parentId; @@ -19798,9 +18986,7 @@ class Folder { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -19878,9 +19064,7 @@ class Folder { String get externalId { if (!_externalIdSet && _apiMapResponse.containsKey('external_id')) { - _externalId = _apiMapResponse['external_id'] == null - ? null - : _apiMapResponse['external_id'].toString(); + _externalId = _apiMapResponse['external_id']?.toString(); _externalIdSet = true; } return _externalId; @@ -20094,8 +19278,7 @@ class Folder { json['content_metadata_id'] = contentMetadataId; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } if (_creatorIdSet || _apiMapResponse.containsKey('creator_id')) { json['creator_id'] = creatorId; @@ -20134,13 +19317,10 @@ class Folder { json['can'] = can; } if (_dashboardsSet || _apiMapResponse.containsKey('dashboards')) { - json['dashboards'] = dashboards == null - ? null - : dashboards.map((i) => i.toJson()).toList(); + json['dashboards'] = dashboards?.map((i) => i.toJson())?.toList(); } if (_looksSet || _apiMapResponse.containsKey('looks')) { - json['looks'] = - looks == null ? null : looks.map((i) => i.toJson()).toList(); + json['looks'] = looks?.map((i) => i.toJson())?.toList(); } return json; } @@ -20203,9 +19383,7 @@ class FolderBase { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -20220,9 +19398,7 @@ class FolderBase { String get parentId { if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { - _parentId = _apiMapResponse['parent_id'] == null - ? null - : _apiMapResponse['parent_id'].toString(); + _parentId = _apiMapResponse['parent_id']?.toString(); _parentIdSet = true; } return _parentId; @@ -20237,9 +19413,7 @@ class FolderBase { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -20317,9 +19491,7 @@ class FolderBase { String get externalId { if (!_externalIdSet && _apiMapResponse.containsKey('external_id')) { - _externalId = _apiMapResponse['external_id'] == null - ? null - : _apiMapResponse['external_id'].toString(); + _externalId = _apiMapResponse['external_id']?.toString(); _externalIdSet = true; } return _externalId; @@ -20495,8 +19667,7 @@ class FolderBase { json['content_metadata_id'] = contentMetadataId; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } if (_creatorIdSet || _apiMapResponse.containsKey('creator_id')) { json['creator_id'] = creatorId; @@ -20640,9 +19811,7 @@ class GitBranch { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -20657,9 +19826,7 @@ class GitBranch { String get remote { if (!_remoteSet && _apiMapResponse.containsKey('remote')) { - _remote = _apiMapResponse['remote'] == null - ? null - : _apiMapResponse['remote'].toString(); + _remote = _apiMapResponse['remote']?.toString(); _remoteSet = true; } return _remote; @@ -20674,9 +19841,7 @@ class GitBranch { String get remoteName { if (!_remoteNameSet && _apiMapResponse.containsKey('remote_name')) { - _remoteName = _apiMapResponse['remote_name'] == null - ? null - : _apiMapResponse['remote_name'].toString(); + _remoteName = _apiMapResponse['remote_name']?.toString(); _remoteNameSet = true; } return _remoteName; @@ -20691,9 +19856,7 @@ class GitBranch { String get error { if (!_errorSet && _apiMapResponse.containsKey('error')) { - _error = _apiMapResponse['error'] == null - ? null - : _apiMapResponse['error'].toString(); + _error = _apiMapResponse['error']?.toString(); _errorSet = true; } return _error; @@ -20708,9 +19871,7 @@ class GitBranch { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -20725,9 +19886,7 @@ class GitBranch { String get ownerName { if (!_ownerNameSet && _apiMapResponse.containsKey('owner_name')) { - _ownerName = _apiMapResponse['owner_name'] == null - ? null - : _apiMapResponse['owner_name'].toString(); + _ownerName = _apiMapResponse['owner_name']?.toString(); _ownerNameSet = true; } return _ownerName; @@ -20862,9 +20021,7 @@ class GitBranch { String get ref { if (!_refSet && _apiMapResponse.containsKey('ref')) { - _ref = _apiMapResponse['ref'] == null - ? null - : _apiMapResponse['ref'].toString(); + _ref = _apiMapResponse['ref']?.toString(); _refSet = true; } return _ref; @@ -20879,9 +20036,7 @@ class GitBranch { String get remoteRef { if (!_remoteRefSet && _apiMapResponse.containsKey('remote_ref')) { - _remoteRef = _apiMapResponse['remote_ref'] == null - ? null - : _apiMapResponse['remote_ref'].toString(); + _remoteRef = _apiMapResponse['remote_ref']?.toString(); _remoteRefSet = true; } return _remoteRef; @@ -21007,9 +20162,7 @@ class GitConnectionTest { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -21024,9 +20177,7 @@ class GitConnectionTest { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -21114,9 +20265,7 @@ class GitConnectionTestResult { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -21131,9 +20280,7 @@ class GitConnectionTestResult { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -21148,9 +20295,7 @@ class GitConnectionTestResult { String get status { if (!_statusSet && _apiMapResponse.containsKey('status')) { - _status = _apiMapResponse['status'] == null - ? null - : _apiMapResponse['status'].toString(); + _status = _apiMapResponse['status']?.toString(); _statusSet = true; } return _status; @@ -21226,9 +20371,7 @@ class GitStatus { String get action { if (!_actionSet && _apiMapResponse.containsKey('action')) { - _action = _apiMapResponse['action'] == null - ? null - : _apiMapResponse['action'].toString(); + _action = _apiMapResponse['action']?.toString(); _actionSet = true; } return _action; @@ -21273,9 +20416,7 @@ class GitStatus { String get text { if (!_textSet && _apiMapResponse.containsKey('text')) { - _text = _apiMapResponse['text'] == null - ? null - : _apiMapResponse['text'].toString(); + _text = _apiMapResponse['text']?.toString(); _textSet = true; } return _text; @@ -21413,9 +20554,7 @@ class Group { String get externalGroupId { if (!_externalGroupIdSet && _apiMapResponse.containsKey('external_group_id')) { - _externalGroupId = _apiMapResponse['external_group_id'] == null - ? null - : _apiMapResponse['external_group_id'].toString(); + _externalGroupId = _apiMapResponse['external_group_id']?.toString(); _externalGroupIdSet = true; } return _externalGroupId; @@ -21477,9 +20616,7 @@ class Group { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -21658,9 +20795,7 @@ class GroupHierarchy { String get externalGroupId { if (!_externalGroupIdSet && _apiMapResponse.containsKey('external_group_id')) { - _externalGroupId = _apiMapResponse['external_group_id'] == null - ? null - : _apiMapResponse['external_group_id'].toString(); + _externalGroupId = _apiMapResponse['external_group_id']?.toString(); _externalGroupIdSet = true; } return _externalGroupId; @@ -21722,9 +20857,7 @@ class GroupHierarchy { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -21755,11 +20888,9 @@ class GroupHierarchy { List get parentGroupIds { if (!_parentGroupIdsSet && _apiMapResponse.containsKey('parent_group_ids')) { - _parentGroupIds = _apiMapResponse['parent_group_ids'] == null - ? null - : _apiMapResponse['parent_group_ids'] - .map((i) => i as int) - .toList(); + _parentGroupIds = _apiMapResponse['parent_group_ids'] + ?.map((i) => i as int) + ?.toList(); _parentGroupIdsSet = true; } return _parentGroupIds; @@ -21774,9 +20905,8 @@ class GroupHierarchy { List get roleIds { if (!_roleIdsSet && _apiMapResponse.containsKey('role_ids')) { - _roleIds = _apiMapResponse['role_ids'] == null - ? null - : _apiMapResponse['role_ids'].map((i) => i as int).toList(); + _roleIds = + _apiMapResponse['role_ids']?.map((i) => i as int)?.toList(); _roleIdsSet = true; } return _roleIds; @@ -22062,9 +21192,7 @@ class GroupSearch { String get externalGroupId { if (!_externalGroupIdSet && _apiMapResponse.containsKey('external_group_id')) { - _externalGroupId = _apiMapResponse['external_group_id'] == null - ? null - : _apiMapResponse['external_group_id'].toString(); + _externalGroupId = _apiMapResponse['external_group_id']?.toString(); _externalGroupIdSet = true; } return _externalGroupId; @@ -22126,9 +21254,7 @@ class GroupSearch { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -22234,8 +21360,7 @@ class GroupSearch { json['user_count'] = userCount; } if (_rolesSet || _apiMapResponse.containsKey('roles')) { - json['roles'] = - roles == null ? null : roles.map((i) => i.toJson()).toList(); + json['roles'] = roles?.map((i) => i.toJson())?.toList(); } return json; } @@ -22350,9 +21475,7 @@ class HomepageItem { String get contentCreatedBy { if (!_contentCreatedBySet && _apiMapResponse.containsKey('content_created_by')) { - _contentCreatedBy = _apiMapResponse['content_created_by'] == null - ? null - : _apiMapResponse['content_created_by'].toString(); + _contentCreatedBy = _apiMapResponse['content_created_by']?.toString(); _contentCreatedBySet = true; } return _contentCreatedBy; @@ -22400,9 +21523,7 @@ class HomepageItem { String get contentUpdatedAt { if (!_contentUpdatedAtSet && _apiMapResponse.containsKey('content_updated_at')) { - _contentUpdatedAt = _apiMapResponse['content_updated_at'] == null - ? null - : _apiMapResponse['content_updated_at'].toString(); + _contentUpdatedAt = _apiMapResponse['content_updated_at']?.toString(); _contentUpdatedAtSet = true; } return _contentUpdatedAt; @@ -22418,9 +21539,7 @@ class HomepageItem { String get customDescription { if (!_customDescriptionSet && _apiMapResponse.containsKey('custom_description')) { - _customDescription = _apiMapResponse['custom_description'] == null - ? null - : _apiMapResponse['custom_description'].toString(); + _customDescription = _apiMapResponse['custom_description']?.toString(); _customDescriptionSet = true; } return _customDescription; @@ -22437,9 +21556,7 @@ class HomepageItem { if (!_customImageDataBase64Set && _apiMapResponse.containsKey('custom_image_data_base64')) { _customImageDataBase64 = - _apiMapResponse['custom_image_data_base64'] == null - ? null - : _apiMapResponse['custom_image_data_base64'].toString(); + _apiMapResponse['custom_image_data_base64']?.toString(); _customImageDataBase64Set = true; } return _customImageDataBase64; @@ -22455,9 +21572,7 @@ class HomepageItem { String get customImageUrl { if (!_customImageUrlSet && _apiMapResponse.containsKey('custom_image_url')) { - _customImageUrl = _apiMapResponse['custom_image_url'] == null - ? null - : _apiMapResponse['custom_image_url'].toString(); + _customImageUrl = _apiMapResponse['custom_image_url']?.toString(); _customImageUrlSet = true; } return _customImageUrl; @@ -22472,9 +21587,7 @@ class HomepageItem { String get customTitle { if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { - _customTitle = _apiMapResponse['custom_title'] == null - ? null - : _apiMapResponse['custom_title'].toString(); + _customTitle = _apiMapResponse['custom_title']?.toString(); _customTitleSet = true; } return _customTitle; @@ -22489,9 +21602,7 @@ class HomepageItem { String get customUrl { if (!_customUrlSet && _apiMapResponse.containsKey('custom_url')) { - _customUrl = _apiMapResponse['custom_url'] == null - ? null - : _apiMapResponse['custom_url'].toString(); + _customUrl = _apiMapResponse['custom_url']?.toString(); _customUrlSet = true; } return _customUrl; @@ -22521,9 +21632,7 @@ class HomepageItem { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -22584,9 +21693,7 @@ class HomepageItem { String get imageUrl { if (!_imageUrlSet && _apiMapResponse.containsKey('image_url')) { - _imageUrl = _apiMapResponse['image_url'] == null - ? null - : _apiMapResponse['image_url'].toString(); + _imageUrl = _apiMapResponse['image_url']?.toString(); _imageUrlSet = true; } return _imageUrl; @@ -22601,9 +21708,7 @@ class HomepageItem { String get location { if (!_locationSet && _apiMapResponse.containsKey('location')) { - _location = _apiMapResponse['location'] == null - ? null - : _apiMapResponse['location'].toString(); + _location = _apiMapResponse['location']?.toString(); _locationSet = true; } return _location; @@ -22618,9 +21723,7 @@ class HomepageItem { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -22636,9 +21739,7 @@ class HomepageItem { String get lookmlDashboardId { if (!_lookmlDashboardIdSet && _apiMapResponse.containsKey('lookml_dashboard_id')) { - _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null - ? null - : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id']?.toString(); _lookmlDashboardIdSet = true; } return _lookmlDashboardId; @@ -22684,9 +21785,7 @@ class HomepageItem { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -22701,9 +21800,7 @@ class HomepageItem { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -23015,9 +22112,7 @@ class HomepageSection { String get detailUrl { if (!_detailUrlSet && _apiMapResponse.containsKey('detail_url')) { - _detailUrl = _apiMapResponse['detail_url'] == null - ? null - : _apiMapResponse['detail_url'].toString(); + _detailUrl = _apiMapResponse['detail_url']?.toString(); _detailUrlSet = true; } return _detailUrl; @@ -23096,9 +22191,8 @@ class HomepageSection { List get itemOrder { if (!_itemOrderSet && _apiMapResponse.containsKey('item_order')) { - _itemOrder = _apiMapResponse['item_order'] == null - ? null - : _apiMapResponse['item_order'].map((i) => i as int).toList(); + _itemOrder = + _apiMapResponse['item_order']?.map((i) => i as int)?.toList(); _itemOrderSet = true; } return _itemOrder; @@ -23113,9 +22207,7 @@ class HomepageSection { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -23147,9 +22239,7 @@ class HomepageSection { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -23165,11 +22255,9 @@ class HomepageSection { List get visibleItemOrder { if (!_visibleItemOrderSet && _apiMapResponse.containsKey('visible_item_order')) { - _visibleItemOrder = _apiMapResponse['visible_item_order'] == null - ? null - : _apiMapResponse['visible_item_order'] - .map((i) => i as int) - .toList(); + _visibleItemOrder = _apiMapResponse['visible_item_order'] + ?.map((i) => i as int) + ?.toList(); _visibleItemOrderSet = true; } return _visibleItemOrder; @@ -23212,12 +22300,10 @@ class HomepageSection { json['can'] = can; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { - json['deleted_at'] = - deletedAt == null ? null : deletedAt.toIso8601String(); + json['deleted_at'] = deletedAt?.toIso8601String(); } if (_detailUrlSet || _apiMapResponse.containsKey('detail_url')) { json['detail_url'] = detailUrl; @@ -23226,9 +22312,7 @@ class HomepageSection { json['homepage_id'] = homepageId; } if (_homepageItemsSet || _apiMapResponse.containsKey('homepage_items')) { - json['homepage_items'] = homepageItems == null - ? null - : homepageItems.map((i) => i.toJson()).toList(); + json['homepage_items'] = homepageItems?.map((i) => i.toJson())?.toList(); } if (_idSet || _apiMapResponse.containsKey('id')) { json['id'] = id; @@ -23243,8 +22327,7 @@ class HomepageSection { json['title'] = title; } if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { - json['updated_at'] = - updatedAt == null ? null : updatedAt.toIso8601String(); + json['updated_at'] = updatedAt?.toIso8601String(); } if (_descriptionSet || _apiMapResponse.containsKey('description')) { json['description'] = description; @@ -23278,9 +22361,7 @@ class ImportedProject { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -23295,9 +22376,7 @@ class ImportedProject { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -23312,9 +22391,7 @@ class ImportedProject { String get ref { if (!_refSet && _apiMapResponse.containsKey('ref')) { - _ref = _apiMapResponse['ref'] == null - ? null - : _apiMapResponse['ref'].toString(); + _ref = _apiMapResponse['ref']?.toString(); _refSet = true; } return _ref; @@ -23459,9 +22536,7 @@ class Integration { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -23492,9 +22567,7 @@ class Integration { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -23509,9 +22582,7 @@ class Integration { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -23562,11 +22633,9 @@ class Integration { List get supportedFormats { if (!_supportedFormatsSet && _apiMapResponse.containsKey('supported_formats')) { - _supportedFormats = _apiMapResponse['supported_formats'] == null - ? null - : _apiMapResponse['supported_formats'] - .map((i) => i as SupportedFormats) - .toList(); + _supportedFormats = _apiMapResponse['supported_formats'] + ?.map((i) => i as SupportedFormats) + ?.toList(); _supportedFormatsSet = true; } return _supportedFormats; @@ -23582,11 +22651,9 @@ class Integration { List get supportedActionTypes { if (!_supportedActionTypesSet && _apiMapResponse.containsKey('supported_action_types')) { - _supportedActionTypes = _apiMapResponse['supported_action_types'] == null - ? null - : _apiMapResponse['supported_action_types'] - .map((i) => i as SupportedActionTypes) - .toList(); + _supportedActionTypes = _apiMapResponse['supported_action_types'] + ?.map((i) => i as SupportedActionTypes) + ?.toList(); _supportedActionTypesSet = true; } return _supportedActionTypes; @@ -23602,11 +22669,9 @@ class Integration { List get supportedFormattings { if (!_supportedFormattingsSet && _apiMapResponse.containsKey('supported_formattings')) { - _supportedFormattings = _apiMapResponse['supported_formattings'] == null - ? null - : _apiMapResponse['supported_formattings'] - .map((i) => i as SupportedFormattings) - .toList(); + _supportedFormattings = _apiMapResponse['supported_formattings'] + ?.map((i) => i as SupportedFormattings) + ?.toList(); _supportedFormattingsSet = true; } return _supportedFormattings; @@ -23624,12 +22689,10 @@ class Integration { if (!_supportedVisualizationFormattingsSet && _apiMapResponse.containsKey('supported_visualization_formattings')) { _supportedVisualizationFormattings = - _apiMapResponse['supported_visualization_formattings'] == null - ? null - : _apiMapResponse['supported_visualization_formattings'] - .map( - (i) => i as SupportedVisualizationFormattings) - .toList(); + _apiMapResponse['supported_visualization_formattings'] + ?.map( + (i) => i as SupportedVisualizationFormattings) + ?.toList(); _supportedVisualizationFormattingsSet = true; } return _supportedVisualizationFormattings; @@ -23647,12 +22710,10 @@ class Integration { if (!_supportedDownloadSettingsSet && _apiMapResponse.containsKey('supported_download_settings')) { _supportedDownloadSettings = - _apiMapResponse['supported_download_settings'] == null - ? null - : _apiMapResponse['supported_download_settings'] - .map( - (i) => i as SupportedDownloadSettings) - .toList(); + _apiMapResponse['supported_download_settings'] + ?.map( + (i) => i as SupportedDownloadSettings) + ?.toList(); _supportedDownloadSettingsSet = true; } return _supportedDownloadSettings; @@ -23667,9 +22728,7 @@ class Integration { String get iconUrl { if (!_iconUrlSet && _apiMapResponse.containsKey('icon_url')) { - _iconUrl = _apiMapResponse['icon_url'] == null - ? null - : _apiMapResponse['icon_url'].toString(); + _iconUrl = _apiMapResponse['icon_url']?.toString(); _iconUrlSet = true; } return _iconUrl; @@ -23736,11 +22795,9 @@ class Integration { if (!_installedDelegateOauthTargetsSet && _apiMapResponse.containsKey('installed_delegate_oauth_targets')) { _installedDelegateOauthTargets = - _apiMapResponse['installed_delegate_oauth_targets'] == null - ? null - : _apiMapResponse['installed_delegate_oauth_targets'] - .map((i) => i as int) - .toList(); + _apiMapResponse['installed_delegate_oauth_targets'] + ?.map((i) => i as int) + ?.toList(); _installedDelegateOauthTargetsSet = true; } return _installedDelegateOauthTargets; @@ -23799,8 +22856,7 @@ class Integration { json['enabled'] = enabled; } if (_paramsSet || _apiMapResponse.containsKey('params')) { - json['params'] = - params == null ? null : params.map((i) => i.toJson()).toList(); + json['params'] = params?.map((i) => i.toJson())?.toList(); } if (_supportedFormatsSet || _apiMapResponse.containsKey('supported_formats')) { @@ -23830,9 +22886,8 @@ class Integration { json['uses_oauth'] = usesOauth; } if (_requiredFieldsSet || _apiMapResponse.containsKey('required_fields')) { - json['required_fields'] = requiredFields == null - ? null - : requiredFields.map((i) => i.toJson()).toList(); + json['required_fields'] = + requiredFields?.map((i) => i.toJson())?.toList(); } if (_delegateOauthSet || _apiMapResponse.containsKey('delegate_oauth')) { json['delegate_oauth'] = delegateOauth; @@ -23917,9 +22972,7 @@ class IntegrationHub { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -23934,9 +22987,7 @@ class IntegrationHub { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -23967,9 +23018,7 @@ class IntegrationHub { String get fetchErrorMessage { if (!_fetchErrorMessageSet && _apiMapResponse.containsKey('fetch_error_message')) { - _fetchErrorMessage = _apiMapResponse['fetch_error_message'] == null - ? null - : _apiMapResponse['fetch_error_message'].toString(); + _fetchErrorMessage = _apiMapResponse['fetch_error_message']?.toString(); _fetchErrorMessageSet = true; } return _fetchErrorMessage; @@ -23985,9 +23034,7 @@ class IntegrationHub { String get authorizationToken { if (!_authorizationTokenSet && _apiMapResponse.containsKey('authorization_token')) { - _authorizationToken = _apiMapResponse['authorization_token'] == null - ? null - : _apiMapResponse['authorization_token'].toString(); + _authorizationToken = _apiMapResponse['authorization_token']?.toString(); _authorizationTokenSet = true; } return _authorizationToken; @@ -24051,9 +23098,7 @@ class IntegrationHub { String get legalAgreementText { if (!_legalAgreementTextSet && _apiMapResponse.containsKey('legal_agreement_text')) { - _legalAgreementText = _apiMapResponse['legal_agreement_text'] == null - ? null - : _apiMapResponse['legal_agreement_text'].toString(); + _legalAgreementText = _apiMapResponse['legal_agreement_text']?.toString(); _legalAgreementTextSet = true; } return _legalAgreementText; @@ -24174,9 +23219,7 @@ class IntegrationParam { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -24191,9 +23234,7 @@ class IntegrationParam { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -24208,9 +23249,7 @@ class IntegrationParam { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -24255,9 +23294,7 @@ class IntegrationParam { String get value { if (!_valueSet && _apiMapResponse.containsKey('value')) { - _value = _apiMapResponse['value'] == null - ? null - : _apiMapResponse['value'].toString(); + _value = _apiMapResponse['value']?.toString(); _valueSet = true; } return _value; @@ -24273,9 +23310,7 @@ class IntegrationParam { String get userAttributeName { if (!_userAttributeNameSet && _apiMapResponse.containsKey('user_attribute_name')) { - _userAttributeName = _apiMapResponse['user_attribute_name'] == null - ? null - : _apiMapResponse['user_attribute_name'].toString(); + _userAttributeName = _apiMapResponse['user_attribute_name']?.toString(); _userAttributeNameSet = true; } return _userAttributeName; @@ -24321,9 +23356,7 @@ class IntegrationParam { String get delegateOauthUrl { if (!_delegateOauthUrlSet && _apiMapResponse.containsKey('delegate_oauth_url')) { - _delegateOauthUrl = _apiMapResponse['delegate_oauth_url'] == null - ? null - : _apiMapResponse['delegate_oauth_url'].toString(); + _delegateOauthUrl = _apiMapResponse['delegate_oauth_url']?.toString(); _delegateOauthUrlSet = true; } return _delegateOauthUrl; @@ -24416,9 +23449,7 @@ class IntegrationRequiredField { String get tag { if (!_tagSet && _apiMapResponse.containsKey('tag')) { - _tag = _apiMapResponse['tag'] == null - ? null - : _apiMapResponse['tag'].toString(); + _tag = _apiMapResponse['tag']?.toString(); _tagSet = true; } return _tag; @@ -24433,9 +23464,8 @@ class IntegrationRequiredField { List get anyTag { if (!_anyTagSet && _apiMapResponse.containsKey('any_tag')) { - _anyTag = _apiMapResponse['any_tag'] == null - ? null - : _apiMapResponse['any_tag'].map((i) => i as String).toList(); + _anyTag = + _apiMapResponse['any_tag']?.map((i) => i as String)?.toList(); _anyTagSet = true; } return _anyTag; @@ -24450,11 +23480,9 @@ class IntegrationRequiredField { List get allTags { if (!_allTagsSet && _apiMapResponse.containsKey('all_tags')) { - _allTags = _apiMapResponse['all_tags'] == null - ? null - : _apiMapResponse['all_tags'] - .map((i) => i as String) - .toList(); + _allTags = _apiMapResponse['all_tags'] + ?.map((i) => i as String) + ?.toList(); _allTagsSet = true; } return _allTags; @@ -24539,9 +23567,7 @@ class IntegrationTestResult { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -24609,9 +23635,8 @@ class IntegrationTestResult { } if (_delegateOauthResultSet || _apiMapResponse.containsKey('delegate_oauth_result')) { - json['delegate_oauth_result'] = delegateOauthResult == null - ? null - : delegateOauthResult.map((i) => i.toJson()).toList(); + json['delegate_oauth_result'] = + delegateOauthResult?.map((i) => i.toJson())?.toList(); } return json; } @@ -24730,9 +23755,7 @@ class InternalHelpResourcesContent { String get organizationName { if (!_organizationNameSet && _apiMapResponse.containsKey('organization_name')) { - _organizationName = _apiMapResponse['organization_name'] == null - ? null - : _apiMapResponse['organization_name'].toString(); + _organizationName = _apiMapResponse['organization_name']?.toString(); _organizationNameSet = true; } return _organizationName; @@ -24748,9 +23771,7 @@ class InternalHelpResourcesContent { String get markdownContent { if (!_markdownContentSet && _apiMapResponse.containsKey('markdown_content')) { - _markdownContent = _apiMapResponse['markdown_content'] == null - ? null - : _apiMapResponse['markdown_content'].toString(); + _markdownContent = _apiMapResponse['markdown_content']?.toString(); _markdownContentSet = true; } return _markdownContent; @@ -24996,9 +24017,7 @@ class LDAPConfig { String get authPassword { if (!_authPasswordSet && _apiMapResponse.containsKey('auth_password')) { - _authPassword = _apiMapResponse['auth_password'] == null - ? null - : _apiMapResponse['auth_password'].toString(); + _authPassword = _apiMapResponse['auth_password']?.toString(); _authPasswordSet = true; } return _authPassword; @@ -25029,9 +24048,7 @@ class LDAPConfig { String get authUsername { if (!_authUsernameSet && _apiMapResponse.containsKey('auth_username')) { - _authUsername = _apiMapResponse['auth_username'] == null - ? null - : _apiMapResponse['auth_username'].toString(); + _authUsername = _apiMapResponse['auth_username']?.toString(); _authUsernameSet = true; } return _authUsername; @@ -25046,9 +24063,7 @@ class LDAPConfig { String get connectionHost { if (!_connectionHostSet && _apiMapResponse.containsKey('connection_host')) { - _connectionHost = _apiMapResponse['connection_host'] == null - ? null - : _apiMapResponse['connection_host'].toString(); + _connectionHost = _apiMapResponse['connection_host']?.toString(); _connectionHostSet = true; } return _connectionHost; @@ -25063,9 +24078,7 @@ class LDAPConfig { String get connectionPort { if (!_connectionPortSet && _apiMapResponse.containsKey('connection_port')) { - _connectionPort = _apiMapResponse['connection_port'] == null - ? null - : _apiMapResponse['connection_port'].toString(); + _connectionPort = _apiMapResponse['connection_port']?.toString(); _connectionPortSet = true; } return _connectionPort; @@ -25112,12 +24125,9 @@ class LDAPConfig { List get defaultNewUserGroupIds { if (!_defaultNewUserGroupIdsSet && _apiMapResponse.containsKey('default_new_user_group_ids')) { - _defaultNewUserGroupIds = - _apiMapResponse['default_new_user_group_ids'] == null - ? null - : _apiMapResponse['default_new_user_group_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserGroupIds = _apiMapResponse['default_new_user_group_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserGroupIdsSet = true; } return _defaultNewUserGroupIds; @@ -25153,12 +24163,9 @@ class LDAPConfig { List get defaultNewUserRoleIds { if (!_defaultNewUserRoleIdsSet && _apiMapResponse.containsKey('default_new_user_role_ids')) { - _defaultNewUserRoleIds = - _apiMapResponse['default_new_user_role_ids'] == null - ? null - : _apiMapResponse['default_new_user_role_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserRoleIds = _apiMapResponse['default_new_user_role_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserRoleIdsSet = true; } return _defaultNewUserRoleIds; @@ -25242,9 +24249,7 @@ class LDAPConfig { String get groupsBaseDn { if (!_groupsBaseDnSet && _apiMapResponse.containsKey('groups_base_dn')) { - _groupsBaseDn = _apiMapResponse['groups_base_dn'] == null - ? null - : _apiMapResponse['groups_base_dn'].toString(); + _groupsBaseDn = _apiMapResponse['groups_base_dn']?.toString(); _groupsBaseDnSet = true; } return _groupsBaseDn; @@ -25260,9 +24265,7 @@ class LDAPConfig { String get groupsFinderType { if (!_groupsFinderTypeSet && _apiMapResponse.containsKey('groups_finder_type')) { - _groupsFinderType = _apiMapResponse['groups_finder_type'] == null - ? null - : _apiMapResponse['groups_finder_type'].toString(); + _groupsFinderType = _apiMapResponse['groups_finder_type']?.toString(); _groupsFinderTypeSet = true; } return _groupsFinderType; @@ -25279,9 +24282,7 @@ class LDAPConfig { if (!_groupsMemberAttributeSet && _apiMapResponse.containsKey('groups_member_attribute')) { _groupsMemberAttribute = - _apiMapResponse['groups_member_attribute'] == null - ? null - : _apiMapResponse['groups_member_attribute'].toString(); + _apiMapResponse['groups_member_attribute']?.toString(); _groupsMemberAttributeSet = true; } return _groupsMemberAttribute; @@ -25297,9 +24298,8 @@ class LDAPConfig { String get groupsObjectclasses { if (!_groupsObjectclassesSet && _apiMapResponse.containsKey('groups_objectclasses')) { - _groupsObjectclasses = _apiMapResponse['groups_objectclasses'] == null - ? null - : _apiMapResponse['groups_objectclasses'].toString(); + _groupsObjectclasses = + _apiMapResponse['groups_objectclasses']?.toString(); _groupsObjectclassesSet = true; } return _groupsObjectclasses; @@ -25315,9 +24315,8 @@ class LDAPConfig { String get groupsUserAttribute { if (!_groupsUserAttributeSet && _apiMapResponse.containsKey('groups_user_attribute')) { - _groupsUserAttribute = _apiMapResponse['groups_user_attribute'] == null - ? null - : _apiMapResponse['groups_user_attribute'].toString(); + _groupsUserAttribute = + _apiMapResponse['groups_user_attribute']?.toString(); _groupsUserAttributeSet = true; } return _groupsUserAttribute; @@ -25385,9 +24384,7 @@ class LDAPConfig { String get modifiedAt { if (!_modifiedAtSet && _apiMapResponse.containsKey('modified_at')) { - _modifiedAt = _apiMapResponse['modified_at'] == null - ? null - : _apiMapResponse['modified_at'].toString(); + _modifiedAt = _apiMapResponse['modified_at']?.toString(); _modifiedAtSet = true; } return _modifiedAt; @@ -25402,9 +24399,7 @@ class LDAPConfig { String get modifiedBy { if (!_modifiedBySet && _apiMapResponse.containsKey('modified_by')) { - _modifiedBy = _apiMapResponse['modified_by'] == null - ? null - : _apiMapResponse['modified_by'].toString(); + _modifiedBy = _apiMapResponse['modified_by']?.toString(); _modifiedBySet = true; } return _modifiedBy; @@ -25436,9 +24431,7 @@ class LDAPConfig { String get testLdapPassword { if (!_testLdapPasswordSet && _apiMapResponse.containsKey('test_ldap_password')) { - _testLdapPassword = _apiMapResponse['test_ldap_password'] == null - ? null - : _apiMapResponse['test_ldap_password'].toString(); + _testLdapPassword = _apiMapResponse['test_ldap_password']?.toString(); _testLdapPasswordSet = true; } return _testLdapPassword; @@ -25453,9 +24446,7 @@ class LDAPConfig { String get testLdapUser { if (!_testLdapUserSet && _apiMapResponse.containsKey('test_ldap_user')) { - _testLdapUser = _apiMapResponse['test_ldap_user'] == null - ? null - : _apiMapResponse['test_ldap_user'].toString(); + _testLdapUser = _apiMapResponse['test_ldap_user']?.toString(); _testLdapUserSet = true; } return _testLdapUser; @@ -25472,9 +24463,7 @@ class LDAPConfig { if (!_userAttributeMapEmailSet && _apiMapResponse.containsKey('user_attribute_map_email')) { _userAttributeMapEmail = - _apiMapResponse['user_attribute_map_email'] == null - ? null - : _apiMapResponse['user_attribute_map_email'].toString(); + _apiMapResponse['user_attribute_map_email']?.toString(); _userAttributeMapEmailSet = true; } return _userAttributeMapEmail; @@ -25491,9 +24480,7 @@ class LDAPConfig { if (!_userAttributeMapFirstNameSet && _apiMapResponse.containsKey('user_attribute_map_first_name')) { _userAttributeMapFirstName = - _apiMapResponse['user_attribute_map_first_name'] == null - ? null - : _apiMapResponse['user_attribute_map_first_name'].toString(); + _apiMapResponse['user_attribute_map_first_name']?.toString(); _userAttributeMapFirstNameSet = true; } return _userAttributeMapFirstName; @@ -25510,9 +24497,7 @@ class LDAPConfig { if (!_userAttributeMapLastNameSet && _apiMapResponse.containsKey('user_attribute_map_last_name')) { _userAttributeMapLastName = - _apiMapResponse['user_attribute_map_last_name'] == null - ? null - : _apiMapResponse['user_attribute_map_last_name'].toString(); + _apiMapResponse['user_attribute_map_last_name']?.toString(); _userAttributeMapLastNameSet = true; } return _userAttributeMapLastName; @@ -25529,9 +24514,7 @@ class LDAPConfig { if (!_userAttributeMapLdapIdSet && _apiMapResponse.containsKey('user_attribute_map_ldap_id')) { _userAttributeMapLdapId = - _apiMapResponse['user_attribute_map_ldap_id'] == null - ? null - : _apiMapResponse['user_attribute_map_ldap_id'].toString(); + _apiMapResponse['user_attribute_map_ldap_id']?.toString(); _userAttributeMapLdapIdSet = true; } return _userAttributeMapLdapId; @@ -25589,9 +24572,7 @@ class LDAPConfig { String get userBindBaseDn { if (!_userBindBaseDnSet && _apiMapResponse.containsKey('user_bind_base_dn')) { - _userBindBaseDn = _apiMapResponse['user_bind_base_dn'] == null - ? null - : _apiMapResponse['user_bind_base_dn'].toString(); + _userBindBaseDn = _apiMapResponse['user_bind_base_dn']?.toString(); _userBindBaseDnSet = true; } return _userBindBaseDn; @@ -25607,9 +24588,7 @@ class LDAPConfig { String get userCustomFilter { if (!_userCustomFilterSet && _apiMapResponse.containsKey('user_custom_filter')) { - _userCustomFilter = _apiMapResponse['user_custom_filter'] == null - ? null - : _apiMapResponse['user_custom_filter'].toString(); + _userCustomFilter = _apiMapResponse['user_custom_filter']?.toString(); _userCustomFilterSet = true; } return _userCustomFilter; @@ -25625,9 +24604,8 @@ class LDAPConfig { String get userIdAttributeNames { if (!_userIdAttributeNamesSet && _apiMapResponse.containsKey('user_id_attribute_names')) { - _userIdAttributeNames = _apiMapResponse['user_id_attribute_names'] == null - ? null - : _apiMapResponse['user_id_attribute_names'].toString(); + _userIdAttributeNames = + _apiMapResponse['user_id_attribute_names']?.toString(); _userIdAttributeNamesSet = true; } return _userIdAttributeNames; @@ -25643,9 +24621,7 @@ class LDAPConfig { String get userObjectclass { if (!_userObjectclassSet && _apiMapResponse.containsKey('user_objectclass')) { - _userObjectclass = _apiMapResponse['user_objectclass'] == null - ? null - : _apiMapResponse['user_objectclass'].toString(); + _userObjectclass = _apiMapResponse['user_objectclass']?.toString(); _userObjectclassSet = true; } return _userObjectclass; @@ -25710,9 +24686,7 @@ class LDAPConfig { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -25787,9 +24761,8 @@ class LDAPConfig { } if (_defaultNewUserGroupsSet || _apiMapResponse.containsKey('default_new_user_groups')) { - json['default_new_user_groups'] = defaultNewUserGroups == null - ? null - : defaultNewUserGroups.map((i) => i.toJson()).toList(); + json['default_new_user_groups'] = + defaultNewUserGroups?.map((i) => i.toJson())?.toList(); } if (_defaultNewUserRoleIdsSet || _apiMapResponse.containsKey('default_new_user_role_ids')) { @@ -25797,9 +24770,8 @@ class LDAPConfig { } if (_defaultNewUserRolesSet || _apiMapResponse.containsKey('default_new_user_roles')) { - json['default_new_user_roles'] = defaultNewUserRoles == null - ? null - : defaultNewUserRoles.map((i) => i.toJson()).toList(); + json['default_new_user_roles'] = + defaultNewUserRoles?.map((i) => i.toJson())?.toList(); } if (_enabledSet || _apiMapResponse.containsKey('enabled')) { json['enabled'] = enabled; @@ -25808,8 +24780,7 @@ class LDAPConfig { json['force_no_page'] = forceNoPage; } if (_groupsSet || _apiMapResponse.containsKey('groups')) { - json['groups'] = - groups == null ? null : groups.map((i) => i.toJson()).toList(); + json['groups'] = groups?.map((i) => i.toJson())?.toList(); } if (_groupsBaseDnSet || _apiMapResponse.containsKey('groups_base_dn')) { json['groups_base_dn'] = groupsBaseDn; @@ -25832,9 +24803,8 @@ class LDAPConfig { } if (_groupsWithRoleIdsSet || _apiMapResponse.containsKey('groups_with_role_ids')) { - json['groups_with_role_ids'] = groupsWithRoleIds == null - ? null - : groupsWithRoleIds.map((i) => i.toJson()).toList(); + json['groups_with_role_ids'] = + groupsWithRoleIds?.map((i) => i.toJson())?.toList(); } if (_hasAuthPasswordSet || _apiMapResponse.containsKey('has_auth_password')) { @@ -25878,15 +24848,13 @@ class LDAPConfig { json['user_attribute_map_ldap_id'] = userAttributeMapLdapId; } if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { - json['user_attributes'] = userAttributes == null - ? null - : userAttributes.map((i) => i.toJson()).toList(); + json['user_attributes'] = + userAttributes?.map((i) => i.toJson())?.toList(); } if (_userAttributesWithIdsSet || _apiMapResponse.containsKey('user_attributes_with_ids')) { - json['user_attributes_with_ids'] = userAttributesWithIds == null - ? null - : userAttributesWithIds.map((i) => i.toJson()).toList(); + json['user_attributes_with_ids'] = + userAttributesWithIds?.map((i) => i.toJson())?.toList(); } if (_userBindBaseDnSet || _apiMapResponse.containsKey('user_bind_base_dn')) { @@ -25938,9 +24906,7 @@ class LDAPConfigTestIssue { String get severity { if (!_severitySet && _apiMapResponse.containsKey('severity')) { - _severity = _apiMapResponse['severity'] == null - ? null - : _apiMapResponse['severity'].toString(); + _severity = _apiMapResponse['severity']?.toString(); _severitySet = true; } return _severity; @@ -25955,9 +24921,7 @@ class LDAPConfigTestIssue { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -26036,9 +25000,7 @@ class LDAPConfigTestResult { String get details { if (!_detailsSet && _apiMapResponse.containsKey('details')) { - _details = _apiMapResponse['details'] == null - ? null - : _apiMapResponse['details'].toString(); + _details = _apiMapResponse['details']?.toString(); _detailsSet = true; } return _details; @@ -26073,9 +25035,7 @@ class LDAPConfigTestResult { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -26090,9 +25050,7 @@ class LDAPConfigTestResult { String get status { if (!_statusSet && _apiMapResponse.containsKey('status')) { - _status = _apiMapResponse['status'] == null - ? null - : _apiMapResponse['status'].toString(); + _status = _apiMapResponse['status']?.toString(); _statusSet = true; } return _status; @@ -26107,9 +25065,7 @@ class LDAPConfigTestResult { String get trace { if (!_traceSet && _apiMapResponse.containsKey('trace')) { - _trace = _apiMapResponse['trace'] == null - ? null - : _apiMapResponse['trace'].toString(); + _trace = _apiMapResponse['trace']?.toString(); _traceSet = true; } return _trace; @@ -26140,9 +25096,7 @@ class LDAPConfigTestResult { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -26185,8 +25139,7 @@ class LDAPConfigTestResult { json['details'] = details; } if (_issuesSet || _apiMapResponse.containsKey('issues')) { - json['issues'] = - issues == null ? null : issues.map((i) => i.toJson()).toList(); + json['issues'] = issues?.map((i) => i.toJson())?.toList(); } if (_messageSet || _apiMapResponse.containsKey('message')) { json['message'] = message; @@ -26198,7 +25151,7 @@ class LDAPConfigTestResult { json['trace'] = trace; } if (_userSet || _apiMapResponse.containsKey('user')) { - json['user'] = user == null ? null : user.toJson(); + json['user'] = user?.toJson(); } if (_urlSet || _apiMapResponse.containsKey('url')) { json['url'] = url; @@ -26265,9 +25218,7 @@ class LDAPGroupRead { String get lookerGroupName { if (!_lookerGroupNameSet && _apiMapResponse.containsKey('looker_group_name')) { - _lookerGroupName = _apiMapResponse['looker_group_name'] == null - ? null - : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupName = _apiMapResponse['looker_group_name']?.toString(); _lookerGroupNameSet = true; } return _lookerGroupName; @@ -26282,9 +25233,7 @@ class LDAPGroupRead { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -26318,9 +25267,7 @@ class LDAPGroupRead { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -26373,8 +25320,7 @@ class LDAPGroupRead { json['name'] = name; } if (_rolesSet || _apiMapResponse.containsKey('roles')) { - json['roles'] = - roles == null ? null : roles.map((i) => i.toJson()).toList(); + json['roles'] = roles?.map((i) => i.toJson())?.toList(); } if (_urlSet || _apiMapResponse.containsKey('url')) { json['url'] = url; @@ -26441,9 +25387,7 @@ class LDAPGroupWrite { String get lookerGroupName { if (!_lookerGroupNameSet && _apiMapResponse.containsKey('looker_group_name')) { - _lookerGroupName = _apiMapResponse['looker_group_name'] == null - ? null - : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupName = _apiMapResponse['looker_group_name']?.toString(); _lookerGroupNameSet = true; } return _lookerGroupName; @@ -26458,9 +25402,7 @@ class LDAPGroupWrite { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -26475,9 +25417,8 @@ class LDAPGroupWrite { List get roleIds { if (!_roleIdsSet && _apiMapResponse.containsKey('role_ids')) { - _roleIds = _apiMapResponse['role_ids'] == null - ? null - : _apiMapResponse['role_ids'].map((i) => i as int).toList(); + _roleIds = + _apiMapResponse['role_ids']?.map((i) => i as int)?.toList(); _roleIdsSet = true; } return _roleIds; @@ -26492,9 +25433,7 @@ class LDAPGroupWrite { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -26595,11 +25534,9 @@ class LDAPUser { List get allEmails { if (!_allEmailsSet && _apiMapResponse.containsKey('all_emails')) { - _allEmails = _apiMapResponse['all_emails'] == null - ? null - : _apiMapResponse['all_emails'] - .map((i) => i as String) - .toList(); + _allEmails = _apiMapResponse['all_emails'] + ?.map((i) => i as String) + ?.toList(); _allEmailsSet = true; } return _allEmails; @@ -26629,9 +25566,7 @@ class LDAPUser { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -26646,9 +25581,7 @@ class LDAPUser { String get firstName { if (!_firstNameSet && _apiMapResponse.containsKey('first_name')) { - _firstName = _apiMapResponse['first_name'] == null - ? null - : _apiMapResponse['first_name'].toString(); + _firstName = _apiMapResponse['first_name']?.toString(); _firstNameSet = true; } return _firstName; @@ -26663,9 +25596,8 @@ class LDAPUser { List get groups { if (!_groupsSet && _apiMapResponse.containsKey('groups')) { - _groups = _apiMapResponse['groups'] == null - ? null - : _apiMapResponse['groups'].map((i) => i as String).toList(); + _groups = + _apiMapResponse['groups']?.map((i) => i as String)?.toList(); _groupsSet = true; } return _groups; @@ -26680,9 +25612,7 @@ class LDAPUser { String get lastName { if (!_lastNameSet && _apiMapResponse.containsKey('last_name')) { - _lastName = _apiMapResponse['last_name'] == null - ? null - : _apiMapResponse['last_name'].toString(); + _lastName = _apiMapResponse['last_name']?.toString(); _lastNameSet = true; } return _lastName; @@ -26697,9 +25627,7 @@ class LDAPUser { String get ldapDn { if (!_ldapDnSet && _apiMapResponse.containsKey('ldap_dn')) { - _ldapDn = _apiMapResponse['ldap_dn'] == null - ? null - : _apiMapResponse['ldap_dn'].toString(); + _ldapDn = _apiMapResponse['ldap_dn']?.toString(); _ldapDnSet = true; } return _ldapDn; @@ -26714,9 +25642,7 @@ class LDAPUser { String get ldapId { if (!_ldapIdSet && _apiMapResponse.containsKey('ldap_id')) { - _ldapId = _apiMapResponse['ldap_id'] == null - ? null - : _apiMapResponse['ldap_id'].toString(); + _ldapId = _apiMapResponse['ldap_id']?.toString(); _ldapIdSet = true; } return _ldapId; @@ -26731,9 +25657,8 @@ class LDAPUser { List get roles { if (!_rolesSet && _apiMapResponse.containsKey('roles')) { - _roles = _apiMapResponse['roles'] == null - ? null - : _apiMapResponse['roles'].map((i) => i as String).toList(); + _roles = + _apiMapResponse['roles']?.map((i) => i as String)?.toList(); _rolesSet = true; } return _roles; @@ -26748,9 +25673,7 @@ class LDAPUser { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -26843,9 +25766,7 @@ class LDAPUserAttributeRead { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -26894,9 +25815,7 @@ class LDAPUserAttributeRead { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -26942,9 +25861,8 @@ class LDAPUserAttributeRead { json['required'] = required; } if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { - json['user_attributes'] = userAttributes == null - ? null - : userAttributes.map((i) => i.toJson()).toList(); + json['user_attributes'] = + userAttributes?.map((i) => i.toJson())?.toList(); } if (_urlSet || _apiMapResponse.containsKey('url')) { json['url'] = url; @@ -26974,9 +25892,7 @@ class LDAPUserAttributeWrite { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -27007,11 +25923,9 @@ class LDAPUserAttributeWrite { List get userAttributeIds { if (!_userAttributeIdsSet && _apiMapResponse.containsKey('user_attribute_ids')) { - _userAttributeIds = _apiMapResponse['user_attribute_ids'] == null - ? null - : _apiMapResponse['user_attribute_ids'] - .map((i) => i as int) - .toList(); + _userAttributeIds = _apiMapResponse['user_attribute_ids'] + ?.map((i) => i as int) + ?.toList(); _userAttributeIdsSet = true; } return _userAttributeIds; @@ -27026,9 +25940,7 @@ class LDAPUserAttributeWrite { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -27147,9 +26059,7 @@ class LegacyFeature { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -27164,9 +26074,7 @@ class LegacyFeature { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -27181,9 +26089,7 @@ class LegacyFeature { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -27230,9 +26136,7 @@ class LegacyFeature { if (!_disallowedAsOfVersionSet && _apiMapResponse.containsKey('disallowed_as_of_version')) { _disallowedAsOfVersion = - _apiMapResponse['disallowed_as_of_version'] == null - ? null - : _apiMapResponse['disallowed_as_of_version'].toString(); + _apiMapResponse['disallowed_as_of_version']?.toString(); _disallowedAsOfVersionSet = true; } return _disallowedAsOfVersion; @@ -27249,9 +26153,7 @@ class LegacyFeature { if (!_disableOnUpgradeToVersionSet && _apiMapResponse.containsKey('disable_on_upgrade_to_version')) { _disableOnUpgradeToVersion = - _apiMapResponse['disable_on_upgrade_to_version'] == null - ? null - : _apiMapResponse['disable_on_upgrade_to_version'].toString(); + _apiMapResponse['disable_on_upgrade_to_version']?.toString(); _disableOnUpgradeToVersionSet = true; } return _disableOnUpgradeToVersion; @@ -27267,9 +26169,7 @@ class LegacyFeature { String get endOfLifeVersion { if (!_endOfLifeVersionSet && _apiMapResponse.containsKey('end_of_life_version')) { - _endOfLifeVersion = _apiMapResponse['end_of_life_version'] == null - ? null - : _apiMapResponse['end_of_life_version'].toString(); + _endOfLifeVersion = _apiMapResponse['end_of_life_version']?.toString(); _endOfLifeVersionSet = true; } return _endOfLifeVersion; @@ -27285,9 +26185,7 @@ class LegacyFeature { String get documentationUrl { if (!_documentationUrlSet && _apiMapResponse.containsKey('documentation_url')) { - _documentationUrl = _apiMapResponse['documentation_url'] == null - ? null - : _apiMapResponse['documentation_url'].toString(); + _documentationUrl = _apiMapResponse['documentation_url']?.toString(); _documentationUrlSet = true; } return _documentationUrl; @@ -27416,15 +26314,13 @@ class LegacyFeature { } if (_approximateDisableDateSet || _apiMapResponse.containsKey('approximate_disable_date')) { - json['approximate_disable_date'] = approximateDisableDate == null - ? null - : approximateDisableDate.toIso8601String(); + json['approximate_disable_date'] = + approximateDisableDate?.toIso8601String(); } if (_approximateEndOfLifeDateSet || _apiMapResponse.containsKey('approximate_end_of_life_date')) { - json['approximate_end_of_life_date'] = approximateEndOfLifeDate == null - ? null - : approximateEndOfLifeDate.toIso8601String(); + json['approximate_end_of_life_date'] = + approximateEndOfLifeDate?.toIso8601String(); } if (_hasDisabledOnUpgradeSet || _apiMapResponse.containsKey('has_disabled_on_upgrade')) { @@ -27479,9 +26375,7 @@ class Locale { String get code { if (!_codeSet && _apiMapResponse.containsKey('code')) { - _code = _apiMapResponse['code'] == null - ? null - : _apiMapResponse['code'].toString(); + _code = _apiMapResponse['code']?.toString(); _codeSet = true; } return _code; @@ -27496,9 +26390,7 @@ class Locale { String get nativeName { if (!_nativeNameSet && _apiMapResponse.containsKey('native_name')) { - _nativeName = _apiMapResponse['native_name'] == null - ? null - : _apiMapResponse['native_name'].toString(); + _nativeName = _apiMapResponse['native_name']?.toString(); _nativeNameSet = true; } return _nativeName; @@ -27513,9 +26405,7 @@ class Locale { String get englishName { if (!_englishNameSet && _apiMapResponse.containsKey('english_name')) { - _englishName = _apiMapResponse['english_name'] == null - ? null - : _apiMapResponse['english_name'].toString(); + _englishName = _apiMapResponse['english_name']?.toString(); _englishNameSet = true; } return _englishName; @@ -27581,9 +26471,7 @@ class LocalizationSettings { String get defaultLocale { if (!_defaultLocaleSet && _apiMapResponse.containsKey('default_locale')) { - _defaultLocale = _apiMapResponse['default_locale'] == null - ? null - : _apiMapResponse['default_locale'].toString(); + _defaultLocale = _apiMapResponse['default_locale']?.toString(); _defaultLocaleSet = true; } return _defaultLocale; @@ -27599,9 +26487,7 @@ class LocalizationSettings { String get localizationLevel { if (!_localizationLevelSet && _apiMapResponse.containsKey('localization_level')) { - _localizationLevel = _apiMapResponse['localization_level'] == null - ? null - : _apiMapResponse['localization_level'].toString(); + _localizationLevel = _apiMapResponse['localization_level']?.toString(); _localizationLevelSet = true; } return _localizationLevel; @@ -27781,9 +26667,7 @@ class Look { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -27798,9 +26682,7 @@ class Look { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -27910,9 +26792,7 @@ class Look { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -27927,9 +26807,7 @@ class Look { String get embedUrl { if (!_embedUrlSet && _apiMapResponse.containsKey('embed_url')) { - _embedUrl = _apiMapResponse['embed_url'] == null - ? null - : _apiMapResponse['embed_url'].toString(); + _embedUrl = _apiMapResponse['embed_url']?.toString(); _embedUrlSet = true; } return _embedUrl; @@ -27944,9 +26822,7 @@ class Look { String get excelFileUrl { if (!_excelFileUrlSet && _apiMapResponse.containsKey('excel_file_url')) { - _excelFileUrl = _apiMapResponse['excel_file_url'] == null - ? null - : _apiMapResponse['excel_file_url'].toString(); + _excelFileUrl = _apiMapResponse['excel_file_url']?.toString(); _excelFileUrlSet = true; } return _excelFileUrl; @@ -27978,9 +26854,7 @@ class Look { if (!_googleSpreadsheetFormulaSet && _apiMapResponse.containsKey('google_spreadsheet_formula')) { _googleSpreadsheetFormula = - _apiMapResponse['google_spreadsheet_formula'] == null - ? null - : _apiMapResponse['google_spreadsheet_formula'].toString(); + _apiMapResponse['google_spreadsheet_formula']?.toString(); _googleSpreadsheetFormulaSet = true; } return _googleSpreadsheetFormula; @@ -27995,9 +26869,7 @@ class Look { String get imageEmbedUrl { if (!_imageEmbedUrlSet && _apiMapResponse.containsKey('image_embed_url')) { - _imageEmbedUrl = _apiMapResponse['image_embed_url'] == null - ? null - : _apiMapResponse['image_embed_url'].toString(); + _imageEmbedUrl = _apiMapResponse['image_embed_url']?.toString(); _imageEmbedUrlSet = true; } return _imageEmbedUrl; @@ -28108,9 +26980,7 @@ class Look { String get publicSlug { if (!_publicSlugSet && _apiMapResponse.containsKey('public_slug')) { - _publicSlug = _apiMapResponse['public_slug'] == null - ? null - : _apiMapResponse['public_slug'].toString(); + _publicSlug = _apiMapResponse['public_slug']?.toString(); _publicSlugSet = true; } return _publicSlug; @@ -28125,9 +26995,7 @@ class Look { String get publicUrl { if (!_publicUrlSet && _apiMapResponse.containsKey('public_url')) { - _publicUrl = _apiMapResponse['public_url'] == null - ? null - : _apiMapResponse['public_url'].toString(); + _publicUrl = _apiMapResponse['public_url']?.toString(); _publicUrlSet = true; } return _publicUrl; @@ -28157,9 +27025,7 @@ class Look { String get shortUrl { if (!_shortUrlSet && _apiMapResponse.containsKey('short_url')) { - _shortUrl = _apiMapResponse['short_url'] == null - ? null - : _apiMapResponse['short_url'].toString(); + _shortUrl = _apiMapResponse['short_url']?.toString(); _shortUrlSet = true; } return _shortUrl; @@ -28190,9 +27056,7 @@ class Look { String get folderId { if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { - _folderId = _apiMapResponse['folder_id'] == null - ? null - : _apiMapResponse['folder_id'].toString(); + _folderId = _apiMapResponse['folder_id']?.toString(); _folderIdSet = true; } return _folderId; @@ -28283,15 +27147,13 @@ class Look { json['content_favorite_id'] = contentFavoriteId; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } if (_deletedSet || _apiMapResponse.containsKey('deleted')) { json['deleted'] = deleted; } if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { - json['deleted_at'] = - deletedAt == null ? null : deletedAt.toIso8601String(); + json['deleted_at'] = deletedAt?.toIso8601String(); } if (_deleterIdSet || _apiMapResponse.containsKey('deleter_id')) { json['deleter_id'] = deleterId; @@ -28319,18 +27181,16 @@ class Look { json['is_run_on_load'] = isRunOnLoad; } if (_lastAccessedAtSet || _apiMapResponse.containsKey('last_accessed_at')) { - json['last_accessed_at'] = - lastAccessedAt == null ? null : lastAccessedAt.toIso8601String(); + json['last_accessed_at'] = lastAccessedAt?.toIso8601String(); } if (_lastUpdaterIdSet || _apiMapResponse.containsKey('last_updater_id')) { json['last_updater_id'] = lastUpdaterId; } if (_lastViewedAtSet || _apiMapResponse.containsKey('last_viewed_at')) { - json['last_viewed_at'] = - lastViewedAt == null ? null : lastViewedAt.toIso8601String(); + json['last_viewed_at'] = lastViewedAt?.toIso8601String(); } if (_modelSet || _apiMapResponse.containsKey('model')) { - json['model'] = model == null ? null : model.toJson(); + json['model'] = model?.toJson(); } if (_publicSet || _apiMapResponse.containsKey('public')) { json['public'] = public; @@ -28348,14 +27208,13 @@ class Look { json['short_url'] = shortUrl; } if (_folderSet || _apiMapResponse.containsKey('folder')) { - json['folder'] = folder == null ? null : folder.toJson(); + json['folder'] = folder?.toJson(); } if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { json['folder_id'] = folderId; } if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { - json['updated_at'] = - updatedAt == null ? null : updatedAt.toIso8601String(); + json['updated_at'] = updatedAt?.toIso8601String(); } if (_viewCountSet || _apiMapResponse.containsKey('view_count')) { json['view_count'] = viewCount; @@ -28434,9 +27293,7 @@ class LookBasic { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -28558,12 +27415,9 @@ class LookmlModel { List get allowedDbConnectionNames { if (!_allowedDbConnectionNamesSet && _apiMapResponse.containsKey('allowed_db_connection_names')) { - _allowedDbConnectionNames = - _apiMapResponse['allowed_db_connection_names'] == null - ? null - : _apiMapResponse['allowed_db_connection_names'] - .map((i) => i as String) - .toList(); + _allowedDbConnectionNames = _apiMapResponse['allowed_db_connection_names'] + ?.map((i) => i as String) + ?.toList(); _allowedDbConnectionNamesSet = true; } return _allowedDbConnectionNames; @@ -28613,9 +27467,7 @@ class LookmlModel { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -28630,9 +27482,7 @@ class LookmlModel { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -28647,9 +27497,7 @@ class LookmlModel { String get projectName { if (!_projectNameSet && _apiMapResponse.containsKey('project_name')) { - _projectName = _apiMapResponse['project_name'] == null - ? null - : _apiMapResponse['project_name'].toString(); + _projectName = _apiMapResponse['project_name']?.toString(); _projectNameSet = true; } return _projectName; @@ -28712,8 +27560,7 @@ class LookmlModel { json['allowed_db_connection_names'] = allowedDbConnectionNames; } if (_exploresSet || _apiMapResponse.containsKey('explores')) { - json['explores'] = - explores == null ? null : explores.map((i) => i.toJson()).toList(); + json['explores'] = explores?.map((i) => i.toJson())?.toList(); } if (_hasContentSet || _apiMapResponse.containsKey('has_content')) { json['has_content'] = hasContent; @@ -28861,9 +27708,7 @@ class LookmlModelExplore { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -28878,9 +27723,7 @@ class LookmlModelExplore { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -28895,9 +27738,7 @@ class LookmlModelExplore { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -28912,9 +27753,7 @@ class LookmlModelExplore { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -28929,9 +27768,7 @@ class LookmlModelExplore { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -28946,9 +27783,8 @@ class LookmlModelExplore { List get scopes { if (!_scopesSet && _apiMapResponse.containsKey('scopes')) { - _scopes = _apiMapResponse['scopes'] == null - ? null - : _apiMapResponse['scopes'].map((i) => i as String).toList(); + _scopes = + _apiMapResponse['scopes']?.map((i) => i as String)?.toList(); _scopesSet = true; } return _scopes; @@ -29008,9 +27844,7 @@ class LookmlModelExplore { String get lookmlLink { if (!_lookmlLinkSet && _apiMapResponse.containsKey('lookml_link')) { - _lookmlLink = _apiMapResponse['lookml_link'] == null - ? null - : _apiMapResponse['lookml_link'].toString(); + _lookmlLink = _apiMapResponse['lookml_link']?.toString(); _lookmlLinkSet = true; } return _lookmlLink; @@ -29117,9 +27951,7 @@ class LookmlModelExplore { String get connectionName { if (!_connectionNameSet && _apiMapResponse.containsKey('connection_name')) { - _connectionName = _apiMapResponse['connection_name'] == null - ? null - : _apiMapResponse['connection_name'].toString(); + _connectionName = _apiMapResponse['connection_name']?.toString(); _connectionNameSet = true; } return _connectionName; @@ -29135,9 +27967,7 @@ class LookmlModelExplore { String get nullSortTreatment { if (!_nullSortTreatmentSet && _apiMapResponse.containsKey('null_sort_treatment')) { - _nullSortTreatment = _apiMapResponse['null_sort_treatment'] == null - ? null - : _apiMapResponse['null_sort_treatment'].toString(); + _nullSortTreatment = _apiMapResponse['null_sort_treatment']?.toString(); _nullSortTreatmentSet = true; } return _nullSortTreatment; @@ -29152,9 +27982,8 @@ class LookmlModelExplore { List get files { if (!_filesSet && _apiMapResponse.containsKey('files')) { - _files = _apiMapResponse['files'] == null - ? null - : _apiMapResponse['files'].map((i) => i as String).toList(); + _files = + _apiMapResponse['files']?.map((i) => i as String)?.toList(); _filesSet = true; } return _files; @@ -29169,9 +27998,7 @@ class LookmlModelExplore { String get sourceFile { if (!_sourceFileSet && _apiMapResponse.containsKey('source_file')) { - _sourceFile = _apiMapResponse['source_file'] == null - ? null - : _apiMapResponse['source_file'].toString(); + _sourceFile = _apiMapResponse['source_file']?.toString(); _sourceFileSet = true; } return _sourceFile; @@ -29186,9 +28013,7 @@ class LookmlModelExplore { String get projectName { if (!_projectNameSet && _apiMapResponse.containsKey('project_name')) { - _projectName = _apiMapResponse['project_name'] == null - ? null - : _apiMapResponse['project_name'].toString(); + _projectName = _apiMapResponse['project_name']?.toString(); _projectNameSet = true; } return _projectName; @@ -29203,9 +28028,7 @@ class LookmlModelExplore { String get modelName { if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { - _modelName = _apiMapResponse['model_name'] == null - ? null - : _apiMapResponse['model_name'].toString(); + _modelName = _apiMapResponse['model_name']?.toString(); _modelNameSet = true; } return _modelName; @@ -29220,9 +28043,7 @@ class LookmlModelExplore { String get viewName { if (!_viewNameSet && _apiMapResponse.containsKey('view_name')) { - _viewName = _apiMapResponse['view_name'] == null - ? null - : _apiMapResponse['view_name'].toString(); + _viewName = _apiMapResponse['view_name']?.toString(); _viewNameSet = true; } return _viewName; @@ -29252,9 +28073,7 @@ class LookmlModelExplore { String get sqlTableName { if (!_sqlTableNameSet && _apiMapResponse.containsKey('sql_table_name')) { - _sqlTableName = _apiMapResponse['sql_table_name'] == null - ? null - : _apiMapResponse['sql_table_name'].toString(); + _sqlTableName = _apiMapResponse['sql_table_name']?.toString(); _sqlTableNameSet = true; } return _sqlTableName; @@ -29270,11 +28089,9 @@ class LookmlModelExplore { List get accessFilterFields { if (!_accessFilterFieldsSet && _apiMapResponse.containsKey('access_filter_fields')) { - _accessFilterFields = _apiMapResponse['access_filter_fields'] == null - ? null - : _apiMapResponse['access_filter_fields'] - .map((i) => i as String) - .toList(); + _accessFilterFields = _apiMapResponse['access_filter_fields'] + ?.map((i) => i as String) + ?.toList(); _accessFilterFieldsSet = true; } return _accessFilterFields; @@ -29370,11 +28187,9 @@ class LookmlModelExplore { List get indexFields { if (!_indexFieldsSet && _apiMapResponse.containsKey('index_fields')) { - _indexFields = _apiMapResponse['index_fields'] == null - ? null - : _apiMapResponse['index_fields'] - .map((i) => i as String) - .toList(); + _indexFields = _apiMapResponse['index_fields'] + ?.map((i) => i as String) + ?.toList(); _indexFieldsSet = true; } return _indexFields; @@ -29409,9 +28224,8 @@ class LookmlModelExplore { List get tags { if (!_tagsSet && _apiMapResponse.containsKey('tags')) { - _tags = _apiMapResponse['tags'] == null - ? null - : _apiMapResponse['tags'].map((i) => i as String).toList(); + _tags = + _apiMapResponse['tags']?.map((i) => i as String)?.toList(); _tagsSet = true; } return _tags; @@ -29482,9 +28296,7 @@ class LookmlModelExplore { String get groupLabel { if (!_groupLabelSet && _apiMapResponse.containsKey('group_label')) { - _groupLabel = _apiMapResponse['group_label'] == null - ? null - : _apiMapResponse['group_label'].toString(); + _groupLabel = _apiMapResponse['group_label']?.toString(); _groupLabelSet = true; } return _groupLabel; @@ -29521,11 +28333,9 @@ class LookmlModelExplore { List get alwaysJoin { if (!_alwaysJoinSet && _apiMapResponse.containsKey('always_join')) { - _alwaysJoin = _apiMapResponse['always_join'] == null - ? null - : _apiMapResponse['always_join'] - .map((i) => i as String) - .toList(); + _alwaysJoin = _apiMapResponse['always_join'] + ?.map((i) => i as String) + ?.toList(); _alwaysJoinSet = true; } return _alwaysJoin; @@ -29647,53 +28457,44 @@ class LookmlModelExplore { json['access_filter_fields'] = accessFilterFields; } if (_accessFiltersSet || _apiMapResponse.containsKey('access_filters')) { - json['access_filters'] = accessFilters == null - ? null - : accessFilters.map((i) => i.toJson()).toList(); + json['access_filters'] = accessFilters?.map((i) => i.toJson())?.toList(); } if (_aliasesSet || _apiMapResponse.containsKey('aliases')) { - json['aliases'] = - aliases == null ? null : aliases.map((i) => i.toJson()).toList(); + json['aliases'] = aliases?.map((i) => i.toJson())?.toList(); } if (_alwaysFilterSet || _apiMapResponse.containsKey('always_filter')) { - json['always_filter'] = alwaysFilter == null - ? null - : alwaysFilter.map((i) => i.toJson()).toList(); + json['always_filter'] = alwaysFilter?.map((i) => i.toJson())?.toList(); } if (_conditionallyFilterSet || _apiMapResponse.containsKey('conditionally_filter')) { - json['conditionally_filter'] = conditionallyFilter == null - ? null - : conditionallyFilter.map((i) => i.toJson()).toList(); + json['conditionally_filter'] = + conditionallyFilter?.map((i) => i.toJson())?.toList(); } if (_indexFieldsSet || _apiMapResponse.containsKey('index_fields')) { json['index_fields'] = indexFields; } if (_setsSet || _apiMapResponse.containsKey('sets')) { - json['sets'] = sets == null ? null : sets.map((i) => i.toJson()).toList(); + json['sets'] = sets?.map((i) => i.toJson())?.toList(); } if (_tagsSet || _apiMapResponse.containsKey('tags')) { json['tags'] = tags; } if (_errorsSet || _apiMapResponse.containsKey('errors')) { - json['errors'] = - errors == null ? null : errors.map((i) => i.toJson()).toList(); + json['errors'] = errors?.map((i) => i.toJson())?.toList(); } if (_fieldsSet || _apiMapResponse.containsKey('fields')) { - json['fields'] = fields == null ? null : fields.toJson(); + json['fields'] = fields?.toJson(); } if (_joinsSet || _apiMapResponse.containsKey('joins')) { - json['joins'] = - joins == null ? null : joins.map((i) => i.toJson()).toList(); + json['joins'] = joins?.map((i) => i.toJson())?.toList(); } if (_groupLabelSet || _apiMapResponse.containsKey('group_label')) { json['group_label'] = groupLabel; } if (_supportedMeasureTypesSet || _apiMapResponse.containsKey('supported_measure_types')) { - json['supported_measure_types'] = supportedMeasureTypes == null - ? null - : supportedMeasureTypes.map((i) => i.toJson()).toList(); + json['supported_measure_types'] = + supportedMeasureTypes?.map((i) => i.toJson())?.toList(); } if (_alwaysJoinSet || _apiMapResponse.containsKey('always_join')) { json['always_join'] = alwaysJoin; @@ -29717,9 +28518,7 @@ class LookmlModelExploreAccessFilter { String get field { if (!_fieldSet && _apiMapResponse.containsKey('field')) { - _field = _apiMapResponse['field'] == null - ? null - : _apiMapResponse['field'].toString(); + _field = _apiMapResponse['field']?.toString(); _fieldSet = true; } return _field; @@ -29734,9 +28533,7 @@ class LookmlModelExploreAccessFilter { String get userAttribute { if (!_userAttributeSet && _apiMapResponse.containsKey('user_attribute')) { - _userAttribute = _apiMapResponse['user_attribute'] == null - ? null - : _apiMapResponse['user_attribute'].toString(); + _userAttribute = _apiMapResponse['user_attribute']?.toString(); _userAttributeSet = true; } return _userAttribute; @@ -29800,9 +28597,7 @@ class LookmlModelExploreAlias { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -29817,9 +28612,7 @@ class LookmlModelExploreAlias { String get value { if (!_valueSet && _apiMapResponse.containsKey('value')) { - _value = _apiMapResponse['value'] == null - ? null - : _apiMapResponse['value'].toString(); + _value = _apiMapResponse['value']?.toString(); _valueSet = true; } return _value; @@ -29883,9 +28676,7 @@ class LookmlModelExploreAlwaysFilter { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -29900,9 +28691,7 @@ class LookmlModelExploreAlwaysFilter { String get value { if (!_valueSet && _apiMapResponse.containsKey('value')) { - _value = _apiMapResponse['value'] == null - ? null - : _apiMapResponse['value'].toString(); + _value = _apiMapResponse['value']?.toString(); _valueSet = true; } return _value; @@ -29966,9 +28755,7 @@ class LookmlModelExploreConditionallyFilter { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -29983,9 +28770,7 @@ class LookmlModelExploreConditionallyFilter { String get value { if (!_valueSet && _apiMapResponse.containsKey('value')) { - _value = _apiMapResponse['value'] == null - ? null - : _apiMapResponse['value'].toString(); + _value = _apiMapResponse['value']?.toString(); _valueSet = true; } return _value; @@ -30055,9 +28840,7 @@ class LookmlModelExploreError { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -30087,9 +28870,7 @@ class LookmlModelExploreError { String get errorPos { if (!_errorPosSet && _apiMapResponse.containsKey('error_pos')) { - _errorPos = _apiMapResponse['error_pos'] == null - ? null - : _apiMapResponse['error_pos'].toString(); + _errorPos = _apiMapResponse['error_pos']?.toString(); _errorPosSet = true; } return _errorPos; @@ -30376,9 +29157,7 @@ class LookmlModelExploreField { String get defaultFilterValue { if (!_defaultFilterValueSet && _apiMapResponse.containsKey('default_filter_value')) { - _defaultFilterValue = _apiMapResponse['default_filter_value'] == null - ? null - : _apiMapResponse['default_filter_value'].toString(); + _defaultFilterValue = _apiMapResponse['default_filter_value']?.toString(); _defaultFilterValueSet = true; } return _defaultFilterValue; @@ -30393,9 +29172,7 @@ class LookmlModelExploreField { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -30410,9 +29187,7 @@ class LookmlModelExploreField { String get dimensionGroup { if (!_dimensionGroupSet && _apiMapResponse.containsKey('dimension_group')) { - _dimensionGroup = _apiMapResponse['dimension_group'] == null - ? null - : _apiMapResponse['dimension_group'].toString(); + _dimensionGroup = _apiMapResponse['dimension_group']?.toString(); _dimensionGroupSet = true; } return _dimensionGroup; @@ -30447,9 +29222,7 @@ class LookmlModelExploreField { String get error { if (!_errorSet && _apiMapResponse.containsKey('error')) { - _error = _apiMapResponse['error'] == null - ? null - : _apiMapResponse['error'].toString(); + _error = _apiMapResponse['error']?.toString(); _errorSet = true; } return _error; @@ -30465,9 +29238,7 @@ class LookmlModelExploreField { String get fieldGroupLabel { if (!_fieldGroupLabelSet && _apiMapResponse.containsKey('field_group_label')) { - _fieldGroupLabel = _apiMapResponse['field_group_label'] == null - ? null - : _apiMapResponse['field_group_label'].toString(); + _fieldGroupLabel = _apiMapResponse['field_group_label']?.toString(); _fieldGroupLabelSet = true; } return _fieldGroupLabel; @@ -30483,9 +29254,7 @@ class LookmlModelExploreField { String get fieldGroupVariant { if (!_fieldGroupVariantSet && _apiMapResponse.containsKey('field_group_variant')) { - _fieldGroupVariant = _apiMapResponse['field_group_variant'] == null - ? null - : _apiMapResponse['field_group_variant'].toString(); + _fieldGroupVariant = _apiMapResponse['field_group_variant']?.toString(); _fieldGroupVariantSet = true; } return _fieldGroupVariant; @@ -30654,9 +29423,7 @@ class LookmlModelExploreField { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -30672,9 +29439,7 @@ class LookmlModelExploreField { String get labelFromParameter { if (!_labelFromParameterSet && _apiMapResponse.containsKey('label_from_parameter')) { - _labelFromParameter = _apiMapResponse['label_from_parameter'] == null - ? null - : _apiMapResponse['label_from_parameter'].toString(); + _labelFromParameter = _apiMapResponse['label_from_parameter']?.toString(); _labelFromParameterSet = true; } return _labelFromParameter; @@ -30689,9 +29454,7 @@ class LookmlModelExploreField { String get labelShort { if (!_labelShortSet && _apiMapResponse.containsKey('label_short')) { - _labelShort = _apiMapResponse['label_short'] == null - ? null - : _apiMapResponse['label_short'].toString(); + _labelShort = _apiMapResponse['label_short']?.toString(); _labelShortSet = true; } return _labelShort; @@ -30706,9 +29469,7 @@ class LookmlModelExploreField { String get lookmlLink { if (!_lookmlLinkSet && _apiMapResponse.containsKey('lookml_link')) { - _lookmlLink = _apiMapResponse['lookml_link'] == null - ? null - : _apiMapResponse['lookml_link'].toString(); + _lookmlLink = _apiMapResponse['lookml_link']?.toString(); _lookmlLinkSet = true; } return _lookmlLink; @@ -30754,9 +29515,7 @@ class LookmlModelExploreField { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -30832,9 +29591,7 @@ class LookmlModelExploreField { String get projectName { if (!_projectNameSet && _apiMapResponse.containsKey('project_name')) { - _projectName = _apiMapResponse['project_name'] == null - ? null - : _apiMapResponse['project_name'].toString(); + _projectName = _apiMapResponse['project_name']?.toString(); _projectNameSet = true; } return _projectName; @@ -30865,9 +29622,7 @@ class LookmlModelExploreField { String get scope { if (!_scopeSet && _apiMapResponse.containsKey('scope')) { - _scope = _apiMapResponse['scope'] == null - ? null - : _apiMapResponse['scope'].toString(); + _scope = _apiMapResponse['scope']?.toString(); _scopeSet = true; } return _scope; @@ -30897,9 +29652,7 @@ class LookmlModelExploreField { String get sourceFile { if (!_sourceFileSet && _apiMapResponse.containsKey('source_file')) { - _sourceFile = _apiMapResponse['source_file'] == null - ? null - : _apiMapResponse['source_file'].toString(); + _sourceFile = _apiMapResponse['source_file']?.toString(); _sourceFileSet = true; } return _sourceFile; @@ -30915,9 +29668,7 @@ class LookmlModelExploreField { String get sourceFilePath { if (!_sourceFilePathSet && _apiMapResponse.containsKey('source_file_path')) { - _sourceFilePath = _apiMapResponse['source_file_path'] == null - ? null - : _apiMapResponse['source_file_path'].toString(); + _sourceFilePath = _apiMapResponse['source_file_path']?.toString(); _sourceFilePathSet = true; } return _sourceFilePath; @@ -30932,9 +29683,7 @@ class LookmlModelExploreField { String get sql { if (!_sqlSet && _apiMapResponse.containsKey('sql')) { - _sql = _apiMapResponse['sql'] == null - ? null - : _apiMapResponse['sql'].toString(); + _sql = _apiMapResponse['sql']?.toString(); _sqlSet = true; } return _sql; @@ -30990,9 +29739,7 @@ class LookmlModelExploreField { String get suggestDimension { if (!_suggestDimensionSet && _apiMapResponse.containsKey('suggest_dimension')) { - _suggestDimension = _apiMapResponse['suggest_dimension'] == null - ? null - : _apiMapResponse['suggest_dimension'].toString(); + _suggestDimension = _apiMapResponse['suggest_dimension']?.toString(); _suggestDimensionSet = true; } return _suggestDimension; @@ -31007,9 +29754,7 @@ class LookmlModelExploreField { String get suggestExplore { if (!_suggestExploreSet && _apiMapResponse.containsKey('suggest_explore')) { - _suggestExplore = _apiMapResponse['suggest_explore'] == null - ? null - : _apiMapResponse['suggest_explore'].toString(); + _suggestExplore = _apiMapResponse['suggest_explore']?.toString(); _suggestExploreSet = true; } return _suggestExplore; @@ -31039,11 +29784,9 @@ class LookmlModelExploreField { List get suggestions { if (!_suggestionsSet && _apiMapResponse.containsKey('suggestions')) { - _suggestions = _apiMapResponse['suggestions'] == null - ? null - : _apiMapResponse['suggestions'] - .map((i) => i as String) - .toList(); + _suggestions = _apiMapResponse['suggestions'] + ?.map((i) => i as String) + ?.toList(); _suggestionsSet = true; } return _suggestions; @@ -31058,9 +29801,8 @@ class LookmlModelExploreField { List get tags { if (!_tagsSet && _apiMapResponse.containsKey('tags')) { - _tags = _apiMapResponse['tags'] == null - ? null - : _apiMapResponse['tags'].map((i) => i as String).toList(); + _tags = + _apiMapResponse['tags']?.map((i) => i as String)?.toList(); _tagsSet = true; } return _tags; @@ -31075,9 +29817,7 @@ class LookmlModelExploreField { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -31093,13 +29833,9 @@ class LookmlModelExploreField { List get userAttributeFilterTypes { if (!_userAttributeFilterTypesSet && _apiMapResponse.containsKey('user_attribute_filter_types')) { - _userAttributeFilterTypes = - _apiMapResponse['user_attribute_filter_types'] == null - ? null - : _apiMapResponse['user_attribute_filter_types'] - .map( - (i) => i as UserAttributeFilterTypes) - .toList(); + _userAttributeFilterTypes = _apiMapResponse['user_attribute_filter_types'] + ?.map((i) => i as UserAttributeFilterTypes) + ?.toList(); _userAttributeFilterTypesSet = true; } return _userAttributeFilterTypes; @@ -31114,9 +29850,7 @@ class LookmlModelExploreField { String get valueFormat { if (!_valueFormatSet && _apiMapResponse.containsKey('value_format')) { - _valueFormat = _apiMapResponse['value_format'] == null - ? null - : _apiMapResponse['value_format'].toString(); + _valueFormat = _apiMapResponse['value_format']?.toString(); _valueFormatSet = true; } return _valueFormat; @@ -31131,9 +29865,7 @@ class LookmlModelExploreField { String get view { if (!_viewSet && _apiMapResponse.containsKey('view')) { - _view = _apiMapResponse['view'] == null - ? null - : _apiMapResponse['view'].toString(); + _view = _apiMapResponse['view']?.toString(); _viewSet = true; } return _view; @@ -31148,9 +29880,7 @@ class LookmlModelExploreField { String get viewLabel { if (!_viewLabelSet && _apiMapResponse.containsKey('view_label')) { - _viewLabel = _apiMapResponse['view_label'] == null - ? null - : _apiMapResponse['view_label'].toString(); + _viewLabel = _apiMapResponse['view_label']?.toString(); _viewLabelSet = true; } return _viewLabel; @@ -31211,9 +29941,7 @@ class LookmlModelExploreField { String get originalView { if (!_originalViewSet && _apiMapResponse.containsKey('original_view')) { - _originalView = _apiMapResponse['original_view'] == null - ? null - : _apiMapResponse['original_view'].toString(); + _originalView = _apiMapResponse['original_view']?.toString(); _originalViewSet = true; } return _originalView; @@ -31272,9 +30000,7 @@ class LookmlModelExploreField { json['dimension_group'] = dimensionGroup; } if (_enumerationsSet || _apiMapResponse.containsKey('enumerations')) { - json['enumerations'] = enumerations == null - ? null - : enumerations.map((i) => i.toJson()).toList(); + json['enumerations'] = enumerations?.map((i) => i.toJson())?.toList(); } if (_errorSet || _apiMapResponse.containsKey('error')) { json['error'] = error; @@ -31317,8 +30043,7 @@ class LookmlModelExploreField { json['can_time_filter'] = canTimeFilter; } if (_timeIntervalSet || _apiMapResponse.containsKey('time_interval')) { - json['time_interval'] = - timeInterval == null ? null : timeInterval.toJson(); + json['time_interval'] = timeInterval?.toJson(); } if (_labelSet || _apiMapResponse.containsKey('label')) { json['label'] = label; @@ -31334,7 +30059,7 @@ class LookmlModelExploreField { json['lookml_link'] = lookmlLink; } if (_mapLayerSet || _apiMapResponse.containsKey('map_layer')) { - json['map_layer'] = mapLayer == null ? null : mapLayer.toJson(); + json['map_layer'] = mapLayer?.toJson(); } if (_measureSet || _apiMapResponse.containsKey('measure')) { json['measure'] = measure; @@ -31378,12 +30103,10 @@ class LookmlModelExploreField { json['sql'] = sql; } if (_sqlCaseSet || _apiMapResponse.containsKey('sql_case')) { - json['sql_case'] = - sqlCase == null ? null : sqlCase.map((i) => i.toJson()).toList(); + json['sql_case'] = sqlCase?.map((i) => i.toJson())?.toList(); } if (_filtersSet || _apiMapResponse.containsKey('filters')) { - json['filters'] = - filters == null ? null : filters.map((i) => i.toJson()).toList(); + json['filters'] = filters?.map((i) => i.toJson())?.toList(); } if (_suggestDimensionSet || _apiMapResponse.containsKey('suggest_dimension')) { @@ -31448,9 +30171,7 @@ class LookmlModelExploreFieldEnumeration { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -31553,9 +30274,7 @@ class LookmlModelExploreFieldMapLayer { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -31570,9 +30289,7 @@ class LookmlModelExploreFieldMapLayer { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -31587,9 +30304,7 @@ class LookmlModelExploreFieldMapLayer { String get featureKey { if (!_featureKeySet && _apiMapResponse.containsKey('feature_key')) { - _featureKey = _apiMapResponse['feature_key'] == null - ? null - : _apiMapResponse['feature_key'].toString(); + _featureKey = _apiMapResponse['feature_key']?.toString(); _featureKeySet = true; } return _featureKey; @@ -31604,9 +30319,7 @@ class LookmlModelExploreFieldMapLayer { String get propertyKey { if (!_propertyKeySet && _apiMapResponse.containsKey('property_key')) { - _propertyKey = _apiMapResponse['property_key'] == null - ? null - : _apiMapResponse['property_key'].toString(); + _propertyKey = _apiMapResponse['property_key']?.toString(); _propertyKeySet = true; } return _propertyKey; @@ -31622,9 +30335,7 @@ class LookmlModelExploreFieldMapLayer { String get propertyLabelKey { if (!_propertyLabelKeySet && _apiMapResponse.containsKey('property_label_key')) { - _propertyLabelKey = _apiMapResponse['property_label_key'] == null - ? null - : _apiMapResponse['property_label_key'].toString(); + _propertyLabelKey = _apiMapResponse['property_label_key']?.toString(); _propertyLabelKeySet = true; } return _propertyLabelKey; @@ -31639,9 +30350,7 @@ class LookmlModelExploreFieldMapLayer { String get projection { if (!_projectionSet && _apiMapResponse.containsKey('projection')) { - _projection = _apiMapResponse['projection'] == null - ? null - : _apiMapResponse['projection'].toString(); + _projection = _apiMapResponse['projection']?.toString(); _projectionSet = true; } return _projection; @@ -31672,9 +30381,7 @@ class LookmlModelExploreFieldMapLayer { String get extentsJsonUrl { if (!_extentsJsonUrlSet && _apiMapResponse.containsKey('extents_json_url')) { - _extentsJsonUrl = _apiMapResponse['extents_json_url'] == null - ? null - : _apiMapResponse['extents_json_url'].toString(); + _extentsJsonUrl = _apiMapResponse['extents_json_url']?.toString(); _extentsJsonUrlSet = true; } return _extentsJsonUrl; @@ -31793,9 +30500,7 @@ class LookmlModelExploreFieldMeasureFilters { String get field { if (!_fieldSet && _apiMapResponse.containsKey('field')) { - _field = _apiMapResponse['field'] == null - ? null - : _apiMapResponse['field'].toString(); + _field = _apiMapResponse['field']?.toString(); _fieldSet = true; } return _field; @@ -31810,9 +30515,7 @@ class LookmlModelExploreFieldMeasureFilters { String get condition { if (!_conditionSet && _apiMapResponse.containsKey('condition')) { - _condition = _apiMapResponse['condition'] == null - ? null - : _apiMapResponse['condition'].toString(); + _condition = _apiMapResponse['condition']?.toString(); _conditionSet = true; } return _condition; @@ -31987,22 +30690,16 @@ class LookmlModelExploreFieldset { Map toJson() { var json = {}; if (_dimensionsSet || _apiMapResponse.containsKey('dimensions')) { - json['dimensions'] = dimensions == null - ? null - : dimensions.map((i) => i.toJson()).toList(); + json['dimensions'] = dimensions?.map((i) => i.toJson())?.toList(); } if (_measuresSet || _apiMapResponse.containsKey('measures')) { - json['measures'] = - measures == null ? null : measures.map((i) => i.toJson()).toList(); + json['measures'] = measures?.map((i) => i.toJson())?.toList(); } if (_filtersSet || _apiMapResponse.containsKey('filters')) { - json['filters'] = - filters == null ? null : filters.map((i) => i.toJson()).toList(); + json['filters'] = filters?.map((i) => i.toJson())?.toList(); } if (_parametersSet || _apiMapResponse.containsKey('parameters')) { - json['parameters'] = parameters == null - ? null - : parameters.map((i) => i.toJson()).toList(); + json['parameters'] = parameters?.map((i) => i.toJson())?.toList(); } return json; } @@ -32023,9 +30720,7 @@ class LookmlModelExploreFieldSqlCase { String get value { if (!_valueSet && _apiMapResponse.containsKey('value')) { - _value = _apiMapResponse['value'] == null - ? null - : _apiMapResponse['value'].toString(); + _value = _apiMapResponse['value']?.toString(); _valueSet = true; } return _value; @@ -32040,9 +30735,7 @@ class LookmlModelExploreFieldSqlCase { String get condition { if (!_conditionSet && _apiMapResponse.containsKey('condition')) { - _condition = _apiMapResponse['condition'] == null - ? null - : _apiMapResponse['condition'].toString(); + _condition = _apiMapResponse['condition']?.toString(); _conditionSet = true; } return _condition; @@ -32218,9 +30911,7 @@ class LookmlModelExploreJoins { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -32236,11 +30927,9 @@ class LookmlModelExploreJoins { List get dependentFields { if (!_dependentFieldsSet && _apiMapResponse.containsKey('dependent_fields')) { - _dependentFields = _apiMapResponse['dependent_fields'] == null - ? null - : _apiMapResponse['dependent_fields'] - .map((i) => i as String) - .toList(); + _dependentFields = _apiMapResponse['dependent_fields'] + ?.map((i) => i as String) + ?.toList(); _dependentFieldsSet = true; } return _dependentFields; @@ -32255,9 +30944,8 @@ class LookmlModelExploreJoins { List get fields { if (!_fieldsSet && _apiMapResponse.containsKey('fields')) { - _fields = _apiMapResponse['fields'] == null - ? null - : _apiMapResponse['fields'].map((i) => i as String).toList(); + _fields = + _apiMapResponse['fields']?.map((i) => i as String)?.toList(); _fieldsSet = true; } return _fields; @@ -32272,9 +30960,7 @@ class LookmlModelExploreJoins { String get foreignKey { if (!_foreignKeySet && _apiMapResponse.containsKey('foreign_key')) { - _foreignKey = _apiMapResponse['foreign_key'] == null - ? null - : _apiMapResponse['foreign_key'].toString(); + _foreignKey = _apiMapResponse['foreign_key']?.toString(); _foreignKeySet = true; } return _foreignKey; @@ -32289,9 +30975,7 @@ class LookmlModelExploreJoins { String get from { if (!_fromSet && _apiMapResponse.containsKey('from')) { - _from = _apiMapResponse['from'] == null - ? null - : _apiMapResponse['from'].toString(); + _from = _apiMapResponse['from']?.toString(); _fromSet = true; } return _from; @@ -32321,9 +31005,7 @@ class LookmlModelExploreJoins { String get relationship { if (!_relationshipSet && _apiMapResponse.containsKey('relationship')) { - _relationship = _apiMapResponse['relationship'] == null - ? null - : _apiMapResponse['relationship'].toString(); + _relationship = _apiMapResponse['relationship']?.toString(); _relationshipSet = true; } return _relationship; @@ -32338,11 +31020,9 @@ class LookmlModelExploreJoins { List get requiredJoins { if (!_requiredJoinsSet && _apiMapResponse.containsKey('required_joins')) { - _requiredJoins = _apiMapResponse['required_joins'] == null - ? null - : _apiMapResponse['required_joins'] - .map((i) => i as String) - .toList(); + _requiredJoins = _apiMapResponse['required_joins'] + ?.map((i) => i as String) + ?.toList(); _requiredJoinsSet = true; } return _requiredJoins; @@ -32357,9 +31037,7 @@ class LookmlModelExploreJoins { String get sqlForeignKey { if (!_sqlForeignKeySet && _apiMapResponse.containsKey('sql_foreign_key')) { - _sqlForeignKey = _apiMapResponse['sql_foreign_key'] == null - ? null - : _apiMapResponse['sql_foreign_key'].toString(); + _sqlForeignKey = _apiMapResponse['sql_foreign_key']?.toString(); _sqlForeignKeySet = true; } return _sqlForeignKey; @@ -32374,9 +31052,7 @@ class LookmlModelExploreJoins { String get sqlOn { if (!_sqlOnSet && _apiMapResponse.containsKey('sql_on')) { - _sqlOn = _apiMapResponse['sql_on'] == null - ? null - : _apiMapResponse['sql_on'].toString(); + _sqlOn = _apiMapResponse['sql_on']?.toString(); _sqlOnSet = true; } return _sqlOn; @@ -32391,9 +31067,7 @@ class LookmlModelExploreJoins { String get sqlTableName { if (!_sqlTableNameSet && _apiMapResponse.containsKey('sql_table_name')) { - _sqlTableName = _apiMapResponse['sql_table_name'] == null - ? null - : _apiMapResponse['sql_table_name'].toString(); + _sqlTableName = _apiMapResponse['sql_table_name']?.toString(); _sqlTableNameSet = true; } return _sqlTableName; @@ -32408,9 +31082,7 @@ class LookmlModelExploreJoins { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -32425,9 +31097,7 @@ class LookmlModelExploreJoins { String get viewLabel { if (!_viewLabelSet && _apiMapResponse.containsKey('view_label')) { - _viewLabel = _apiMapResponse['view_label'] == null - ? null - : _apiMapResponse['view_label'].toString(); + _viewLabel = _apiMapResponse['view_label']?.toString(); _viewLabelSet = true; } return _viewLabel; @@ -32525,9 +31195,7 @@ class LookmlModelExploreSet { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -32542,9 +31210,8 @@ class LookmlModelExploreSet { List get value { if (!_valueSet && _apiMapResponse.containsKey('value')) { - _value = _apiMapResponse['value'] == null - ? null - : _apiMapResponse['value'].map((i) => i as String).toList(); + _value = + _apiMapResponse['value']?.map((i) => i as String)?.toList(); _valueSet = true; } return _value; @@ -32608,9 +31275,7 @@ class LookmlModelExploreSupportedMeasureType { String get dimensionType { if (!_dimensionTypeSet && _apiMapResponse.containsKey('dimension_type')) { - _dimensionType = _apiMapResponse['dimension_type'] == null - ? null - : _apiMapResponse['dimension_type'].toString(); + _dimensionType = _apiMapResponse['dimension_type']?.toString(); _dimensionTypeSet = true; } return _dimensionType; @@ -32625,11 +31290,9 @@ class LookmlModelExploreSupportedMeasureType { List get measureTypes { if (!_measureTypesSet && _apiMapResponse.containsKey('measure_types')) { - _measureTypes = _apiMapResponse['measure_types'] == null - ? null - : _apiMapResponse['measure_types'] - .map((i) => i as String) - .toList(); + _measureTypes = _apiMapResponse['measure_types'] + ?.map((i) => i as String) + ?.toList(); _measureTypesSet = true; } return _measureTypes; @@ -32702,9 +31365,7 @@ class LookmlModelNavExplore { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -32719,9 +31380,7 @@ class LookmlModelNavExplore { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -32736,9 +31395,7 @@ class LookmlModelNavExplore { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -32768,9 +31425,7 @@ class LookmlModelNavExplore { String get groupLabel { if (!_groupLabelSet && _apiMapResponse.containsKey('group_label')) { - _groupLabel = _apiMapResponse['group_label'] == null - ? null - : _apiMapResponse['group_label'].toString(); + _groupLabel = _apiMapResponse['group_label']?.toString(); _groupLabelSet = true; } return _groupLabel; @@ -32873,9 +31528,7 @@ class LookmlTest { String get modelName { if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { - _modelName = _apiMapResponse['model_name'] == null - ? null - : _apiMapResponse['model_name'].toString(); + _modelName = _apiMapResponse['model_name']?.toString(); _modelNameSet = true; } return _modelName; @@ -32890,9 +31543,7 @@ class LookmlTest { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -32907,9 +31558,7 @@ class LookmlTest { String get exploreName { if (!_exploreNameSet && _apiMapResponse.containsKey('explore_name')) { - _exploreName = _apiMapResponse['explore_name'] == null - ? null - : _apiMapResponse['explore_name'].toString(); + _exploreName = _apiMapResponse['explore_name']?.toString(); _exploreNameSet = true; } return _exploreName; @@ -32925,9 +31574,7 @@ class LookmlTest { String get queryUrlParams { if (!_queryUrlParamsSet && _apiMapResponse.containsKey('query_url_params')) { - _queryUrlParams = _apiMapResponse['query_url_params'] == null - ? null - : _apiMapResponse['query_url_params'].toString(); + _queryUrlParams = _apiMapResponse['query_url_params']?.toString(); _queryUrlParamsSet = true; } return _queryUrlParams; @@ -32942,9 +31589,7 @@ class LookmlTest { String get file { if (!_fileSet && _apiMapResponse.containsKey('file')) { - _file = _apiMapResponse['file'] == null - ? null - : _apiMapResponse['file'].toString(); + _file = _apiMapResponse['file']?.toString(); _fileSet = true; } return _file; @@ -33071,9 +31716,7 @@ class LookmlTestResult { String get modelName { if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { - _modelName = _apiMapResponse['model_name'] == null - ? null - : _apiMapResponse['model_name'].toString(); + _modelName = _apiMapResponse['model_name']?.toString(); _modelNameSet = true; } return _modelName; @@ -33088,9 +31731,7 @@ class LookmlTestResult { String get testName { if (!_testNameSet && _apiMapResponse.containsKey('test_name')) { - _testName = _apiMapResponse['test_name'] == null - ? null - : _apiMapResponse['test_name'].toString(); + _testName = _apiMapResponse['test_name']?.toString(); _testNameSet = true; } return _testName; @@ -33232,12 +31873,10 @@ class LookmlTestResult { json['assertions_failed'] = assertionsFailed; } if (_errorsSet || _apiMapResponse.containsKey('errors')) { - json['errors'] = - errors == null ? null : errors.map((i) => i.toJson()).toList(); + json['errors'] = errors?.map((i) => i.toJson())?.toList(); } if (_warningsSet || _apiMapResponse.containsKey('warnings')) { - json['warnings'] = - warnings == null ? null : warnings.map((i) => i.toJson()).toList(); + json['warnings'] = warnings?.map((i) => i.toJson())?.toList(); } if (_successSet || _apiMapResponse.containsKey('success')) { json['success'] = success; @@ -33261,9 +31900,7 @@ class LookModel { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -33278,9 +31915,7 @@ class LookModel { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -33461,9 +32096,7 @@ class LookWithDashboards { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -33478,9 +32111,7 @@ class LookWithDashboards { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -33590,9 +32221,7 @@ class LookWithDashboards { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -33607,9 +32236,7 @@ class LookWithDashboards { String get embedUrl { if (!_embedUrlSet && _apiMapResponse.containsKey('embed_url')) { - _embedUrl = _apiMapResponse['embed_url'] == null - ? null - : _apiMapResponse['embed_url'].toString(); + _embedUrl = _apiMapResponse['embed_url']?.toString(); _embedUrlSet = true; } return _embedUrl; @@ -33624,9 +32251,7 @@ class LookWithDashboards { String get excelFileUrl { if (!_excelFileUrlSet && _apiMapResponse.containsKey('excel_file_url')) { - _excelFileUrl = _apiMapResponse['excel_file_url'] == null - ? null - : _apiMapResponse['excel_file_url'].toString(); + _excelFileUrl = _apiMapResponse['excel_file_url']?.toString(); _excelFileUrlSet = true; } return _excelFileUrl; @@ -33658,9 +32283,7 @@ class LookWithDashboards { if (!_googleSpreadsheetFormulaSet && _apiMapResponse.containsKey('google_spreadsheet_formula')) { _googleSpreadsheetFormula = - _apiMapResponse['google_spreadsheet_formula'] == null - ? null - : _apiMapResponse['google_spreadsheet_formula'].toString(); + _apiMapResponse['google_spreadsheet_formula']?.toString(); _googleSpreadsheetFormulaSet = true; } return _googleSpreadsheetFormula; @@ -33675,9 +32298,7 @@ class LookWithDashboards { String get imageEmbedUrl { if (!_imageEmbedUrlSet && _apiMapResponse.containsKey('image_embed_url')) { - _imageEmbedUrl = _apiMapResponse['image_embed_url'] == null - ? null - : _apiMapResponse['image_embed_url'].toString(); + _imageEmbedUrl = _apiMapResponse['image_embed_url']?.toString(); _imageEmbedUrlSet = true; } return _imageEmbedUrl; @@ -33788,9 +32409,7 @@ class LookWithDashboards { String get publicSlug { if (!_publicSlugSet && _apiMapResponse.containsKey('public_slug')) { - _publicSlug = _apiMapResponse['public_slug'] == null - ? null - : _apiMapResponse['public_slug'].toString(); + _publicSlug = _apiMapResponse['public_slug']?.toString(); _publicSlugSet = true; } return _publicSlug; @@ -33805,9 +32424,7 @@ class LookWithDashboards { String get publicUrl { if (!_publicUrlSet && _apiMapResponse.containsKey('public_url')) { - _publicUrl = _apiMapResponse['public_url'] == null - ? null - : _apiMapResponse['public_url'].toString(); + _publicUrl = _apiMapResponse['public_url']?.toString(); _publicUrlSet = true; } return _publicUrl; @@ -33837,9 +32454,7 @@ class LookWithDashboards { String get shortUrl { if (!_shortUrlSet && _apiMapResponse.containsKey('short_url')) { - _shortUrl = _apiMapResponse['short_url'] == null - ? null - : _apiMapResponse['short_url'].toString(); + _shortUrl = _apiMapResponse['short_url']?.toString(); _shortUrlSet = true; } return _shortUrl; @@ -33870,9 +32485,7 @@ class LookWithDashboards { String get folderId { if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { - _folderId = _apiMapResponse['folder_id'] == null - ? null - : _apiMapResponse['folder_id'].toString(); + _folderId = _apiMapResponse['folder_id']?.toString(); _folderIdSet = true; } return _folderId; @@ -33983,15 +32596,13 @@ class LookWithDashboards { json['content_favorite_id'] = contentFavoriteId; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } if (_deletedSet || _apiMapResponse.containsKey('deleted')) { json['deleted'] = deleted; } if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { - json['deleted_at'] = - deletedAt == null ? null : deletedAt.toIso8601String(); + json['deleted_at'] = deletedAt?.toIso8601String(); } if (_deleterIdSet || _apiMapResponse.containsKey('deleter_id')) { json['deleter_id'] = deleterId; @@ -34019,18 +32630,16 @@ class LookWithDashboards { json['is_run_on_load'] = isRunOnLoad; } if (_lastAccessedAtSet || _apiMapResponse.containsKey('last_accessed_at')) { - json['last_accessed_at'] = - lastAccessedAt == null ? null : lastAccessedAt.toIso8601String(); + json['last_accessed_at'] = lastAccessedAt?.toIso8601String(); } if (_lastUpdaterIdSet || _apiMapResponse.containsKey('last_updater_id')) { json['last_updater_id'] = lastUpdaterId; } if (_lastViewedAtSet || _apiMapResponse.containsKey('last_viewed_at')) { - json['last_viewed_at'] = - lastViewedAt == null ? null : lastViewedAt.toIso8601String(); + json['last_viewed_at'] = lastViewedAt?.toIso8601String(); } if (_modelSet || _apiMapResponse.containsKey('model')) { - json['model'] = model == null ? null : model.toJson(); + json['model'] = model?.toJson(); } if (_publicSet || _apiMapResponse.containsKey('public')) { json['public'] = public; @@ -34048,22 +32657,19 @@ class LookWithDashboards { json['short_url'] = shortUrl; } if (_folderSet || _apiMapResponse.containsKey('folder')) { - json['folder'] = folder == null ? null : folder.toJson(); + json['folder'] = folder?.toJson(); } if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { json['folder_id'] = folderId; } if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { - json['updated_at'] = - updatedAt == null ? null : updatedAt.toIso8601String(); + json['updated_at'] = updatedAt?.toIso8601String(); } if (_viewCountSet || _apiMapResponse.containsKey('view_count')) { json['view_count'] = viewCount; } if (_dashboardsSet || _apiMapResponse.containsKey('dashboards')) { - json['dashboards'] = dashboards == null - ? null - : dashboards.map((i) => i.toJson()).toList(); + json['dashboards'] = dashboards?.map((i) => i.toJson())?.toList(); } return json; } @@ -34205,9 +32811,7 @@ class LookWithQuery { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -34222,9 +32826,7 @@ class LookWithQuery { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -34334,9 +32936,7 @@ class LookWithQuery { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -34351,9 +32951,7 @@ class LookWithQuery { String get embedUrl { if (!_embedUrlSet && _apiMapResponse.containsKey('embed_url')) { - _embedUrl = _apiMapResponse['embed_url'] == null - ? null - : _apiMapResponse['embed_url'].toString(); + _embedUrl = _apiMapResponse['embed_url']?.toString(); _embedUrlSet = true; } return _embedUrl; @@ -34368,9 +32966,7 @@ class LookWithQuery { String get excelFileUrl { if (!_excelFileUrlSet && _apiMapResponse.containsKey('excel_file_url')) { - _excelFileUrl = _apiMapResponse['excel_file_url'] == null - ? null - : _apiMapResponse['excel_file_url'].toString(); + _excelFileUrl = _apiMapResponse['excel_file_url']?.toString(); _excelFileUrlSet = true; } return _excelFileUrl; @@ -34402,9 +32998,7 @@ class LookWithQuery { if (!_googleSpreadsheetFormulaSet && _apiMapResponse.containsKey('google_spreadsheet_formula')) { _googleSpreadsheetFormula = - _apiMapResponse['google_spreadsheet_formula'] == null - ? null - : _apiMapResponse['google_spreadsheet_formula'].toString(); + _apiMapResponse['google_spreadsheet_formula']?.toString(); _googleSpreadsheetFormulaSet = true; } return _googleSpreadsheetFormula; @@ -34419,9 +33013,7 @@ class LookWithQuery { String get imageEmbedUrl { if (!_imageEmbedUrlSet && _apiMapResponse.containsKey('image_embed_url')) { - _imageEmbedUrl = _apiMapResponse['image_embed_url'] == null - ? null - : _apiMapResponse['image_embed_url'].toString(); + _imageEmbedUrl = _apiMapResponse['image_embed_url']?.toString(); _imageEmbedUrlSet = true; } return _imageEmbedUrl; @@ -34532,9 +33124,7 @@ class LookWithQuery { String get publicSlug { if (!_publicSlugSet && _apiMapResponse.containsKey('public_slug')) { - _publicSlug = _apiMapResponse['public_slug'] == null - ? null - : _apiMapResponse['public_slug'].toString(); + _publicSlug = _apiMapResponse['public_slug']?.toString(); _publicSlugSet = true; } return _publicSlug; @@ -34549,9 +33139,7 @@ class LookWithQuery { String get publicUrl { if (!_publicUrlSet && _apiMapResponse.containsKey('public_url')) { - _publicUrl = _apiMapResponse['public_url'] == null - ? null - : _apiMapResponse['public_url'].toString(); + _publicUrl = _apiMapResponse['public_url']?.toString(); _publicUrlSet = true; } return _publicUrl; @@ -34581,9 +33169,7 @@ class LookWithQuery { String get shortUrl { if (!_shortUrlSet && _apiMapResponse.containsKey('short_url')) { - _shortUrl = _apiMapResponse['short_url'] == null - ? null - : _apiMapResponse['short_url'].toString(); + _shortUrl = _apiMapResponse['short_url']?.toString(); _shortUrlSet = true; } return _shortUrl; @@ -34614,9 +33200,7 @@ class LookWithQuery { String get folderId { if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { - _folderId = _apiMapResponse['folder_id'] == null - ? null - : _apiMapResponse['folder_id'].toString(); + _folderId = _apiMapResponse['folder_id']?.toString(); _folderIdSet = true; } return _folderId; @@ -34679,9 +33263,7 @@ class LookWithQuery { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -34741,15 +33323,13 @@ class LookWithQuery { json['content_favorite_id'] = contentFavoriteId; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } if (_deletedSet || _apiMapResponse.containsKey('deleted')) { json['deleted'] = deleted; } if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { - json['deleted_at'] = - deletedAt == null ? null : deletedAt.toIso8601String(); + json['deleted_at'] = deletedAt?.toIso8601String(); } if (_deleterIdSet || _apiMapResponse.containsKey('deleter_id')) { json['deleter_id'] = deleterId; @@ -34777,18 +33357,16 @@ class LookWithQuery { json['is_run_on_load'] = isRunOnLoad; } if (_lastAccessedAtSet || _apiMapResponse.containsKey('last_accessed_at')) { - json['last_accessed_at'] = - lastAccessedAt == null ? null : lastAccessedAt.toIso8601String(); + json['last_accessed_at'] = lastAccessedAt?.toIso8601String(); } if (_lastUpdaterIdSet || _apiMapResponse.containsKey('last_updater_id')) { json['last_updater_id'] = lastUpdaterId; } if (_lastViewedAtSet || _apiMapResponse.containsKey('last_viewed_at')) { - json['last_viewed_at'] = - lastViewedAt == null ? null : lastViewedAt.toIso8601String(); + json['last_viewed_at'] = lastViewedAt?.toIso8601String(); } if (_modelSet || _apiMapResponse.containsKey('model')) { - json['model'] = model == null ? null : model.toJson(); + json['model'] = model?.toJson(); } if (_publicSet || _apiMapResponse.containsKey('public')) { json['public'] = public; @@ -34806,20 +33384,19 @@ class LookWithQuery { json['short_url'] = shortUrl; } if (_folderSet || _apiMapResponse.containsKey('folder')) { - json['folder'] = folder == null ? null : folder.toJson(); + json['folder'] = folder?.toJson(); } if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { json['folder_id'] = folderId; } if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { - json['updated_at'] = - updatedAt == null ? null : updatedAt.toIso8601String(); + json['updated_at'] = updatedAt?.toIso8601String(); } if (_viewCountSet || _apiMapResponse.containsKey('view_count')) { json['view_count'] = viewCount; } if (_querySet || _apiMapResponse.containsKey('query')) { - json['query'] = query == null ? null : query.toJson(); + json['query'] = query?.toJson(); } if (_urlSet || _apiMapResponse.containsKey('url')) { json['url'] = url; @@ -34864,9 +33441,7 @@ class Manifest { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -34948,13 +33523,11 @@ class Manifest { json['name'] = name; } if (_importsSet || _apiMapResponse.containsKey('imports')) { - json['imports'] = - imports == null ? null : imports.map((i) => i.toJson()).toList(); + json['imports'] = imports?.map((i) => i.toJson())?.toList(); } if (_localizationSettingsSet || _apiMapResponse.containsKey('localization_settings')) { - json['localization_settings'] = - localizationSettings == null ? null : localizationSettings.toJson(); + json['localization_settings'] = localizationSettings?.toJson(); } return json; } @@ -34975,9 +33548,7 @@ class MergeFields { String get fieldName { if (!_fieldNameSet && _apiMapResponse.containsKey('field_name')) { - _fieldName = _apiMapResponse['field_name'] == null - ? null - : _apiMapResponse['field_name'].toString(); + _fieldName = _apiMapResponse['field_name']?.toString(); _fieldNameSet = true; } return _fieldName; @@ -34993,9 +33564,7 @@ class MergeFields { String get sourceFieldName { if (!_sourceFieldNameSet && _apiMapResponse.containsKey('source_field_name')) { - _sourceFieldName = _apiMapResponse['source_field_name'] == null - ? null - : _apiMapResponse['source_field_name'].toString(); + _sourceFieldName = _apiMapResponse['source_field_name']?.toString(); _sourceFieldNameSet = true; } return _sourceFieldName; @@ -35099,9 +33668,7 @@ class MergeQuery { String get columnLimit { if (!_columnLimitSet && _apiMapResponse.containsKey('column_limit')) { - _columnLimit = _apiMapResponse['column_limit'] == null - ? null - : _apiMapResponse['column_limit'].toString(); + _columnLimit = _apiMapResponse['column_limit']?.toString(); _columnLimitSet = true; } return _columnLimit; @@ -35116,9 +33683,7 @@ class MergeQuery { String get dynamicFields { if (!_dynamicFieldsSet && _apiMapResponse.containsKey('dynamic_fields')) { - _dynamicFields = _apiMapResponse['dynamic_fields'] == null - ? null - : _apiMapResponse['dynamic_fields'].toString(); + _dynamicFields = _apiMapResponse['dynamic_fields']?.toString(); _dynamicFieldsSet = true; } return _dynamicFields; @@ -35133,9 +33698,7 @@ class MergeQuery { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -35150,9 +33713,8 @@ class MergeQuery { List get pivots { if (!_pivotsSet && _apiMapResponse.containsKey('pivots')) { - _pivots = _apiMapResponse['pivots'] == null - ? null - : _apiMapResponse['pivots'].map((i) => i as String).toList(); + _pivots = + _apiMapResponse['pivots']?.map((i) => i as String)?.toList(); _pivotsSet = true; } return _pivots; @@ -35182,9 +33744,8 @@ class MergeQuery { List get sorts { if (!_sortsSet && _apiMapResponse.containsKey('sorts')) { - _sorts = _apiMapResponse['sorts'] == null - ? null - : _apiMapResponse['sorts'].map((i) => i as String).toList(); + _sorts = + _apiMapResponse['sorts']?.map((i) => i as String)?.toList(); _sortsSet = true; } return _sorts; @@ -35295,9 +33856,7 @@ class MergeQuery { json['sorts'] = sorts; } if (_sourceQueriesSet || _apiMapResponse.containsKey('source_queries')) { - json['source_queries'] = sourceQueries == null - ? null - : sourceQueries.map((i) => i.toJson()).toList(); + json['source_queries'] = sourceQueries?.map((i) => i.toJson())?.toList(); } if (_totalSet || _apiMapResponse.containsKey('total')) { json['total'] = total; @@ -35346,9 +33905,7 @@ class MergeQuerySourceQuery { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -35403,9 +33960,7 @@ class MergeQuerySourceQuery { Map toJson() { var json = {}; if (_mergeFieldsSet || _apiMapResponse.containsKey('merge_fields')) { - json['merge_fields'] = mergeFields == null - ? null - : mergeFields.map((i) => i.toJson()).toList(); + json['merge_fields'] = mergeFields?.map((i) => i.toJson())?.toList(); } if (_nameSet || _apiMapResponse.containsKey('name')) { json['name'] = name; @@ -35519,9 +34074,7 @@ class Model { String get connection { if (!_connectionSet && _apiMapResponse.containsKey('connection')) { - _connection = _apiMapResponse['connection'] == null - ? null - : _apiMapResponse['connection'].toString(); + _connection = _apiMapResponse['connection']?.toString(); _connectionSet = true; } return _connection; @@ -35536,9 +34089,7 @@ class Model { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -35603,9 +34154,7 @@ class Model { json['name'] = name; } if (_valueFormatsSet || _apiMapResponse.containsKey('value_formats')) { - json['value_formats'] = valueFormats == null - ? null - : valueFormats.map((i) => i.toJson()).toList(); + json['value_formats'] = valueFormats?.map((i) => i.toJson())?.toList(); } return json; } @@ -35635,11 +34184,9 @@ class ModelFieldSuggestions { List get suggestions { if (!_suggestionsSet && _apiMapResponse.containsKey('suggestions')) { - _suggestions = _apiMapResponse['suggestions'] == null - ? null - : _apiMapResponse['suggestions'] - .map((i) => i as String) - .toList(); + _suggestions = _apiMapResponse['suggestions'] + ?.map((i) => i as String) + ?.toList(); _suggestionsSet = true; } return _suggestions; @@ -35654,9 +34201,7 @@ class ModelFieldSuggestions { String get error { if (!_errorSet && _apiMapResponse.containsKey('error')) { - _error = _apiMapResponse['error'] == null - ? null - : _apiMapResponse['error'].toString(); + _error = _apiMapResponse['error']?.toString(); _errorSet = true; } return _error; @@ -35783,9 +34328,7 @@ class ModelNamedValueFormats { String get formatString { if (!_formatStringSet && _apiMapResponse.containsKey('format_string')) { - _formatString = _apiMapResponse['format_string'] == null - ? null - : _apiMapResponse['format_string'].toString(); + _formatString = _apiMapResponse['format_string']?.toString(); _formatStringSet = true; } return _formatString; @@ -35800,9 +34343,7 @@ class ModelNamedValueFormats { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -35817,9 +34358,7 @@ class ModelNamedValueFormats { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -35979,9 +34518,8 @@ class ModelSet { List get models { if (!_modelsSet && _apiMapResponse.containsKey('models')) { - _models = _apiMapResponse['models'] == null - ? null - : _apiMapResponse['models'].map((i) => i as String).toList(); + _models = + _apiMapResponse['models']?.map((i) => i as String)?.toList(); _modelsSet = true; } return _models; @@ -35996,9 +34534,7 @@ class ModelSet { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -36013,9 +34549,7 @@ class ModelSet { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -36093,9 +34627,7 @@ class ModelsNotValidated { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -36110,9 +34642,7 @@ class ModelsNotValidated { String get projectFileId { if (!_projectFileIdSet && _apiMapResponse.containsKey('project_file_id')) { - _projectFileId = _apiMapResponse['project_file_id'] == null - ? null - : _apiMapResponse['project_file_id'].toString(); + _projectFileId = _apiMapResponse['project_file_id']?.toString(); _projectFileIdSet = true; } return _projectFileId; @@ -36290,9 +34820,7 @@ class OauthClientApp { String get clientGuid { if (!_clientGuidSet && _apiMapResponse.containsKey('client_guid')) { - _clientGuid = _apiMapResponse['client_guid'] == null - ? null - : _apiMapResponse['client_guid'].toString(); + _clientGuid = _apiMapResponse['client_guid']?.toString(); _clientGuidSet = true; } return _clientGuid; @@ -36307,9 +34835,7 @@ class OauthClientApp { String get redirectUri { if (!_redirectUriSet && _apiMapResponse.containsKey('redirect_uri')) { - _redirectUri = _apiMapResponse['redirect_uri'] == null - ? null - : _apiMapResponse['redirect_uri'].toString(); + _redirectUri = _apiMapResponse['redirect_uri']?.toString(); _redirectUriSet = true; } return _redirectUri; @@ -36324,9 +34850,7 @@ class OauthClientApp { String get displayName { if (!_displayNameSet && _apiMapResponse.containsKey('display_name')) { - _displayName = _apiMapResponse['display_name'] == null - ? null - : _apiMapResponse['display_name'].toString(); + _displayName = _apiMapResponse['display_name']?.toString(); _displayNameSet = true; } return _displayName; @@ -36341,9 +34865,7 @@ class OauthClientApp { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -36472,14 +34994,11 @@ class OauthClientApp { } if (_tokensInvalidBeforeSet || _apiMapResponse.containsKey('tokens_invalid_before')) { - json['tokens_invalid_before'] = tokensInvalidBefore == null - ? null - : tokensInvalidBefore.toIso8601String(); + json['tokens_invalid_before'] = tokensInvalidBefore?.toIso8601String(); } if (_activatedUsersSet || _apiMapResponse.containsKey('activated_users')) { - json['activated_users'] = activatedUsers == null - ? null - : activatedUsers.map((i) => i.toJson()).toList(); + json['activated_users'] = + activatedUsers?.map((i) => i.toJson())?.toList(); } return json; } @@ -36625,9 +35144,7 @@ class OIDCConfig { String get audience { if (!_audienceSet && _apiMapResponse.containsKey('audience')) { - _audience = _apiMapResponse['audience'] == null - ? null - : _apiMapResponse['audience'].toString(); + _audience = _apiMapResponse['audience']?.toString(); _audienceSet = true; } return _audience; @@ -36659,9 +35176,8 @@ class OIDCConfig { String get authorizationEndpoint { if (!_authorizationEndpointSet && _apiMapResponse.containsKey('authorization_endpoint')) { - _authorizationEndpoint = _apiMapResponse['authorization_endpoint'] == null - ? null - : _apiMapResponse['authorization_endpoint'].toString(); + _authorizationEndpoint = + _apiMapResponse['authorization_endpoint']?.toString(); _authorizationEndpointSet = true; } return _authorizationEndpoint; @@ -36677,12 +35193,9 @@ class OIDCConfig { List get defaultNewUserGroupIds { if (!_defaultNewUserGroupIdsSet && _apiMapResponse.containsKey('default_new_user_group_ids')) { - _defaultNewUserGroupIds = - _apiMapResponse['default_new_user_group_ids'] == null - ? null - : _apiMapResponse['default_new_user_group_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserGroupIds = _apiMapResponse['default_new_user_group_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserGroupIdsSet = true; } return _defaultNewUserGroupIds; @@ -36718,12 +35231,9 @@ class OIDCConfig { List get defaultNewUserRoleIds { if (!_defaultNewUserRoleIdsSet && _apiMapResponse.containsKey('default_new_user_role_ids')) { - _defaultNewUserRoleIds = - _apiMapResponse['default_new_user_role_ids'] == null - ? null - : _apiMapResponse['default_new_user_role_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserRoleIds = _apiMapResponse['default_new_user_role_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserRoleIdsSet = true; } return _defaultNewUserRoleIds; @@ -36793,9 +35303,7 @@ class OIDCConfig { String get groupsAttribute { if (!_groupsAttributeSet && _apiMapResponse.containsKey('groups_attribute')) { - _groupsAttribute = _apiMapResponse['groups_attribute'] == null - ? null - : _apiMapResponse['groups_attribute'].toString(); + _groupsAttribute = _apiMapResponse['groups_attribute']?.toString(); _groupsAttributeSet = true; } return _groupsAttribute; @@ -36831,9 +35339,7 @@ class OIDCConfig { String get identifier { if (!_identifierSet && _apiMapResponse.containsKey('identifier')) { - _identifier = _apiMapResponse['identifier'] == null - ? null - : _apiMapResponse['identifier'].toString(); + _identifier = _apiMapResponse['identifier']?.toString(); _identifierSet = true; } return _identifier; @@ -36848,9 +35354,7 @@ class OIDCConfig { String get issuer { if (!_issuerSet && _apiMapResponse.containsKey('issuer')) { - _issuer = _apiMapResponse['issuer'] == null - ? null - : _apiMapResponse['issuer'].toString(); + _issuer = _apiMapResponse['issuer']?.toString(); _issuerSet = true; } return _issuer; @@ -36899,9 +35403,7 @@ class OIDCConfig { if (!_newUserMigrationTypesSet && _apiMapResponse.containsKey('new_user_migration_types')) { _newUserMigrationTypes = - _apiMapResponse['new_user_migration_types'] == null - ? null - : _apiMapResponse['new_user_migration_types'].toString(); + _apiMapResponse['new_user_migration_types']?.toString(); _newUserMigrationTypesSet = true; } return _newUserMigrationTypes; @@ -36916,9 +35418,8 @@ class OIDCConfig { List get scopes { if (!_scopesSet && _apiMapResponse.containsKey('scopes')) { - _scopes = _apiMapResponse['scopes'] == null - ? null - : _apiMapResponse['scopes'].map((i) => i as String).toList(); + _scopes = + _apiMapResponse['scopes']?.map((i) => i as String)?.toList(); _scopesSet = true; } return _scopes; @@ -36933,9 +35434,7 @@ class OIDCConfig { String get secret { if (!_secretSet && _apiMapResponse.containsKey('secret')) { - _secret = _apiMapResponse['secret'] == null - ? null - : _apiMapResponse['secret'].toString(); + _secret = _apiMapResponse['secret']?.toString(); _secretSet = true; } return _secret; @@ -36966,9 +35465,7 @@ class OIDCConfig { String get testSlug { if (!_testSlugSet && _apiMapResponse.containsKey('test_slug')) { - _testSlug = _apiMapResponse['test_slug'] == null - ? null - : _apiMapResponse['test_slug'].toString(); + _testSlug = _apiMapResponse['test_slug']?.toString(); _testSlugSet = true; } return _testSlug; @@ -36983,9 +35480,7 @@ class OIDCConfig { String get tokenEndpoint { if (!_tokenEndpointSet && _apiMapResponse.containsKey('token_endpoint')) { - _tokenEndpoint = _apiMapResponse['token_endpoint'] == null - ? null - : _apiMapResponse['token_endpoint'].toString(); + _tokenEndpoint = _apiMapResponse['token_endpoint']?.toString(); _tokenEndpointSet = true; } return _tokenEndpoint; @@ -37002,9 +35497,7 @@ class OIDCConfig { if (!_userAttributeMapEmailSet && _apiMapResponse.containsKey('user_attribute_map_email')) { _userAttributeMapEmail = - _apiMapResponse['user_attribute_map_email'] == null - ? null - : _apiMapResponse['user_attribute_map_email'].toString(); + _apiMapResponse['user_attribute_map_email']?.toString(); _userAttributeMapEmailSet = true; } return _userAttributeMapEmail; @@ -37021,9 +35514,7 @@ class OIDCConfig { if (!_userAttributeMapFirstNameSet && _apiMapResponse.containsKey('user_attribute_map_first_name')) { _userAttributeMapFirstName = - _apiMapResponse['user_attribute_map_first_name'] == null - ? null - : _apiMapResponse['user_attribute_map_first_name'].toString(); + _apiMapResponse['user_attribute_map_first_name']?.toString(); _userAttributeMapFirstNameSet = true; } return _userAttributeMapFirstName; @@ -37040,9 +35531,7 @@ class OIDCConfig { if (!_userAttributeMapLastNameSet && _apiMapResponse.containsKey('user_attribute_map_last_name')) { _userAttributeMapLastName = - _apiMapResponse['user_attribute_map_last_name'] == null - ? null - : _apiMapResponse['user_attribute_map_last_name'].toString(); + _apiMapResponse['user_attribute_map_last_name']?.toString(); _userAttributeMapLastNameSet = true; } return _userAttributeMapLastName; @@ -37100,9 +35589,7 @@ class OIDCConfig { String get userinfoEndpoint { if (!_userinfoEndpointSet && _apiMapResponse.containsKey('userinfo_endpoint')) { - _userinfoEndpoint = _apiMapResponse['userinfo_endpoint'] == null - ? null - : _apiMapResponse['userinfo_endpoint'].toString(); + _userinfoEndpoint = _apiMapResponse['userinfo_endpoint']?.toString(); _userinfoEndpointSet = true; } return _userinfoEndpoint; @@ -37167,9 +35654,7 @@ class OIDCConfig { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -37232,9 +35717,8 @@ class OIDCConfig { } if (_defaultNewUserGroupsSet || _apiMapResponse.containsKey('default_new_user_groups')) { - json['default_new_user_groups'] = defaultNewUserGroups == null - ? null - : defaultNewUserGroups.map((i) => i.toJson()).toList(); + json['default_new_user_groups'] = + defaultNewUserGroups?.map((i) => i.toJson())?.toList(); } if (_defaultNewUserRoleIdsSet || _apiMapResponse.containsKey('default_new_user_role_ids')) { @@ -37242,16 +35726,14 @@ class OIDCConfig { } if (_defaultNewUserRolesSet || _apiMapResponse.containsKey('default_new_user_roles')) { - json['default_new_user_roles'] = defaultNewUserRoles == null - ? null - : defaultNewUserRoles.map((i) => i.toJson()).toList(); + json['default_new_user_roles'] = + defaultNewUserRoles?.map((i) => i.toJson())?.toList(); } if (_enabledSet || _apiMapResponse.containsKey('enabled')) { json['enabled'] = enabled; } if (_groupsSet || _apiMapResponse.containsKey('groups')) { - json['groups'] = - groups == null ? null : groups.map((i) => i.toJson()).toList(); + json['groups'] = groups?.map((i) => i.toJson())?.toList(); } if (_groupsAttributeSet || _apiMapResponse.containsKey('groups_attribute')) { @@ -37259,9 +35741,8 @@ class OIDCConfig { } if (_groupsWithRoleIdsSet || _apiMapResponse.containsKey('groups_with_role_ids')) { - json['groups_with_role_ids'] = groupsWithRoleIds == null - ? null - : groupsWithRoleIds.map((i) => i.toJson()).toList(); + json['groups_with_role_ids'] = + groupsWithRoleIds?.map((i) => i.toJson())?.toList(); } if (_identifierSet || _apiMapResponse.containsKey('identifier')) { json['identifier'] = identifier; @@ -37270,8 +35751,7 @@ class OIDCConfig { json['issuer'] = issuer; } if (_modifiedAtSet || _apiMapResponse.containsKey('modified_at')) { - json['modified_at'] = - modifiedAt == null ? null : modifiedAt.toIso8601String(); + json['modified_at'] = modifiedAt?.toIso8601String(); } if (_modifiedBySet || _apiMapResponse.containsKey('modified_by')) { json['modified_by'] = modifiedBy; @@ -37309,15 +35789,13 @@ class OIDCConfig { json['user_attribute_map_last_name'] = userAttributeMapLastName; } if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { - json['user_attributes'] = userAttributes == null - ? null - : userAttributes.map((i) => i.toJson()).toList(); + json['user_attributes'] = + userAttributes?.map((i) => i.toJson())?.toList(); } if (_userAttributesWithIdsSet || _apiMapResponse.containsKey('user_attributes_with_ids')) { - json['user_attributes_with_ids'] = userAttributesWithIds == null - ? null - : userAttributesWithIds.map((i) => i.toJson()).toList(); + json['user_attributes_with_ids'] = + userAttributesWithIds?.map((i) => i.toJson())?.toList(); } if (_userinfoEndpointSet || _apiMapResponse.containsKey('userinfo_endpoint')) { @@ -37397,9 +35875,7 @@ class OIDCGroupRead { String get lookerGroupName { if (!_lookerGroupNameSet && _apiMapResponse.containsKey('looker_group_name')) { - _lookerGroupName = _apiMapResponse['looker_group_name'] == null - ? null - : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupName = _apiMapResponse['looker_group_name']?.toString(); _lookerGroupNameSet = true; } return _lookerGroupName; @@ -37414,9 +35890,7 @@ class OIDCGroupRead { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -37488,8 +35962,7 @@ class OIDCGroupRead { json['name'] = name; } if (_rolesSet || _apiMapResponse.containsKey('roles')) { - json['roles'] = - roles == null ? null : roles.map((i) => i.toJson()).toList(); + json['roles'] = roles?.map((i) => i.toJson())?.toList(); } return json; } @@ -37550,9 +36023,7 @@ class OIDCGroupWrite { String get lookerGroupName { if (!_lookerGroupNameSet && _apiMapResponse.containsKey('looker_group_name')) { - _lookerGroupName = _apiMapResponse['looker_group_name'] == null - ? null - : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupName = _apiMapResponse['looker_group_name']?.toString(); _lookerGroupNameSet = true; } return _lookerGroupName; @@ -37567,9 +36038,7 @@ class OIDCGroupWrite { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -37584,9 +36053,8 @@ class OIDCGroupWrite { List get roleIds { if (!_roleIdsSet && _apiMapResponse.containsKey('role_ids')) { - _roleIds = _apiMapResponse['role_ids'] == null - ? null - : _apiMapResponse['role_ids'].map((i) => i as int).toList(); + _roleIds = + _apiMapResponse['role_ids']?.map((i) => i as int)?.toList(); _roleIdsSet = true; } return _roleIds; @@ -37663,9 +36131,7 @@ class OIDCUserAttributeRead { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -37745,9 +36211,8 @@ class OIDCUserAttributeRead { json['required'] = required; } if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { - json['user_attributes'] = userAttributes == null - ? null - : userAttributes.map((i) => i.toJson()).toList(); + json['user_attributes'] = + userAttributes?.map((i) => i.toJson())?.toList(); } return json; } @@ -37771,9 +36236,7 @@ class OIDCUserAttributeWrite { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -37804,11 +36267,9 @@ class OIDCUserAttributeWrite { List get userAttributeIds { if (!_userAttributeIdsSet && _apiMapResponse.containsKey('user_attribute_ids')) { - _userAttributeIds = _apiMapResponse['user_attribute_ids'] == null - ? null - : _apiMapResponse['user_attribute_ids'] - .map((i) => i as int) - .toList(); + _userAttributeIds = _apiMapResponse['user_attribute_ids'] + ?.map((i) => i as int) + ?.toList(); _userAttributeIdsSet = true; } return _userAttributeIds; @@ -38041,9 +36502,7 @@ class Permission { String get permission { if (!_permissionSet && _apiMapResponse.containsKey('permission')) { - _permission = _apiMapResponse['permission'] == null - ? null - : _apiMapResponse['permission'].toString(); + _permission = _apiMapResponse['permission']?.toString(); _permissionSet = true; } return _permission; @@ -38058,9 +36517,7 @@ class Permission { String get parent { if (!_parentSet && _apiMapResponse.containsKey('parent')) { - _parent = _apiMapResponse['parent'] == null - ? null - : _apiMapResponse['parent'].toString(); + _parent = _apiMapResponse['parent']?.toString(); _parentSet = true; } return _parent; @@ -38075,9 +36532,7 @@ class Permission { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -38222,9 +36677,7 @@ class PermissionSet { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -38237,11 +36690,9 @@ class PermissionSet { List get permissions { if (!_permissionsSet && _apiMapResponse.containsKey('permissions')) { - _permissions = _apiMapResponse['permissions'] == null - ? null - : _apiMapResponse['permissions'] - .map((i) => i as String) - .toList(); + _permissions = _apiMapResponse['permissions'] + ?.map((i) => i as String) + ?.toList(); _permissionsSet = true; } return _permissions; @@ -38256,9 +36707,7 @@ class PermissionSet { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -38439,9 +36888,7 @@ class Project { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -38456,9 +36903,7 @@ class Project { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -38488,9 +36933,7 @@ class Project { String get gitRemoteUrl { if (!_gitRemoteUrlSet && _apiMapResponse.containsKey('git_remote_url')) { - _gitRemoteUrl = _apiMapResponse['git_remote_url'] == null - ? null - : _apiMapResponse['git_remote_url'].toString(); + _gitRemoteUrl = _apiMapResponse['git_remote_url']?.toString(); _gitRemoteUrlSet = true; } return _gitRemoteUrl; @@ -38505,9 +36948,7 @@ class Project { String get gitUsername { if (!_gitUsernameSet && _apiMapResponse.containsKey('git_username')) { - _gitUsername = _apiMapResponse['git_username'] == null - ? null - : _apiMapResponse['git_username'].toString(); + _gitUsername = _apiMapResponse['git_username']?.toString(); _gitUsernameSet = true; } return _gitUsername; @@ -38522,9 +36963,7 @@ class Project { String get gitPassword { if (!_gitPasswordSet && _apiMapResponse.containsKey('git_password')) { - _gitPassword = _apiMapResponse['git_password'] == null - ? null - : _apiMapResponse['git_password'].toString(); + _gitPassword = _apiMapResponse['git_password']?.toString(); _gitPasswordSet = true; } return _gitPassword; @@ -38541,9 +36980,7 @@ class Project { if (!_gitProductionBranchNameSet && _apiMapResponse.containsKey('git_production_branch_name')) { _gitProductionBranchName = - _apiMapResponse['git_production_branch_name'] == null - ? null - : _apiMapResponse['git_production_branch_name'].toString(); + _apiMapResponse['git_production_branch_name']?.toString(); _gitProductionBranchNameSet = true; } return _gitProductionBranchName; @@ -38576,9 +37013,7 @@ class Project { if (!_gitUsernameUserAttributeSet && _apiMapResponse.containsKey('git_username_user_attribute')) { _gitUsernameUserAttribute = - _apiMapResponse['git_username_user_attribute'] == null - ? null - : _apiMapResponse['git_username_user_attribute'].toString(); + _apiMapResponse['git_username_user_attribute']?.toString(); _gitUsernameUserAttributeSet = true; } return _gitUsernameUserAttribute; @@ -38595,9 +37030,7 @@ class Project { if (!_gitPasswordUserAttributeSet && _apiMapResponse.containsKey('git_password_user_attribute')) { _gitPasswordUserAttribute = - _apiMapResponse['git_password_user_attribute'] == null - ? null - : _apiMapResponse['git_password_user_attribute'].toString(); + _apiMapResponse['git_password_user_attribute']?.toString(); _gitPasswordUserAttributeSet = true; } return _gitPasswordUserAttribute; @@ -38613,9 +37046,7 @@ class Project { String get gitServiceName { if (!_gitServiceNameSet && _apiMapResponse.containsKey('git_service_name')) { - _gitServiceName = _apiMapResponse['git_service_name'] == null - ? null - : _apiMapResponse['git_service_name'].toString(); + _gitServiceName = _apiMapResponse['git_service_name']?.toString(); _gitServiceNameSet = true; } return _gitServiceName; @@ -38649,10 +37080,7 @@ class Project { if (!_gitApplicationServerHttpSchemeSet && _apiMapResponse.containsKey('git_application_server_http_scheme')) { _gitApplicationServerHttpScheme = - _apiMapResponse['git_application_server_http_scheme'] == null - ? null - : _apiMapResponse['git_application_server_http_scheme'] - .toString(); + _apiMapResponse['git_application_server_http_scheme']?.toString(); _gitApplicationServerHttpSchemeSet = true; } return _gitApplicationServerHttpScheme; @@ -38667,9 +37095,7 @@ class Project { String get deploySecret { if (!_deploySecretSet && _apiMapResponse.containsKey('deploy_secret')) { - _deploySecret = _apiMapResponse['deploy_secret'] == null - ? null - : _apiMapResponse['deploy_secret'].toString(); + _deploySecret = _apiMapResponse['deploy_secret']?.toString(); _deploySecretSet = true; } return _deploySecret; @@ -38780,9 +37206,7 @@ class Project { String get dependencyStatus { if (!_dependencyStatusSet && _apiMapResponse.containsKey('dependency_status')) { - _dependencyStatus = _apiMapResponse['dependency_status'] == null - ? null - : _apiMapResponse['dependency_status'].toString(); + _dependencyStatus = _apiMapResponse['dependency_status']?.toString(); _dependencyStatusSet = true; } return _dependencyStatus; @@ -38948,9 +37372,7 @@ class ProjectError { String get code { if (!_codeSet && _apiMapResponse.containsKey('code')) { - _code = _apiMapResponse['code'] == null - ? null - : _apiMapResponse['code'].toString(); + _code = _apiMapResponse['code']?.toString(); _codeSet = true; } return _code; @@ -38965,9 +37387,7 @@ class ProjectError { String get severity { if (!_severitySet && _apiMapResponse.containsKey('severity')) { - _severity = _apiMapResponse['severity'] == null - ? null - : _apiMapResponse['severity'].toString(); + _severity = _apiMapResponse['severity']?.toString(); _severitySet = true; } return _severity; @@ -38982,9 +37402,7 @@ class ProjectError { String get kind { if (!_kindSet && _apiMapResponse.containsKey('kind')) { - _kind = _apiMapResponse['kind'] == null - ? null - : _apiMapResponse['kind'].toString(); + _kind = _apiMapResponse['kind']?.toString(); _kindSet = true; } return _kind; @@ -38999,9 +37417,7 @@ class ProjectError { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -39016,9 +37432,7 @@ class ProjectError { String get fieldName { if (!_fieldNameSet && _apiMapResponse.containsKey('field_name')) { - _fieldName = _apiMapResponse['field_name'] == null - ? null - : _apiMapResponse['field_name'].toString(); + _fieldName = _apiMapResponse['field_name']?.toString(); _fieldNameSet = true; } return _fieldName; @@ -39033,9 +37447,7 @@ class ProjectError { String get filePath { if (!_filePathSet && _apiMapResponse.containsKey('file_path')) { - _filePath = _apiMapResponse['file_path'] == null - ? null - : _apiMapResponse['file_path'].toString(); + _filePath = _apiMapResponse['file_path']?.toString(); _filePathSet = true; } return _filePath; @@ -39065,9 +37477,7 @@ class ProjectError { String get modelId { if (!_modelIdSet && _apiMapResponse.containsKey('model_id')) { - _modelId = _apiMapResponse['model_id'] == null - ? null - : _apiMapResponse['model_id'].toString(); + _modelId = _apiMapResponse['model_id']?.toString(); _modelIdSet = true; } return _modelId; @@ -39082,9 +37492,7 @@ class ProjectError { String get explore { if (!_exploreSet && _apiMapResponse.containsKey('explore')) { - _explore = _apiMapResponse['explore'] == null - ? null - : _apiMapResponse['explore'].toString(); + _explore = _apiMapResponse['explore']?.toString(); _exploreSet = true; } return _explore; @@ -39099,9 +37507,7 @@ class ProjectError { String get helpUrl { if (!_helpUrlSet && _apiMapResponse.containsKey('help_url')) { - _helpUrl = _apiMapResponse['help_url'] == null - ? null - : _apiMapResponse['help_url'].toString(); + _helpUrl = _apiMapResponse['help_url']?.toString(); _helpUrlSet = true; } return _helpUrl; @@ -39132,9 +37538,7 @@ class ProjectError { String get sanitizedMessage { if (!_sanitizedMessageSet && _apiMapResponse.containsKey('sanitized_message')) { - _sanitizedMessage = _apiMapResponse['sanitized_message'] == null - ? null - : _apiMapResponse['sanitized_message'].toString(); + _sanitizedMessage = _apiMapResponse['sanitized_message']?.toString(); _sanitizedMessageSet = true; } return _sanitizedMessage; @@ -39265,9 +37669,7 @@ class ProjectFile { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -39282,9 +37684,7 @@ class ProjectFile { String get path { if (!_pathSet && _apiMapResponse.containsKey('path')) { - _path = _apiMapResponse['path'] == null - ? null - : _apiMapResponse['path'].toString(); + _path = _apiMapResponse['path']?.toString(); _pathSet = true; } return _path; @@ -39299,9 +37699,7 @@ class ProjectFile { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -39316,9 +37714,7 @@ class ProjectFile { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -39333,9 +37729,7 @@ class ProjectFile { String get extension { if (!_extensionSet && _apiMapResponse.containsKey('extension')) { - _extension = _apiMapResponse['extension'] == null - ? null - : _apiMapResponse['extension'].toString(); + _extension = _apiMapResponse['extension']?.toString(); _extensionSet = true; } return _extension; @@ -39350,9 +37744,7 @@ class ProjectFile { String get mimeType { if (!_mimeTypeSet && _apiMapResponse.containsKey('mime_type')) { - _mimeType = _apiMapResponse['mime_type'] == null - ? null - : _apiMapResponse['mime_type'].toString(); + _mimeType = _apiMapResponse['mime_type']?.toString(); _mimeTypeSet = true; } return _mimeType; @@ -39447,7 +37839,7 @@ class ProjectFile { json['editable'] = editable; } if (_gitStatusSet || _apiMapResponse.containsKey('git_status')) { - json['git_status'] = gitStatus == null ? null : gitStatus.toJson(); + json['git_status'] = gitStatus?.toJson(); } return json; } @@ -39493,9 +37885,7 @@ class ProjectValidation { String get projectDigest { if (!_projectDigestSet && _apiMapResponse.containsKey('project_digest')) { - _projectDigest = _apiMapResponse['project_digest'] == null - ? null - : _apiMapResponse['project_digest'].toString(); + _projectDigest = _apiMapResponse['project_digest']?.toString(); _projectDigestSet = true; } return _projectDigest; @@ -39572,17 +37962,15 @@ class ProjectValidation { Map toJson() { var json = {}; if (_errorsSet || _apiMapResponse.containsKey('errors')) { - json['errors'] = - errors == null ? null : errors.map((i) => i.toJson()).toList(); + json['errors'] = errors?.map((i) => i.toJson())?.toList(); } if (_projectDigestSet || _apiMapResponse.containsKey('project_digest')) { json['project_digest'] = projectDigest; } if (_modelsNotValidatedSet || _apiMapResponse.containsKey('models_not_validated')) { - json['models_not_validated'] = modelsNotValidated == null - ? null - : modelsNotValidated.map((i) => i.toJson()).toList(); + json['models_not_validated'] = + modelsNotValidated?.map((i) => i.toJson())?.toList(); } if (_computationTimeSet || _apiMapResponse.containsKey('computation_time')) { @@ -39635,9 +38023,7 @@ class ProjectValidationCache { String get projectDigest { if (!_projectDigestSet && _apiMapResponse.containsKey('project_digest')) { - _projectDigest = _apiMapResponse['project_digest'] == null - ? null - : _apiMapResponse['project_digest'].toString(); + _projectDigest = _apiMapResponse['project_digest']?.toString(); _projectDigestSet = true; } return _projectDigest; @@ -39729,17 +38115,15 @@ class ProjectValidationCache { Map toJson() { var json = {}; if (_errorsSet || _apiMapResponse.containsKey('errors')) { - json['errors'] = - errors == null ? null : errors.map((i) => i.toJson()).toList(); + json['errors'] = errors?.map((i) => i.toJson())?.toList(); } if (_projectDigestSet || _apiMapResponse.containsKey('project_digest')) { json['project_digest'] = projectDigest; } if (_modelsNotValidatedSet || _apiMapResponse.containsKey('models_not_validated')) { - json['models_not_validated'] = modelsNotValidated == null - ? null - : modelsNotValidated.map((i) => i.toJson()).toList(); + json['models_not_validated'] = + modelsNotValidated?.map((i) => i.toJson())?.toList(); } if (_computationTimeSet || _apiMapResponse.containsKey('computation_time')) { @@ -39800,9 +38184,7 @@ class ProjectWorkspace { String get projectId { if (!_projectIdSet && _apiMapResponse.containsKey('project_id')) { - _projectId = _apiMapResponse['project_id'] == null - ? null - : _apiMapResponse['project_id'].toString(); + _projectId = _apiMapResponse['project_id']?.toString(); _projectIdSet = true; } return _projectId; @@ -39817,9 +38199,7 @@ class ProjectWorkspace { String get workspaceId { if (!_workspaceIdSet && _apiMapResponse.containsKey('workspace_id')) { - _workspaceId = _apiMapResponse['workspace_id'] == null - ? null - : _apiMapResponse['workspace_id'].toString(); + _workspaceId = _apiMapResponse['workspace_id']?.toString(); _workspaceIdSet = true; } return _workspaceId; @@ -39834,9 +38214,7 @@ class ProjectWorkspace { String get gitStatus { if (!_gitStatusSet && _apiMapResponse.containsKey('git_status')) { - _gitStatus = _apiMapResponse['git_status'] == null - ? null - : _apiMapResponse['git_status'].toString(); + _gitStatus = _apiMapResponse['git_status']?.toString(); _gitStatusSet = true; } return _gitStatus; @@ -39851,9 +38229,7 @@ class ProjectWorkspace { String get gitHead { if (!_gitHeadSet && _apiMapResponse.containsKey('git_head')) { - _gitHead = _apiMapResponse['git_head'] == null - ? null - : _apiMapResponse['git_head'].toString(); + _gitHead = _apiMapResponse['git_head']?.toString(); _gitHeadSet = true; } return _gitHead; @@ -39901,9 +38277,7 @@ class ProjectWorkspace { String get lookmlType { if (!_lookmlTypeSet && _apiMapResponse.containsKey('lookml_type')) { - _lookmlType = _apiMapResponse['lookml_type'] == null - ? null - : _apiMapResponse['lookml_type'].toString(); + _lookmlType = _apiMapResponse['lookml_type']?.toString(); _lookmlTypeSet = true; } return _lookmlType; @@ -39963,7 +38337,7 @@ class ProjectWorkspace { DependencyStatusMapper.toStringValue(dependencyStatus); } if (_gitBranchSet || _apiMapResponse.containsKey('git_branch')) { - json['git_branch'] = gitBranch == null ? null : gitBranch.toJson(); + json['git_branch'] = gitBranch?.toJson(); } if (_lookmlTypeSet || _apiMapResponse.containsKey('lookml_type')) { json['lookml_type'] = lookmlType; @@ -40126,9 +38500,7 @@ class Query { String get model { if (!_modelSet && _apiMapResponse.containsKey('model')) { - _model = _apiMapResponse['model'] == null - ? null - : _apiMapResponse['model'].toString(); + _model = _apiMapResponse['model']?.toString(); _modelSet = true; } return _model; @@ -40143,9 +38515,7 @@ class Query { String get view { if (!_viewSet && _apiMapResponse.containsKey('view')) { - _view = _apiMapResponse['view'] == null - ? null - : _apiMapResponse['view'].toString(); + _view = _apiMapResponse['view']?.toString(); _viewSet = true; } return _view; @@ -40160,9 +38530,8 @@ class Query { List get fields { if (!_fieldsSet && _apiMapResponse.containsKey('fields')) { - _fields = _apiMapResponse['fields'] == null - ? null - : _apiMapResponse['fields'].map((i) => i as String).toList(); + _fields = + _apiMapResponse['fields']?.map((i) => i as String)?.toList(); _fieldsSet = true; } return _fields; @@ -40177,9 +38546,8 @@ class Query { List get pivots { if (!_pivotsSet && _apiMapResponse.containsKey('pivots')) { - _pivots = _apiMapResponse['pivots'] == null - ? null - : _apiMapResponse['pivots'].map((i) => i as String).toList(); + _pivots = + _apiMapResponse['pivots']?.map((i) => i as String)?.toList(); _pivotsSet = true; } return _pivots; @@ -40194,11 +38562,9 @@ class Query { List get fillFields { if (!_fillFieldsSet && _apiMapResponse.containsKey('fill_fields')) { - _fillFields = _apiMapResponse['fill_fields'] == null - ? null - : _apiMapResponse['fill_fields'] - .map((i) => i as String) - .toList(); + _fillFields = _apiMapResponse['fill_fields'] + ?.map((i) => i as String) + ?.toList(); _fillFieldsSet = true; } return _fillFields; @@ -40229,9 +38595,7 @@ class Query { String get filterExpression { if (!_filterExpressionSet && _apiMapResponse.containsKey('filter_expression')) { - _filterExpression = _apiMapResponse['filter_expression'] == null - ? null - : _apiMapResponse['filter_expression'].toString(); + _filterExpression = _apiMapResponse['filter_expression']?.toString(); _filterExpressionSet = true; } return _filterExpression; @@ -40246,9 +38610,8 @@ class Query { List get sorts { if (!_sortsSet && _apiMapResponse.containsKey('sorts')) { - _sorts = _apiMapResponse['sorts'] == null - ? null - : _apiMapResponse['sorts'].map((i) => i as String).toList(); + _sorts = + _apiMapResponse['sorts']?.map((i) => i as String)?.toList(); _sortsSet = true; } return _sorts; @@ -40263,9 +38626,7 @@ class Query { String get limit { if (!_limitSet && _apiMapResponse.containsKey('limit')) { - _limit = _apiMapResponse['limit'] == null - ? null - : _apiMapResponse['limit'].toString(); + _limit = _apiMapResponse['limit']?.toString(); _limitSet = true; } return _limit; @@ -40280,9 +38641,7 @@ class Query { String get columnLimit { if (!_columnLimitSet && _apiMapResponse.containsKey('column_limit')) { - _columnLimit = _apiMapResponse['column_limit'] == null - ? null - : _apiMapResponse['column_limit'].toString(); + _columnLimit = _apiMapResponse['column_limit']?.toString(); _columnLimitSet = true; } return _columnLimit; @@ -40312,9 +38671,7 @@ class Query { String get rowTotal { if (!_rowTotalSet && _apiMapResponse.containsKey('row_total')) { - _rowTotal = _apiMapResponse['row_total'] == null - ? null - : _apiMapResponse['row_total'].toString(); + _rowTotal = _apiMapResponse['row_total']?.toString(); _rowTotalSet = true; } return _rowTotal; @@ -40329,11 +38686,9 @@ class Query { List get subtotals { if (!_subtotalsSet && _apiMapResponse.containsKey('subtotals')) { - _subtotals = _apiMapResponse['subtotals'] == null - ? null - : _apiMapResponse['subtotals'] - .map((i) => i as String) - .toList(); + _subtotals = _apiMapResponse['subtotals'] + ?.map((i) => i as String) + ?.toList(); _subtotalsSet = true; } return _subtotals; @@ -40379,9 +38734,7 @@ class Query { String get visibleUiSections { if (!_visibleUiSectionsSet && _apiMapResponse.containsKey('visible_ui_sections')) { - _visibleUiSections = _apiMapResponse['visible_ui_sections'] == null - ? null - : _apiMapResponse['visible_ui_sections'].toString(); + _visibleUiSections = _apiMapResponse['visible_ui_sections']?.toString(); _visibleUiSectionsSet = true; } return _visibleUiSections; @@ -40396,9 +38749,7 @@ class Query { String get slug { if (!_slugSet && _apiMapResponse.containsKey('slug')) { - _slug = _apiMapResponse['slug'] == null - ? null - : _apiMapResponse['slug'].toString(); + _slug = _apiMapResponse['slug']?.toString(); _slugSet = true; } return _slug; @@ -40413,9 +38764,7 @@ class Query { String get dynamicFields { if (!_dynamicFieldsSet && _apiMapResponse.containsKey('dynamic_fields')) { - _dynamicFields = _apiMapResponse['dynamic_fields'] == null - ? null - : _apiMapResponse['dynamic_fields'].toString(); + _dynamicFields = _apiMapResponse['dynamic_fields']?.toString(); _dynamicFieldsSet = true; } return _dynamicFields; @@ -40430,9 +38779,7 @@ class Query { String get clientId { if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { - _clientId = _apiMapResponse['client_id'] == null - ? null - : _apiMapResponse['client_id'].toString(); + _clientId = _apiMapResponse['client_id']?.toString(); _clientIdSet = true; } return _clientId; @@ -40447,9 +38794,7 @@ class Query { String get shareUrl { if (!_shareUrlSet && _apiMapResponse.containsKey('share_url')) { - _shareUrl = _apiMapResponse['share_url'] == null - ? null - : _apiMapResponse['share_url'].toString(); + _shareUrl = _apiMapResponse['share_url']?.toString(); _shareUrlSet = true; } return _shareUrl; @@ -40465,9 +38810,7 @@ class Query { String get expandedShareUrl { if (!_expandedShareUrlSet && _apiMapResponse.containsKey('expanded_share_url')) { - _expandedShareUrl = _apiMapResponse['expanded_share_url'] == null - ? null - : _apiMapResponse['expanded_share_url'].toString(); + _expandedShareUrl = _apiMapResponse['expanded_share_url']?.toString(); _expandedShareUrlSet = true; } return _expandedShareUrl; @@ -40482,9 +38825,7 @@ class Query { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -40499,9 +38840,7 @@ class Query { String get queryTimezone { if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { - _queryTimezone = _apiMapResponse['query_timezone'] == null - ? null - : _apiMapResponse['query_timezone'].toString(); + _queryTimezone = _apiMapResponse['query_timezone']?.toString(); _queryTimezoneSet = true; } return _queryTimezone; @@ -40722,9 +39061,7 @@ class QueryTask { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -40801,9 +39138,7 @@ class QueryTask { String get pathPrefix { if (!_pathPrefixSet && _apiMapResponse.containsKey('path_prefix')) { - _pathPrefix = _apiMapResponse['path_prefix'] == null - ? null - : _apiMapResponse['path_prefix'].toString(); + _pathPrefix = _apiMapResponse['path_prefix']?.toString(); _pathPrefixSet = true; } return _pathPrefix; @@ -40864,9 +39199,7 @@ class QueryTask { String get cacheKey { if (!_cacheKeySet && _apiMapResponse.containsKey('cache_key')) { - _cacheKey = _apiMapResponse['cache_key'] == null - ? null - : _apiMapResponse['cache_key'].toString(); + _cacheKey = _apiMapResponse['cache_key']?.toString(); _cacheKeySet = true; } return _cacheKey; @@ -40881,9 +39214,7 @@ class QueryTask { String get status { if (!_statusSet && _apiMapResponse.containsKey('status')) { - _status = _apiMapResponse['status'] == null - ? null - : _apiMapResponse['status'].toString(); + _status = _apiMapResponse['status']?.toString(); _statusSet = true; } return _status; @@ -40898,9 +39229,7 @@ class QueryTask { String get source { if (!_sourceSet && _apiMapResponse.containsKey('source')) { - _source = _apiMapResponse['source'] == null - ? null - : _apiMapResponse['source'].toString(); + _source = _apiMapResponse['source']?.toString(); _sourceSet = true; } return _source; @@ -40945,9 +39274,7 @@ class QueryTask { String get resultSource { if (!_resultSourceSet && _apiMapResponse.containsKey('result_source')) { - _resultSource = _apiMapResponse['result_source'] == null - ? null - : _apiMapResponse['result_source'].toString(); + _resultSource = _apiMapResponse['result_source']?.toString(); _resultSourceSet = true; } return _resultSource; @@ -40962,9 +39289,7 @@ class QueryTask { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -40979,9 +39304,7 @@ class QueryTask { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -40996,9 +39319,7 @@ class QueryTask { String get resultFormat { if (!_resultFormatSet && _apiMapResponse.containsKey('result_format')) { - _resultFormat = _apiMapResponse['result_format'] == null - ? null - : _apiMapResponse['result_format'].toString(); + _resultFormat = _apiMapResponse['result_format']?.toString(); _resultFormatSet = true; } return _resultFormat; @@ -41046,7 +39367,7 @@ class QueryTask { json['query_id'] = queryId; } if (_querySet || _apiMapResponse.containsKey('query')) { - json['query'] = query == null ? null : query.toJson(); + json['query'] = query?.toJson(); } if (_generateLinksSet || _apiMapResponse.containsKey('generate_links')) { json['generate_links'] = generateLinks; @@ -41183,9 +39504,7 @@ class RenderTask { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -41201,9 +39520,7 @@ class RenderTask { String get dashboardFilters { if (!_dashboardFiltersSet && _apiMapResponse.containsKey('dashboard_filters')) { - _dashboardFilters = _apiMapResponse['dashboard_filters'] == null - ? null - : _apiMapResponse['dashboard_filters'].toString(); + _dashboardFilters = _apiMapResponse['dashboard_filters']?.toString(); _dashboardFiltersSet = true; } return _dashboardFilters; @@ -41233,9 +39550,7 @@ class RenderTask { String get dashboardStyle { if (!_dashboardStyleSet && _apiMapResponse.containsKey('dashboard_style')) { - _dashboardStyle = _apiMapResponse['dashboard_style'] == null - ? null - : _apiMapResponse['dashboard_style'].toString(); + _dashboardStyle = _apiMapResponse['dashboard_style']?.toString(); _dashboardStyleSet = true; } return _dashboardStyle; @@ -41250,9 +39565,7 @@ class RenderTask { String get finalizedAt { if (!_finalizedAtSet && _apiMapResponse.containsKey('finalized_at')) { - _finalizedAt = _apiMapResponse['finalized_at'] == null - ? null - : _apiMapResponse['finalized_at'].toString(); + _finalizedAt = _apiMapResponse['finalized_at']?.toString(); _finalizedAtSet = true; } return _finalizedAt; @@ -41282,9 +39595,7 @@ class RenderTask { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -41299,9 +39610,7 @@ class RenderTask { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -41317,9 +39626,7 @@ class RenderTask { String get lookmlDashboardId { if (!_lookmlDashboardIdSet && _apiMapResponse.containsKey('lookml_dashboard_id')) { - _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null - ? null - : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id']?.toString(); _lookmlDashboardIdSet = true; } return _lookmlDashboardId; @@ -41350,9 +39657,7 @@ class RenderTask { String get dashboardElementId { if (!_dashboardElementIdSet && _apiMapResponse.containsKey('dashboard_element_id')) { - _dashboardElementId = _apiMapResponse['dashboard_element_id'] == null - ? null - : _apiMapResponse['dashboard_element_id'].toString(); + _dashboardElementId = _apiMapResponse['dashboard_element_id']?.toString(); _dashboardElementIdSet = true; } return _dashboardElementId; @@ -41397,9 +39702,7 @@ class RenderTask { String get resultFormat { if (!_resultFormatSet && _apiMapResponse.containsKey('result_format')) { - _resultFormat = _apiMapResponse['result_format'] == null - ? null - : _apiMapResponse['result_format'].toString(); + _resultFormat = _apiMapResponse['result_format']?.toString(); _resultFormatSet = true; } return _resultFormat; @@ -41429,9 +39732,7 @@ class RenderTask { String get status { if (!_statusSet && _apiMapResponse.containsKey('status')) { - _status = _apiMapResponse['status'] == null - ? null - : _apiMapResponse['status'].toString(); + _status = _apiMapResponse['status']?.toString(); _statusSet = true; } return _status; @@ -41446,9 +39747,7 @@ class RenderTask { String get statusDetail { if (!_statusDetailSet && _apiMapResponse.containsKey('status_detail')) { - _statusDetail = _apiMapResponse['status_detail'] == null - ? null - : _apiMapResponse['status_detail'].toString(); + _statusDetail = _apiMapResponse['status_detail']?.toString(); _statusDetailSet = true; } return _statusDetail; @@ -41632,9 +39931,7 @@ class RepositoryCredential { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -41649,9 +39946,7 @@ class RepositoryCredential { String get rootProjectId { if (!_rootProjectIdSet && _apiMapResponse.containsKey('root_project_id')) { - _rootProjectId = _apiMapResponse['root_project_id'] == null - ? null - : _apiMapResponse['root_project_id'].toString(); + _rootProjectId = _apiMapResponse['root_project_id']?.toString(); _rootProjectIdSet = true; } return _rootProjectId; @@ -41666,9 +39961,7 @@ class RepositoryCredential { String get remoteUrl { if (!_remoteUrlSet && _apiMapResponse.containsKey('remote_url')) { - _remoteUrl = _apiMapResponse['remote_url'] == null - ? null - : _apiMapResponse['remote_url'].toString(); + _remoteUrl = _apiMapResponse['remote_url']?.toString(); _remoteUrlSet = true; } return _remoteUrl; @@ -41683,9 +39976,7 @@ class RepositoryCredential { String get gitUsername { if (!_gitUsernameSet && _apiMapResponse.containsKey('git_username')) { - _gitUsername = _apiMapResponse['git_username'] == null - ? null - : _apiMapResponse['git_username'].toString(); + _gitUsername = _apiMapResponse['git_username']?.toString(); _gitUsernameSet = true; } return _gitUsername; @@ -41700,9 +39991,7 @@ class RepositoryCredential { String get gitPassword { if (!_gitPasswordSet && _apiMapResponse.containsKey('git_password')) { - _gitPassword = _apiMapResponse['git_password'] == null - ? null - : _apiMapResponse['git_password'].toString(); + _gitPassword = _apiMapResponse['git_password']?.toString(); _gitPasswordSet = true; } return _gitPassword; @@ -41717,9 +40006,7 @@ class RepositoryCredential { String get sshPublicKey { if (!_sshPublicKeySet && _apiMapResponse.containsKey('ssh_public_key')) { - _sshPublicKey = _apiMapResponse['ssh_public_key'] == null - ? null - : _apiMapResponse['ssh_public_key'].toString(); + _sshPublicKey = _apiMapResponse['ssh_public_key']?.toString(); _sshPublicKeySet = true; } return _sshPublicKey; @@ -41900,9 +40187,7 @@ class ResultMakerFilterables { String get model { if (!_modelSet && _apiMapResponse.containsKey('model')) { - _model = _apiMapResponse['model'] == null - ? null - : _apiMapResponse['model'].toString(); + _model = _apiMapResponse['model']?.toString(); _modelSet = true; } return _model; @@ -41917,9 +40202,7 @@ class ResultMakerFilterables { String get view { if (!_viewSet && _apiMapResponse.containsKey('view')) { - _view = _apiMapResponse['view'] == null - ? null - : _apiMapResponse['view'].toString(); + _view = _apiMapResponse['view']?.toString(); _viewSet = true; } return _view; @@ -41934,9 +40217,7 @@ class ResultMakerFilterables { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -42005,8 +40286,7 @@ class ResultMakerFilterables { json['name'] = name; } if (_listenSet || _apiMapResponse.containsKey('listen')) { - json['listen'] = - listen == null ? null : listen.map((i) => i.toJson()).toList(); + json['listen'] = listen?.map((i) => i.toJson())?.toList(); } return json; } @@ -42028,9 +40308,8 @@ class ResultMakerFilterablesListen { String get dashboardFilterName { if (!_dashboardFilterNameSet && _apiMapResponse.containsKey('dashboard_filter_name')) { - _dashboardFilterName = _apiMapResponse['dashboard_filter_name'] == null - ? null - : _apiMapResponse['dashboard_filter_name'].toString(); + _dashboardFilterName = + _apiMapResponse['dashboard_filter_name']?.toString(); _dashboardFilterNameSet = true; } return _dashboardFilterName; @@ -42045,9 +40324,7 @@ class ResultMakerFilterablesListen { String get field { if (!_fieldSet && _apiMapResponse.containsKey('field')) { - _field = _apiMapResponse['field'] == null - ? null - : _apiMapResponse['field'].toString(); + _field = _apiMapResponse['field']?.toString(); _fieldSet = true; } return _field; @@ -42151,9 +40428,7 @@ class ResultMakerWithIdVisConfigAndDynamicFields { String get dynamicFields { if (!_dynamicFieldsSet && _apiMapResponse.containsKey('dynamic_fields')) { - _dynamicFields = _apiMapResponse['dynamic_fields'] == null - ? null - : _apiMapResponse['dynamic_fields'].toString(); + _dynamicFields = _apiMapResponse['dynamic_fields']?.toString(); _dynamicFieldsSet = true; } return _dynamicFields; @@ -42188,9 +40463,8 @@ class ResultMakerWithIdVisConfigAndDynamicFields { List get sorts { if (!_sortsSet && _apiMapResponse.containsKey('sorts')) { - _sorts = _apiMapResponse['sorts'] == null - ? null - : _apiMapResponse['sorts'].map((i) => i as String).toList(); + _sorts = + _apiMapResponse['sorts']?.map((i) => i as String)?.toList(); _sortsSet = true; } return _sorts; @@ -42205,9 +40479,7 @@ class ResultMakerWithIdVisConfigAndDynamicFields { String get mergeResultId { if (!_mergeResultIdSet && _apiMapResponse.containsKey('merge_result_id')) { - _mergeResultId = _apiMapResponse['merge_result_id'] == null - ? null - : _apiMapResponse['merge_result_id'].toString(); + _mergeResultId = _apiMapResponse['merge_result_id']?.toString(); _mergeResultIdSet = true; } return _mergeResultId; @@ -42252,9 +40524,7 @@ class ResultMakerWithIdVisConfigAndDynamicFields { String get sqlQueryId { if (!_sqlQueryIdSet && _apiMapResponse.containsKey('sql_query_id')) { - _sqlQueryId = _apiMapResponse['sql_query_id'] == null - ? null - : _apiMapResponse['sql_query_id'].toString(); + _sqlQueryId = _apiMapResponse['sql_query_id']?.toString(); _sqlQueryIdSet = true; } return _sqlQueryId; @@ -42331,9 +40601,7 @@ class ResultMakerWithIdVisConfigAndDynamicFields { json['dynamic_fields'] = dynamicFields; } if (_filterablesSet || _apiMapResponse.containsKey('filterables')) { - json['filterables'] = filterables == null - ? null - : filterables.map((i) => i.toJson()).toList(); + json['filterables'] = filterables?.map((i) => i.toJson())?.toList(); } if (_sortsSet || _apiMapResponse.containsKey('sorts')) { json['sorts'] = sorts; @@ -42351,7 +40619,7 @@ class ResultMakerWithIdVisConfigAndDynamicFields { json['sql_query_id'] = sqlQueryId; } if (_querySet || _apiMapResponse.containsKey('query')) { - json['query'] = query == null ? null : query.toJson(); + json['query'] = query?.toJson(); } if (_visConfigSet || _apiMapResponse.containsKey('vis_config')) { json['vis_config'] = visConfig; @@ -42426,9 +40694,7 @@ class Role { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -42506,9 +40772,7 @@ class Role { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -42523,9 +40787,7 @@ class Role { String get usersUrl { if (!_usersUrlSet && _apiMapResponse.containsKey('users_url')) { - _usersUrl = _apiMapResponse['users_url'] == null - ? null - : _apiMapResponse['users_url'].toString(); + _usersUrl = _apiMapResponse['users_url']?.toString(); _usersUrlSet = true; } return _usersUrl; @@ -42573,15 +40835,14 @@ class Role { json['name'] = name; } if (_permissionSetSet || _apiMapResponse.containsKey('permission_set')) { - json['permission_set'] = - permissionSet == null ? null : permissionSet.toJson(); + json['permission_set'] = permissionSet?.toJson(); } if (_permissionSetIdSet || _apiMapResponse.containsKey('permission_set_id')) { json['permission_set_id'] = permissionSetId; } if (_modelSetSet || _apiMapResponse.containsKey('model_set')) { - json['model_set'] = modelSet == null ? null : modelSet.toJson(); + json['model_set'] = modelSet?.toJson(); } if (_modelSetIdSet || _apiMapResponse.containsKey('model_set_id')) { json['model_set_id'] = modelSetId; @@ -42665,9 +40926,7 @@ class RoleSearch { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -42760,9 +41019,7 @@ class RoleSearch { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -42777,9 +41034,7 @@ class RoleSearch { String get usersUrl { if (!_usersUrlSet && _apiMapResponse.containsKey('users_url')) { - _usersUrl = _apiMapResponse['users_url'] == null - ? null - : _apiMapResponse['users_url'].toString(); + _usersUrl = _apiMapResponse['users_url']?.toString(); _usersUrlSet = true; } return _usersUrl; @@ -42828,15 +41083,14 @@ class RoleSearch { json['name'] = name; } if (_permissionSetSet || _apiMapResponse.containsKey('permission_set')) { - json['permission_set'] = - permissionSet == null ? null : permissionSet.toJson(); + json['permission_set'] = permissionSet?.toJson(); } if (_permissionSetIdSet || _apiMapResponse.containsKey('permission_set_id')) { json['permission_set_id'] = permissionSetId; } if (_modelSetSet || _apiMapResponse.containsKey('model_set')) { - json['model_set'] = modelSet == null ? null : modelSet.toJson(); + json['model_set'] = modelSet?.toJson(); } if (_modelSetIdSet || _apiMapResponse.containsKey('model_set_id')) { json['model_set_id'] = modelSetId; @@ -43020,9 +41274,7 @@ class RunningQueries { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -43037,9 +41289,7 @@ class RunningQueries { String get completedAt { if (!_completedAtSet && _apiMapResponse.containsKey('completed_at')) { - _completedAt = _apiMapResponse['completed_at'] == null - ? null - : _apiMapResponse['completed_at'].toString(); + _completedAt = _apiMapResponse['completed_at']?.toString(); _completedAtSet = true; } return _completedAt; @@ -43054,9 +41304,7 @@ class RunningQueries { String get queryId { if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { - _queryId = _apiMapResponse['query_id'] == null - ? null - : _apiMapResponse['query_id'].toString(); + _queryId = _apiMapResponse['query_id']?.toString(); _queryIdSet = true; } return _queryId; @@ -43071,9 +41319,7 @@ class RunningQueries { String get source { if (!_sourceSet && _apiMapResponse.containsKey('source')) { - _source = _apiMapResponse['source'] == null - ? null - : _apiMapResponse['source'].toString(); + _source = _apiMapResponse['source']?.toString(); _sourceSet = true; } return _source; @@ -43088,9 +41334,7 @@ class RunningQueries { String get nodeId { if (!_nodeIdSet && _apiMapResponse.containsKey('node_id')) { - _nodeId = _apiMapResponse['node_id'] == null - ? null - : _apiMapResponse['node_id'].toString(); + _nodeId = _apiMapResponse['node_id']?.toString(); _nodeIdSet = true; } return _nodeId; @@ -43105,9 +41349,7 @@ class RunningQueries { String get slug { if (!_slugSet && _apiMapResponse.containsKey('slug')) { - _slug = _apiMapResponse['slug'] == null - ? null - : _apiMapResponse['slug'].toString(); + _slug = _apiMapResponse['slug']?.toString(); _slugSet = true; } return _slug; @@ -43122,9 +41364,7 @@ class RunningQueries { String get queryTaskId { if (!_queryTaskIdSet && _apiMapResponse.containsKey('query_task_id')) { - _queryTaskId = _apiMapResponse['query_task_id'] == null - ? null - : _apiMapResponse['query_task_id'].toString(); + _queryTaskId = _apiMapResponse['query_task_id']?.toString(); _queryTaskIdSet = true; } return _queryTaskId; @@ -43139,9 +41379,7 @@ class RunningQueries { String get cacheKey { if (!_cacheKeySet && _apiMapResponse.containsKey('cache_key')) { - _cacheKey = _apiMapResponse['cache_key'] == null - ? null - : _apiMapResponse['cache_key'].toString(); + _cacheKey = _apiMapResponse['cache_key']?.toString(); _cacheKeySet = true; } return _cacheKey; @@ -43156,9 +41394,7 @@ class RunningQueries { String get connectionName { if (!_connectionNameSet && _apiMapResponse.containsKey('connection_name')) { - _connectionName = _apiMapResponse['connection_name'] == null - ? null - : _apiMapResponse['connection_name'].toString(); + _connectionName = _apiMapResponse['connection_name']?.toString(); _connectionNameSet = true; } return _connectionName; @@ -43173,9 +41409,7 @@ class RunningQueries { String get dialect { if (!_dialectSet && _apiMapResponse.containsKey('dialect')) { - _dialect = _apiMapResponse['dialect'] == null - ? null - : _apiMapResponse['dialect'].toString(); + _dialect = _apiMapResponse['dialect']?.toString(); _dialectSet = true; } return _dialect; @@ -43190,9 +41424,7 @@ class RunningQueries { String get connectionId { if (!_connectionIdSet && _apiMapResponse.containsKey('connection_id')) { - _connectionId = _apiMapResponse['connection_id'] == null - ? null - : _apiMapResponse['connection_id'].toString(); + _connectionId = _apiMapResponse['connection_id']?.toString(); _connectionIdSet = true; } return _connectionId; @@ -43207,9 +41439,7 @@ class RunningQueries { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -43224,9 +41454,7 @@ class RunningQueries { String get status { if (!_statusSet && _apiMapResponse.containsKey('status')) { - _status = _apiMapResponse['status'] == null - ? null - : _apiMapResponse['status'].toString(); + _status = _apiMapResponse['status']?.toString(); _statusSet = true; } return _status; @@ -43256,9 +41484,7 @@ class RunningQueries { String get sql { if (!_sqlSet && _apiMapResponse.containsKey('sql')) { - _sql = _apiMapResponse['sql'] == null - ? null - : _apiMapResponse['sql'].toString(); + _sql = _apiMapResponse['sql']?.toString(); _sqlSet = true; } return _sql; @@ -43304,16 +41530,16 @@ class RunningQueries { json['id'] = id; } if (_userSet || _apiMapResponse.containsKey('user')) { - json['user'] = user == null ? null : user.toJson(); + json['user'] = user?.toJson(); } if (_querySet || _apiMapResponse.containsKey('query')) { - json['query'] = query == null ? null : query.toJson(); + json['query'] = query?.toJson(); } if (_sqlQuerySet || _apiMapResponse.containsKey('sql_query')) { - json['sql_query'] = sqlQuery == null ? null : sqlQuery.toJson(); + json['sql_query'] = sqlQuery?.toJson(); } if (_lookSet || _apiMapResponse.containsKey('look')) { - json['look'] = look == null ? null : look.toJson(); + json['look'] = look?.toJson(); } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { json['created_at'] = createdAt; @@ -43502,9 +41728,7 @@ class SamlConfig { String get idpCert { if (!_idpCertSet && _apiMapResponse.containsKey('idp_cert')) { - _idpCert = _apiMapResponse['idp_cert'] == null - ? null - : _apiMapResponse['idp_cert'].toString(); + _idpCert = _apiMapResponse['idp_cert']?.toString(); _idpCertSet = true; } return _idpCert; @@ -43519,9 +41743,7 @@ class SamlConfig { String get idpUrl { if (!_idpUrlSet && _apiMapResponse.containsKey('idp_url')) { - _idpUrl = _apiMapResponse['idp_url'] == null - ? null - : _apiMapResponse['idp_url'].toString(); + _idpUrl = _apiMapResponse['idp_url']?.toString(); _idpUrlSet = true; } return _idpUrl; @@ -43536,9 +41758,7 @@ class SamlConfig { String get idpIssuer { if (!_idpIssuerSet && _apiMapResponse.containsKey('idp_issuer')) { - _idpIssuer = _apiMapResponse['idp_issuer'] == null - ? null - : _apiMapResponse['idp_issuer'].toString(); + _idpIssuer = _apiMapResponse['idp_issuer']?.toString(); _idpIssuerSet = true; } return _idpIssuer; @@ -43553,9 +41773,7 @@ class SamlConfig { String get idpAudience { if (!_idpAudienceSet && _apiMapResponse.containsKey('idp_audience')) { - _idpAudience = _apiMapResponse['idp_audience'] == null - ? null - : _apiMapResponse['idp_audience'].toString(); + _idpAudience = _apiMapResponse['idp_audience']?.toString(); _idpAudienceSet = true; } return _idpAudience; @@ -43588,9 +41806,7 @@ class SamlConfig { if (!_userAttributeMapEmailSet && _apiMapResponse.containsKey('user_attribute_map_email')) { _userAttributeMapEmail = - _apiMapResponse['user_attribute_map_email'] == null - ? null - : _apiMapResponse['user_attribute_map_email'].toString(); + _apiMapResponse['user_attribute_map_email']?.toString(); _userAttributeMapEmailSet = true; } return _userAttributeMapEmail; @@ -43607,9 +41823,7 @@ class SamlConfig { if (!_userAttributeMapFirstNameSet && _apiMapResponse.containsKey('user_attribute_map_first_name')) { _userAttributeMapFirstName = - _apiMapResponse['user_attribute_map_first_name'] == null - ? null - : _apiMapResponse['user_attribute_map_first_name'].toString(); + _apiMapResponse['user_attribute_map_first_name']?.toString(); _userAttributeMapFirstNameSet = true; } return _userAttributeMapFirstName; @@ -43626,9 +41840,7 @@ class SamlConfig { if (!_userAttributeMapLastNameSet && _apiMapResponse.containsKey('user_attribute_map_last_name')) { _userAttributeMapLastName = - _apiMapResponse['user_attribute_map_last_name'] == null - ? null - : _apiMapResponse['user_attribute_map_last_name'].toString(); + _apiMapResponse['user_attribute_map_last_name']?.toString(); _userAttributeMapLastNameSet = true; } return _userAttributeMapLastName; @@ -43645,9 +41857,7 @@ class SamlConfig { if (!_newUserMigrationTypesSet && _apiMapResponse.containsKey('new_user_migration_types')) { _newUserMigrationTypes = - _apiMapResponse['new_user_migration_types'] == null - ? null - : _apiMapResponse['new_user_migration_types'].toString(); + _apiMapResponse['new_user_migration_types']?.toString(); _newUserMigrationTypesSet = true; } return _newUserMigrationTypes; @@ -43679,9 +41889,7 @@ class SamlConfig { String get testSlug { if (!_testSlugSet && _apiMapResponse.containsKey('test_slug')) { - _testSlug = _apiMapResponse['test_slug'] == null - ? null - : _apiMapResponse['test_slug'].toString(); + _testSlug = _apiMapResponse['test_slug']?.toString(); _testSlugSet = true; } return _testSlug; @@ -43696,9 +41904,7 @@ class SamlConfig { String get modifiedAt { if (!_modifiedAtSet && _apiMapResponse.containsKey('modified_at')) { - _modifiedAt = _apiMapResponse['modified_at'] == null - ? null - : _apiMapResponse['modified_at'].toString(); + _modifiedAt = _apiMapResponse['modified_at']?.toString(); _modifiedAtSet = true; } return _modifiedAt; @@ -43713,9 +41919,7 @@ class SamlConfig { String get modifiedBy { if (!_modifiedBySet && _apiMapResponse.containsKey('modified_by')) { - _modifiedBy = _apiMapResponse['modified_by'] == null - ? null - : _apiMapResponse['modified_by'].toString(); + _modifiedBy = _apiMapResponse['modified_by']?.toString(); _modifiedBySet = true; } return _modifiedBy; @@ -43771,12 +41975,9 @@ class SamlConfig { List get defaultNewUserRoleIds { if (!_defaultNewUserRoleIdsSet && _apiMapResponse.containsKey('default_new_user_role_ids')) { - _defaultNewUserRoleIds = - _apiMapResponse['default_new_user_role_ids'] == null - ? null - : _apiMapResponse['default_new_user_role_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserRoleIds = _apiMapResponse['default_new_user_role_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserRoleIdsSet = true; } return _defaultNewUserRoleIds; @@ -43792,12 +41993,9 @@ class SamlConfig { List get defaultNewUserGroupIds { if (!_defaultNewUserGroupIdsSet && _apiMapResponse.containsKey('default_new_user_group_ids')) { - _defaultNewUserGroupIds = - _apiMapResponse['default_new_user_group_ids'] == null - ? null - : _apiMapResponse['default_new_user_group_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserGroupIds = _apiMapResponse['default_new_user_group_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserGroupIdsSet = true; } return _defaultNewUserGroupIds; @@ -43829,9 +42027,7 @@ class SamlConfig { String get groupsAttribute { if (!_groupsAttributeSet && _apiMapResponse.containsKey('groups_attribute')) { - _groupsAttribute = _apiMapResponse['groups_attribute'] == null - ? null - : _apiMapResponse['groups_attribute'].toString(); + _groupsAttribute = _apiMapResponse['groups_attribute']?.toString(); _groupsAttributeSet = true; } return _groupsAttribute; @@ -43945,9 +42141,7 @@ class SamlConfig { String get groupsFinderType { if (!_groupsFinderTypeSet && _apiMapResponse.containsKey('groups_finder_type')) { - _groupsFinderType = _apiMapResponse['groups_finder_type'] == null - ? null - : _apiMapResponse['groups_finder_type'].toString(); + _groupsFinderType = _apiMapResponse['groups_finder_type']?.toString(); _groupsFinderTypeSet = true; } return _groupsFinderType; @@ -43963,9 +42157,7 @@ class SamlConfig { String get groupsMemberValue { if (!_groupsMemberValueSet && _apiMapResponse.containsKey('groups_member_value')) { - _groupsMemberValue = _apiMapResponse['groups_member_value'] == null - ? null - : _apiMapResponse['groups_member_value'].toString(); + _groupsMemberValue = _apiMapResponse['groups_member_value']?.toString(); _groupsMemberValueSet = true; } return _groupsMemberValue; @@ -44046,9 +42238,7 @@ class SamlConfig { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -44140,15 +42330,13 @@ class SamlConfig { } if (_defaultNewUserRolesSet || _apiMapResponse.containsKey('default_new_user_roles')) { - json['default_new_user_roles'] = defaultNewUserRoles == null - ? null - : defaultNewUserRoles.map((i) => i.toJson()).toList(); + json['default_new_user_roles'] = + defaultNewUserRoles?.map((i) => i.toJson())?.toList(); } if (_defaultNewUserGroupsSet || _apiMapResponse.containsKey('default_new_user_groups')) { - json['default_new_user_groups'] = defaultNewUserGroups == null - ? null - : defaultNewUserGroups.map((i) => i.toJson()).toList(); + json['default_new_user_groups'] = + defaultNewUserGroups?.map((i) => i.toJson())?.toList(); } if (_defaultNewUserRoleIdsSet || _apiMapResponse.containsKey('default_new_user_role_ids')) { @@ -44167,29 +42355,25 @@ class SamlConfig { json['groups_attribute'] = groupsAttribute; } if (_groupsSet || _apiMapResponse.containsKey('groups')) { - json['groups'] = - groups == null ? null : groups.map((i) => i.toJson()).toList(); + json['groups'] = groups?.map((i) => i.toJson())?.toList(); } if (_groupsWithRoleIdsSet || _apiMapResponse.containsKey('groups_with_role_ids')) { - json['groups_with_role_ids'] = groupsWithRoleIds == null - ? null - : groupsWithRoleIds.map((i) => i.toJson()).toList(); + json['groups_with_role_ids'] = + groupsWithRoleIds?.map((i) => i.toJson())?.toList(); } if (_authRequiresRoleSet || _apiMapResponse.containsKey('auth_requires_role')) { json['auth_requires_role'] = authRequiresRole; } if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { - json['user_attributes'] = userAttributes == null - ? null - : userAttributes.map((i) => i.toJson()).toList(); + json['user_attributes'] = + userAttributes?.map((i) => i.toJson())?.toList(); } if (_userAttributesWithIdsSet || _apiMapResponse.containsKey('user_attributes_with_ids')) { - json['user_attributes_with_ids'] = userAttributesWithIds == null - ? null - : userAttributesWithIds.map((i) => i.toJson()).toList(); + json['user_attributes_with_ids'] = + userAttributesWithIds?.map((i) => i.toJson())?.toList(); } if (_groupsFinderTypeSet || _apiMapResponse.containsKey('groups_finder_type')) { @@ -44280,9 +42464,7 @@ class SamlGroupRead { String get lookerGroupName { if (!_lookerGroupNameSet && _apiMapResponse.containsKey('looker_group_name')) { - _lookerGroupName = _apiMapResponse['looker_group_name'] == null - ? null - : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupName = _apiMapResponse['looker_group_name']?.toString(); _lookerGroupNameSet = true; } return _lookerGroupName; @@ -44297,9 +42479,7 @@ class SamlGroupRead { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -44333,9 +42513,7 @@ class SamlGroupRead { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -44388,8 +42566,7 @@ class SamlGroupRead { json['name'] = name; } if (_rolesSet || _apiMapResponse.containsKey('roles')) { - json['roles'] = - roles == null ? null : roles.map((i) => i.toJson()).toList(); + json['roles'] = roles?.map((i) => i.toJson())?.toList(); } if (_urlSet || _apiMapResponse.containsKey('url')) { json['url'] = url; @@ -44456,9 +42633,7 @@ class SamlGroupWrite { String get lookerGroupName { if (!_lookerGroupNameSet && _apiMapResponse.containsKey('looker_group_name')) { - _lookerGroupName = _apiMapResponse['looker_group_name'] == null - ? null - : _apiMapResponse['looker_group_name'].toString(); + _lookerGroupName = _apiMapResponse['looker_group_name']?.toString(); _lookerGroupNameSet = true; } return _lookerGroupName; @@ -44473,9 +42648,7 @@ class SamlGroupWrite { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -44490,9 +42663,8 @@ class SamlGroupWrite { List get roleIds { if (!_roleIdsSet && _apiMapResponse.containsKey('role_ids')) { - _roleIds = _apiMapResponse['role_ids'] == null - ? null - : _apiMapResponse['role_ids'].map((i) => i as int).toList(); + _roleIds = + _apiMapResponse['role_ids']?.map((i) => i as int)?.toList(); _roleIdsSet = true; } return _roleIds; @@ -44507,9 +42679,7 @@ class SamlGroupWrite { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -44607,9 +42777,7 @@ class SamlMetadataParseResult { String get idpIssuer { if (!_idpIssuerSet && _apiMapResponse.containsKey('idp_issuer')) { - _idpIssuer = _apiMapResponse['idp_issuer'] == null - ? null - : _apiMapResponse['idp_issuer'].toString(); + _idpIssuer = _apiMapResponse['idp_issuer']?.toString(); _idpIssuerSet = true; } return _idpIssuer; @@ -44624,9 +42792,7 @@ class SamlMetadataParseResult { String get idpUrl { if (!_idpUrlSet && _apiMapResponse.containsKey('idp_url')) { - _idpUrl = _apiMapResponse['idp_url'] == null - ? null - : _apiMapResponse['idp_url'].toString(); + _idpUrl = _apiMapResponse['idp_url']?.toString(); _idpUrlSet = true; } return _idpUrl; @@ -44641,9 +42807,7 @@ class SamlMetadataParseResult { String get idpCert { if (!_idpCertSet && _apiMapResponse.containsKey('idp_cert')) { - _idpCert = _apiMapResponse['idp_cert'] == null - ? null - : _apiMapResponse['idp_cert'].toString(); + _idpCert = _apiMapResponse['idp_cert']?.toString(); _idpCertSet = true; } return _idpCert; @@ -44719,9 +42883,7 @@ class SamlUserAttributeRead { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -44770,9 +42932,7 @@ class SamlUserAttributeRead { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -44818,9 +42978,8 @@ class SamlUserAttributeRead { json['required'] = required; } if (_userAttributesSet || _apiMapResponse.containsKey('user_attributes')) { - json['user_attributes'] = userAttributes == null - ? null - : userAttributes.map((i) => i.toJson()).toList(); + json['user_attributes'] = + userAttributes?.map((i) => i.toJson())?.toList(); } if (_urlSet || _apiMapResponse.containsKey('url')) { json['url'] = url; @@ -44850,9 +43009,7 @@ class SamlUserAttributeWrite { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -44883,11 +43040,9 @@ class SamlUserAttributeWrite { List get userAttributeIds { if (!_userAttributeIdsSet && _apiMapResponse.containsKey('user_attribute_ids')) { - _userAttributeIds = _apiMapResponse['user_attribute_ids'] == null - ? null - : _apiMapResponse['user_attribute_ids'] - .map((i) => i as int) - .toList(); + _userAttributeIds = _apiMapResponse['user_attribute_ids'] + ?.map((i) => i as int) + ?.toList(); _userAttributeIdsSet = true; } return _userAttributeIds; @@ -44902,9 +43057,7 @@ class SamlUserAttributeWrite { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -45071,9 +43224,7 @@ class ScheduledPlan { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -45134,9 +43285,7 @@ class ScheduledPlan { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -45167,9 +43316,7 @@ class ScheduledPlan { String get lookmlDashboardId { if (!_lookmlDashboardIdSet && _apiMapResponse.containsKey('lookml_dashboard_id')) { - _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null - ? null - : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id']?.toString(); _lookmlDashboardIdSet = true; } return _lookmlDashboardId; @@ -45184,9 +43331,7 @@ class ScheduledPlan { String get filtersString { if (!_filtersStringSet && _apiMapResponse.containsKey('filters_string')) { - _filtersString = _apiMapResponse['filters_string'] == null - ? null - : _apiMapResponse['filters_string'].toString(); + _filtersString = _apiMapResponse['filters_string']?.toString(); _filtersStringSet = true; } return _filtersString; @@ -45202,9 +43347,7 @@ class ScheduledPlan { String get dashboardFilters { if (!_dashboardFiltersSet && _apiMapResponse.containsKey('dashboard_filters')) { - _dashboardFilters = _apiMapResponse['dashboard_filters'] == null - ? null - : _apiMapResponse['dashboard_filters'].toString(); + _dashboardFilters = _apiMapResponse['dashboard_filters']?.toString(); _dashboardFiltersSet = true; } return _dashboardFilters; @@ -45281,9 +43424,7 @@ class ScheduledPlan { String get crontab { if (!_crontabSet && _apiMapResponse.containsKey('crontab')) { - _crontab = _apiMapResponse['crontab'] == null - ? null - : _apiMapResponse['crontab'].toString(); + _crontab = _apiMapResponse['crontab']?.toString(); _crontabSet = true; } return _crontab; @@ -45298,9 +43439,7 @@ class ScheduledPlan { String get datagroup { if (!_datagroupSet && _apiMapResponse.containsKey('datagroup')) { - _datagroup = _apiMapResponse['datagroup'] == null - ? null - : _apiMapResponse['datagroup'].toString(); + _datagroup = _apiMapResponse['datagroup']?.toString(); _datagroupSet = true; } return _datagroup; @@ -45315,9 +43454,7 @@ class ScheduledPlan { String get timezone { if (!_timezoneSet && _apiMapResponse.containsKey('timezone')) { - _timezone = _apiMapResponse['timezone'] == null - ? null - : _apiMapResponse['timezone'].toString(); + _timezone = _apiMapResponse['timezone']?.toString(); _timezoneSet = true; } return _timezone; @@ -45332,9 +43469,7 @@ class ScheduledPlan { String get queryId { if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { - _queryId = _apiMapResponse['query_id'] == null - ? null - : _apiMapResponse['query_id'].toString(); + _queryId = _apiMapResponse['query_id']?.toString(); _queryIdSet = true; } return _queryId; @@ -45401,9 +43536,7 @@ class ScheduledPlan { String get pdfPaperSize { if (!_pdfPaperSizeSet && _apiMapResponse.containsKey('pdf_paper_size')) { - _pdfPaperSize = _apiMapResponse['pdf_paper_size'] == null - ? null - : _apiMapResponse['pdf_paper_size'].toString(); + _pdfPaperSize = _apiMapResponse['pdf_paper_size']?.toString(); _pdfPaperSizeSet = true; } return _pdfPaperSize; @@ -45448,9 +43581,7 @@ class ScheduledPlan { String get colorTheme { if (!_colorThemeSet && _apiMapResponse.containsKey('color_theme')) { - _colorTheme = _apiMapResponse['color_theme'] == null - ? null - : _apiMapResponse['color_theme'].toString(); + _colorTheme = _apiMapResponse['color_theme']?.toString(); _colorThemeSet = true; } return _colorTheme; @@ -45545,9 +43676,7 @@ class ScheduledPlan { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -45707,9 +43836,8 @@ class ScheduledPlan { } if (_scheduledPlanDestinationSet || _apiMapResponse.containsKey('scheduled_plan_destination')) { - json['scheduled_plan_destination'] = scheduledPlanDestination == null - ? null - : scheduledPlanDestination.map((i) => i.toJson()).toList(); + json['scheduled_plan_destination'] = + scheduledPlanDestination?.map((i) => i.toJson())?.toList(); } if (_runOnceSet || _apiMapResponse.containsKey('run_once')) { json['run_once'] = runOnce; @@ -45740,26 +43868,22 @@ class ScheduledPlan { json['id'] = id; } if (_createdAtSet || _apiMapResponse.containsKey('created_at')) { - json['created_at'] = - createdAt == null ? null : createdAt.toIso8601String(); + json['created_at'] = createdAt?.toIso8601String(); } if (_updatedAtSet || _apiMapResponse.containsKey('updated_at')) { - json['updated_at'] = - updatedAt == null ? null : updatedAt.toIso8601String(); + json['updated_at'] = updatedAt?.toIso8601String(); } if (_titleSet || _apiMapResponse.containsKey('title')) { json['title'] = title; } if (_userSet || _apiMapResponse.containsKey('user')) { - json['user'] = user == null ? null : user.toJson(); + json['user'] = user?.toJson(); } if (_nextRunAtSet || _apiMapResponse.containsKey('next_run_at')) { - json['next_run_at'] = - nextRunAt == null ? null : nextRunAt.toIso8601String(); + json['next_run_at'] = nextRunAt?.toIso8601String(); } if (_lastRunAtSet || _apiMapResponse.containsKey('last_run_at')) { - json['last_run_at'] = - lastRunAt == null ? null : lastRunAt.toIso8601String(); + json['last_run_at'] = lastRunAt?.toIso8601String(); } if (_canSet || _apiMapResponse.containsKey('can')) { json['can'] = can; @@ -45841,9 +43965,7 @@ class ScheduledPlanDestination { String get format { if (!_formatSet && _apiMapResponse.containsKey('format')) { - _format = _apiMapResponse['format'] == null - ? null - : _apiMapResponse['format'].toString(); + _format = _apiMapResponse['format']?.toString(); _formatSet = true; } return _format; @@ -45889,9 +44011,7 @@ class ScheduledPlanDestination { String get address { if (!_addressSet && _apiMapResponse.containsKey('address')) { - _address = _apiMapResponse['address'] == null - ? null - : _apiMapResponse['address'].toString(); + _address = _apiMapResponse['address']?.toString(); _addressSet = true; } return _address; @@ -45922,9 +44042,7 @@ class ScheduledPlanDestination { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -45939,9 +44057,7 @@ class ScheduledPlanDestination { String get parameters { if (!_parametersSet && _apiMapResponse.containsKey('parameters')) { - _parameters = _apiMapResponse['parameters'] == null - ? null - : _apiMapResponse['parameters'].toString(); + _parameters = _apiMapResponse['parameters']?.toString(); _parametersSet = true; } return _parameters; @@ -45957,9 +44073,7 @@ class ScheduledPlanDestination { String get secretParameters { if (!_secretParametersSet && _apiMapResponse.containsKey('secret_parameters')) { - _secretParameters = _apiMapResponse['secret_parameters'] == null - ? null - : _apiMapResponse['secret_parameters'].toString(); + _secretParameters = _apiMapResponse['secret_parameters']?.toString(); _secretParametersSet = true; } return _secretParameters; @@ -45974,9 +44088,7 @@ class ScheduledPlanDestination { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -46071,9 +44183,7 @@ class Schema { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -46172,9 +44282,7 @@ class SchemaColumn { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -46190,9 +44298,7 @@ class SchemaColumn { String get sqlEscapedName { if (!_sqlEscapedNameSet && _apiMapResponse.containsKey('sql_escaped_name')) { - _sqlEscapedName = _apiMapResponse['sql_escaped_name'] == null - ? null - : _apiMapResponse['sql_escaped_name'].toString(); + _sqlEscapedName = _apiMapResponse['sql_escaped_name']?.toString(); _sqlEscapedNameSet = true; } return _sqlEscapedName; @@ -46207,9 +44313,7 @@ class SchemaColumn { String get schemaName { if (!_schemaNameSet && _apiMapResponse.containsKey('schema_name')) { - _schemaName = _apiMapResponse['schema_name'] == null - ? null - : _apiMapResponse['schema_name'].toString(); + _schemaName = _apiMapResponse['schema_name']?.toString(); _schemaNameSet = true; } return _schemaName; @@ -46225,9 +44329,7 @@ class SchemaColumn { String get dataTypeDatabase { if (!_dataTypeDatabaseSet && _apiMapResponse.containsKey('data_type_database')) { - _dataTypeDatabase = _apiMapResponse['data_type_database'] == null - ? null - : _apiMapResponse['data_type_database'].toString(); + _dataTypeDatabase = _apiMapResponse['data_type_database']?.toString(); _dataTypeDatabaseSet = true; } return _dataTypeDatabase; @@ -46242,9 +44344,7 @@ class SchemaColumn { String get dataType { if (!_dataTypeSet && _apiMapResponse.containsKey('data_type')) { - _dataType = _apiMapResponse['data_type'] == null - ? null - : _apiMapResponse['data_type'].toString(); + _dataType = _apiMapResponse['data_type']?.toString(); _dataTypeSet = true; } return _dataType; @@ -46260,9 +44360,7 @@ class SchemaColumn { String get dataTypeLooker { if (!_dataTypeLookerSet && _apiMapResponse.containsKey('data_type_looker')) { - _dataTypeLooker = _apiMapResponse['data_type_looker'] == null - ? null - : _apiMapResponse['data_type_looker'].toString(); + _dataTypeLooker = _apiMapResponse['data_type_looker']?.toString(); _dataTypeLookerSet = true; } return _dataTypeLooker; @@ -46277,9 +44375,7 @@ class SchemaColumn { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -46378,8 +44474,7 @@ class SchemaColumn { json['column_size'] = columnSize; } if (_snippetsSet || _apiMapResponse.containsKey('snippets')) { - json['snippets'] = - snippets == null ? null : snippets.map((i) => i.toJson()).toList(); + json['snippets'] = snippets?.map((i) => i.toJson())?.toList(); } return json; } @@ -46406,9 +44501,7 @@ class SchemaColumns { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -46424,9 +44517,7 @@ class SchemaColumns { String get sqlEscapedName { if (!_sqlEscapedNameSet && _apiMapResponse.containsKey('sql_escaped_name')) { - _sqlEscapedName = _apiMapResponse['sql_escaped_name'] == null - ? null - : _apiMapResponse['sql_escaped_name'].toString(); + _sqlEscapedName = _apiMapResponse['sql_escaped_name']?.toString(); _sqlEscapedNameSet = true; } return _sqlEscapedName; @@ -46441,9 +44532,7 @@ class SchemaColumns { String get schemaName { if (!_schemaNameSet && _apiMapResponse.containsKey('schema_name')) { - _schemaName = _apiMapResponse['schema_name'] == null - ? null - : _apiMapResponse['schema_name'].toString(); + _schemaName = _apiMapResponse['schema_name']?.toString(); _schemaNameSet = true; } return _schemaName; @@ -46511,8 +44600,7 @@ class SchemaColumns { json['schema_name'] = schemaName; } if (_columnsSet || _apiMapResponse.containsKey('columns')) { - json['columns'] = - columns == null ? null : columns.map((i) => i.toJson()).toList(); + json['columns'] = columns?.map((i) => i.toJson())?.toList(); } return json; } @@ -46545,9 +44633,7 @@ class SchemaTable { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -46563,9 +44649,7 @@ class SchemaTable { String get sqlEscapedName { if (!_sqlEscapedNameSet && _apiMapResponse.containsKey('sql_escaped_name')) { - _sqlEscapedName = _apiMapResponse['sql_escaped_name'] == null - ? null - : _apiMapResponse['sql_escaped_name'].toString(); + _sqlEscapedName = _apiMapResponse['sql_escaped_name']?.toString(); _sqlEscapedNameSet = true; } return _sqlEscapedName; @@ -46580,9 +44664,7 @@ class SchemaTable { String get schemaName { if (!_schemaNameSet && _apiMapResponse.containsKey('schema_name')) { - _schemaName = _apiMapResponse['schema_name'] == null - ? null - : _apiMapResponse['schema_name'].toString(); + _schemaName = _apiMapResponse['schema_name']?.toString(); _schemaNameSet = true; } return _schemaName; @@ -46612,9 +44694,7 @@ class SchemaTable { String get external { if (!_externalSet && _apiMapResponse.containsKey('external')) { - _external = _apiMapResponse['external'] == null - ? null - : _apiMapResponse['external'].toString(); + _external = _apiMapResponse['external']?.toString(); _externalSet = true; } return _external; @@ -46688,8 +44768,7 @@ class SchemaTable { json['external'] = external; } if (_snippetsSet || _apiMapResponse.containsKey('snippets')) { - json['snippets'] = - snippets == null ? null : snippets.map((i) => i.toJson()).toList(); + json['snippets'] = snippets?.map((i) => i.toJson())?.toList(); } return json; } @@ -46716,9 +44795,7 @@ class SchemaTables { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -46813,8 +44890,7 @@ class SchemaTables { json['is_default'] = isDefault; } if (_tablesSet || _apiMapResponse.containsKey('tables')) { - json['tables'] = - tables == null ? null : tables.map((i) => i.toJson()).toList(); + json['tables'] = tables?.map((i) => i.toJson())?.toList(); } if (_tableLimitHitSet || _apiMapResponse.containsKey('table_limit_hit')) { json['table_limit_hit'] = tableLimitHit; @@ -46907,9 +44983,7 @@ class Session { String get ipAddress { if (!_ipAddressSet && _apiMapResponse.containsKey('ip_address')) { - _ipAddress = _apiMapResponse['ip_address'] == null - ? null - : _apiMapResponse['ip_address'].toString(); + _ipAddress = _apiMapResponse['ip_address']?.toString(); _ipAddressSet = true; } return _ipAddress; @@ -46924,9 +44998,7 @@ class Session { String get browser { if (!_browserSet && _apiMapResponse.containsKey('browser')) { - _browser = _apiMapResponse['browser'] == null - ? null - : _apiMapResponse['browser'].toString(); + _browser = _apiMapResponse['browser']?.toString(); _browserSet = true; } return _browser; @@ -46942,9 +45014,7 @@ class Session { String get operatingSystem { if (!_operatingSystemSet && _apiMapResponse.containsKey('operating_system')) { - _operatingSystem = _apiMapResponse['operating_system'] == null - ? null - : _apiMapResponse['operating_system'].toString(); + _operatingSystem = _apiMapResponse['operating_system']?.toString(); _operatingSystemSet = true; } return _operatingSystem; @@ -46959,9 +45029,7 @@ class Session { String get city { if (!_citySet && _apiMapResponse.containsKey('city')) { - _city = _apiMapResponse['city'] == null - ? null - : _apiMapResponse['city'].toString(); + _city = _apiMapResponse['city']?.toString(); _citySet = true; } return _city; @@ -46976,9 +45044,7 @@ class Session { String get state { if (!_stateSet && _apiMapResponse.containsKey('state')) { - _state = _apiMapResponse['state'] == null - ? null - : _apiMapResponse['state'].toString(); + _state = _apiMapResponse['state']?.toString(); _stateSet = true; } return _state; @@ -46993,9 +45059,7 @@ class Session { String get country { if (!_countrySet && _apiMapResponse.containsKey('country')) { - _country = _apiMapResponse['country'] == null - ? null - : _apiMapResponse['country'].toString(); + _country = _apiMapResponse['country']?.toString(); _countrySet = true; } return _country; @@ -47011,9 +45075,7 @@ class Session { String get credentialsType { if (!_credentialsTypeSet && _apiMapResponse.containsKey('credentials_type')) { - _credentialsType = _apiMapResponse['credentials_type'] == null - ? null - : _apiMapResponse['credentials_type'].toString(); + _credentialsType = _apiMapResponse['credentials_type']?.toString(); _credentialsTypeSet = true; } return _credentialsType; @@ -47028,9 +45090,7 @@ class Session { String get extendedAt { if (!_extendedAtSet && _apiMapResponse.containsKey('extended_at')) { - _extendedAt = _apiMapResponse['extended_at'] == null - ? null - : _apiMapResponse['extended_at'].toString(); + _extendedAt = _apiMapResponse['extended_at']?.toString(); _extendedAtSet = true; } return _extendedAt; @@ -47075,9 +45135,7 @@ class Session { String get createdAt { if (!_createdAtSet && _apiMapResponse.containsKey('created_at')) { - _createdAt = _apiMapResponse['created_at'] == null - ? null - : _apiMapResponse['created_at'].toString(); + _createdAt = _apiMapResponse['created_at']?.toString(); _createdAtSet = true; } return _createdAt; @@ -47092,9 +45150,7 @@ class Session { String get expiresAt { if (!_expiresAtSet && _apiMapResponse.containsKey('expires_at')) { - _expiresAt = _apiMapResponse['expires_at'] == null - ? null - : _apiMapResponse['expires_at'].toString(); + _expiresAt = _apiMapResponse['expires_at']?.toString(); _expiresAtSet = true; } return _expiresAt; @@ -47109,9 +45165,7 @@ class Session { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -47520,14 +45574,11 @@ class Setting { } if (_whitelabelConfigurationSet || _apiMapResponse.containsKey('whitelabel_configuration')) { - json['whitelabel_configuration'] = whitelabelConfiguration == null - ? null - : whitelabelConfiguration.toJson(); + json['whitelabel_configuration'] = whitelabelConfiguration?.toJson(); } if (_customWelcomeEmailSet || _apiMapResponse.containsKey('custom_welcome_email')) { - json['custom_welcome_email'] = - customWelcomeEmail == null ? null : customWelcomeEmail.toJson(); + json['custom_welcome_email'] = customWelcomeEmail?.toJson(); } return json; } @@ -47566,9 +45617,7 @@ class SmtpNodeStatus { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -47583,9 +45632,7 @@ class SmtpNodeStatus { String get hostname { if (!_hostnameSet && _apiMapResponse.containsKey('hostname')) { - _hostname = _apiMapResponse['hostname'] == null - ? null - : _apiMapResponse['hostname'].toString(); + _hostname = _apiMapResponse['hostname']?.toString(); _hostnameSet = true; } return _hostname; @@ -47736,9 +45783,7 @@ class SmtpStatus { json['node_count'] = nodeCount; } if (_nodeStatusSet || _apiMapResponse.containsKey('node_status')) { - json['node_status'] = nodeStatus == null - ? null - : nodeStatus.map((i) => i.toJson()).toList(); + json['node_status'] = nodeStatus?.map((i) => i.toJson())?.toList(); } return json; } @@ -47762,9 +45807,7 @@ class Snippet { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -47779,9 +45822,7 @@ class Snippet { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -47796,9 +45837,7 @@ class Snippet { String get sql { if (!_sqlSet && _apiMapResponse.containsKey('sql')) { - _sql = _apiMapResponse['sql'] == null - ? null - : _apiMapResponse['sql'].toString(); + _sql = _apiMapResponse['sql']?.toString(); _sqlSet = true; } return _sql; @@ -47915,9 +45954,7 @@ class SqlQuery { String get slug { if (!_slugSet && _apiMapResponse.containsKey('slug')) { - _slug = _apiMapResponse['slug'] == null - ? null - : _apiMapResponse['slug'].toString(); + _slug = _apiMapResponse['slug']?.toString(); _slugSet = true; } return _slug; @@ -47977,9 +46014,7 @@ class SqlQuery { String get sql { if (!_sqlSet && _apiMapResponse.containsKey('sql')) { - _sql = _apiMapResponse['sql'] == null - ? null - : _apiMapResponse['sql'].toString(); + _sql = _apiMapResponse['sql']?.toString(); _sqlSet = true; } return _sql; @@ -47994,9 +46029,7 @@ class SqlQuery { String get lastRunAt { if (!_lastRunAtSet && _apiMapResponse.containsKey('last_run_at')) { - _lastRunAt = _apiMapResponse['last_run_at'] == null - ? null - : _apiMapResponse['last_run_at'].toString(); + _lastRunAt = _apiMapResponse['last_run_at']?.toString(); _lastRunAtSet = true; } return _lastRunAt; @@ -48027,9 +46060,7 @@ class SqlQuery { String get modelName { if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { - _modelName = _apiMapResponse['model_name'] == null - ? null - : _apiMapResponse['model_name'].toString(); + _modelName = _apiMapResponse['model_name']?.toString(); _modelNameSet = true; } return _modelName; @@ -48060,9 +46091,7 @@ class SqlQuery { String get exploreUrl { if (!_exploreUrlSet && _apiMapResponse.containsKey('explore_url')) { - _exploreUrl = _apiMapResponse['explore_url'] == null - ? null - : _apiMapResponse['explore_url'].toString(); + _exploreUrl = _apiMapResponse['explore_url']?.toString(); _exploreUrlSet = true; } return _exploreUrl; @@ -48167,13 +46196,13 @@ class SqlQuery { json['last_run_at'] = lastRunAt; } if (_connectionSet || _apiMapResponse.containsKey('connection')) { - json['connection'] = connection == null ? null : connection.toJson(); + json['connection'] = connection?.toJson(); } if (_modelNameSet || _apiMapResponse.containsKey('model_name')) { json['model_name'] = modelName; } if (_creatorSet || _apiMapResponse.containsKey('creator')) { - json['creator'] = creator == null ? null : creator.toJson(); + json['creator'] = creator?.toJson(); } if (_exploreUrlSet || _apiMapResponse.containsKey('explore_url')) { json['explore_url'] = exploreUrl; @@ -48215,9 +46244,7 @@ class SqlQueryCreate { String get connectionName { if (!_connectionNameSet && _apiMapResponse.containsKey('connection_name')) { - _connectionName = _apiMapResponse['connection_name'] == null - ? null - : _apiMapResponse['connection_name'].toString(); + _connectionName = _apiMapResponse['connection_name']?.toString(); _connectionNameSet = true; } return _connectionName; @@ -48232,9 +46259,7 @@ class SqlQueryCreate { String get connectionId { if (!_connectionIdSet && _apiMapResponse.containsKey('connection_id')) { - _connectionId = _apiMapResponse['connection_id'] == null - ? null - : _apiMapResponse['connection_id'].toString(); + _connectionId = _apiMapResponse['connection_id']?.toString(); _connectionIdSet = true; } return _connectionId; @@ -48249,9 +46274,7 @@ class SqlQueryCreate { String get modelName { if (!_modelNameSet && _apiMapResponse.containsKey('model_name')) { - _modelName = _apiMapResponse['model_name'] == null - ? null - : _apiMapResponse['model_name'].toString(); + _modelName = _apiMapResponse['model_name']?.toString(); _modelNameSet = true; } return _modelName; @@ -48266,9 +46289,7 @@ class SqlQueryCreate { String get sql { if (!_sqlSet && _apiMapResponse.containsKey('sql')) { - _sql = _apiMapResponse['sql'] == null - ? null - : _apiMapResponse['sql'].toString(); + _sql = _apiMapResponse['sql']?.toString(); _sqlSet = true; } return _sql; @@ -48353,9 +46374,7 @@ class SshPublicKey { String get publicKey { if (!_publicKeySet && _apiMapResponse.containsKey('public_key')) { - _publicKey = _apiMapResponse['public_key'] == null - ? null - : _apiMapResponse['public_key'].toString(); + _publicKey = _apiMapResponse['public_key']?.toString(); _publicKeySet = true; } return _publicKey; @@ -48437,9 +46456,7 @@ class SshServer { String get sshServerId { if (!_sshServerIdSet && _apiMapResponse.containsKey('ssh_server_id')) { - _sshServerId = _apiMapResponse['ssh_server_id'] == null - ? null - : _apiMapResponse['ssh_server_id'].toString(); + _sshServerId = _apiMapResponse['ssh_server_id']?.toString(); _sshServerIdSet = true; } return _sshServerId; @@ -48454,9 +46471,7 @@ class SshServer { String get sshServerName { if (!_sshServerNameSet && _apiMapResponse.containsKey('ssh_server_name')) { - _sshServerName = _apiMapResponse['ssh_server_name'] == null - ? null - : _apiMapResponse['ssh_server_name'].toString(); + _sshServerName = _apiMapResponse['ssh_server_name']?.toString(); _sshServerNameSet = true; } return _sshServerName; @@ -48471,9 +46486,7 @@ class SshServer { String get sshServerHost { if (!_sshServerHostSet && _apiMapResponse.containsKey('ssh_server_host')) { - _sshServerHost = _apiMapResponse['ssh_server_host'] == null - ? null - : _apiMapResponse['ssh_server_host'].toString(); + _sshServerHost = _apiMapResponse['ssh_server_host']?.toString(); _sshServerHostSet = true; } return _sshServerHost; @@ -48503,9 +46516,7 @@ class SshServer { String get sshServerUser { if (!_sshServerUserSet && _apiMapResponse.containsKey('ssh_server_user')) { - _sshServerUser = _apiMapResponse['ssh_server_user'] == null - ? null - : _apiMapResponse['ssh_server_user'].toString(); + _sshServerUser = _apiMapResponse['ssh_server_user']?.toString(); _sshServerUserSet = true; } return _sshServerUser; @@ -48520,9 +46531,7 @@ class SshServer { String get fingerPrint { if (!_fingerPrintSet && _apiMapResponse.containsKey('finger_print')) { - _fingerPrint = _apiMapResponse['finger_print'] == null - ? null - : _apiMapResponse['finger_print'].toString(); + _fingerPrint = _apiMapResponse['finger_print']?.toString(); _fingerPrintSet = true; } return _fingerPrint; @@ -48538,9 +46547,7 @@ class SshServer { String get shaFingerPrint { if (!_shaFingerPrintSet && _apiMapResponse.containsKey('sha_finger_print')) { - _shaFingerPrint = _apiMapResponse['sha_finger_print'] == null - ? null - : _apiMapResponse['sha_finger_print'].toString(); + _shaFingerPrint = _apiMapResponse['sha_finger_print']?.toString(); _shaFingerPrintSet = true; } return _shaFingerPrint; @@ -48555,9 +46562,7 @@ class SshServer { String get publicKey { if (!_publicKeySet && _apiMapResponse.containsKey('public_key')) { - _publicKey = _apiMapResponse['public_key'] == null - ? null - : _apiMapResponse['public_key'].toString(); + _publicKey = _apiMapResponse['public_key']?.toString(); _publicKeySet = true; } return _publicKey; @@ -48572,9 +46577,7 @@ class SshServer { String get status { if (!_statusSet && _apiMapResponse.containsKey('status')) { - _status = _apiMapResponse['status'] == null - ? null - : _apiMapResponse['status'].toString(); + _status = _apiMapResponse['status']?.toString(); _statusSet = true; } return _status; @@ -48685,9 +46688,7 @@ class SshTunnel { String get tunnelId { if (!_tunnelIdSet && _apiMapResponse.containsKey('tunnel_id')) { - _tunnelId = _apiMapResponse['tunnel_id'] == null - ? null - : _apiMapResponse['tunnel_id'].toString(); + _tunnelId = _apiMapResponse['tunnel_id']?.toString(); _tunnelIdSet = true; } return _tunnelId; @@ -48702,9 +46703,7 @@ class SshTunnel { String get sshServerId { if (!_sshServerIdSet && _apiMapResponse.containsKey('ssh_server_id')) { - _sshServerId = _apiMapResponse['ssh_server_id'] == null - ? null - : _apiMapResponse['ssh_server_id'].toString(); + _sshServerId = _apiMapResponse['ssh_server_id']?.toString(); _sshServerIdSet = true; } return _sshServerId; @@ -48719,9 +46718,7 @@ class SshTunnel { String get sshServerName { if (!_sshServerNameSet && _apiMapResponse.containsKey('ssh_server_name')) { - _sshServerName = _apiMapResponse['ssh_server_name'] == null - ? null - : _apiMapResponse['ssh_server_name'].toString(); + _sshServerName = _apiMapResponse['ssh_server_name']?.toString(); _sshServerNameSet = true; } return _sshServerName; @@ -48736,9 +46733,7 @@ class SshTunnel { String get sshServerHost { if (!_sshServerHostSet && _apiMapResponse.containsKey('ssh_server_host')) { - _sshServerHost = _apiMapResponse['ssh_server_host'] == null - ? null - : _apiMapResponse['ssh_server_host'].toString(); + _sshServerHost = _apiMapResponse['ssh_server_host']?.toString(); _sshServerHostSet = true; } return _sshServerHost; @@ -48768,9 +46763,7 @@ class SshTunnel { String get sshServerUser { if (!_sshServerUserSet && _apiMapResponse.containsKey('ssh_server_user')) { - _sshServerUser = _apiMapResponse['ssh_server_user'] == null - ? null - : _apiMapResponse['ssh_server_user'].toString(); + _sshServerUser = _apiMapResponse['ssh_server_user']?.toString(); _sshServerUserSet = true; } return _sshServerUser; @@ -48785,9 +46778,7 @@ class SshTunnel { String get lastAttempt { if (!_lastAttemptSet && _apiMapResponse.containsKey('last_attempt')) { - _lastAttempt = _apiMapResponse['last_attempt'] == null - ? null - : _apiMapResponse['last_attempt'].toString(); + _lastAttempt = _apiMapResponse['last_attempt']?.toString(); _lastAttemptSet = true; } return _lastAttempt; @@ -48817,9 +46808,7 @@ class SshTunnel { String get databaseHost { if (!_databaseHostSet && _apiMapResponse.containsKey('database_host')) { - _databaseHost = _apiMapResponse['database_host'] == null - ? null - : _apiMapResponse['database_host'].toString(); + _databaseHost = _apiMapResponse['database_host']?.toString(); _databaseHostSet = true; } return _databaseHost; @@ -48849,9 +46838,7 @@ class SshTunnel { String get status { if (!_statusSet && _apiMapResponse.containsKey('status')) { - _status = _apiMapResponse['status'] == null - ? null - : _apiMapResponse['status'].toString(); + _status = _apiMapResponse['status']?.toString(); _statusSet = true; } return _status; @@ -48941,9 +46928,8 @@ class SupportAccessAddEntries { List get emails { if (!_emailsSet && _apiMapResponse.containsKey('emails')) { - _emails = _apiMapResponse['emails'] == null - ? null - : _apiMapResponse['emails'].map((i) => i as String).toList(); + _emails = + _apiMapResponse['emails']?.map((i) => i as String)?.toList(); _emailsSet = true; } return _emails; @@ -48958,9 +46944,7 @@ class SupportAccessAddEntries { String get reason { if (!_reasonSet && _apiMapResponse.containsKey('reason')) { - _reason = _apiMapResponse['reason'] == null - ? null - : _apiMapResponse['reason'].toString(); + _reason = _apiMapResponse['reason']?.toString(); _reasonSet = true; } return _reason; @@ -49033,9 +47017,7 @@ class SupportAccessAllowlistEntry { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -49050,9 +47032,7 @@ class SupportAccessAllowlistEntry { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -49067,9 +47047,7 @@ class SupportAccessAllowlistEntry { String get fullName { if (!_fullNameSet && _apiMapResponse.containsKey('full_name')) { - _fullName = _apiMapResponse['full_name'] == null - ? null - : _apiMapResponse['full_name'].toString(); + _fullName = _apiMapResponse['full_name']?.toString(); _fullNameSet = true; } return _fullName; @@ -49084,9 +47062,7 @@ class SupportAccessAllowlistEntry { String get reason { if (!_reasonSet && _apiMapResponse.containsKey('reason')) { - _reason = _apiMapResponse['reason'] == null - ? null - : _apiMapResponse['reason'].toString(); + _reason = _apiMapResponse['reason']?.toString(); _reasonSet = true; } return _reason; @@ -49155,8 +47131,7 @@ class SupportAccessAllowlistEntry { json['reason'] = reason; } if (_createdDateSet || _apiMapResponse.containsKey('created_date')) { - json['created_date'] = - createdDate == null ? null : createdDate.toIso8601String(); + json['created_date'] = createdDate?.toIso8601String(); } return json; } @@ -49297,8 +47272,7 @@ class SupportAccessStatus { json['open'] = open; } if (_openUntilSet || _apiMapResponse.containsKey('open_until')) { - json['open_until'] = - openUntil == null ? null : openUntil.toIso8601String(); + json['open_until'] = openUntil?.toIso8601String(); } return json; } @@ -49604,9 +47578,7 @@ class Theme { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -49664,10 +47636,10 @@ class Theme { json['can'] = can; } if (_beginAtSet || _apiMapResponse.containsKey('begin_at')) { - json['begin_at'] = beginAt == null ? null : beginAt.toIso8601String(); + json['begin_at'] = beginAt?.toIso8601String(); } if (_endAtSet || _apiMapResponse.containsKey('end_at')) { - json['end_at'] = endAt == null ? null : endAt.toIso8601String(); + json['end_at'] = endAt?.toIso8601String(); } if (_idSet || _apiMapResponse.containsKey('id')) { json['id'] = id; @@ -49676,7 +47648,7 @@ class Theme { json['name'] = name; } if (_settingsSet || _apiMapResponse.containsKey('settings')) { - json['settings'] = settings == null ? null : settings.toJson(); + json['settings'] = settings?.toJson(); } return json; } @@ -49743,9 +47715,7 @@ class ThemeSettings { String get backgroundColor { if (!_backgroundColorSet && _apiMapResponse.containsKey('background_color')) { - _backgroundColor = _apiMapResponse['background_color'] == null - ? null - : _apiMapResponse['background_color'].toString(); + _backgroundColor = _apiMapResponse['background_color']?.toString(); _backgroundColorSet = true; } return _backgroundColor; @@ -49760,9 +47730,7 @@ class ThemeSettings { String get baseFontSize { if (!_baseFontSizeSet && _apiMapResponse.containsKey('base_font_size')) { - _baseFontSize = _apiMapResponse['base_font_size'] == null - ? null - : _apiMapResponse['base_font_size'].toString(); + _baseFontSize = _apiMapResponse['base_font_size']?.toString(); _baseFontSizeSet = true; } return _baseFontSize; @@ -49778,9 +47746,7 @@ class ThemeSettings { String get colorCollectionId { if (!_colorCollectionIdSet && _apiMapResponse.containsKey('color_collection_id')) { - _colorCollectionId = _apiMapResponse['color_collection_id'] == null - ? null - : _apiMapResponse['color_collection_id'].toString(); + _colorCollectionId = _apiMapResponse['color_collection_id']?.toString(); _colorCollectionIdSet = true; } return _colorCollectionId; @@ -49795,9 +47761,7 @@ class ThemeSettings { String get fontColor { if (!_fontColorSet && _apiMapResponse.containsKey('font_color')) { - _fontColor = _apiMapResponse['font_color'] == null - ? null - : _apiMapResponse['font_color'].toString(); + _fontColor = _apiMapResponse['font_color']?.toString(); _fontColorSet = true; } return _fontColor; @@ -49812,9 +47776,7 @@ class ThemeSettings { String get fontFamily { if (!_fontFamilySet && _apiMapResponse.containsKey('font_family')) { - _fontFamily = _apiMapResponse['font_family'] == null - ? null - : _apiMapResponse['font_family'].toString(); + _fontFamily = _apiMapResponse['font_family']?.toString(); _fontFamilySet = true; } return _fontFamily; @@ -49829,9 +47791,7 @@ class ThemeSettings { String get fontSource { if (!_fontSourceSet && _apiMapResponse.containsKey('font_source')) { - _fontSource = _apiMapResponse['font_source'] == null - ? null - : _apiMapResponse['font_source'].toString(); + _fontSource = _apiMapResponse['font_source']?.toString(); _fontSourceSet = true; } return _fontSource; @@ -49847,9 +47807,7 @@ class ThemeSettings { String get infoButtonColor { if (!_infoButtonColorSet && _apiMapResponse.containsKey('info_button_color')) { - _infoButtonColor = _apiMapResponse['info_button_color'] == null - ? null - : _apiMapResponse['info_button_color'].toString(); + _infoButtonColor = _apiMapResponse['info_button_color']?.toString(); _infoButtonColorSet = true; } return _infoButtonColor; @@ -49865,9 +47823,7 @@ class ThemeSettings { String get primaryButtonColor { if (!_primaryButtonColorSet && _apiMapResponse.containsKey('primary_button_color')) { - _primaryButtonColor = _apiMapResponse['primary_button_color'] == null - ? null - : _apiMapResponse['primary_button_color'].toString(); + _primaryButtonColor = _apiMapResponse['primary_button_color']?.toString(); _primaryButtonColorSet = true; } return _primaryButtonColor; @@ -49914,9 +47870,7 @@ class ThemeSettings { String get textTileTextColor { if (!_textTileTextColorSet && _apiMapResponse.containsKey('text_tile_text_color')) { - _textTileTextColor = _apiMapResponse['text_tile_text_color'] == null - ? null - : _apiMapResponse['text_tile_text_color'].toString(); + _textTileTextColor = _apiMapResponse['text_tile_text_color']?.toString(); _textTileTextColorSet = true; } return _textTileTextColor; @@ -49932,9 +47886,8 @@ class ThemeSettings { String get tileBackgroundColor { if (!_tileBackgroundColorSet && _apiMapResponse.containsKey('tile_background_color')) { - _tileBackgroundColor = _apiMapResponse['tile_background_color'] == null - ? null - : _apiMapResponse['tile_background_color'].toString(); + _tileBackgroundColor = + _apiMapResponse['tile_background_color']?.toString(); _tileBackgroundColorSet = true; } return _tileBackgroundColor; @@ -49949,9 +47902,7 @@ class ThemeSettings { String get tileTextColor { if (!_tileTextColorSet && _apiMapResponse.containsKey('tile_text_color')) { - _tileTextColor = _apiMapResponse['tile_text_color'] == null - ? null - : _apiMapResponse['tile_text_color'].toString(); + _tileTextColor = _apiMapResponse['tile_text_color']?.toString(); _tileTextColorSet = true; } return _tileTextColor; @@ -49966,9 +47917,7 @@ class ThemeSettings { String get titleColor { if (!_titleColorSet && _apiMapResponse.containsKey('title_color')) { - _titleColor = _apiMapResponse['title_color'] == null - ? null - : _apiMapResponse['title_color'].toString(); + _titleColor = _apiMapResponse['title_color']?.toString(); _titleColorSet = true; } return _titleColor; @@ -49984,9 +47933,7 @@ class ThemeSettings { String get warnButtonColor { if (!_warnButtonColorSet && _apiMapResponse.containsKey('warn_button_color')) { - _warnButtonColor = _apiMapResponse['warn_button_color'] == null - ? null - : _apiMapResponse['warn_button_color'].toString(); + _warnButtonColor = _apiMapResponse['warn_button_color']?.toString(); _warnButtonColorSet = true; } return _warnButtonColor; @@ -50002,9 +47949,7 @@ class ThemeSettings { String get tileTitleAlignment { if (!_tileTitleAlignmentSet && _apiMapResponse.containsKey('tile_title_alignment')) { - _tileTitleAlignment = _apiMapResponse['tile_title_alignment'] == null - ? null - : _apiMapResponse['tile_title_alignment'].toString(); + _tileTitleAlignment = _apiMapResponse['tile_title_alignment']?.toString(); _tileTitleAlignmentSet = true; } return _tileTitleAlignment; @@ -50139,9 +48084,7 @@ class Timezone { String get value { if (!_valueSet && _apiMapResponse.containsKey('value')) { - _value = _apiMapResponse['value'] == null - ? null - : _apiMapResponse['value'].toString(); + _value = _apiMapResponse['value']?.toString(); _valueSet = true; } return _value; @@ -50156,9 +48099,7 @@ class Timezone { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -50173,9 +48114,7 @@ class Timezone { String get group { if (!_groupSet && _apiMapResponse.containsKey('group')) { - _group = _apiMapResponse['group'] == null - ? null - : _apiMapResponse['group'].toString(); + _group = _apiMapResponse['group']?.toString(); _groupSet = true; } return _group; @@ -50241,9 +48180,7 @@ class UpdateCommand { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -50258,9 +48195,7 @@ class UpdateCommand { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -50324,9 +48259,7 @@ class UpdateFolder { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -50341,9 +48274,7 @@ class UpdateFolder { String get parentId { if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { - _parentId = _apiMapResponse['parent_id'] == null - ? null - : _apiMapResponse['parent_id'].toString(); + _parentId = _apiMapResponse['parent_id']?.toString(); _parentIdSet = true; } return _parentId; @@ -50521,9 +48452,7 @@ class User { String get avatarUrl { if (!_avatarUrlSet && _apiMapResponse.containsKey('avatar_url')) { - _avatarUrl = _apiMapResponse['avatar_url'] == null - ? null - : _apiMapResponse['avatar_url'].toString(); + _avatarUrl = _apiMapResponse['avatar_url']?.toString(); _avatarUrlSet = true; } return _avatarUrl; @@ -50540,9 +48469,7 @@ class User { if (!_avatarUrlWithoutSizingSet && _apiMapResponse.containsKey('avatar_url_without_sizing')) { _avatarUrlWithoutSizing = - _apiMapResponse['avatar_url_without_sizing'] == null - ? null - : _apiMapResponse['avatar_url_without_sizing'].toString(); + _apiMapResponse['avatar_url_without_sizing']?.toString(); _avatarUrlWithoutSizingSet = true; } return _avatarUrlWithoutSizing; @@ -50720,9 +48647,7 @@ class User { String get displayName { if (!_displayNameSet && _apiMapResponse.containsKey('display_name')) { - _displayName = _apiMapResponse['display_name'] == null - ? null - : _apiMapResponse['display_name'].toString(); + _displayName = _apiMapResponse['display_name']?.toString(); _displayNameSet = true; } return _displayName; @@ -50737,9 +48662,7 @@ class User { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -50770,9 +48693,7 @@ class User { String get firstName { if (!_firstNameSet && _apiMapResponse.containsKey('first_name')) { - _firstName = _apiMapResponse['first_name'] == null - ? null - : _apiMapResponse['first_name'].toString(); + _firstName = _apiMapResponse['first_name']?.toString(); _firstNameSet = true; } return _firstName; @@ -50787,9 +48708,8 @@ class User { List get groupIds { if (!_groupIdsSet && _apiMapResponse.containsKey('group_ids')) { - _groupIds = _apiMapResponse['group_ids'] == null - ? null - : _apiMapResponse['group_ids'].map((i) => i as int).toList(); + _groupIds = + _apiMapResponse['group_ids']?.map((i) => i as int)?.toList(); _groupIdsSet = true; } return _groupIds; @@ -50804,9 +48724,7 @@ class User { String get homeFolderId { if (!_homeFolderIdSet && _apiMapResponse.containsKey('home_folder_id')) { - _homeFolderId = _apiMapResponse['home_folder_id'] == null - ? null - : _apiMapResponse['home_folder_id'].toString(); + _homeFolderId = _apiMapResponse['home_folder_id']?.toString(); _homeFolderIdSet = true; } return _homeFolderId; @@ -50851,9 +48769,7 @@ class User { String get lastName { if (!_lastNameSet && _apiMapResponse.containsKey('last_name')) { - _lastName = _apiMapResponse['last_name'] == null - ? null - : _apiMapResponse['last_name'].toString(); + _lastName = _apiMapResponse['last_name']?.toString(); _lastNameSet = true; } return _lastName; @@ -50868,9 +48784,7 @@ class User { String get locale { if (!_localeSet && _apiMapResponse.containsKey('locale')) { - _locale = _apiMapResponse['locale'] == null - ? null - : _apiMapResponse['locale'].toString(); + _locale = _apiMapResponse['locale']?.toString(); _localeSet = true; } return _locale; @@ -50885,11 +48799,9 @@ class User { List get lookerVersions { if (!_lookerVersionsSet && _apiMapResponse.containsKey('looker_versions')) { - _lookerVersions = _apiMapResponse['looker_versions'] == null - ? null - : _apiMapResponse['looker_versions'] - .map((i) => i as String) - .toList(); + _lookerVersions = _apiMapResponse['looker_versions'] + ?.map((i) => i as String) + ?.toList(); _lookerVersionsSet = true; } return _lookerVersions; @@ -50952,9 +48864,8 @@ class User { List get roleIds { if (!_roleIdsSet && _apiMapResponse.containsKey('role_ids')) { - _roleIds = _apiMapResponse['role_ids'] == null - ? null - : _apiMapResponse['role_ids'].map((i) => i as int).toList(); + _roleIds = + _apiMapResponse['role_ids']?.map((i) => i as int)?.toList(); _roleIdsSet = true; } return _roleIds; @@ -51085,9 +48996,7 @@ class User { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -51137,51 +49046,41 @@ class User { } if (_credentialsApi3Set || _apiMapResponse.containsKey('credentials_api3')) { - json['credentials_api3'] = credentialsApi3 == null - ? null - : credentialsApi3.map((i) => i.toJson()).toList(); + json['credentials_api3'] = + credentialsApi3?.map((i) => i.toJson())?.toList(); } if (_credentialsEmailSet || _apiMapResponse.containsKey('credentials_email')) { - json['credentials_email'] = - credentialsEmail == null ? null : credentialsEmail.toJson(); + json['credentials_email'] = credentialsEmail?.toJson(); } if (_credentialsEmbedSet || _apiMapResponse.containsKey('credentials_embed')) { - json['credentials_embed'] = credentialsEmbed == null - ? null - : credentialsEmbed.map((i) => i.toJson()).toList(); + json['credentials_embed'] = + credentialsEmbed?.map((i) => i.toJson())?.toList(); } if (_credentialsGoogleSet || _apiMapResponse.containsKey('credentials_google')) { - json['credentials_google'] = - credentialsGoogle == null ? null : credentialsGoogle.toJson(); + json['credentials_google'] = credentialsGoogle?.toJson(); } if (_credentialsLdapSet || _apiMapResponse.containsKey('credentials_ldap')) { - json['credentials_ldap'] = - credentialsLdap == null ? null : credentialsLdap.toJson(); + json['credentials_ldap'] = credentialsLdap?.toJson(); } if (_credentialsLookerOpenidSet || _apiMapResponse.containsKey('credentials_looker_openid')) { - json['credentials_looker_openid'] = credentialsLookerOpenid == null - ? null - : credentialsLookerOpenid.toJson(); + json['credentials_looker_openid'] = credentialsLookerOpenid?.toJson(); } if (_credentialsOidcSet || _apiMapResponse.containsKey('credentials_oidc')) { - json['credentials_oidc'] = - credentialsOidc == null ? null : credentialsOidc.toJson(); + json['credentials_oidc'] = credentialsOidc?.toJson(); } if (_credentialsSamlSet || _apiMapResponse.containsKey('credentials_saml')) { - json['credentials_saml'] = - credentialsSaml == null ? null : credentialsSaml.toJson(); + json['credentials_saml'] = credentialsSaml?.toJson(); } if (_credentialsTotpSet || _apiMapResponse.containsKey('credentials_totp')) { - json['credentials_totp'] = - credentialsTotp == null ? null : credentialsTotp.toJson(); + json['credentials_totp'] = credentialsTotp?.toJson(); } if (_displayNameSet || _apiMapResponse.containsKey('display_name')) { json['display_name'] = displayName; @@ -51233,8 +49132,7 @@ class User { json['role_ids'] = roleIds; } if (_sessionsSet || _apiMapResponse.containsKey('sessions')) { - json['sessions'] = - sessions == null ? null : sessions.map((i) => i.toJson()).toList(); + json['sessions'] = sessions?.map((i) => i.toJson())?.toList(); } if (_uiStateSet || _apiMapResponse.containsKey('ui_state')) { json['ui_state'] = uiState; @@ -51341,9 +49239,7 @@ class UserAttribute { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -51358,9 +49254,7 @@ class UserAttribute { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -51375,9 +49269,7 @@ class UserAttribute { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -51392,9 +49284,7 @@ class UserAttribute { String get defaultValue { if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { - _defaultValue = _apiMapResponse['default_value'] == null - ? null - : _apiMapResponse['default_value'].toString(); + _defaultValue = _apiMapResponse['default_value']?.toString(); _defaultValueSet = true; } return _defaultValue; @@ -51486,9 +49376,7 @@ class UserAttribute { if (!_hiddenValueDomainWhitelistSet && _apiMapResponse.containsKey('hidden_value_domain_whitelist')) { _hiddenValueDomainWhitelist = - _apiMapResponse['hidden_value_domain_whitelist'] == null - ? null - : _apiMapResponse['hidden_value_domain_whitelist'].toString(); + _apiMapResponse['hidden_value_domain_whitelist']?.toString(); _hiddenValueDomainWhitelistSet = true; } return _hiddenValueDomainWhitelist; @@ -51762,9 +49650,7 @@ class UserAttributeGroupValue { String get value { if (!_valueSet && _apiMapResponse.containsKey('value')) { - _value = _apiMapResponse['value'] == null - ? null - : _apiMapResponse['value'].toString(); + _value = _apiMapResponse['value']?.toString(); _valueSet = true; } return _value; @@ -51886,9 +49772,7 @@ class UserAttributeWithValue { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -51903,9 +49787,7 @@ class UserAttributeWithValue { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -51935,9 +49817,7 @@ class UserAttributeWithValue { String get value { if (!_valueSet && _apiMapResponse.containsKey('value')) { - _value = _apiMapResponse['value'] == null - ? null - : _apiMapResponse['value'].toString(); + _value = _apiMapResponse['value']?.toString(); _valueSet = true; } return _value; @@ -52013,9 +49893,7 @@ class UserAttributeWithValue { String get source { if (!_sourceSet && _apiMapResponse.containsKey('source')) { - _source = _apiMapResponse['source'] == null - ? null - : _apiMapResponse['source'].toString(); + _source = _apiMapResponse['source']?.toString(); _sourceSet = true; } return _source; @@ -52032,9 +49910,7 @@ class UserAttributeWithValue { if (!_hiddenValueDomainWhitelistSet && _apiMapResponse.containsKey('hidden_value_domain_whitelist')) { _hiddenValueDomainWhitelist = - _apiMapResponse['hidden_value_domain_whitelist'] == null - ? null - : _apiMapResponse['hidden_value_domain_whitelist'].toString(); + _apiMapResponse['hidden_value_domain_whitelist']?.toString(); _hiddenValueDomainWhitelistSet = true; } return _hiddenValueDomainWhitelist; @@ -52124,9 +50000,7 @@ class UserEmailOnly { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -52226,9 +50100,7 @@ class UserLoginLockout { String get key { if (!_keySet && _apiMapResponse.containsKey('key')) { - _key = _apiMapResponse['key'] == null - ? null - : _apiMapResponse['key'].toString(); + _key = _apiMapResponse['key']?.toString(); _keySet = true; } return _key; @@ -52243,9 +50115,7 @@ class UserLoginLockout { String get authType { if (!_authTypeSet && _apiMapResponse.containsKey('auth_type')) { - _authType = _apiMapResponse['auth_type'] == null - ? null - : _apiMapResponse['auth_type'].toString(); + _authType = _apiMapResponse['auth_type']?.toString(); _authTypeSet = true; } return _authType; @@ -52260,9 +50130,7 @@ class UserLoginLockout { String get ip { if (!_ipSet && _apiMapResponse.containsKey('ip')) { - _ip = _apiMapResponse['ip'] == null - ? null - : _apiMapResponse['ip'].toString(); + _ip = _apiMapResponse['ip']?.toString(); _ipSet = true; } return _ip; @@ -52292,9 +50160,7 @@ class UserLoginLockout { String get remoteId { if (!_remoteIdSet && _apiMapResponse.containsKey('remote_id')) { - _remoteId = _apiMapResponse['remote_id'] == null - ? null - : _apiMapResponse['remote_id'].toString(); + _remoteId = _apiMapResponse['remote_id']?.toString(); _remoteIdSet = true; } return _remoteId; @@ -52309,9 +50175,7 @@ class UserLoginLockout { String get fullName { if (!_fullNameSet && _apiMapResponse.containsKey('full_name')) { - _fullName = _apiMapResponse['full_name'] == null - ? null - : _apiMapResponse['full_name'].toString(); + _fullName = _apiMapResponse['full_name']?.toString(); _fullNameSet = true; } return _fullName; @@ -52326,9 +50190,7 @@ class UserLoginLockout { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -52427,8 +50289,7 @@ class UserLoginLockout { json['fail_count'] = failCount; } if (_lockoutAtSet || _apiMapResponse.containsKey('lockout_at')) { - json['lockout_at'] = - lockoutAt == null ? null : lockoutAt.toIso8601String(); + json['lockout_at'] = lockoutAt?.toIso8601String(); } return json; } @@ -52494,9 +50355,7 @@ class UserPublic { String get firstName { if (!_firstNameSet && _apiMapResponse.containsKey('first_name')) { - _firstName = _apiMapResponse['first_name'] == null - ? null - : _apiMapResponse['first_name'].toString(); + _firstName = _apiMapResponse['first_name']?.toString(); _firstNameSet = true; } return _firstName; @@ -52511,9 +50370,7 @@ class UserPublic { String get lastName { if (!_lastNameSet && _apiMapResponse.containsKey('last_name')) { - _lastName = _apiMapResponse['last_name'] == null - ? null - : _apiMapResponse['last_name'].toString(); + _lastName = _apiMapResponse['last_name']?.toString(); _lastNameSet = true; } return _lastName; @@ -52528,9 +50385,7 @@ class UserPublic { String get displayName { if (!_displayNameSet && _apiMapResponse.containsKey('display_name')) { - _displayName = _apiMapResponse['display_name'] == null - ? null - : _apiMapResponse['display_name'].toString(); + _displayName = _apiMapResponse['display_name']?.toString(); _displayNameSet = true; } return _displayName; @@ -52545,9 +50400,7 @@ class UserPublic { String get avatarUrl { if (!_avatarUrlSet && _apiMapResponse.containsKey('avatar_url')) { - _avatarUrl = _apiMapResponse['avatar_url'] == null - ? null - : _apiMapResponse['avatar_url'].toString(); + _avatarUrl = _apiMapResponse['avatar_url']?.toString(); _avatarUrlSet = true; } return _avatarUrl; @@ -52562,9 +50415,7 @@ class UserPublic { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -52646,9 +50497,7 @@ class ValidationError { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -52684,9 +50533,7 @@ class ValidationError { String get documentationUrl { if (!_documentationUrlSet && _apiMapResponse.containsKey('documentation_url')) { - _documentationUrl = _apiMapResponse['documentation_url'] == null - ? null - : _apiMapResponse['documentation_url'].toString(); + _documentationUrl = _apiMapResponse['documentation_url']?.toString(); _documentationUrlSet = true; } return _documentationUrl; @@ -52729,8 +50576,7 @@ class ValidationError { json['message'] = message; } if (_errorsSet || _apiMapResponse.containsKey('errors')) { - json['errors'] = - errors == null ? null : errors.map((i) => i.toJson()).toList(); + json['errors'] = errors?.map((i) => i.toJson())?.toList(); } if (_documentationUrlSet || _apiMapResponse.containsKey('documentation_url')) { @@ -52761,9 +50607,7 @@ class ValidationErrorDetail { String get field { if (!_fieldSet && _apiMapResponse.containsKey('field')) { - _field = _apiMapResponse['field'] == null - ? null - : _apiMapResponse['field'].toString(); + _field = _apiMapResponse['field']?.toString(); _fieldSet = true; } return _field; @@ -52778,9 +50622,7 @@ class ValidationErrorDetail { String get code { if (!_codeSet && _apiMapResponse.containsKey('code')) { - _code = _apiMapResponse['code'] == null - ? null - : _apiMapResponse['code'].toString(); + _code = _apiMapResponse['code']?.toString(); _codeSet = true; } return _code; @@ -52795,9 +50637,7 @@ class ValidationErrorDetail { String get message { if (!_messageSet && _apiMapResponse.containsKey('message')) { - _message = _apiMapResponse['message'] == null - ? null - : _apiMapResponse['message'].toString(); + _message = _apiMapResponse['message']?.toString(); _messageSet = true; } return _message; @@ -52813,9 +50653,7 @@ class ValidationErrorDetail { String get documentationUrl { if (!_documentationUrlSet && _apiMapResponse.containsKey('documentation_url')) { - _documentationUrl = _apiMapResponse['documentation_url'] == null - ? null - : _apiMapResponse['documentation_url'].toString(); + _documentationUrl = _apiMapResponse['documentation_url']?.toString(); _documentationUrlSet = true; } return _documentationUrl; @@ -52949,9 +50787,7 @@ class WelcomeEmailTest { String get content { if (!_contentSet && _apiMapResponse.containsKey('content')) { - _content = _apiMapResponse['content'] == null - ? null - : _apiMapResponse['content'].toString(); + _content = _apiMapResponse['content']?.toString(); _contentSet = true; } return _content; @@ -52966,9 +50802,7 @@ class WelcomeEmailTest { String get subject { if (!_subjectSet && _apiMapResponse.containsKey('subject')) { - _subject = _apiMapResponse['subject'] == null - ? null - : _apiMapResponse['subject'].toString(); + _subject = _apiMapResponse['subject']?.toString(); _subjectSet = true; } return _subject; @@ -52983,9 +50817,7 @@ class WelcomeEmailTest { String get header { if (!_headerSet && _apiMapResponse.containsKey('header')) { - _header = _apiMapResponse['header'] == null - ? null - : _apiMapResponse['header'].toString(); + _header = _apiMapResponse['header']?.toString(); _headerSet = true; } return _header; @@ -53109,9 +50941,7 @@ class WhitelabelConfiguration { String get logoFile { if (!_logoFileSet && _apiMapResponse.containsKey('logo_file')) { - _logoFile = _apiMapResponse['logo_file'] == null - ? null - : _apiMapResponse['logo_file'].toString(); + _logoFile = _apiMapResponse['logo_file']?.toString(); _logoFileSet = true; } return _logoFile; @@ -53126,9 +50956,7 @@ class WhitelabelConfiguration { String get logoUrl { if (!_logoUrlSet && _apiMapResponse.containsKey('logo_url')) { - _logoUrl = _apiMapResponse['logo_url'] == null - ? null - : _apiMapResponse['logo_url'].toString(); + _logoUrl = _apiMapResponse['logo_url']?.toString(); _logoUrlSet = true; } return _logoUrl; @@ -53143,9 +50971,7 @@ class WhitelabelConfiguration { String get faviconFile { if (!_faviconFileSet && _apiMapResponse.containsKey('favicon_file')) { - _faviconFile = _apiMapResponse['favicon_file'] == null - ? null - : _apiMapResponse['favicon_file'].toString(); + _faviconFile = _apiMapResponse['favicon_file']?.toString(); _faviconFileSet = true; } return _faviconFile; @@ -53160,9 +50986,7 @@ class WhitelabelConfiguration { String get faviconUrl { if (!_faviconUrlSet && _apiMapResponse.containsKey('favicon_url')) { - _faviconUrl = _apiMapResponse['favicon_url'] == null - ? null - : _apiMapResponse['favicon_url'].toString(); + _faviconUrl = _apiMapResponse['favicon_url']?.toString(); _faviconUrlSet = true; } return _faviconUrl; @@ -53177,9 +51001,7 @@ class WhitelabelConfiguration { String get defaultTitle { if (!_defaultTitleSet && _apiMapResponse.containsKey('default_title')) { - _defaultTitle = _apiMapResponse['default_title'] == null - ? null - : _apiMapResponse['default_title'].toString(); + _defaultTitle = _apiMapResponse['default_title']?.toString(); _defaultTitleSet = true; } return _defaultTitle; @@ -53464,9 +51286,7 @@ class Workspace { String get id { if (!_idSet && _apiMapResponse.containsKey('id')) { - _id = _apiMapResponse['id'] == null - ? null - : _apiMapResponse['id'].toString(); + _id = _apiMapResponse['id']?.toString(); _idSet = true; } return _id; @@ -53530,8 +51350,7 @@ class Workspace { json['id'] = id; } if (_projectsSet || _apiMapResponse.containsKey('projects')) { - json['projects'] = - projects == null ? null : projects.map((i) => i.toJson()).toList(); + json['projects'] = projects?.map((i) => i.toJson())?.toList(); } return json; } @@ -53640,9 +51459,7 @@ class WriteAlert { String get cron { if (!_cronSet && _apiMapResponse.containsKey('cron')) { - _cron = _apiMapResponse['cron'] == null - ? null - : _apiMapResponse['cron'].toString(); + _cron = _apiMapResponse['cron']?.toString(); _cronSet = true; } return _cron; @@ -53657,9 +51474,7 @@ class WriteAlert { String get customTitle { if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { - _customTitle = _apiMapResponse['custom_title'] == null - ? null - : _apiMapResponse['custom_title'].toString(); + _customTitle = _apiMapResponse['custom_title']?.toString(); _customTitleSet = true; } return _customTitle; @@ -53690,9 +51505,7 @@ class WriteAlert { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -53758,9 +51571,7 @@ class WriteAlert { String get disabledReason { if (!_disabledReasonSet && _apiMapResponse.containsKey('disabled_reason')) { - _disabledReason = _apiMapResponse['disabled_reason'] == null - ? null - : _apiMapResponse['disabled_reason'].toString(); + _disabledReason = _apiMapResponse['disabled_reason']?.toString(); _disabledReasonSet = true; } return _disabledReason; @@ -53810,9 +51621,7 @@ class WriteAlert { if (!_investigativeContentIdSet && _apiMapResponse.containsKey('investigative_content_id')) { _investigativeContentId = - _apiMapResponse['investigative_content_id'] == null - ? null - : _apiMapResponse['investigative_content_id'].toString(); + _apiMapResponse['investigative_content_id']?.toString(); _investigativeContentIdSet = true; } return _investigativeContentId; @@ -53828,9 +51637,7 @@ class WriteAlert { String get lookmlDashboardId { if (!_lookmlDashboardIdSet && _apiMapResponse.containsKey('lookml_dashboard_id')) { - _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null - ? null - : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id']?.toString(); _lookmlDashboardIdSet = true; } return _lookmlDashboardId; @@ -53845,9 +51652,7 @@ class WriteAlert { String get lookmlLinkId { if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { - _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null - ? null - : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkId = _apiMapResponse['lookml_link_id']?.toString(); _lookmlLinkIdSet = true; } return _lookmlLinkId; @@ -53937,9 +51742,8 @@ class WriteAlert { var json = {}; if (_appliedDashboardFiltersSet || _apiMapResponse.containsKey('applied_dashboard_filters')) { - json['applied_dashboard_filters'] = appliedDashboardFilters == null - ? null - : appliedDashboardFilters.map((i) => i.toJson()).toList(); + json['applied_dashboard_filters'] = + appliedDashboardFilters?.map((i) => i.toJson())?.toList(); } if (_comparisonTypeSet || _apiMapResponse.containsKey('comparison_type')) { json['comparison_type'] = @@ -53959,12 +51763,10 @@ class WriteAlert { json['description'] = description; } if (_destinationsSet || _apiMapResponse.containsKey('destinations')) { - json['destinations'] = destinations == null - ? null - : destinations.map((i) => i.toJson()).toList(); + json['destinations'] = destinations?.map((i) => i.toJson())?.toList(); } if (_fieldSet || _apiMapResponse.containsKey('field')) { - json['field'] = field == null ? null : field.toJson(); + json['field'] = field?.toJson(); } if (_isDisabledSet || _apiMapResponse.containsKey('is_disabled')) { json['is_disabled'] = isDisabled; @@ -54000,9 +51802,7 @@ class WriteAlert { } if (_timeSeriesConditionStateSet || _apiMapResponse.containsKey('time_series_condition_state')) { - json['time_series_condition_state'] = timeSeriesConditionState == null - ? null - : timeSeriesConditionState.toJson(); + json['time_series_condition_state'] = timeSeriesConditionState?.toJson(); } return json; } @@ -54022,9 +51822,7 @@ class WriteApiSession { String get workspaceId { if (!_workspaceIdSet && _apiMapResponse.containsKey('workspace_id')) { - _workspaceId = _apiMapResponse['workspace_id'] == null - ? null - : _apiMapResponse['workspace_id'].toString(); + _workspaceId = _apiMapResponse['workspace_id']?.toString(); _workspaceIdSet = true; } return _workspaceId; @@ -54096,9 +51894,7 @@ class WriteBackupConfiguration { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -54114,9 +51910,7 @@ class WriteBackupConfiguration { String get customS3Bucket { if (!_customS3BucketSet && _apiMapResponse.containsKey('custom_s3_bucket')) { - _customS3Bucket = _apiMapResponse['custom_s3_bucket'] == null - ? null - : _apiMapResponse['custom_s3_bucket'].toString(); + _customS3Bucket = _apiMapResponse['custom_s3_bucket']?.toString(); _customS3BucketSet = true; } return _customS3Bucket; @@ -54132,9 +51926,8 @@ class WriteBackupConfiguration { String get customS3BucketRegion { if (!_customS3BucketRegionSet && _apiMapResponse.containsKey('custom_s3_bucket_region')) { - _customS3BucketRegion = _apiMapResponse['custom_s3_bucket_region'] == null - ? null - : _apiMapResponse['custom_s3_bucket_region'].toString(); + _customS3BucketRegion = + _apiMapResponse['custom_s3_bucket_region']?.toString(); _customS3BucketRegionSet = true; } return _customS3BucketRegion; @@ -54149,9 +51942,7 @@ class WriteBackupConfiguration { String get customS3Key { if (!_customS3KeySet && _apiMapResponse.containsKey('custom_s3_key')) { - _customS3Key = _apiMapResponse['custom_s3_key'] == null - ? null - : _apiMapResponse['custom_s3_key'].toString(); + _customS3Key = _apiMapResponse['custom_s3_key']?.toString(); _customS3KeySet = true; } return _customS3Key; @@ -54167,9 +51958,7 @@ class WriteBackupConfiguration { String get customS3Secret { if (!_customS3SecretSet && _apiMapResponse.containsKey('custom_s3_secret')) { - _customS3Secret = _apiMapResponse['custom_s3_secret'] == null - ? null - : _apiMapResponse['custom_s3_secret'].toString(); + _customS3Secret = _apiMapResponse['custom_s3_secret']?.toString(); _customS3SecretSet = true; } return _customS3Secret; @@ -54268,9 +52057,7 @@ class WriteBoard { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -54285,9 +52072,8 @@ class WriteBoard { List get sectionOrder { if (!_sectionOrderSet && _apiMapResponse.containsKey('section_order')) { - _sectionOrder = _apiMapResponse['section_order'] == null - ? null - : _apiMapResponse['section_order'].map((i) => i as int).toList(); + _sectionOrder = + _apiMapResponse['section_order']?.map((i) => i as int)?.toList(); _sectionOrderSet = true; } return _sectionOrder; @@ -54302,9 +52088,7 @@ class WriteBoard { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -54344,8 +52128,7 @@ class WriteBoard { Map toJson() { var json = {}; if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { - json['deleted_at'] = - deletedAt == null ? null : deletedAt.toIso8601String(); + json['deleted_at'] = deletedAt?.toIso8601String(); } if (_descriptionSet || _apiMapResponse.containsKey('description')) { json['description'] = description; @@ -54396,9 +52179,7 @@ class WriteBoardItem { String get customDescription { if (!_customDescriptionSet && _apiMapResponse.containsKey('custom_description')) { - _customDescription = _apiMapResponse['custom_description'] == null - ? null - : _apiMapResponse['custom_description'].toString(); + _customDescription = _apiMapResponse['custom_description']?.toString(); _customDescriptionSet = true; } return _customDescription; @@ -54413,9 +52194,7 @@ class WriteBoardItem { String get customTitle { if (!_customTitleSet && _apiMapResponse.containsKey('custom_title')) { - _customTitle = _apiMapResponse['custom_title'] == null - ? null - : _apiMapResponse['custom_title'].toString(); + _customTitle = _apiMapResponse['custom_title']?.toString(); _customTitleSet = true; } return _customTitle; @@ -54430,9 +52209,7 @@ class WriteBoardItem { String get customUrl { if (!_customUrlSet && _apiMapResponse.containsKey('custom_url')) { - _customUrl = _apiMapResponse['custom_url'] == null - ? null - : _apiMapResponse['custom_url'].toString(); + _customUrl = _apiMapResponse['custom_url']?.toString(); _customUrlSet = true; } return _customUrl; @@ -54478,9 +52255,7 @@ class WriteBoardItem { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -54496,9 +52271,7 @@ class WriteBoardItem { String get lookmlDashboardId { if (!_lookmlDashboardIdSet && _apiMapResponse.containsKey('lookml_dashboard_id')) { - _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null - ? null - : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id']?.toString(); _lookmlDashboardIdSet = true; } return _lookmlDashboardId; @@ -54625,9 +52398,7 @@ class WriteBoardSection { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -54657,9 +52428,8 @@ class WriteBoardSection { List get itemOrder { if (!_itemOrderSet && _apiMapResponse.containsKey('item_order')) { - _itemOrder = _apiMapResponse['item_order'] == null - ? null - : _apiMapResponse['item_order'].map((i) => i as int).toList(); + _itemOrder = + _apiMapResponse['item_order']?.map((i) => i as int)?.toList(); _itemOrderSet = true; } return _itemOrder; @@ -54674,9 +52444,7 @@ class WriteBoardSection { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -54716,8 +52484,7 @@ class WriteBoardSection { Map toJson() { var json = {}; if (_deletedAtSet || _apiMapResponse.containsKey('deleted_at')) { - json['deleted_at'] = - deletedAt == null ? null : deletedAt.toIso8601String(); + json['deleted_at'] = deletedAt?.toIso8601String(); } if (_descriptionSet || _apiMapResponse.containsKey('description')) { json['description'] = description; @@ -54758,9 +52525,7 @@ class WriteColorCollection { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -54867,21 +52632,18 @@ class WriteColorCollection { } if (_categoricalPalettesSet || _apiMapResponse.containsKey('categoricalPalettes')) { - json['categoricalPalettes'] = categoricalPalettes == null - ? null - : categoricalPalettes.map((i) => i.toJson()).toList(); + json['categoricalPalettes'] = + categoricalPalettes?.map((i) => i.toJson())?.toList(); } if (_sequentialPalettesSet || _apiMapResponse.containsKey('sequentialPalettes')) { - json['sequentialPalettes'] = sequentialPalettes == null - ? null - : sequentialPalettes.map((i) => i.toJson()).toList(); + json['sequentialPalettes'] = + sequentialPalettes?.map((i) => i.toJson())?.toList(); } if (_divergingPalettesSet || _apiMapResponse.containsKey('divergingPalettes')) { - json['divergingPalettes'] = divergingPalettes == null - ? null - : divergingPalettes.map((i) => i.toJson()).toList(); + json['divergingPalettes'] = + divergingPalettes?.map((i) => i.toJson())?.toList(); } return json; } @@ -54910,9 +52672,7 @@ class WriteCommand { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -54927,9 +52687,7 @@ class WriteCommand { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -54945,9 +52703,7 @@ class WriteCommand { String get linkedContentId { if (!_linkedContentIdSet && _apiMapResponse.containsKey('linked_content_id')) { - _linkedContentId = _apiMapResponse['linked_content_id'] == null - ? null - : _apiMapResponse['linked_content_id'].toString(); + _linkedContentId = _apiMapResponse['linked_content_id']?.toString(); _linkedContentIdSet = true; } return _linkedContentId; @@ -55146,10 +52902,10 @@ class WriteContentFavorite { json['content_metadata_id'] = contentMetadataId; } if (_lookSet || _apiMapResponse.containsKey('look')) { - json['look'] = look == null ? null : look.toJson(); + json['look'] = look?.toJson(); } if (_dashboardSet || _apiMapResponse.containsKey('dashboard')) { - json['dashboard'] = dashboard == null ? null : dashboard.toJson(); + json['dashboard'] = dashboard?.toJson(); } return json; } @@ -55265,9 +53021,7 @@ class WriteCreateDashboardFilter { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -55282,9 +53036,7 @@ class WriteCreateDashboardFilter { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -55299,9 +53051,7 @@ class WriteCreateDashboardFilter { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -55316,9 +53066,7 @@ class WriteCreateDashboardFilter { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -55333,9 +53081,7 @@ class WriteCreateDashboardFilter { String get defaultValue { if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { - _defaultValue = _apiMapResponse['default_value'] == null - ? null - : _apiMapResponse['default_value'].toString(); + _defaultValue = _apiMapResponse['default_value']?.toString(); _defaultValueSet = true; } return _defaultValue; @@ -55350,9 +53096,7 @@ class WriteCreateDashboardFilter { String get model { if (!_modelSet && _apiMapResponse.containsKey('model')) { - _model = _apiMapResponse['model'] == null - ? null - : _apiMapResponse['model'].toString(); + _model = _apiMapResponse['model']?.toString(); _modelSet = true; } return _model; @@ -55367,9 +53111,7 @@ class WriteCreateDashboardFilter { String get explore { if (!_exploreSet && _apiMapResponse.containsKey('explore')) { - _explore = _apiMapResponse['explore'] == null - ? null - : _apiMapResponse['explore'].toString(); + _explore = _apiMapResponse['explore']?.toString(); _exploreSet = true; } return _explore; @@ -55384,9 +53126,7 @@ class WriteCreateDashboardFilter { String get dimension { if (!_dimensionSet && _apiMapResponse.containsKey('dimension')) { - _dimension = _apiMapResponse['dimension'] == null - ? null - : _apiMapResponse['dimension'].toString(); + _dimension = _apiMapResponse['dimension']?.toString(); _dimensionSet = true; } return _dimension; @@ -55417,11 +53157,9 @@ class WriteCreateDashboardFilter { List get listensToFilters { if (!_listensToFiltersSet && _apiMapResponse.containsKey('listens_to_filters')) { - _listensToFilters = _apiMapResponse['listens_to_filters'] == null - ? null - : _apiMapResponse['listens_to_filters'] - .map((i) => i as String) - .toList(); + _listensToFilters = _apiMapResponse['listens_to_filters'] + ?.map((i) => i as String) + ?.toList(); _listensToFiltersSet = true; } return _listensToFilters; @@ -55611,9 +53349,7 @@ class WriteCreateQueryTask { String get source { if (!_sourceSet && _apiMapResponse.containsKey('source')) { - _source = _apiMapResponse['source'] == null - ? null - : _apiMapResponse['source'].toString(); + _source = _apiMapResponse['source']?.toString(); _sourceSet = true; } return _source; @@ -55643,9 +53379,7 @@ class WriteCreateQueryTask { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -55660,9 +53394,7 @@ class WriteCreateQueryTask { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -55740,9 +53472,7 @@ class WriteCredentialsEmail { String get email { if (!_emailSet && _apiMapResponse.containsKey('email')) { - _email = _apiMapResponse['email'] == null - ? null - : _apiMapResponse['email'].toString(); + _email = _apiMapResponse['email']?.toString(); _emailSet = true; } return _email; @@ -55890,9 +53620,7 @@ class WriteDashboard { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -55922,9 +53650,7 @@ class WriteDashboard { String get queryTimezone { if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { - _queryTimezone = _apiMapResponse['query_timezone'] == null - ? null - : _apiMapResponse['query_timezone'].toString(); + _queryTimezone = _apiMapResponse['query_timezone']?.toString(); _queryTimezoneSet = true; } return _queryTimezone; @@ -55940,9 +53666,7 @@ class WriteDashboard { String get refreshInterval { if (!_refreshIntervalSet && _apiMapResponse.containsKey('refresh_interval')) { - _refreshInterval = _apiMapResponse['refresh_interval'] == null - ? null - : _apiMapResponse['refresh_interval'].toString(); + _refreshInterval = _apiMapResponse['refresh_interval']?.toString(); _refreshIntervalSet = true; } return _refreshInterval; @@ -55976,9 +53700,7 @@ class WriteDashboard { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -55993,9 +53715,7 @@ class WriteDashboard { String get slug { if (!_slugSet && _apiMapResponse.containsKey('slug')) { - _slug = _apiMapResponse['slug'] == null - ? null - : _apiMapResponse['slug'].toString(); + _slug = _apiMapResponse['slug']?.toString(); _slugSet = true; } return _slug; @@ -56011,9 +53731,7 @@ class WriteDashboard { String get preferredViewer { if (!_preferredViewerSet && _apiMapResponse.containsKey('preferred_viewer')) { - _preferredViewer = _apiMapResponse['preferred_viewer'] == null - ? null - : _apiMapResponse['preferred_viewer'].toString(); + _preferredViewer = _apiMapResponse['preferred_viewer']?.toString(); _preferredViewerSet = true; } return _preferredViewer; @@ -56047,9 +53765,7 @@ class WriteDashboard { String get backgroundColor { if (!_backgroundColorSet && _apiMapResponse.containsKey('background_color')) { - _backgroundColor = _apiMapResponse['background_color'] == null - ? null - : _apiMapResponse['background_color'].toString(); + _backgroundColor = _apiMapResponse['background_color']?.toString(); _backgroundColorSet = true; } return _backgroundColor; @@ -56112,9 +53828,7 @@ class WriteDashboard { String get loadConfiguration { if (!_loadConfigurationSet && _apiMapResponse.containsKey('load_configuration')) { - _loadConfiguration = _apiMapResponse['load_configuration'] == null - ? null - : _apiMapResponse['load_configuration'].toString(); + _loadConfiguration = _apiMapResponse['load_configuration']?.toString(); _loadConfigurationSet = true; } return _loadConfiguration; @@ -56129,9 +53843,7 @@ class WriteDashboard { String get lookmlLinkId { if (!_lookmlLinkIdSet && _apiMapResponse.containsKey('lookml_link_id')) { - _lookmlLinkId = _apiMapResponse['lookml_link_id'] == null - ? null - : _apiMapResponse['lookml_link_id'].toString(); + _lookmlLinkId = _apiMapResponse['lookml_link_id']?.toString(); _lookmlLinkIdSet = true; } return _lookmlLinkId; @@ -56177,9 +53889,7 @@ class WriteDashboard { String get folderId { if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { - _folderId = _apiMapResponse['folder_id'] == null - ? null - : _apiMapResponse['folder_id'].toString(); + _folderId = _apiMapResponse['folder_id']?.toString(); _folderIdSet = true; } return _folderId; @@ -56195,9 +53905,7 @@ class WriteDashboard { String get textTileTextColor { if (!_textTileTextColorSet && _apiMapResponse.containsKey('text_tile_text_color')) { - _textTileTextColor = _apiMapResponse['text_tile_text_color'] == null - ? null - : _apiMapResponse['text_tile_text_color'].toString(); + _textTileTextColor = _apiMapResponse['text_tile_text_color']?.toString(); _textTileTextColorSet = true; } return _textTileTextColor; @@ -56213,9 +53921,8 @@ class WriteDashboard { String get tileBackgroundColor { if (!_tileBackgroundColorSet && _apiMapResponse.containsKey('tile_background_color')) { - _tileBackgroundColor = _apiMapResponse['tile_background_color'] == null - ? null - : _apiMapResponse['tile_background_color'].toString(); + _tileBackgroundColor = + _apiMapResponse['tile_background_color']?.toString(); _tileBackgroundColorSet = true; } return _tileBackgroundColor; @@ -56230,9 +53937,7 @@ class WriteDashboard { String get tileTextColor { if (!_tileTextColorSet && _apiMapResponse.containsKey('tile_text_color')) { - _tileTextColor = _apiMapResponse['tile_text_color'] == null - ? null - : _apiMapResponse['tile_text_color'].toString(); + _tileTextColor = _apiMapResponse['tile_text_color']?.toString(); _tileTextColorSet = true; } return _tileTextColor; @@ -56247,9 +53952,7 @@ class WriteDashboard { String get titleColor { if (!_titleColorSet && _apiMapResponse.containsKey('title_color')) { - _titleColor = _apiMapResponse['title_color'] == null - ? null - : _apiMapResponse['title_color'].toString(); + _titleColor = _apiMapResponse['title_color']?.toString(); _titleColorSet = true; } return _titleColor; @@ -56318,7 +54021,7 @@ class WriteDashboard { json['refresh_interval'] = refreshInterval; } if (_folderSet || _apiMapResponse.containsKey('folder')) { - json['folder'] = folder == null ? null : folder.toJson(); + json['folder'] = folder?.toJson(); } if (_titleSet || _apiMapResponse.containsKey('title')) { json['title'] = title; @@ -56382,7 +54085,7 @@ class WriteDashboard { json['title_color'] = titleColor; } if (_appearanceSet || _apiMapResponse.containsKey('appearance')) { - json['appearance'] = appearance == null ? null : appearance.toJson(); + json['appearance'] = appearance?.toJson(); } return json; } @@ -56446,7 +54149,7 @@ class WriteDashboardBase { Map toJson() { var json = {}; if (_folderSet || _apiMapResponse.containsKey('folder')) { - json['folder'] = folder == null ? null : folder.toJson(); + json['folder'] = folder?.toJson(); } return json; } @@ -56517,9 +54220,7 @@ class WriteDashboardElement { String get bodyText { if (!_bodyTextSet && _apiMapResponse.containsKey('body_text')) { - _bodyText = _apiMapResponse['body_text'] == null - ? null - : _apiMapResponse['body_text'].toString(); + _bodyText = _apiMapResponse['body_text']?.toString(); _bodyTextSet = true; } return _bodyText; @@ -56534,9 +54235,7 @@ class WriteDashboardElement { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -56570,9 +54269,7 @@ class WriteDashboardElement { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -56587,9 +54284,7 @@ class WriteDashboardElement { String get mergeResultId { if (!_mergeResultIdSet && _apiMapResponse.containsKey('merge_result_id')) { - _mergeResultId = _apiMapResponse['merge_result_id'] == null - ? null - : _apiMapResponse['merge_result_id'].toString(); + _mergeResultId = _apiMapResponse['merge_result_id']?.toString(); _mergeResultIdSet = true; } return _mergeResultId; @@ -56604,9 +54299,7 @@ class WriteDashboardElement { String get noteDisplay { if (!_noteDisplaySet && _apiMapResponse.containsKey('note_display')) { - _noteDisplay = _apiMapResponse['note_display'] == null - ? null - : _apiMapResponse['note_display'].toString(); + _noteDisplay = _apiMapResponse['note_display']?.toString(); _noteDisplaySet = true; } return _noteDisplay; @@ -56621,9 +54314,7 @@ class WriteDashboardElement { String get noteState { if (!_noteStateSet && _apiMapResponse.containsKey('note_state')) { - _noteState = _apiMapResponse['note_state'] == null - ? null - : _apiMapResponse['note_state'].toString(); + _noteState = _apiMapResponse['note_state']?.toString(); _noteStateSet = true; } return _noteState; @@ -56638,9 +54329,7 @@ class WriteDashboardElement { String get noteText { if (!_noteTextSet && _apiMapResponse.containsKey('note_text')) { - _noteText = _apiMapResponse['note_text'] == null - ? null - : _apiMapResponse['note_text'].toString(); + _noteText = _apiMapResponse['note_text']?.toString(); _noteTextSet = true; } return _noteText; @@ -56690,9 +54379,7 @@ class WriteDashboardElement { String get refreshInterval { if (!_refreshIntervalSet && _apiMapResponse.containsKey('refresh_interval')) { - _refreshInterval = _apiMapResponse['refresh_interval'] == null - ? null - : _apiMapResponse['refresh_interval'].toString(); + _refreshInterval = _apiMapResponse['refresh_interval']?.toString(); _refreshIntervalSet = true; } return _refreshInterval; @@ -56741,9 +54428,7 @@ class WriteDashboardElement { String get subtitleText { if (!_subtitleTextSet && _apiMapResponse.containsKey('subtitle_text')) { - _subtitleText = _apiMapResponse['subtitle_text'] == null - ? null - : _apiMapResponse['subtitle_text'].toString(); + _subtitleText = _apiMapResponse['subtitle_text']?.toString(); _subtitleTextSet = true; } return _subtitleText; @@ -56758,9 +54443,7 @@ class WriteDashboardElement { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -56790,9 +54473,7 @@ class WriteDashboardElement { String get titleText { if (!_titleTextSet && _apiMapResponse.containsKey('title_text')) { - _titleText = _apiMapResponse['title_text'] == null - ? null - : _apiMapResponse['title_text'].toString(); + _titleText = _apiMapResponse['title_text']?.toString(); _titleTextSet = true; } return _titleText; @@ -56807,9 +54488,7 @@ class WriteDashboardElement { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -56855,7 +54534,7 @@ class WriteDashboardElement { json['dashboard_id'] = dashboardId; } if (_lookSet || _apiMapResponse.containsKey('look')) { - json['look'] = look == null ? null : look.toJson(); + json['look'] = look?.toJson(); } if (_lookIdSet || _apiMapResponse.containsKey('look_id')) { json['look_id'] = lookId; @@ -56873,7 +54552,7 @@ class WriteDashboardElement { json['note_text'] = noteText; } if (_querySet || _apiMapResponse.containsKey('query')) { - json['query'] = query == null ? null : query.toJson(); + json['query'] = query?.toJson(); } if (_queryIdSet || _apiMapResponse.containsKey('query_id')) { json['query_id'] = queryId; @@ -56883,7 +54562,7 @@ class WriteDashboardElement { json['refresh_interval'] = refreshInterval; } if (_resultMakerSet || _apiMapResponse.containsKey('result_maker')) { - json['result_maker'] = resultMaker == null ? null : resultMaker.toJson(); + json['result_maker'] = resultMaker?.toJson(); } if (_resultMakerIdSet || _apiMapResponse.containsKey('result_maker_id')) { json['result_maker_id'] = resultMakerId; @@ -56954,9 +54633,7 @@ class WriteDashboardFilter { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -56971,9 +54648,7 @@ class WriteDashboardFilter { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -56988,9 +54663,7 @@ class WriteDashboardFilter { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -57005,9 +54678,7 @@ class WriteDashboardFilter { String get defaultValue { if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { - _defaultValue = _apiMapResponse['default_value'] == null - ? null - : _apiMapResponse['default_value'].toString(); + _defaultValue = _apiMapResponse['default_value']?.toString(); _defaultValueSet = true; } return _defaultValue; @@ -57022,9 +54693,7 @@ class WriteDashboardFilter { String get model { if (!_modelSet && _apiMapResponse.containsKey('model')) { - _model = _apiMapResponse['model'] == null - ? null - : _apiMapResponse['model'].toString(); + _model = _apiMapResponse['model']?.toString(); _modelSet = true; } return _model; @@ -57039,9 +54708,7 @@ class WriteDashboardFilter { String get explore { if (!_exploreSet && _apiMapResponse.containsKey('explore')) { - _explore = _apiMapResponse['explore'] == null - ? null - : _apiMapResponse['explore'].toString(); + _explore = _apiMapResponse['explore']?.toString(); _exploreSet = true; } return _explore; @@ -57056,9 +54723,7 @@ class WriteDashboardFilter { String get dimension { if (!_dimensionSet && _apiMapResponse.containsKey('dimension')) { - _dimension = _apiMapResponse['dimension'] == null - ? null - : _apiMapResponse['dimension'].toString(); + _dimension = _apiMapResponse['dimension']?.toString(); _dimensionSet = true; } return _dimension; @@ -57089,11 +54754,9 @@ class WriteDashboardFilter { List get listensToFilters { if (!_listensToFiltersSet && _apiMapResponse.containsKey('listens_to_filters')) { - _listensToFilters = _apiMapResponse['listens_to_filters'] == null - ? null - : _apiMapResponse['listens_to_filters'] - .map((i) => i as String) - .toList(); + _listensToFilters = _apiMapResponse['listens_to_filters'] + ?.map((i) => i as String) + ?.toList(); _listensToFiltersSet = true; } return _listensToFilters; @@ -57246,9 +54909,7 @@ class WriteDashboardLayout { String get dashboardId { if (!_dashboardIdSet && _apiMapResponse.containsKey('dashboard_id')) { - _dashboardId = _apiMapResponse['dashboard_id'] == null - ? null - : _apiMapResponse['dashboard_id'].toString(); + _dashboardId = _apiMapResponse['dashboard_id']?.toString(); _dashboardIdSet = true; } return _dashboardId; @@ -57263,9 +54924,7 @@ class WriteDashboardLayout { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -57398,9 +55057,7 @@ class WriteDashboardLayoutComponent { String get dashboardLayoutId { if (!_dashboardLayoutIdSet && _apiMapResponse.containsKey('dashboard_layout_id')) { - _dashboardLayoutId = _apiMapResponse['dashboard_layout_id'] == null - ? null - : _apiMapResponse['dashboard_layout_id'].toString(); + _dashboardLayoutId = _apiMapResponse['dashboard_layout_id']?.toString(); _dashboardLayoutIdSet = true; } return _dashboardLayoutId; @@ -57416,9 +55073,7 @@ class WriteDashboardLayoutComponent { String get dashboardElementId { if (!_dashboardElementIdSet && _apiMapResponse.containsKey('dashboard_element_id')) { - _dashboardElementId = _apiMapResponse['dashboard_element_id'] == null - ? null - : _apiMapResponse['dashboard_element_id'].toString(); + _dashboardElementId = _apiMapResponse['dashboard_element_id']?.toString(); _dashboardElementIdSet = true; } return _dashboardElementId; @@ -57726,9 +55381,7 @@ class WriteDBConnection { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -57743,9 +55396,7 @@ class WriteDBConnection { String get host { if (!_hostSet && _apiMapResponse.containsKey('host')) { - _host = _apiMapResponse['host'] == null - ? null - : _apiMapResponse['host'].toString(); + _host = _apiMapResponse['host']?.toString(); _hostSet = true; } return _host; @@ -57760,9 +55411,7 @@ class WriteDBConnection { String get port { if (!_portSet && _apiMapResponse.containsKey('port')) { - _port = _apiMapResponse['port'] == null - ? null - : _apiMapResponse['port'].toString(); + _port = _apiMapResponse['port']?.toString(); _portSet = true; } return _port; @@ -57777,9 +55426,7 @@ class WriteDBConnection { String get username { if (!_usernameSet && _apiMapResponse.containsKey('username')) { - _username = _apiMapResponse['username'] == null - ? null - : _apiMapResponse['username'].toString(); + _username = _apiMapResponse['username']?.toString(); _usernameSet = true; } return _username; @@ -57794,9 +55441,7 @@ class WriteDBConnection { String get password { if (!_passwordSet && _apiMapResponse.containsKey('password')) { - _password = _apiMapResponse['password'] == null - ? null - : _apiMapResponse['password'].toString(); + _password = _apiMapResponse['password']?.toString(); _passwordSet = true; } return _password; @@ -57811,9 +55456,7 @@ class WriteDBConnection { String get certificate { if (!_certificateSet && _apiMapResponse.containsKey('certificate')) { - _certificate = _apiMapResponse['certificate'] == null - ? null - : _apiMapResponse['certificate'].toString(); + _certificate = _apiMapResponse['certificate']?.toString(); _certificateSet = true; } return _certificate; @@ -57828,9 +55471,7 @@ class WriteDBConnection { String get fileType { if (!_fileTypeSet && _apiMapResponse.containsKey('file_type')) { - _fileType = _apiMapResponse['file_type'] == null - ? null - : _apiMapResponse['file_type'].toString(); + _fileType = _apiMapResponse['file_type']?.toString(); _fileTypeSet = true; } return _fileType; @@ -57845,9 +55486,7 @@ class WriteDBConnection { String get database { if (!_databaseSet && _apiMapResponse.containsKey('database')) { - _database = _apiMapResponse['database'] == null - ? null - : _apiMapResponse['database'].toString(); + _database = _apiMapResponse['database']?.toString(); _databaseSet = true; } return _database; @@ -57862,9 +55501,7 @@ class WriteDBConnection { String get dbTimezone { if (!_dbTimezoneSet && _apiMapResponse.containsKey('db_timezone')) { - _dbTimezone = _apiMapResponse['db_timezone'] == null - ? null - : _apiMapResponse['db_timezone'].toString(); + _dbTimezone = _apiMapResponse['db_timezone']?.toString(); _dbTimezoneSet = true; } return _dbTimezone; @@ -57879,9 +55516,7 @@ class WriteDBConnection { String get queryTimezone { if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { - _queryTimezone = _apiMapResponse['query_timezone'] == null - ? null - : _apiMapResponse['query_timezone'].toString(); + _queryTimezone = _apiMapResponse['query_timezone']?.toString(); _queryTimezoneSet = true; } return _queryTimezone; @@ -57896,9 +55531,7 @@ class WriteDBConnection { String get schema { if (!_schemaSet && _apiMapResponse.containsKey('schema')) { - _schema = _apiMapResponse['schema'] == null - ? null - : _apiMapResponse['schema'].toString(); + _schema = _apiMapResponse['schema']?.toString(); _schemaSet = true; } return _schema; @@ -57929,9 +55562,8 @@ class WriteDBConnection { String get maxBillingGigabytes { if (!_maxBillingGigabytesSet && _apiMapResponse.containsKey('max_billing_gigabytes')) { - _maxBillingGigabytes = _apiMapResponse['max_billing_gigabytes'] == null - ? null - : _apiMapResponse['max_billing_gigabytes'].toString(); + _maxBillingGigabytes = + _apiMapResponse['max_billing_gigabytes']?.toString(); _maxBillingGigabytesSet = true; } return _maxBillingGigabytes; @@ -57976,9 +55608,7 @@ class WriteDBConnection { String get tmpDbName { if (!_tmpDbNameSet && _apiMapResponse.containsKey('tmp_db_name')) { - _tmpDbName = _apiMapResponse['tmp_db_name'] == null - ? null - : _apiMapResponse['tmp_db_name'].toString(); + _tmpDbName = _apiMapResponse['tmp_db_name']?.toString(); _tmpDbNameSet = true; } return _tmpDbName; @@ -57994,9 +55624,8 @@ class WriteDBConnection { String get jdbcAdditionalParams { if (!_jdbcAdditionalParamsSet && _apiMapResponse.containsKey('jdbc_additional_params')) { - _jdbcAdditionalParams = _apiMapResponse['jdbc_additional_params'] == null - ? null - : _apiMapResponse['jdbc_additional_params'].toString(); + _jdbcAdditionalParams = + _apiMapResponse['jdbc_additional_params']?.toString(); _jdbcAdditionalParamsSet = true; } return _jdbcAdditionalParams; @@ -58026,9 +55655,7 @@ class WriteDBConnection { String get dialectName { if (!_dialectNameSet && _apiMapResponse.containsKey('dialect_name')) { - _dialectName = _apiMapResponse['dialect_name'] == null - ? null - : _apiMapResponse['dialect_name'].toString(); + _dialectName = _apiMapResponse['dialect_name']?.toString(); _dialectNameSet = true; } return _dialectName; @@ -58060,11 +55687,9 @@ class WriteDBConnection { List get userAttributeFields { if (!_userAttributeFieldsSet && _apiMapResponse.containsKey('user_attribute_fields')) { - _userAttributeFields = _apiMapResponse['user_attribute_fields'] == null - ? null - : _apiMapResponse['user_attribute_fields'] - .map((i) => i as String) - .toList(); + _userAttributeFields = _apiMapResponse['user_attribute_fields'] + ?.map((i) => i as String) + ?.toList(); _userAttributeFieldsSet = true; } return _userAttributeFields; @@ -58080,9 +55705,7 @@ class WriteDBConnection { String get maintenanceCron { if (!_maintenanceCronSet && _apiMapResponse.containsKey('maintenance_cron')) { - _maintenanceCron = _apiMapResponse['maintenance_cron'] == null - ? null - : _apiMapResponse['maintenance_cron'].toString(); + _maintenanceCron = _apiMapResponse['maintenance_cron']?.toString(); _maintenanceCronSet = true; } return _maintenanceCron; @@ -58132,9 +55755,7 @@ class WriteDBConnection { if (!_afterConnectStatementsSet && _apiMapResponse.containsKey('after_connect_statements')) { _afterConnectStatements = - _apiMapResponse['after_connect_statements'] == null - ? null - : _apiMapResponse['after_connect_statements'].toString(); + _apiMapResponse['after_connect_statements']?.toString(); _afterConnectStatementsSet = true; } return _afterConnectStatements; @@ -58169,9 +55790,7 @@ class WriteDBConnection { String get tunnelId { if (!_tunnelIdSet && _apiMapResponse.containsKey('tunnel_id')) { - _tunnelId = _apiMapResponse['tunnel_id'] == null - ? null - : _apiMapResponse['tunnel_id'].toString(); + _tunnelId = _apiMapResponse['tunnel_id']?.toString(); _tunnelIdSet = true; } return _tunnelId; @@ -58358,8 +55977,7 @@ class WriteDBConnection { } if (_pdtContextOverrideSet || _apiMapResponse.containsKey('pdt_context_override')) { - json['pdt_context_override'] = - pdtContextOverride == null ? null : pdtContextOverride.toJson(); + json['pdt_context_override'] = pdtContextOverride?.toJson(); } if (_tunnelIdSet || _apiMapResponse.containsKey('tunnel_id')) { json['tunnel_id'] = tunnelId; @@ -58427,9 +56045,7 @@ class WriteDBConnectionOverride { String get context { if (!_contextSet && _apiMapResponse.containsKey('context')) { - _context = _apiMapResponse['context'] == null - ? null - : _apiMapResponse['context'].toString(); + _context = _apiMapResponse['context']?.toString(); _contextSet = true; } return _context; @@ -58444,9 +56060,7 @@ class WriteDBConnectionOverride { String get host { if (!_hostSet && _apiMapResponse.containsKey('host')) { - _host = _apiMapResponse['host'] == null - ? null - : _apiMapResponse['host'].toString(); + _host = _apiMapResponse['host']?.toString(); _hostSet = true; } return _host; @@ -58461,9 +56075,7 @@ class WriteDBConnectionOverride { String get port { if (!_portSet && _apiMapResponse.containsKey('port')) { - _port = _apiMapResponse['port'] == null - ? null - : _apiMapResponse['port'].toString(); + _port = _apiMapResponse['port']?.toString(); _portSet = true; } return _port; @@ -58478,9 +56090,7 @@ class WriteDBConnectionOverride { String get username { if (!_usernameSet && _apiMapResponse.containsKey('username')) { - _username = _apiMapResponse['username'] == null - ? null - : _apiMapResponse['username'].toString(); + _username = _apiMapResponse['username']?.toString(); _usernameSet = true; } return _username; @@ -58495,9 +56105,7 @@ class WriteDBConnectionOverride { String get password { if (!_passwordSet && _apiMapResponse.containsKey('password')) { - _password = _apiMapResponse['password'] == null - ? null - : _apiMapResponse['password'].toString(); + _password = _apiMapResponse['password']?.toString(); _passwordSet = true; } return _password; @@ -58512,9 +56120,7 @@ class WriteDBConnectionOverride { String get certificate { if (!_certificateSet && _apiMapResponse.containsKey('certificate')) { - _certificate = _apiMapResponse['certificate'] == null - ? null - : _apiMapResponse['certificate'].toString(); + _certificate = _apiMapResponse['certificate']?.toString(); _certificateSet = true; } return _certificate; @@ -58529,9 +56135,7 @@ class WriteDBConnectionOverride { String get fileType { if (!_fileTypeSet && _apiMapResponse.containsKey('file_type')) { - _fileType = _apiMapResponse['file_type'] == null - ? null - : _apiMapResponse['file_type'].toString(); + _fileType = _apiMapResponse['file_type']?.toString(); _fileTypeSet = true; } return _fileType; @@ -58546,9 +56150,7 @@ class WriteDBConnectionOverride { String get database { if (!_databaseSet && _apiMapResponse.containsKey('database')) { - _database = _apiMapResponse['database'] == null - ? null - : _apiMapResponse['database'].toString(); + _database = _apiMapResponse['database']?.toString(); _databaseSet = true; } return _database; @@ -58563,9 +56165,7 @@ class WriteDBConnectionOverride { String get schema { if (!_schemaSet && _apiMapResponse.containsKey('schema')) { - _schema = _apiMapResponse['schema'] == null - ? null - : _apiMapResponse['schema'].toString(); + _schema = _apiMapResponse['schema']?.toString(); _schemaSet = true; } return _schema; @@ -58581,9 +56181,8 @@ class WriteDBConnectionOverride { String get jdbcAdditionalParams { if (!_jdbcAdditionalParamsSet && _apiMapResponse.containsKey('jdbc_additional_params')) { - _jdbcAdditionalParams = _apiMapResponse['jdbc_additional_params'] == null - ? null - : _apiMapResponse['jdbc_additional_params'].toString(); + _jdbcAdditionalParams = + _apiMapResponse['jdbc_additional_params']?.toString(); _jdbcAdditionalParamsSet = true; } return _jdbcAdditionalParams; @@ -58600,9 +56199,7 @@ class WriteDBConnectionOverride { if (!_afterConnectStatementsSet && _apiMapResponse.containsKey('after_connect_statements')) { _afterConnectStatements = - _apiMapResponse['after_connect_statements'] == null - ? null - : _apiMapResponse['after_connect_statements'].toString(); + _apiMapResponse['after_connect_statements']?.toString(); _afterConnectStatementsSet = true; } return _afterConnectStatements; @@ -58697,9 +56294,7 @@ class WriteEmbedSecret { String get algorithm { if (!_algorithmSet && _apiMapResponse.containsKey('algorithm')) { - _algorithm = _apiMapResponse['algorithm'] == null - ? null - : _apiMapResponse['algorithm'].toString(); + _algorithm = _apiMapResponse['algorithm']?.toString(); _algorithmSet = true; } return _algorithm; @@ -58786,9 +56381,7 @@ class WriteExternalOauthApplication { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -58803,9 +56396,7 @@ class WriteExternalOauthApplication { String get clientId { if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { - _clientId = _apiMapResponse['client_id'] == null - ? null - : _apiMapResponse['client_id'].toString(); + _clientId = _apiMapResponse['client_id']?.toString(); _clientIdSet = true; } return _clientId; @@ -58820,9 +56411,7 @@ class WriteExternalOauthApplication { String get clientSecret { if (!_clientSecretSet && _apiMapResponse.containsKey('client_secret')) { - _clientSecret = _apiMapResponse['client_secret'] == null - ? null - : _apiMapResponse['client_secret'].toString(); + _clientSecret = _apiMapResponse['client_secret']?.toString(); _clientSecretSet = true; } return _clientSecret; @@ -58837,9 +56426,7 @@ class WriteExternalOauthApplication { String get dialectName { if (!_dialectNameSet && _apiMapResponse.containsKey('dialect_name')) { - _dialectName = _apiMapResponse['dialect_name'] == null - ? null - : _apiMapResponse['dialect_name'].toString(); + _dialectName = _apiMapResponse['dialect_name']?.toString(); _dialectNameSet = true; } return _dialectName; @@ -58911,9 +56498,7 @@ class WriteFolderBase { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -58928,9 +56513,7 @@ class WriteFolderBase { String get parentId { if (!_parentIdSet && _apiMapResponse.containsKey('parent_id')) { - _parentId = _apiMapResponse['parent_id'] == null - ? null - : _apiMapResponse['parent_id'].toString(); + _parentId = _apiMapResponse['parent_id']?.toString(); _parentIdSet = true; } return _parentId; @@ -58996,9 +56579,7 @@ class WriteGitBranch { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -59013,9 +56594,7 @@ class WriteGitBranch { String get ref { if (!_refSet && _apiMapResponse.containsKey('ref')) { - _ref = _apiMapResponse['ref'] == null - ? null - : _apiMapResponse['ref'].toString(); + _ref = _apiMapResponse['ref']?.toString(); _refSet = true; } return _ref; @@ -59097,9 +56676,7 @@ class WriteGroup { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -59206,11 +56783,9 @@ class WriteIntegration { if (!_installedDelegateOauthTargetsSet && _apiMapResponse.containsKey('installed_delegate_oauth_targets')) { _installedDelegateOauthTargets = - _apiMapResponse['installed_delegate_oauth_targets'] == null - ? null - : _apiMapResponse['installed_delegate_oauth_targets'] - .map((i) => i as int) - .toList(); + _apiMapResponse['installed_delegate_oauth_targets'] + ?.map((i) => i as int) + ?.toList(); _installedDelegateOauthTargetsSet = true; } return _installedDelegateOauthTargets; @@ -59253,8 +56828,7 @@ class WriteIntegration { json['enabled'] = enabled; } if (_paramsSet || _apiMapResponse.containsKey('params')) { - json['params'] = - params == null ? null : params.map((i) => i.toJson()).toList(); + json['params'] = params?.map((i) => i.toJson())?.toList(); } if (_installedDelegateOauthTargetsSet || _apiMapResponse.containsKey('installed_delegate_oauth_targets')) { @@ -59281,9 +56855,7 @@ class WriteIntegrationHub { String get url { if (!_urlSet && _apiMapResponse.containsKey('url')) { - _url = _apiMapResponse['url'] == null - ? null - : _apiMapResponse['url'].toString(); + _url = _apiMapResponse['url']?.toString(); _urlSet = true; } return _url; @@ -59299,9 +56871,7 @@ class WriteIntegrationHub { String get authorizationToken { if (!_authorizationTokenSet && _apiMapResponse.containsKey('authorization_token')) { - _authorizationToken = _apiMapResponse['authorization_token'] == null - ? null - : _apiMapResponse['authorization_token'].toString(); + _authorizationToken = _apiMapResponse['authorization_token']?.toString(); _authorizationTokenSet = true; } return _authorizationToken; @@ -59429,9 +56999,7 @@ class WriteInternalHelpResourcesContent { String get organizationName { if (!_organizationNameSet && _apiMapResponse.containsKey('organization_name')) { - _organizationName = _apiMapResponse['organization_name'] == null - ? null - : _apiMapResponse['organization_name'].toString(); + _organizationName = _apiMapResponse['organization_name']?.toString(); _organizationNameSet = true; } return _organizationName; @@ -59447,9 +57015,7 @@ class WriteInternalHelpResourcesContent { String get markdownContent { if (!_markdownContentSet && _apiMapResponse.containsKey('markdown_content')) { - _markdownContent = _apiMapResponse['markdown_content'] == null - ? null - : _apiMapResponse['markdown_content'].toString(); + _markdownContent = _apiMapResponse['markdown_content']?.toString(); _markdownContentSet = true; } return _markdownContent; @@ -59630,9 +57196,7 @@ class WriteLDAPConfig { String get authPassword { if (!_authPasswordSet && _apiMapResponse.containsKey('auth_password')) { - _authPassword = _apiMapResponse['auth_password'] == null - ? null - : _apiMapResponse['auth_password'].toString(); + _authPassword = _apiMapResponse['auth_password']?.toString(); _authPasswordSet = true; } return _authPassword; @@ -59663,9 +57227,7 @@ class WriteLDAPConfig { String get authUsername { if (!_authUsernameSet && _apiMapResponse.containsKey('auth_username')) { - _authUsername = _apiMapResponse['auth_username'] == null - ? null - : _apiMapResponse['auth_username'].toString(); + _authUsername = _apiMapResponse['auth_username']?.toString(); _authUsernameSet = true; } return _authUsername; @@ -59680,9 +57242,7 @@ class WriteLDAPConfig { String get connectionHost { if (!_connectionHostSet && _apiMapResponse.containsKey('connection_host')) { - _connectionHost = _apiMapResponse['connection_host'] == null - ? null - : _apiMapResponse['connection_host'].toString(); + _connectionHost = _apiMapResponse['connection_host']?.toString(); _connectionHostSet = true; } return _connectionHost; @@ -59697,9 +57257,7 @@ class WriteLDAPConfig { String get connectionPort { if (!_connectionPortSet && _apiMapResponse.containsKey('connection_port')) { - _connectionPort = _apiMapResponse['connection_port'] == null - ? null - : _apiMapResponse['connection_port'].toString(); + _connectionPort = _apiMapResponse['connection_port']?.toString(); _connectionPortSet = true; } return _connectionPort; @@ -59746,12 +57304,9 @@ class WriteLDAPConfig { List get defaultNewUserGroupIds { if (!_defaultNewUserGroupIdsSet && _apiMapResponse.containsKey('default_new_user_group_ids')) { - _defaultNewUserGroupIds = - _apiMapResponse['default_new_user_group_ids'] == null - ? null - : _apiMapResponse['default_new_user_group_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserGroupIds = _apiMapResponse['default_new_user_group_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserGroupIdsSet = true; } return _defaultNewUserGroupIds; @@ -59767,12 +57322,9 @@ class WriteLDAPConfig { List get defaultNewUserRoleIds { if (!_defaultNewUserRoleIdsSet && _apiMapResponse.containsKey('default_new_user_role_ids')) { - _defaultNewUserRoleIds = - _apiMapResponse['default_new_user_role_ids'] == null - ? null - : _apiMapResponse['default_new_user_role_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserRoleIds = _apiMapResponse['default_new_user_role_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserRoleIdsSet = true; } return _defaultNewUserRoleIds; @@ -59817,9 +57369,7 @@ class WriteLDAPConfig { String get groupsBaseDn { if (!_groupsBaseDnSet && _apiMapResponse.containsKey('groups_base_dn')) { - _groupsBaseDn = _apiMapResponse['groups_base_dn'] == null - ? null - : _apiMapResponse['groups_base_dn'].toString(); + _groupsBaseDn = _apiMapResponse['groups_base_dn']?.toString(); _groupsBaseDnSet = true; } return _groupsBaseDn; @@ -59835,9 +57385,7 @@ class WriteLDAPConfig { String get groupsFinderType { if (!_groupsFinderTypeSet && _apiMapResponse.containsKey('groups_finder_type')) { - _groupsFinderType = _apiMapResponse['groups_finder_type'] == null - ? null - : _apiMapResponse['groups_finder_type'].toString(); + _groupsFinderType = _apiMapResponse['groups_finder_type']?.toString(); _groupsFinderTypeSet = true; } return _groupsFinderType; @@ -59854,9 +57402,7 @@ class WriteLDAPConfig { if (!_groupsMemberAttributeSet && _apiMapResponse.containsKey('groups_member_attribute')) { _groupsMemberAttribute = - _apiMapResponse['groups_member_attribute'] == null - ? null - : _apiMapResponse['groups_member_attribute'].toString(); + _apiMapResponse['groups_member_attribute']?.toString(); _groupsMemberAttributeSet = true; } return _groupsMemberAttribute; @@ -59872,9 +57418,8 @@ class WriteLDAPConfig { String get groupsObjectclasses { if (!_groupsObjectclassesSet && _apiMapResponse.containsKey('groups_objectclasses')) { - _groupsObjectclasses = _apiMapResponse['groups_objectclasses'] == null - ? null - : _apiMapResponse['groups_objectclasses'].toString(); + _groupsObjectclasses = + _apiMapResponse['groups_objectclasses']?.toString(); _groupsObjectclassesSet = true; } return _groupsObjectclasses; @@ -59890,9 +57435,8 @@ class WriteLDAPConfig { String get groupsUserAttribute { if (!_groupsUserAttributeSet && _apiMapResponse.containsKey('groups_user_attribute')) { - _groupsUserAttribute = _apiMapResponse['groups_user_attribute'] == null - ? null - : _apiMapResponse['groups_user_attribute'].toString(); + _groupsUserAttribute = + _apiMapResponse['groups_user_attribute']?.toString(); _groupsUserAttributeSet = true; } return _groupsUserAttribute; @@ -59961,9 +57505,7 @@ class WriteLDAPConfig { String get testLdapPassword { if (!_testLdapPasswordSet && _apiMapResponse.containsKey('test_ldap_password')) { - _testLdapPassword = _apiMapResponse['test_ldap_password'] == null - ? null - : _apiMapResponse['test_ldap_password'].toString(); + _testLdapPassword = _apiMapResponse['test_ldap_password']?.toString(); _testLdapPasswordSet = true; } return _testLdapPassword; @@ -59978,9 +57520,7 @@ class WriteLDAPConfig { String get testLdapUser { if (!_testLdapUserSet && _apiMapResponse.containsKey('test_ldap_user')) { - _testLdapUser = _apiMapResponse['test_ldap_user'] == null - ? null - : _apiMapResponse['test_ldap_user'].toString(); + _testLdapUser = _apiMapResponse['test_ldap_user']?.toString(); _testLdapUserSet = true; } return _testLdapUser; @@ -59997,9 +57537,7 @@ class WriteLDAPConfig { if (!_userAttributeMapEmailSet && _apiMapResponse.containsKey('user_attribute_map_email')) { _userAttributeMapEmail = - _apiMapResponse['user_attribute_map_email'] == null - ? null - : _apiMapResponse['user_attribute_map_email'].toString(); + _apiMapResponse['user_attribute_map_email']?.toString(); _userAttributeMapEmailSet = true; } return _userAttributeMapEmail; @@ -60016,9 +57554,7 @@ class WriteLDAPConfig { if (!_userAttributeMapFirstNameSet && _apiMapResponse.containsKey('user_attribute_map_first_name')) { _userAttributeMapFirstName = - _apiMapResponse['user_attribute_map_first_name'] == null - ? null - : _apiMapResponse['user_attribute_map_first_name'].toString(); + _apiMapResponse['user_attribute_map_first_name']?.toString(); _userAttributeMapFirstNameSet = true; } return _userAttributeMapFirstName; @@ -60035,9 +57571,7 @@ class WriteLDAPConfig { if (!_userAttributeMapLastNameSet && _apiMapResponse.containsKey('user_attribute_map_last_name')) { _userAttributeMapLastName = - _apiMapResponse['user_attribute_map_last_name'] == null - ? null - : _apiMapResponse['user_attribute_map_last_name'].toString(); + _apiMapResponse['user_attribute_map_last_name']?.toString(); _userAttributeMapLastNameSet = true; } return _userAttributeMapLastName; @@ -60054,9 +57588,7 @@ class WriteLDAPConfig { if (!_userAttributeMapLdapIdSet && _apiMapResponse.containsKey('user_attribute_map_ldap_id')) { _userAttributeMapLdapId = - _apiMapResponse['user_attribute_map_ldap_id'] == null - ? null - : _apiMapResponse['user_attribute_map_ldap_id'].toString(); + _apiMapResponse['user_attribute_map_ldap_id']?.toString(); _userAttributeMapLdapIdSet = true; } return _userAttributeMapLdapId; @@ -60094,9 +57626,7 @@ class WriteLDAPConfig { String get userBindBaseDn { if (!_userBindBaseDnSet && _apiMapResponse.containsKey('user_bind_base_dn')) { - _userBindBaseDn = _apiMapResponse['user_bind_base_dn'] == null - ? null - : _apiMapResponse['user_bind_base_dn'].toString(); + _userBindBaseDn = _apiMapResponse['user_bind_base_dn']?.toString(); _userBindBaseDnSet = true; } return _userBindBaseDn; @@ -60112,9 +57642,7 @@ class WriteLDAPConfig { String get userCustomFilter { if (!_userCustomFilterSet && _apiMapResponse.containsKey('user_custom_filter')) { - _userCustomFilter = _apiMapResponse['user_custom_filter'] == null - ? null - : _apiMapResponse['user_custom_filter'].toString(); + _userCustomFilter = _apiMapResponse['user_custom_filter']?.toString(); _userCustomFilterSet = true; } return _userCustomFilter; @@ -60130,9 +57658,8 @@ class WriteLDAPConfig { String get userIdAttributeNames { if (!_userIdAttributeNamesSet && _apiMapResponse.containsKey('user_id_attribute_names')) { - _userIdAttributeNames = _apiMapResponse['user_id_attribute_names'] == null - ? null - : _apiMapResponse['user_id_attribute_names'].toString(); + _userIdAttributeNames = + _apiMapResponse['user_id_attribute_names']?.toString(); _userIdAttributeNamesSet = true; } return _userIdAttributeNames; @@ -60148,9 +57675,7 @@ class WriteLDAPConfig { String get userObjectclass { if (!_userObjectclassSet && _apiMapResponse.containsKey('user_objectclass')) { - _userObjectclass = _apiMapResponse['user_objectclass'] == null - ? null - : _apiMapResponse['user_objectclass'].toString(); + _userObjectclass = _apiMapResponse['user_objectclass']?.toString(); _userObjectclassSet = true; } return _userObjectclass; @@ -60301,9 +57826,8 @@ class WriteLDAPConfig { } if (_groupsWithRoleIdsSet || _apiMapResponse.containsKey('groups_with_role_ids')) { - json['groups_with_role_ids'] = groupsWithRoleIds == null - ? null - : groupsWithRoleIds.map((i) => i.toJson()).toList(); + json['groups_with_role_ids'] = + groupsWithRoleIds?.map((i) => i.toJson())?.toList(); } if (_mergeNewUsersByEmailSet || _apiMapResponse.containsKey('merge_new_users_by_email')) { @@ -60338,9 +57862,8 @@ class WriteLDAPConfig { } if (_userAttributesWithIdsSet || _apiMapResponse.containsKey('user_attributes_with_ids')) { - json['user_attributes_with_ids'] = userAttributesWithIds == null - ? null - : userAttributesWithIds.map((i) => i.toJson()).toList(); + json['user_attributes_with_ids'] = + userAttributesWithIds?.map((i) => i.toJson())?.toList(); } if (_userBindBaseDnSet || _apiMapResponse.containsKey('user_bind_base_dn')) { @@ -60518,12 +58041,9 @@ class WriteLookmlModel { List get allowedDbConnectionNames { if (!_allowedDbConnectionNamesSet && _apiMapResponse.containsKey('allowed_db_connection_names')) { - _allowedDbConnectionNames = - _apiMapResponse['allowed_db_connection_names'] == null - ? null - : _apiMapResponse['allowed_db_connection_names'] - .map((i) => i as String) - .toList(); + _allowedDbConnectionNames = _apiMapResponse['allowed_db_connection_names'] + ?.map((i) => i as String) + ?.toList(); _allowedDbConnectionNamesSet = true; } return _allowedDbConnectionNames; @@ -60538,9 +58058,7 @@ class WriteLookmlModel { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -60555,9 +58073,7 @@ class WriteLookmlModel { String get projectName { if (!_projectNameSet && _apiMapResponse.containsKey('project_name')) { - _projectName = _apiMapResponse['project_name'] == null - ? null - : _apiMapResponse['project_name'].toString(); + _projectName = _apiMapResponse['project_name']?.toString(); _projectNameSet = true; } return _projectName; @@ -60671,9 +58187,7 @@ class WriteLookWithQuery { String get title { if (!_titleSet && _apiMapResponse.containsKey('title')) { - _title = _apiMapResponse['title'] == null - ? null - : _apiMapResponse['title'].toString(); + _title = _apiMapResponse['title']?.toString(); _titleSet = true; } return _title; @@ -60718,9 +58232,7 @@ class WriteLookWithQuery { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -60799,9 +58311,7 @@ class WriteLookWithQuery { String get folderId { if (!_folderIdSet && _apiMapResponse.containsKey('folder_id')) { - _folderId = _apiMapResponse['folder_id'] == null - ? null - : _apiMapResponse['folder_id'].toString(); + _folderId = _apiMapResponse['folder_id']?.toString(); _folderIdSet = true; } return _folderId; @@ -60881,13 +58391,13 @@ class WriteLookWithQuery { json['query_id'] = queryId; } if (_folderSet || _apiMapResponse.containsKey('folder')) { - json['folder'] = folder == null ? null : folder.toJson(); + json['folder'] = folder?.toJson(); } if (_folderIdSet || _apiMapResponse.containsKey('folder_id')) { json['folder_id'] = folderId; } if (_querySet || _apiMapResponse.containsKey('query')) { - json['query'] = query == null ? null : query.toJson(); + json['query'] = query?.toJson(); } return json; } @@ -60925,9 +58435,7 @@ class WriteMergeQuery { String get columnLimit { if (!_columnLimitSet && _apiMapResponse.containsKey('column_limit')) { - _columnLimit = _apiMapResponse['column_limit'] == null - ? null - : _apiMapResponse['column_limit'].toString(); + _columnLimit = _apiMapResponse['column_limit']?.toString(); _columnLimitSet = true; } return _columnLimit; @@ -60942,9 +58450,7 @@ class WriteMergeQuery { String get dynamicFields { if (!_dynamicFieldsSet && _apiMapResponse.containsKey('dynamic_fields')) { - _dynamicFields = _apiMapResponse['dynamic_fields'] == null - ? null - : _apiMapResponse['dynamic_fields'].toString(); + _dynamicFields = _apiMapResponse['dynamic_fields']?.toString(); _dynamicFieldsSet = true; } return _dynamicFields; @@ -60959,9 +58465,8 @@ class WriteMergeQuery { List get pivots { if (!_pivotsSet && _apiMapResponse.containsKey('pivots')) { - _pivots = _apiMapResponse['pivots'] == null - ? null - : _apiMapResponse['pivots'].map((i) => i as String).toList(); + _pivots = + _apiMapResponse['pivots']?.map((i) => i as String)?.toList(); _pivotsSet = true; } return _pivots; @@ -60976,9 +58481,8 @@ class WriteMergeQuery { List get sorts { if (!_sortsSet && _apiMapResponse.containsKey('sorts')) { - _sorts = _apiMapResponse['sorts'] == null - ? null - : _apiMapResponse['sorts'].map((i) => i as String).toList(); + _sorts = + _apiMapResponse['sorts']?.map((i) => i as String)?.toList(); _sortsSet = true; } return _sorts; @@ -61080,9 +58584,7 @@ class WriteMergeQuery { json['sorts'] = sorts; } if (_sourceQueriesSet || _apiMapResponse.containsKey('source_queries')) { - json['source_queries'] = sourceQueries == null - ? null - : sourceQueries.map((i) => i.toJson()).toList(); + json['source_queries'] = sourceQueries?.map((i) => i.toJson())?.toList(); } if (_totalSet || _apiMapResponse.containsKey('total')) { json['total'] = total; @@ -61109,9 +58611,8 @@ class WriteModelSet { List get models { if (!_modelsSet && _apiMapResponse.containsKey('models')) { - _models = _apiMapResponse['models'] == null - ? null - : _apiMapResponse['models'].map((i) => i as String).toList(); + _models = + _apiMapResponse['models']?.map((i) => i as String)?.toList(); _modelsSet = true; } return _models; @@ -61126,9 +58627,7 @@ class WriteModelSet { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -61203,9 +58702,7 @@ class WriteOauthClientApp { String get redirectUri { if (!_redirectUriSet && _apiMapResponse.containsKey('redirect_uri')) { - _redirectUri = _apiMapResponse['redirect_uri'] == null - ? null - : _apiMapResponse['redirect_uri'].toString(); + _redirectUri = _apiMapResponse['redirect_uri']?.toString(); _redirectUriSet = true; } return _redirectUri; @@ -61220,9 +58717,7 @@ class WriteOauthClientApp { String get displayName { if (!_displayNameSet && _apiMapResponse.containsKey('display_name')) { - _displayName = _apiMapResponse['display_name'] == null - ? null - : _apiMapResponse['display_name'].toString(); + _displayName = _apiMapResponse['display_name']?.toString(); _displayNameSet = true; } return _displayName; @@ -61237,9 +58732,7 @@ class WriteOauthClientApp { String get description { if (!_descriptionSet && _apiMapResponse.containsKey('description')) { - _description = _apiMapResponse['description'] == null - ? null - : _apiMapResponse['description'].toString(); + _description = _apiMapResponse['description']?.toString(); _descriptionSet = true; } return _description; @@ -61427,9 +58920,7 @@ class WriteOIDCConfig { String get audience { if (!_audienceSet && _apiMapResponse.containsKey('audience')) { - _audience = _apiMapResponse['audience'] == null - ? null - : _apiMapResponse['audience'].toString(); + _audience = _apiMapResponse['audience']?.toString(); _audienceSet = true; } return _audience; @@ -61461,9 +58952,8 @@ class WriteOIDCConfig { String get authorizationEndpoint { if (!_authorizationEndpointSet && _apiMapResponse.containsKey('authorization_endpoint')) { - _authorizationEndpoint = _apiMapResponse['authorization_endpoint'] == null - ? null - : _apiMapResponse['authorization_endpoint'].toString(); + _authorizationEndpoint = + _apiMapResponse['authorization_endpoint']?.toString(); _authorizationEndpointSet = true; } return _authorizationEndpoint; @@ -61479,12 +58969,9 @@ class WriteOIDCConfig { List get defaultNewUserGroupIds { if (!_defaultNewUserGroupIdsSet && _apiMapResponse.containsKey('default_new_user_group_ids')) { - _defaultNewUserGroupIds = - _apiMapResponse['default_new_user_group_ids'] == null - ? null - : _apiMapResponse['default_new_user_group_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserGroupIds = _apiMapResponse['default_new_user_group_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserGroupIdsSet = true; } return _defaultNewUserGroupIds; @@ -61500,12 +58987,9 @@ class WriteOIDCConfig { List get defaultNewUserRoleIds { if (!_defaultNewUserRoleIdsSet && _apiMapResponse.containsKey('default_new_user_role_ids')) { - _defaultNewUserRoleIds = - _apiMapResponse['default_new_user_role_ids'] == null - ? null - : _apiMapResponse['default_new_user_role_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserRoleIds = _apiMapResponse['default_new_user_role_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserRoleIdsSet = true; } return _defaultNewUserRoleIds; @@ -61536,9 +59020,7 @@ class WriteOIDCConfig { String get groupsAttribute { if (!_groupsAttributeSet && _apiMapResponse.containsKey('groups_attribute')) { - _groupsAttribute = _apiMapResponse['groups_attribute'] == null - ? null - : _apiMapResponse['groups_attribute'].toString(); + _groupsAttribute = _apiMapResponse['groups_attribute']?.toString(); _groupsAttributeSet = true; } return _groupsAttribute; @@ -61574,9 +59056,7 @@ class WriteOIDCConfig { String get identifier { if (!_identifierSet && _apiMapResponse.containsKey('identifier')) { - _identifier = _apiMapResponse['identifier'] == null - ? null - : _apiMapResponse['identifier'].toString(); + _identifier = _apiMapResponse['identifier']?.toString(); _identifierSet = true; } return _identifier; @@ -61591,9 +59071,7 @@ class WriteOIDCConfig { String get issuer { if (!_issuerSet && _apiMapResponse.containsKey('issuer')) { - _issuer = _apiMapResponse['issuer'] == null - ? null - : _apiMapResponse['issuer'].toString(); + _issuer = _apiMapResponse['issuer']?.toString(); _issuerSet = true; } return _issuer; @@ -61610,9 +59088,7 @@ class WriteOIDCConfig { if (!_newUserMigrationTypesSet && _apiMapResponse.containsKey('new_user_migration_types')) { _newUserMigrationTypes = - _apiMapResponse['new_user_migration_types'] == null - ? null - : _apiMapResponse['new_user_migration_types'].toString(); + _apiMapResponse['new_user_migration_types']?.toString(); _newUserMigrationTypesSet = true; } return _newUserMigrationTypes; @@ -61627,9 +59103,8 @@ class WriteOIDCConfig { List get scopes { if (!_scopesSet && _apiMapResponse.containsKey('scopes')) { - _scopes = _apiMapResponse['scopes'] == null - ? null - : _apiMapResponse['scopes'].map((i) => i as String).toList(); + _scopes = + _apiMapResponse['scopes']?.map((i) => i as String)?.toList(); _scopesSet = true; } return _scopes; @@ -61644,9 +59119,7 @@ class WriteOIDCConfig { String get secret { if (!_secretSet && _apiMapResponse.containsKey('secret')) { - _secret = _apiMapResponse['secret'] == null - ? null - : _apiMapResponse['secret'].toString(); + _secret = _apiMapResponse['secret']?.toString(); _secretSet = true; } return _secret; @@ -61677,9 +59150,7 @@ class WriteOIDCConfig { String get tokenEndpoint { if (!_tokenEndpointSet && _apiMapResponse.containsKey('token_endpoint')) { - _tokenEndpoint = _apiMapResponse['token_endpoint'] == null - ? null - : _apiMapResponse['token_endpoint'].toString(); + _tokenEndpoint = _apiMapResponse['token_endpoint']?.toString(); _tokenEndpointSet = true; } return _tokenEndpoint; @@ -61696,9 +59167,7 @@ class WriteOIDCConfig { if (!_userAttributeMapEmailSet && _apiMapResponse.containsKey('user_attribute_map_email')) { _userAttributeMapEmail = - _apiMapResponse['user_attribute_map_email'] == null - ? null - : _apiMapResponse['user_attribute_map_email'].toString(); + _apiMapResponse['user_attribute_map_email']?.toString(); _userAttributeMapEmailSet = true; } return _userAttributeMapEmail; @@ -61715,9 +59184,7 @@ class WriteOIDCConfig { if (!_userAttributeMapFirstNameSet && _apiMapResponse.containsKey('user_attribute_map_first_name')) { _userAttributeMapFirstName = - _apiMapResponse['user_attribute_map_first_name'] == null - ? null - : _apiMapResponse['user_attribute_map_first_name'].toString(); + _apiMapResponse['user_attribute_map_first_name']?.toString(); _userAttributeMapFirstNameSet = true; } return _userAttributeMapFirstName; @@ -61734,9 +59201,7 @@ class WriteOIDCConfig { if (!_userAttributeMapLastNameSet && _apiMapResponse.containsKey('user_attribute_map_last_name')) { _userAttributeMapLastName = - _apiMapResponse['user_attribute_map_last_name'] == null - ? null - : _apiMapResponse['user_attribute_map_last_name'].toString(); + _apiMapResponse['user_attribute_map_last_name']?.toString(); _userAttributeMapLastNameSet = true; } return _userAttributeMapLastName; @@ -61774,9 +59239,7 @@ class WriteOIDCConfig { String get userinfoEndpoint { if (!_userinfoEndpointSet && _apiMapResponse.containsKey('userinfo_endpoint')) { - _userinfoEndpoint = _apiMapResponse['userinfo_endpoint'] == null - ? null - : _apiMapResponse['userinfo_endpoint'].toString(); + _userinfoEndpoint = _apiMapResponse['userinfo_endpoint']?.toString(); _userinfoEndpointSet = true; } return _userinfoEndpoint; @@ -61897,9 +59360,8 @@ class WriteOIDCConfig { } if (_groupsWithRoleIdsSet || _apiMapResponse.containsKey('groups_with_role_ids')) { - json['groups_with_role_ids'] = groupsWithRoleIds == null - ? null - : groupsWithRoleIds.map((i) => i.toJson()).toList(); + json['groups_with_role_ids'] = + groupsWithRoleIds?.map((i) => i.toJson())?.toList(); } if (_identifierSet || _apiMapResponse.containsKey('identifier')) { json['identifier'] = identifier; @@ -61938,9 +59400,8 @@ class WriteOIDCConfig { } if (_userAttributesWithIdsSet || _apiMapResponse.containsKey('user_attributes_with_ids')) { - json['user_attributes_with_ids'] = userAttributesWithIds == null - ? null - : userAttributesWithIds.map((i) => i.toJson()).toList(); + json['user_attributes_with_ids'] = + userAttributesWithIds?.map((i) => i.toJson())?.toList(); } if (_userinfoEndpointSet || _apiMapResponse.containsKey('userinfo_endpoint')) { @@ -62104,9 +59565,7 @@ class WritePermissionSet { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -62119,11 +59578,9 @@ class WritePermissionSet { List get permissions { if (!_permissionsSet && _apiMapResponse.containsKey('permissions')) { - _permissions = _apiMapResponse['permissions'] == null - ? null - : _apiMapResponse['permissions'] - .map((i) => i as String) - .toList(); + _permissions = _apiMapResponse['permissions'] + ?.map((i) => i as String) + ?.toList(); _permissionsSet = true; } return _permissions; @@ -62237,9 +59694,7 @@ class WriteProject { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -62254,9 +59709,7 @@ class WriteProject { String get gitRemoteUrl { if (!_gitRemoteUrlSet && _apiMapResponse.containsKey('git_remote_url')) { - _gitRemoteUrl = _apiMapResponse['git_remote_url'] == null - ? null - : _apiMapResponse['git_remote_url'].toString(); + _gitRemoteUrl = _apiMapResponse['git_remote_url']?.toString(); _gitRemoteUrlSet = true; } return _gitRemoteUrl; @@ -62271,9 +59724,7 @@ class WriteProject { String get gitUsername { if (!_gitUsernameSet && _apiMapResponse.containsKey('git_username')) { - _gitUsername = _apiMapResponse['git_username'] == null - ? null - : _apiMapResponse['git_username'].toString(); + _gitUsername = _apiMapResponse['git_username']?.toString(); _gitUsernameSet = true; } return _gitUsername; @@ -62288,9 +59739,7 @@ class WriteProject { String get gitPassword { if (!_gitPasswordSet && _apiMapResponse.containsKey('git_password')) { - _gitPassword = _apiMapResponse['git_password'] == null - ? null - : _apiMapResponse['git_password'].toString(); + _gitPassword = _apiMapResponse['git_password']?.toString(); _gitPasswordSet = true; } return _gitPassword; @@ -62307,9 +59756,7 @@ class WriteProject { if (!_gitProductionBranchNameSet && _apiMapResponse.containsKey('git_production_branch_name')) { _gitProductionBranchName = - _apiMapResponse['git_production_branch_name'] == null - ? null - : _apiMapResponse['git_production_branch_name'].toString(); + _apiMapResponse['git_production_branch_name']?.toString(); _gitProductionBranchNameSet = true; } return _gitProductionBranchName; @@ -62342,9 +59789,7 @@ class WriteProject { if (!_gitUsernameUserAttributeSet && _apiMapResponse.containsKey('git_username_user_attribute')) { _gitUsernameUserAttribute = - _apiMapResponse['git_username_user_attribute'] == null - ? null - : _apiMapResponse['git_username_user_attribute'].toString(); + _apiMapResponse['git_username_user_attribute']?.toString(); _gitUsernameUserAttributeSet = true; } return _gitUsernameUserAttribute; @@ -62361,9 +59806,7 @@ class WriteProject { if (!_gitPasswordUserAttributeSet && _apiMapResponse.containsKey('git_password_user_attribute')) { _gitPasswordUserAttribute = - _apiMapResponse['git_password_user_attribute'] == null - ? null - : _apiMapResponse['git_password_user_attribute'].toString(); + _apiMapResponse['git_password_user_attribute']?.toString(); _gitPasswordUserAttributeSet = true; } return _gitPasswordUserAttribute; @@ -62379,9 +59822,7 @@ class WriteProject { String get gitServiceName { if (!_gitServiceNameSet && _apiMapResponse.containsKey('git_service_name')) { - _gitServiceName = _apiMapResponse['git_service_name'] == null - ? null - : _apiMapResponse['git_service_name'].toString(); + _gitServiceName = _apiMapResponse['git_service_name']?.toString(); _gitServiceNameSet = true; } return _gitServiceName; @@ -62415,10 +59856,7 @@ class WriteProject { if (!_gitApplicationServerHttpSchemeSet && _apiMapResponse.containsKey('git_application_server_http_scheme')) { _gitApplicationServerHttpScheme = - _apiMapResponse['git_application_server_http_scheme'] == null - ? null - : _apiMapResponse['git_application_server_http_scheme'] - .toString(); + _apiMapResponse['git_application_server_http_scheme']?.toString(); _gitApplicationServerHttpSchemeSet = true; } return _gitApplicationServerHttpScheme; @@ -62433,9 +59871,7 @@ class WriteProject { String get deploySecret { if (!_deploySecretSet && _apiMapResponse.containsKey('deploy_secret')) { - _deploySecret = _apiMapResponse['deploy_secret'] == null - ? null - : _apiMapResponse['deploy_secret'].toString(); + _deploySecret = _apiMapResponse['deploy_secret']?.toString(); _deploySecretSet = true; } return _deploySecret; @@ -62531,9 +59967,7 @@ class WriteProject { String get dependencyStatus { if (!_dependencyStatusSet && _apiMapResponse.containsKey('dependency_status')) { - _dependencyStatus = _apiMapResponse['dependency_status'] == null - ? null - : _apiMapResponse['dependency_status'].toString(); + _dependencyStatus = _apiMapResponse['dependency_status']?.toString(); _dependencyStatusSet = true; } return _dependencyStatus; @@ -62711,9 +60145,7 @@ class WriteQuery { String get model { if (!_modelSet && _apiMapResponse.containsKey('model')) { - _model = _apiMapResponse['model'] == null - ? null - : _apiMapResponse['model'].toString(); + _model = _apiMapResponse['model']?.toString(); _modelSet = true; } return _model; @@ -62728,9 +60160,7 @@ class WriteQuery { String get view { if (!_viewSet && _apiMapResponse.containsKey('view')) { - _view = _apiMapResponse['view'] == null - ? null - : _apiMapResponse['view'].toString(); + _view = _apiMapResponse['view']?.toString(); _viewSet = true; } return _view; @@ -62745,9 +60175,8 @@ class WriteQuery { List get fields { if (!_fieldsSet && _apiMapResponse.containsKey('fields')) { - _fields = _apiMapResponse['fields'] == null - ? null - : _apiMapResponse['fields'].map((i) => i as String).toList(); + _fields = + _apiMapResponse['fields']?.map((i) => i as String)?.toList(); _fieldsSet = true; } return _fields; @@ -62762,9 +60191,8 @@ class WriteQuery { List get pivots { if (!_pivotsSet && _apiMapResponse.containsKey('pivots')) { - _pivots = _apiMapResponse['pivots'] == null - ? null - : _apiMapResponse['pivots'].map((i) => i as String).toList(); + _pivots = + _apiMapResponse['pivots']?.map((i) => i as String)?.toList(); _pivotsSet = true; } return _pivots; @@ -62779,11 +60207,9 @@ class WriteQuery { List get fillFields { if (!_fillFieldsSet && _apiMapResponse.containsKey('fill_fields')) { - _fillFields = _apiMapResponse['fill_fields'] == null - ? null - : _apiMapResponse['fill_fields'] - .map((i) => i as String) - .toList(); + _fillFields = _apiMapResponse['fill_fields'] + ?.map((i) => i as String) + ?.toList(); _fillFieldsSet = true; } return _fillFields; @@ -62814,9 +60240,7 @@ class WriteQuery { String get filterExpression { if (!_filterExpressionSet && _apiMapResponse.containsKey('filter_expression')) { - _filterExpression = _apiMapResponse['filter_expression'] == null - ? null - : _apiMapResponse['filter_expression'].toString(); + _filterExpression = _apiMapResponse['filter_expression']?.toString(); _filterExpressionSet = true; } return _filterExpression; @@ -62831,9 +60255,8 @@ class WriteQuery { List get sorts { if (!_sortsSet && _apiMapResponse.containsKey('sorts')) { - _sorts = _apiMapResponse['sorts'] == null - ? null - : _apiMapResponse['sorts'].map((i) => i as String).toList(); + _sorts = + _apiMapResponse['sorts']?.map((i) => i as String)?.toList(); _sortsSet = true; } return _sorts; @@ -62848,9 +60271,7 @@ class WriteQuery { String get limit { if (!_limitSet && _apiMapResponse.containsKey('limit')) { - _limit = _apiMapResponse['limit'] == null - ? null - : _apiMapResponse['limit'].toString(); + _limit = _apiMapResponse['limit']?.toString(); _limitSet = true; } return _limit; @@ -62865,9 +60286,7 @@ class WriteQuery { String get columnLimit { if (!_columnLimitSet && _apiMapResponse.containsKey('column_limit')) { - _columnLimit = _apiMapResponse['column_limit'] == null - ? null - : _apiMapResponse['column_limit'].toString(); + _columnLimit = _apiMapResponse['column_limit']?.toString(); _columnLimitSet = true; } return _columnLimit; @@ -62897,9 +60316,7 @@ class WriteQuery { String get rowTotal { if (!_rowTotalSet && _apiMapResponse.containsKey('row_total')) { - _rowTotal = _apiMapResponse['row_total'] == null - ? null - : _apiMapResponse['row_total'].toString(); + _rowTotal = _apiMapResponse['row_total']?.toString(); _rowTotalSet = true; } return _rowTotal; @@ -62914,11 +60331,9 @@ class WriteQuery { List get subtotals { if (!_subtotalsSet && _apiMapResponse.containsKey('subtotals')) { - _subtotals = _apiMapResponse['subtotals'] == null - ? null - : _apiMapResponse['subtotals'] - .map((i) => i as String) - .toList(); + _subtotals = _apiMapResponse['subtotals'] + ?.map((i) => i as String) + ?.toList(); _subtotalsSet = true; } return _subtotals; @@ -62964,9 +60379,7 @@ class WriteQuery { String get visibleUiSections { if (!_visibleUiSectionsSet && _apiMapResponse.containsKey('visible_ui_sections')) { - _visibleUiSections = _apiMapResponse['visible_ui_sections'] == null - ? null - : _apiMapResponse['visible_ui_sections'].toString(); + _visibleUiSections = _apiMapResponse['visible_ui_sections']?.toString(); _visibleUiSectionsSet = true; } return _visibleUiSections; @@ -62981,9 +60394,7 @@ class WriteQuery { String get dynamicFields { if (!_dynamicFieldsSet && _apiMapResponse.containsKey('dynamic_fields')) { - _dynamicFields = _apiMapResponse['dynamic_fields'] == null - ? null - : _apiMapResponse['dynamic_fields'].toString(); + _dynamicFields = _apiMapResponse['dynamic_fields']?.toString(); _dynamicFieldsSet = true; } return _dynamicFields; @@ -62998,9 +60409,7 @@ class WriteQuery { String get clientId { if (!_clientIdSet && _apiMapResponse.containsKey('client_id')) { - _clientId = _apiMapResponse['client_id'] == null - ? null - : _apiMapResponse['client_id'].toString(); + _clientId = _apiMapResponse['client_id']?.toString(); _clientIdSet = true; } return _clientId; @@ -63015,9 +60424,7 @@ class WriteQuery { String get queryTimezone { if (!_queryTimezoneSet && _apiMapResponse.containsKey('query_timezone')) { - _queryTimezone = _apiMapResponse['query_timezone'] == null - ? null - : _apiMapResponse['query_timezone'].toString(); + _queryTimezone = _apiMapResponse['query_timezone']?.toString(); _queryTimezoneSet = true; } return _queryTimezone; @@ -63139,9 +60546,7 @@ class WriteRepositoryCredential { String get gitUsername { if (!_gitUsernameSet && _apiMapResponse.containsKey('git_username')) { - _gitUsername = _apiMapResponse['git_username'] == null - ? null - : _apiMapResponse['git_username'].toString(); + _gitUsername = _apiMapResponse['git_username']?.toString(); _gitUsernameSet = true; } return _gitUsername; @@ -63156,9 +60561,7 @@ class WriteRepositoryCredential { String get gitPassword { if (!_gitPasswordSet && _apiMapResponse.containsKey('git_password')) { - _gitPassword = _apiMapResponse['git_password'] == null - ? null - : _apiMapResponse['git_password'].toString(); + _gitPassword = _apiMapResponse['git_password']?.toString(); _gitPasswordSet = true; } return _gitPassword; @@ -63173,9 +60576,7 @@ class WriteRepositoryCredential { String get sshPublicKey { if (!_sshPublicKeySet && _apiMapResponse.containsKey('ssh_public_key')) { - _sshPublicKey = _apiMapResponse['ssh_public_key'] == null - ? null - : _apiMapResponse['ssh_public_key'].toString(); + _sshPublicKey = _apiMapResponse['ssh_public_key']?.toString(); _sshPublicKeySet = true; } return _sshPublicKey; @@ -63285,7 +60686,7 @@ class WriteResultMakerWithIdVisConfigAndDynamicFields { Map toJson() { var json = {}; if (_querySet || _apiMapResponse.containsKey('query')) { - json['query'] = query == null ? null : query.toJson(); + json['query'] = query?.toJson(); } return json; } @@ -63317,9 +60718,7 @@ class WriteRole { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -63430,15 +60829,14 @@ class WriteRole { json['name'] = name; } if (_permissionSetSet || _apiMapResponse.containsKey('permission_set')) { - json['permission_set'] = - permissionSet == null ? null : permissionSet.toJson(); + json['permission_set'] = permissionSet?.toJson(); } if (_permissionSetIdSet || _apiMapResponse.containsKey('permission_set_id')) { json['permission_set_id'] = permissionSetId; } if (_modelSetSet || _apiMapResponse.containsKey('model_set')) { - json['model_set'] = modelSet == null ? null : modelSet.toJson(); + json['model_set'] = modelSet?.toJson(); } if (_modelSetIdSet || _apiMapResponse.containsKey('model_set_id')) { json['model_set_id'] = modelSetId; @@ -63545,9 +60943,7 @@ class WriteSamlConfig { String get idpCert { if (!_idpCertSet && _apiMapResponse.containsKey('idp_cert')) { - _idpCert = _apiMapResponse['idp_cert'] == null - ? null - : _apiMapResponse['idp_cert'].toString(); + _idpCert = _apiMapResponse['idp_cert']?.toString(); _idpCertSet = true; } return _idpCert; @@ -63562,9 +60958,7 @@ class WriteSamlConfig { String get idpUrl { if (!_idpUrlSet && _apiMapResponse.containsKey('idp_url')) { - _idpUrl = _apiMapResponse['idp_url'] == null - ? null - : _apiMapResponse['idp_url'].toString(); + _idpUrl = _apiMapResponse['idp_url']?.toString(); _idpUrlSet = true; } return _idpUrl; @@ -63579,9 +60973,7 @@ class WriteSamlConfig { String get idpIssuer { if (!_idpIssuerSet && _apiMapResponse.containsKey('idp_issuer')) { - _idpIssuer = _apiMapResponse['idp_issuer'] == null - ? null - : _apiMapResponse['idp_issuer'].toString(); + _idpIssuer = _apiMapResponse['idp_issuer']?.toString(); _idpIssuerSet = true; } return _idpIssuer; @@ -63596,9 +60988,7 @@ class WriteSamlConfig { String get idpAudience { if (!_idpAudienceSet && _apiMapResponse.containsKey('idp_audience')) { - _idpAudience = _apiMapResponse['idp_audience'] == null - ? null - : _apiMapResponse['idp_audience'].toString(); + _idpAudience = _apiMapResponse['idp_audience']?.toString(); _idpAudienceSet = true; } return _idpAudience; @@ -63631,9 +61021,7 @@ class WriteSamlConfig { if (!_userAttributeMapEmailSet && _apiMapResponse.containsKey('user_attribute_map_email')) { _userAttributeMapEmail = - _apiMapResponse['user_attribute_map_email'] == null - ? null - : _apiMapResponse['user_attribute_map_email'].toString(); + _apiMapResponse['user_attribute_map_email']?.toString(); _userAttributeMapEmailSet = true; } return _userAttributeMapEmail; @@ -63650,9 +61038,7 @@ class WriteSamlConfig { if (!_userAttributeMapFirstNameSet && _apiMapResponse.containsKey('user_attribute_map_first_name')) { _userAttributeMapFirstName = - _apiMapResponse['user_attribute_map_first_name'] == null - ? null - : _apiMapResponse['user_attribute_map_first_name'].toString(); + _apiMapResponse['user_attribute_map_first_name']?.toString(); _userAttributeMapFirstNameSet = true; } return _userAttributeMapFirstName; @@ -63669,9 +61055,7 @@ class WriteSamlConfig { if (!_userAttributeMapLastNameSet && _apiMapResponse.containsKey('user_attribute_map_last_name')) { _userAttributeMapLastName = - _apiMapResponse['user_attribute_map_last_name'] == null - ? null - : _apiMapResponse['user_attribute_map_last_name'].toString(); + _apiMapResponse['user_attribute_map_last_name']?.toString(); _userAttributeMapLastNameSet = true; } return _userAttributeMapLastName; @@ -63688,9 +61072,7 @@ class WriteSamlConfig { if (!_newUserMigrationTypesSet && _apiMapResponse.containsKey('new_user_migration_types')) { _newUserMigrationTypes = - _apiMapResponse['new_user_migration_types'] == null - ? null - : _apiMapResponse['new_user_migration_types'].toString(); + _apiMapResponse['new_user_migration_types']?.toString(); _newUserMigrationTypesSet = true; } return _newUserMigrationTypes; @@ -63723,12 +61105,9 @@ class WriteSamlConfig { List get defaultNewUserRoleIds { if (!_defaultNewUserRoleIdsSet && _apiMapResponse.containsKey('default_new_user_role_ids')) { - _defaultNewUserRoleIds = - _apiMapResponse['default_new_user_role_ids'] == null - ? null - : _apiMapResponse['default_new_user_role_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserRoleIds = _apiMapResponse['default_new_user_role_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserRoleIdsSet = true; } return _defaultNewUserRoleIds; @@ -63744,12 +61123,9 @@ class WriteSamlConfig { List get defaultNewUserGroupIds { if (!_defaultNewUserGroupIdsSet && _apiMapResponse.containsKey('default_new_user_group_ids')) { - _defaultNewUserGroupIds = - _apiMapResponse['default_new_user_group_ids'] == null - ? null - : _apiMapResponse['default_new_user_group_ids'] - .map((i) => i as int) - .toList(); + _defaultNewUserGroupIds = _apiMapResponse['default_new_user_group_ids'] + ?.map((i) => i as int) + ?.toList(); _defaultNewUserGroupIdsSet = true; } return _defaultNewUserGroupIds; @@ -63781,9 +61157,7 @@ class WriteSamlConfig { String get groupsAttribute { if (!_groupsAttributeSet && _apiMapResponse.containsKey('groups_attribute')) { - _groupsAttribute = _apiMapResponse['groups_attribute'] == null - ? null - : _apiMapResponse['groups_attribute'].toString(); + _groupsAttribute = _apiMapResponse['groups_attribute']?.toString(); _groupsAttributeSet = true; } return _groupsAttribute; @@ -63858,9 +61232,7 @@ class WriteSamlConfig { String get groupsFinderType { if (!_groupsFinderTypeSet && _apiMapResponse.containsKey('groups_finder_type')) { - _groupsFinderType = _apiMapResponse['groups_finder_type'] == null - ? null - : _apiMapResponse['groups_finder_type'].toString(); + _groupsFinderType = _apiMapResponse['groups_finder_type']?.toString(); _groupsFinderTypeSet = true; } return _groupsFinderType; @@ -63876,9 +61248,7 @@ class WriteSamlConfig { String get groupsMemberValue { if (!_groupsMemberValueSet && _apiMapResponse.containsKey('groups_member_value')) { - _groupsMemberValue = _apiMapResponse['groups_member_value'] == null - ? null - : _apiMapResponse['groups_member_value'].toString(); + _groupsMemberValue = _apiMapResponse['groups_member_value']?.toString(); _groupsMemberValueSet = true; } return _groupsMemberValue; @@ -64040,9 +61410,8 @@ class WriteSamlConfig { } if (_groupsWithRoleIdsSet || _apiMapResponse.containsKey('groups_with_role_ids')) { - json['groups_with_role_ids'] = groupsWithRoleIds == null - ? null - : groupsWithRoleIds.map((i) => i.toJson()).toList(); + json['groups_with_role_ids'] = + groupsWithRoleIds?.map((i) => i.toJson())?.toList(); } if (_authRequiresRoleSet || _apiMapResponse.containsKey('auth_requires_role')) { @@ -64050,9 +61419,8 @@ class WriteSamlConfig { } if (_userAttributesWithIdsSet || _apiMapResponse.containsKey('user_attributes_with_ids')) { - json['user_attributes_with_ids'] = userAttributesWithIds == null - ? null - : userAttributesWithIds.map((i) => i.toJson()).toList(); + json['user_attributes_with_ids'] = + userAttributesWithIds?.map((i) => i.toJson())?.toList(); } if (_groupsFinderTypeSet || _apiMapResponse.containsKey('groups_finder_type')) { @@ -64171,9 +61539,7 @@ class WriteScheduledPlan { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -64234,9 +61600,7 @@ class WriteScheduledPlan { String get lookId { if (!_lookIdSet && _apiMapResponse.containsKey('look_id')) { - _lookId = _apiMapResponse['look_id'] == null - ? null - : _apiMapResponse['look_id'].toString(); + _lookId = _apiMapResponse['look_id']?.toString(); _lookIdSet = true; } return _lookId; @@ -64267,9 +61631,7 @@ class WriteScheduledPlan { String get lookmlDashboardId { if (!_lookmlDashboardIdSet && _apiMapResponse.containsKey('lookml_dashboard_id')) { - _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id'] == null - ? null - : _apiMapResponse['lookml_dashboard_id'].toString(); + _lookmlDashboardId = _apiMapResponse['lookml_dashboard_id']?.toString(); _lookmlDashboardIdSet = true; } return _lookmlDashboardId; @@ -64284,9 +61646,7 @@ class WriteScheduledPlan { String get filtersString { if (!_filtersStringSet && _apiMapResponse.containsKey('filters_string')) { - _filtersString = _apiMapResponse['filters_string'] == null - ? null - : _apiMapResponse['filters_string'].toString(); + _filtersString = _apiMapResponse['filters_string']?.toString(); _filtersStringSet = true; } return _filtersString; @@ -64302,9 +61662,7 @@ class WriteScheduledPlan { String get dashboardFilters { if (!_dashboardFiltersSet && _apiMapResponse.containsKey('dashboard_filters')) { - _dashboardFilters = _apiMapResponse['dashboard_filters'] == null - ? null - : _apiMapResponse['dashboard_filters'].toString(); + _dashboardFilters = _apiMapResponse['dashboard_filters']?.toString(); _dashboardFiltersSet = true; } return _dashboardFilters; @@ -64381,9 +61739,7 @@ class WriteScheduledPlan { String get crontab { if (!_crontabSet && _apiMapResponse.containsKey('crontab')) { - _crontab = _apiMapResponse['crontab'] == null - ? null - : _apiMapResponse['crontab'].toString(); + _crontab = _apiMapResponse['crontab']?.toString(); _crontabSet = true; } return _crontab; @@ -64398,9 +61754,7 @@ class WriteScheduledPlan { String get datagroup { if (!_datagroupSet && _apiMapResponse.containsKey('datagroup')) { - _datagroup = _apiMapResponse['datagroup'] == null - ? null - : _apiMapResponse['datagroup'].toString(); + _datagroup = _apiMapResponse['datagroup']?.toString(); _datagroupSet = true; } return _datagroup; @@ -64415,9 +61769,7 @@ class WriteScheduledPlan { String get timezone { if (!_timezoneSet && _apiMapResponse.containsKey('timezone')) { - _timezone = _apiMapResponse['timezone'] == null - ? null - : _apiMapResponse['timezone'].toString(); + _timezone = _apiMapResponse['timezone']?.toString(); _timezoneSet = true; } return _timezone; @@ -64432,9 +61784,7 @@ class WriteScheduledPlan { String get queryId { if (!_queryIdSet && _apiMapResponse.containsKey('query_id')) { - _queryId = _apiMapResponse['query_id'] == null - ? null - : _apiMapResponse['query_id'].toString(); + _queryId = _apiMapResponse['query_id']?.toString(); _queryIdSet = true; } return _queryId; @@ -64501,9 +61851,7 @@ class WriteScheduledPlan { String get pdfPaperSize { if (!_pdfPaperSizeSet && _apiMapResponse.containsKey('pdf_paper_size')) { - _pdfPaperSize = _apiMapResponse['pdf_paper_size'] == null - ? null - : _apiMapResponse['pdf_paper_size'].toString(); + _pdfPaperSize = _apiMapResponse['pdf_paper_size']?.toString(); _pdfPaperSizeSet = true; } return _pdfPaperSize; @@ -64548,9 +61896,7 @@ class WriteScheduledPlan { String get colorTheme { if (!_colorThemeSet && _apiMapResponse.containsKey('color_theme')) { - _colorTheme = _apiMapResponse['color_theme'] == null - ? null - : _apiMapResponse['color_theme'].toString(); + _colorTheme = _apiMapResponse['color_theme']?.toString(); _colorThemeSet = true; } return _colorTheme; @@ -64676,9 +62022,8 @@ class WriteScheduledPlan { } if (_scheduledPlanDestinationSet || _apiMapResponse.containsKey('scheduled_plan_destination')) { - json['scheduled_plan_destination'] = scheduledPlanDestination == null - ? null - : scheduledPlanDestination.map((i) => i.toJson()).toList(); + json['scheduled_plan_destination'] = + scheduledPlanDestination?.map((i) => i.toJson())?.toList(); } if (_runOnceSet || _apiMapResponse.containsKey('run_once')) { json['run_once'] = runOnce; @@ -65015,14 +62360,11 @@ class WriteSetting { } if (_whitelabelConfigurationSet || _apiMapResponse.containsKey('whitelabel_configuration')) { - json['whitelabel_configuration'] = whitelabelConfiguration == null - ? null - : whitelabelConfiguration.toJson(); + json['whitelabel_configuration'] = whitelabelConfiguration?.toJson(); } if (_customWelcomeEmailSet || _apiMapResponse.containsKey('custom_welcome_email')) { - json['custom_welcome_email'] = - customWelcomeEmail == null ? null : customWelcomeEmail.toJson(); + json['custom_welcome_email'] = customWelcomeEmail?.toJson(); } return json; } @@ -65051,9 +62393,7 @@ class WriteSshServer { String get sshServerName { if (!_sshServerNameSet && _apiMapResponse.containsKey('ssh_server_name')) { - _sshServerName = _apiMapResponse['ssh_server_name'] == null - ? null - : _apiMapResponse['ssh_server_name'].toString(); + _sshServerName = _apiMapResponse['ssh_server_name']?.toString(); _sshServerNameSet = true; } return _sshServerName; @@ -65068,9 +62408,7 @@ class WriteSshServer { String get sshServerHost { if (!_sshServerHostSet && _apiMapResponse.containsKey('ssh_server_host')) { - _sshServerHost = _apiMapResponse['ssh_server_host'] == null - ? null - : _apiMapResponse['ssh_server_host'].toString(); + _sshServerHost = _apiMapResponse['ssh_server_host']?.toString(); _sshServerHostSet = true; } return _sshServerHost; @@ -65100,9 +62438,7 @@ class WriteSshServer { String get sshServerUser { if (!_sshServerUserSet && _apiMapResponse.containsKey('ssh_server_user')) { - _sshServerUser = _apiMapResponse['ssh_server_user'] == null - ? null - : _apiMapResponse['ssh_server_user'].toString(); + _sshServerUser = _apiMapResponse['ssh_server_user']?.toString(); _sshServerUserSet = true; } return _sshServerUser; @@ -65177,9 +62513,7 @@ class WriteSshTunnel { String get sshServerId { if (!_sshServerIdSet && _apiMapResponse.containsKey('ssh_server_id')) { - _sshServerId = _apiMapResponse['ssh_server_id'] == null - ? null - : _apiMapResponse['ssh_server_id'].toString(); + _sshServerId = _apiMapResponse['ssh_server_id']?.toString(); _sshServerIdSet = true; } return _sshServerId; @@ -65194,9 +62528,7 @@ class WriteSshTunnel { String get databaseHost { if (!_databaseHostSet && _apiMapResponse.containsKey('database_host')) { - _databaseHost = _apiMapResponse['database_host'] == null - ? null - : _apiMapResponse['database_host'].toString(); + _databaseHost = _apiMapResponse['database_host']?.toString(); _databaseHostSet = true; } return _databaseHost; @@ -65320,9 +62652,7 @@ class WriteTheme { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -65378,16 +62708,16 @@ class WriteTheme { Map toJson() { var json = {}; if (_beginAtSet || _apiMapResponse.containsKey('begin_at')) { - json['begin_at'] = beginAt == null ? null : beginAt.toIso8601String(); + json['begin_at'] = beginAt?.toIso8601String(); } if (_endAtSet || _apiMapResponse.containsKey('end_at')) { - json['end_at'] = endAt == null ? null : endAt.toIso8601String(); + json['end_at'] = endAt?.toIso8601String(); } if (_nameSet || _apiMapResponse.containsKey('name')) { json['name'] = name; } if (_settingsSet || _apiMapResponse.containsKey('settings')) { - json['settings'] = settings == null ? null : settings.toJson(); + json['settings'] = settings?.toJson(); } return json; } @@ -65448,9 +62778,7 @@ class WriteUser { String get firstName { if (!_firstNameSet && _apiMapResponse.containsKey('first_name')) { - _firstName = _apiMapResponse['first_name'] == null - ? null - : _apiMapResponse['first_name'].toString(); + _firstName = _apiMapResponse['first_name']?.toString(); _firstNameSet = true; } return _firstName; @@ -65465,9 +62793,7 @@ class WriteUser { String get homeFolderId { if (!_homeFolderIdSet && _apiMapResponse.containsKey('home_folder_id')) { - _homeFolderId = _apiMapResponse['home_folder_id'] == null - ? null - : _apiMapResponse['home_folder_id'].toString(); + _homeFolderId = _apiMapResponse['home_folder_id']?.toString(); _homeFolderIdSet = true; } return _homeFolderId; @@ -65497,9 +62823,7 @@ class WriteUser { String get lastName { if (!_lastNameSet && _apiMapResponse.containsKey('last_name')) { - _lastName = _apiMapResponse['last_name'] == null - ? null - : _apiMapResponse['last_name'].toString(); + _lastName = _apiMapResponse['last_name']?.toString(); _lastNameSet = true; } return _lastName; @@ -65514,9 +62838,7 @@ class WriteUser { String get locale { if (!_localeSet && _apiMapResponse.containsKey('locale')) { - _locale = _apiMapResponse['locale'] == null - ? null - : _apiMapResponse['locale'].toString(); + _locale = _apiMapResponse['locale']?.toString(); _localeSet = true; } return _locale; @@ -65587,8 +62909,7 @@ class WriteUser { var json = {}; if (_credentialsEmailSet || _apiMapResponse.containsKey('credentials_email')) { - json['credentials_email'] = - credentialsEmail == null ? null : credentialsEmail.toJson(); + json['credentials_email'] = credentialsEmail?.toJson(); } if (_firstNameSet || _apiMapResponse.containsKey('first_name')) { json['first_name'] = firstName; @@ -65651,9 +62972,7 @@ class WriteUserAttribute { String get name { if (!_nameSet && _apiMapResponse.containsKey('name')) { - _name = _apiMapResponse['name'] == null - ? null - : _apiMapResponse['name'].toString(); + _name = _apiMapResponse['name']?.toString(); _nameSet = true; } return _name; @@ -65668,9 +62987,7 @@ class WriteUserAttribute { String get label { if (!_labelSet && _apiMapResponse.containsKey('label')) { - _label = _apiMapResponse['label'] == null - ? null - : _apiMapResponse['label'].toString(); + _label = _apiMapResponse['label']?.toString(); _labelSet = true; } return _label; @@ -65685,9 +63002,7 @@ class WriteUserAttribute { String get type { if (!_typeSet && _apiMapResponse.containsKey('type')) { - _type = _apiMapResponse['type'] == null - ? null - : _apiMapResponse['type'].toString(); + _type = _apiMapResponse['type']?.toString(); _typeSet = true; } return _type; @@ -65702,9 +63017,7 @@ class WriteUserAttribute { String get defaultValue { if (!_defaultValueSet && _apiMapResponse.containsKey('default_value')) { - _defaultValue = _apiMapResponse['default_value'] == null - ? null - : _apiMapResponse['default_value'].toString(); + _defaultValue = _apiMapResponse['default_value']?.toString(); _defaultValueSet = true; } return _defaultValue; @@ -65766,9 +63079,7 @@ class WriteUserAttribute { if (!_hiddenValueDomainWhitelistSet && _apiMapResponse.containsKey('hidden_value_domain_whitelist')) { _hiddenValueDomainWhitelist = - _apiMapResponse['hidden_value_domain_whitelist'] == null - ? null - : _apiMapResponse['hidden_value_domain_whitelist'].toString(); + _apiMapResponse['hidden_value_domain_whitelist']?.toString(); _hiddenValueDomainWhitelistSet = true; } return _hiddenValueDomainWhitelist; @@ -65850,9 +63161,7 @@ class WriteUserAttributeWithValue { String get value { if (!_valueSet && _apiMapResponse.containsKey('value')) { - _value = _apiMapResponse['value'] == null - ? null - : _apiMapResponse['value'].toString(); + _value = _apiMapResponse['value']?.toString(); _valueSet = true; } return _value; @@ -65948,9 +63257,7 @@ class WriteWhitelabelConfiguration { String get logoFile { if (!_logoFileSet && _apiMapResponse.containsKey('logo_file')) { - _logoFile = _apiMapResponse['logo_file'] == null - ? null - : _apiMapResponse['logo_file'].toString(); + _logoFile = _apiMapResponse['logo_file']?.toString(); _logoFileSet = true; } return _logoFile; @@ -65965,9 +63272,7 @@ class WriteWhitelabelConfiguration { String get faviconFile { if (!_faviconFileSet && _apiMapResponse.containsKey('favicon_file')) { - _faviconFile = _apiMapResponse['favicon_file'] == null - ? null - : _apiMapResponse['favicon_file'].toString(); + _faviconFile = _apiMapResponse['favicon_file']?.toString(); _faviconFileSet = true; } return _faviconFile; @@ -65982,9 +63287,7 @@ class WriteWhitelabelConfiguration { String get defaultTitle { if (!_defaultTitleSet && _apiMapResponse.containsKey('default_title')) { - _defaultTitle = _apiMapResponse['default_title'] == null - ? null - : _apiMapResponse['default_title'].toString(); + _defaultTitle = _apiMapResponse['default_title']?.toString(); _defaultTitleSet = true; } return _defaultTitle; diff --git a/dart/looker_sdk/package.json b/dart/looker_sdk/package.json index 9980f2079..77bdfc19a 100644 --- a/dart/looker_sdk/package.json +++ b/dart/looker_sdk/package.json @@ -6,7 +6,8 @@ "test:unit": "dart test test/unit", "test:e2e": "dart test test/e2e", "example": "dart run example/main.dart", - "lint": "dart format -o none --set-exit-if-changed .", + "analyze": "dart analyze", + "format-check": "dart format -o none --set-exit-if-changed .", "format": "dart format ." } } diff --git a/dart/looker_sdk/pubspec.yaml b/dart/looker_sdk/pubspec.yaml index 51a87a5c7..52f0dc831 100644 --- a/dart/looker_sdk/pubspec.yaml +++ b/dart/looker_sdk/pubspec.yaml @@ -7,4 +7,5 @@ dependencies: pedantic: ^1.9.0 dotenv: ^2.0.0 dev_dependencies: + lints: ^1.0.1 test: ^1.16.5 diff --git a/dart/looker_sdk/test/e2e/boards_test.dart b/dart/looker_sdk/test/e2e/boards_test.dart index 56f7d0169..250aa4973 100644 --- a/dart/looker_sdk/test/e2e/boards_test.dart +++ b/dart/looker_sdk/test/e2e/boards_test.dart @@ -9,7 +9,7 @@ void main() { }); test('boards', () async { - var boards = await sdk.ok(sdk.all_boards()); + var boards = await sdk.ok(sdk.allBoards()); if (boards.isNotEmpty) { expect(boards[0].createdAt, isNotNull); print(boards[0].createdAt.toIso8601String()); diff --git a/dart/looker_sdk/test/e2e/connections_test.dart b/dart/looker_sdk/test/e2e/connections_test.dart index 0e3b71d09..f1ff110eb 100644 --- a/dart/looker_sdk/test/e2e/connections_test.dart +++ b/dart/looker_sdk/test/e2e/connections_test.dart @@ -10,7 +10,7 @@ void main() { void cleanup() async { try { - await sdk.ok(sdk.delete_connection('TestConnection')); + await sdk.ok(sdk.deleteConnection('TestConnection')); } catch (error) { // ignore } @@ -18,9 +18,11 @@ void main() { test('connections', () async { cleanup(); - var connections = await sdk.ok(sdk.all_connections()); + var connections = await sdk.ok(sdk.allConnections()); expect(connections.length, isNonNegative); - connections.forEach((connection) => expect(connection.name, isNotNull)); + for (var connection in connections) { + expect(connection.name, isNotNull); + } if (connections.isNotEmpty) { var connection = await sdk .ok(sdk.connection(connections[0].name, fields: 'name,host,port')); @@ -37,7 +39,7 @@ void main() { newConnection.password = 'look_your_data'; newConnection.database = 'demo_db2'; newConnection.tmpDbName = 'looker_demo_scratch'; - var connection = await sdk.ok(sdk.create_connection(newConnection)); + var connection = await sdk.ok(sdk.createConnection(newConnection)); expect(connection.name, equals(newConnection.name.toLowerCase())); expect(connection.username, equals(newConnection.username)); connection = await sdk @@ -49,14 +51,14 @@ void main() { var updateConnection = WriteDBConnection(); updateConnection.username = 'looker_demo'; connection = - await sdk.ok(sdk.update_connection('TestConnection', updateConnection)); + await sdk.ok(sdk.updateConnection('TestConnection', updateConnection)); expect(connection.name, equals(newConnection.name.toLowerCase())); expect(connection.username, equals(updateConnection.username)); var testResults = await sdk.ok( - sdk.test_connection('TestConnection', tests: DelimList(['connect']))); + sdk.testConnection('TestConnection', tests: DelimList(['connect']))); expect(testResults[0].name, equals('connect')); expect(testResults[0].message, equals('Can connect')); - var deleteResult = await sdk.ok(sdk.delete_connection('TestConnection')); + var deleteResult = await sdk.ok(sdk.deleteConnection('TestConnection')); expect(deleteResult, equals('')); }); } diff --git a/dart/looker_sdk/test/e2e/dashboards_test.dart b/dart/looker_sdk/test/e2e/dashboards_test.dart index 807fae1ac..7a1d98d4d 100644 --- a/dart/looker_sdk/test/e2e/dashboards_test.dart +++ b/dart/looker_sdk/test/e2e/dashboards_test.dart @@ -9,9 +9,11 @@ void main() { }); test('get dashboards', () async { - var dashboards = await sdk.ok(sdk.all_dashboards()); + var dashboards = await sdk.ok(sdk.allDashboards()); expect(dashboards.length, isNonNegative); - dashboards.forEach((dashboard) => expect(dashboard.id, isNotNull)); + for (var dashboard in dashboards) { + expect(dashboard.id, isNotNull); + } if (dashboards.isNotEmpty) { var dashboard = await sdk.ok(sdk.dashboard(dashboards[0].id)); expect(dashboard.id, isNotNull); diff --git a/dart/looker_sdk/test/e2e/looks_test.dart b/dart/looker_sdk/test/e2e/looks_test.dart index 274efea43..ba53515d7 100644 --- a/dart/looker_sdk/test/e2e/looks_test.dart +++ b/dart/looker_sdk/test/e2e/looks_test.dart @@ -9,12 +9,11 @@ void main() { }); test('looks', () async { - var looks = await sdk.ok(sdk.all_looks()); + var looks = await sdk.ok(sdk.allLooks()); if (looks.isNotEmpty) { - var result = - await sdk.ok(sdk.run_look(looks[looks.length - 1].id, 'png')); + var result = await sdk.ok(sdk.runLook(looks[looks.length - 1].id, 'png')); expect(result.runtimeType.toString(), equals('Uint8List')); - result = await sdk.ok(sdk.run_look(looks[looks.length - 1].id, 'csv')); + result = await sdk.ok(sdk.runLook(looks[looks.length - 1].id, 'csv')); expect(result.runtimeType.toString(), equals('String')); } else { print('No looks to run tests against'); diff --git a/packages/sdk-codegen/src/dart.gen.spec.ts b/packages/sdk-codegen/src/dart.gen.spec.ts index 1926e12d2..81610b0d7 100644 --- a/packages/sdk-codegen/src/dart.gen.spec.ts +++ b/packages/sdk-codegen/src/dart.gen.spec.ts @@ -89,7 +89,7 @@ describe('Dart generator', () => { ` String get myProp { if (!_myPropSet && _apiMapResponse.containsKey('my_prop')) { - _myProp = _apiMapResponse['my_prop'] == null ? null : _apiMapResponse['my_prop'].toString(); + _myProp = _apiMapResponse['my_prop']?.toString(); _myPropSet = true; } return _myProp; @@ -110,7 +110,7 @@ describe('Dart generator', () => { ` String get defaultValue { if (!_defaultValueSet && _apiMapResponse.containsKey('default')) { - _defaultValue = _apiMapResponse['default'] == null ? null : _apiMapResponse['default'].toString(); + _defaultValue = _apiMapResponse['default']?.toString(); _defaultValueSet = true; } return _defaultValue; @@ -309,9 +309,7 @@ MyType.fromResponse(Object apiRawResponse, String apiResponseContentType) { { name: 'my_prop', type: { name: 'String' } } as IProperty, '_apiMapResponse' ) - expect(s).toEqual( - "_myProp = _apiMapResponse['my_prop'] == null ? null : _apiMapResponse['my_prop'].toString()" - ) + expect(s).toEqual("_myProp = _apiMapResponse['my_prop']?.toString()") }) it('summary', () => { diff --git a/packages/sdk-codegen/src/dart.gen.ts b/packages/sdk-codegen/src/dart.gen.ts index 8116655c6..57acc4c68 100644 --- a/packages/sdk-codegen/src/dart.gen.ts +++ b/packages/sdk-codegen/src/dart.gen.ts @@ -26,14 +26,7 @@ import type { IMappedType } from './codeGen' import { CodeGen, commentBlock } from './codeGen' -import type { - IMethod, - IParameter, - IProperty, - IType, - Arg, - EnumValueType, -} from './sdkModels' +import type { IMethod, IParameter, IProperty, IType, Arg } from './sdkModels' import { EnumType, mayQuote, strBody, camelCase } from './sdkModels' /** @@ -177,7 +170,7 @@ class ${this.sdkClassName()} extends APIMethods { ender = `\n}` const num = type as EnumType num.values.forEach((value) => - props.push(this.declareEnumValue(bump, value)) + props.push(this.declareEnumValue(bump, value as string)) ) propertyValues = props.join(this.enumDelimiter) return ( @@ -214,7 +207,7 @@ class ${this.sdkClassName()} extends APIMethods { enumMapper(type: EnumType) { const toMaps = type.values .map( - (v) => `case ${type.name}.${camelCase(v as string)}: + (v) => `case ${type.name}.${camelCase((v as string).toLowerCase())}: return '${v}'; ` ) @@ -223,7 +216,7 @@ class ${this.sdkClassName()} extends APIMethods { .map( (v) => ` if (s == '${v}') { - return ${type.name}.${camelCase(v as string)}; + return ${type.name}.${camelCase((v as string).toLowerCase())}; }` ) .join('') @@ -243,8 +236,8 @@ ${fromMaps} }` } - declareEnumValue(indent: string, value: EnumValueType) { - return `${indent}${mayQuote(camelCase(value as string))}` + declareEnumValue(indent: string, value: string) { + return `${indent}${mayQuote(camelCase(value.toLowerCase()))}` } defaultConstructor(type: IType) { @@ -310,12 +303,10 @@ String get apiResponseContentType { if (prop.type.customType) { if (prop.type.className === 'ArrayType') { props.push( - `json['${prop.name}'] = ${name} == null ? null : ${name}.map((i) => i.toJson()).toList();` + `json['${prop.name}'] = ${name}?.map((i) => i.toJson())?.toList();` ) } else { - props.push( - `json['${prop.name}'] = ${name} == null ? null : ${name}.toJson();` - ) + props.push(`json['${prop.name}'] = ${name}?.toJson();`) } } else { if (prop.type instanceof EnumType) { @@ -328,9 +319,7 @@ String get apiResponseContentType { } else { const mapped = this.typeMap(prop.type) if (mapped.name === 'DateTime') { - props.push( - `json['${prop.name}'] = ${name} == null ? null : ${name}.toIso8601String();` - ) + props.push(`json['${prop.name}'] = ${name}?.toIso8601String();`) } else { props.push(`json['${prop.name}'] = ${name};`) } @@ -380,12 +369,12 @@ ${type.name}.fromResponse(Object apiRawResponse, String apiResponseContentType) return `${name} = ${prop.type.name}Mapper.fromStringValue(${sourceName}['${prop.name}'])` } else if (prop.type.className === 'ArrayType') { const listType = this.typeMap(prop.type!.elementType!).name - return `${name} = ${sourceName}['${prop.name}'] == null ? null : ${sourceName}['${prop.name}'].map<${listType}>((i) => i as ${listType}).toList()` + return `${name} = ${sourceName}['${prop.name}']?.map<${listType}>((i) => i as ${listType})?.toList()` } else { const propType = this.typeMap(prop.type!).name if (propType === 'String') { // Dart is very picky about types. Coorce type to string - return `${name} = ${sourceName}['${prop.name}'] == null ? null : ${sourceName}['${prop.name}'].toString()` + return `${name} = ${sourceName}['${prop.name}']?.toString()` } else if (propType === 'DateTime') { return `${name} = ${sourceName}['${prop.name}'] == null ? null : DateTime.parse(${sourceName}['${prop.name}'])` } else { @@ -478,7 +467,7 @@ ${type.name}.fromResponse(Object apiRawResponse, String apiResponseContentType) const mapped = this.typeMap(type) return ( this.commentHeader(indent, this.paramComment(param, mapped)) + - `${indent}${mapped.name} ${param.name}` + + `${indent}${mapped.name} ${camelCase(param.name)}` + (param.required ? '' : mapped.default && mapped.default !== 'null' @@ -533,7 +522,7 @@ ${type.name}.fromResponse(Object apiRawResponse, String apiResponseContentType) // const callback = `callback: (readable: Readable) => Promise<${type.name}>,` const header = this.commentHeader(indent, headComment) + - `${indent}Future> ${method.name}(` + `${indent}Future> ${camelCase(method.name)}(` return header + fragment + `) async {\n` } @@ -547,7 +536,9 @@ ${type.name}.fromResponse(Object apiRawResponse, String apiResponseContentType) let encodings = '' if (method.pathParams.length > 0) { for (const param of method.pathParams) { - encodings += `${bump}var path_${param.name} = encodeParam(${param.name});\n` + encodings += `${bump}var ${camelCase( + 'path_' + param.name + )} = encodeParam(${camelCase(param.name)});\n` } } return encodings @@ -599,13 +590,14 @@ ${type.name}.fromResponse(Object apiRawResponse, String apiResponseContentType) });` } - httpPath(path: string, prefix?: string) { - prefix = prefix || '' - if (path.indexOf('{') >= 0) - return ( - "'" + path.replace(/{/gi, '$path_' + prefix).replace(/}/gi, '') + "'" - ) - return `'${path}'` + httpPath(path: string, _prefix?: string) { + const pathNodes = path.split('/').map((node) => { + if (node.startsWith('{')) { + return camelCase(node.replace(/{/gi, '$path_').replace(/}/gi, '')) + } + return node + }) + return `'${pathNodes.join('/')}'` } httpArgs(indent: string, method: IMethod) { @@ -631,9 +623,9 @@ ${type.name}.fromResponse(Object apiRawResponse, String apiResponseContentType) for (const arg of args) { const reserved = this.reserve(arg) if (prefix) { - hash.push(`'${reserved}': ${this.accessor(arg, prefix)}`) + hash.push(`'${reserved}': ${camelCase(this.accessor(arg, prefix))}`) } else { - hash.push(`'${reserved}': ${reserved}`) + hash.push(`'${reserved}': ${camelCase(reserved)}`) } } return `\n${indent}{${hash.join(this.argDelimiter)}}` @@ -651,7 +643,7 @@ ${type.name}.fromResponse(Object apiRawResponse, String apiResponseContentType) ) { result = `${request}${method.bodyArg}` } else { - result = `${request}${method.bodyArg} == null ? null : ${request}${method.bodyArg} .toJson()` + result = `${request}${method.bodyArg}?.toJson()` } } else { result = `${request}${method.bodyArg}` From 6d68297c3026449919ca45742dd9dfe8727a3bda Mon Sep 17 00:00:00 2001 From: Bryn Ryans Date: Mon, 10 Jan 2022 05:24:11 +0000 Subject: [PATCH 3/8] Make it easier to use the SDK in g3 by copying. --- dart/looker_sdk/example/main.dart | 2 +- dart/looker_sdk/lib/index.dart | 1 + dart/looker_sdk/lib/looker_sdk.dart | 10 ---------- dart/looker_sdk/lib/src/looker_sdk.dart | 10 ++++++++++ dart/looker_sdk/lib/src/rtl/auth_session.dart | 2 +- dart/looker_sdk/lib/src/rtl/sdk.dart | 2 +- dart/looker_sdk/lib/src/rtl/transport.dart | 2 +- dart/looker_sdk/lib/src/sdk/methods.dart | 2 +- dart/looker_sdk/test/e2e/boards_test.dart | 2 +- dart/looker_sdk/test/e2e/connections_test.dart | 2 +- dart/looker_sdk/test/e2e/dashboards_test.dart | 2 +- dart/looker_sdk/test/e2e/looks_test.dart | 2 +- dart/looker_sdk/test/e2e/utils.dart | 2 +- dart/looker_sdk/test/unit/looker_sdk_test.dart | 2 +- packages/sdk-codegen/src/dart.gen.spec.ts | 2 +- packages/sdk-codegen/src/dart.gen.ts | 2 +- 16 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 dart/looker_sdk/lib/index.dart delete mode 100644 dart/looker_sdk/lib/looker_sdk.dart create mode 100644 dart/looker_sdk/lib/src/looker_sdk.dart diff --git a/dart/looker_sdk/example/main.dart b/dart/looker_sdk/example/main.dart index 78a4e3ef7..35f019adc 100644 --- a/dart/looker_sdk/example/main.dart +++ b/dart/looker_sdk/example/main.dart @@ -1,6 +1,6 @@ import 'dart:io'; import 'dart:typed_data'; -import 'package:looker_sdk/looker_sdk.dart'; +import 'package:looker_sdk/index.dart'; import 'package:dotenv/dotenv.dart' show load, env; void main() async { diff --git a/dart/looker_sdk/lib/index.dart b/dart/looker_sdk/lib/index.dart new file mode 100644 index 000000000..fb49f800e --- /dev/null +++ b/dart/looker_sdk/lib/index.dart @@ -0,0 +1 @@ +export 'src/looker_sdk.dart'; diff --git a/dart/looker_sdk/lib/looker_sdk.dart b/dart/looker_sdk/lib/looker_sdk.dart deleted file mode 100644 index c1c3ae074..000000000 --- a/dart/looker_sdk/lib/looker_sdk.dart +++ /dev/null @@ -1,10 +0,0 @@ -export 'src/rtl/api_types.dart'; -export 'src/rtl/api_methods.dart'; -export 'src/rtl/api_settings.dart'; -export 'src/rtl/auth_session.dart'; -export 'src/rtl/auth_token.dart'; -export 'src/rtl/constants.dart'; -export 'src/rtl/sdk.dart'; -export 'src/rtl/transport.dart'; -export 'src/sdk/methods.dart'; -export 'src/sdk/models.dart'; diff --git a/dart/looker_sdk/lib/src/looker_sdk.dart b/dart/looker_sdk/lib/src/looker_sdk.dart new file mode 100644 index 000000000..9f33af7d5 --- /dev/null +++ b/dart/looker_sdk/lib/src/looker_sdk.dart @@ -0,0 +1,10 @@ +export 'rtl/api_types.dart'; +export 'rtl/api_methods.dart'; +export 'rtl/api_settings.dart'; +export 'rtl/auth_session.dart'; +export 'rtl/auth_token.dart'; +export 'rtl/constants.dart'; +export 'rtl/sdk.dart'; +export 'rtl/transport.dart'; +export 'sdk/methods.dart'; +export 'sdk/models.dart'; diff --git a/dart/looker_sdk/lib/src/rtl/auth_session.dart b/dart/looker_sdk/lib/src/rtl/auth_session.dart index f24d14b82..0abafb693 100644 --- a/dart/looker_sdk/lib/src/rtl/auth_session.dart +++ b/dart/looker_sdk/lib/src/rtl/auth_session.dart @@ -1,4 +1,4 @@ -import 'package:looker_sdk/looker_sdk.dart'; +import '../../index.dart'; class AuthSession { Transport transport; diff --git a/dart/looker_sdk/lib/src/rtl/sdk.dart b/dart/looker_sdk/lib/src/rtl/sdk.dart index bd6c41367..3c4468fc9 100644 --- a/dart/looker_sdk/lib/src/rtl/sdk.dart +++ b/dart/looker_sdk/lib/src/rtl/sdk.dart @@ -1,4 +1,4 @@ -import 'package:looker_sdk/looker_sdk.dart'; +import '../../index.dart'; class Sdk { static LookerSDK _sdk; diff --git a/dart/looker_sdk/lib/src/rtl/transport.dart b/dart/looker_sdk/lib/src/rtl/transport.dart index 670533dd8..05a440d86 100644 --- a/dart/looker_sdk/lib/src/rtl/transport.dart +++ b/dart/looker_sdk/lib/src/rtl/transport.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:http/http.dart' as http; -import 'package:looker_sdk/looker_sdk.dart'; +import '../looker_sdk.dart'; import 'api_settings.dart'; enum HttpMethod { get, head, delete, post, put, patch } diff --git a/dart/looker_sdk/lib/src/sdk/methods.dart b/dart/looker_sdk/lib/src/sdk/methods.dart index 25075fcda..c853f0993 100644 --- a/dart/looker_sdk/lib/src/sdk/methods.dart +++ b/dart/looker_sdk/lib/src/sdk/methods.dart @@ -28,7 +28,7 @@ /// 437 API methods // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 -import 'package:looker_sdk/looker_sdk.dart'; +import '../looker_sdk.dart'; class LookerSDK extends APIMethods { LookerSDK(AuthSession authSession) : super(authSession); diff --git a/dart/looker_sdk/test/e2e/boards_test.dart b/dart/looker_sdk/test/e2e/boards_test.dart index 250aa4973..be2ec50a2 100644 --- a/dart/looker_sdk/test/e2e/boards_test.dart +++ b/dart/looker_sdk/test/e2e/boards_test.dart @@ -1,5 +1,5 @@ import 'package:test/test.dart'; -import 'package:looker_sdk/looker_sdk.dart'; +import 'package:looker_sdk/index.dart'; import './utils.dart'; void main() { diff --git a/dart/looker_sdk/test/e2e/connections_test.dart b/dart/looker_sdk/test/e2e/connections_test.dart index f1ff110eb..f6c69e8a6 100644 --- a/dart/looker_sdk/test/e2e/connections_test.dart +++ b/dart/looker_sdk/test/e2e/connections_test.dart @@ -1,5 +1,5 @@ import 'package:test/test.dart'; -import 'package:looker_sdk/looker_sdk.dart'; +import 'package:looker_sdk/index.dart'; import './utils.dart'; void main() { diff --git a/dart/looker_sdk/test/e2e/dashboards_test.dart b/dart/looker_sdk/test/e2e/dashboards_test.dart index 7a1d98d4d..2e89787e0 100644 --- a/dart/looker_sdk/test/e2e/dashboards_test.dart +++ b/dart/looker_sdk/test/e2e/dashboards_test.dart @@ -1,5 +1,5 @@ import 'package:test/test.dart'; -import 'package:looker_sdk/looker_sdk.dart'; +import 'package:looker_sdk/index.dart'; import './utils.dart'; void main() { diff --git a/dart/looker_sdk/test/e2e/looks_test.dart b/dart/looker_sdk/test/e2e/looks_test.dart index ba53515d7..1bd66ee76 100644 --- a/dart/looker_sdk/test/e2e/looks_test.dart +++ b/dart/looker_sdk/test/e2e/looks_test.dart @@ -1,5 +1,5 @@ import 'package:test/test.dart'; -import 'package:looker_sdk/looker_sdk.dart'; +import 'package:looker_sdk/index.dart'; import './utils.dart'; void main() { diff --git a/dart/looker_sdk/test/e2e/utils.dart b/dart/looker_sdk/test/e2e/utils.dart index dad8630e6..1d61311a9 100644 --- a/dart/looker_sdk/test/e2e/utils.dart +++ b/dart/looker_sdk/test/e2e/utils.dart @@ -1,5 +1,5 @@ import 'package:dotenv/dotenv.dart' show load, env; -import 'package:looker_sdk/looker_sdk.dart'; +import 'package:looker_sdk/index.dart'; class Utils { Utils() { diff --git a/dart/looker_sdk/test/unit/looker_sdk_test.dart b/dart/looker_sdk/test/unit/looker_sdk_test.dart index 85d9b821c..d616fef98 100644 --- a/dart/looker_sdk/test/unit/looker_sdk_test.dart +++ b/dart/looker_sdk/test/unit/looker_sdk_test.dart @@ -1,5 +1,5 @@ import 'package:test/test.dart'; -import 'package:looker_sdk/looker_sdk.dart'; +import 'package:looker_sdk/index.dart'; void main() { test('DelimList', () { diff --git a/packages/sdk-codegen/src/dart.gen.spec.ts b/packages/sdk-codegen/src/dart.gen.spec.ts index 81610b0d7..e7b756eff 100644 --- a/packages/sdk-codegen/src/dart.gen.spec.ts +++ b/packages/sdk-codegen/src/dart.gen.spec.ts @@ -129,7 +129,7 @@ describe('Dart generator', () => { const prologue = gen.methodsPrologue('') expect(prologue).toEqual(` // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 -import 'package:looker_sdk/looker_sdk.dart'; +import '../looker_sdk.dart'; class LookerSDK extends APIMethods { LookerSDK(AuthSession authSession) : super(authSession); diff --git a/packages/sdk-codegen/src/dart.gen.ts b/packages/sdk-codegen/src/dart.gen.ts index 57acc4c68..7b6370ae3 100644 --- a/packages/sdk-codegen/src/dart.gen.ts +++ b/packages/sdk-codegen/src/dart.gen.ts @@ -114,7 +114,7 @@ export class DartGen extends CodeGen { methodsPrologue(_indent: string): string { return ` // ${this.warnEditing()} -import 'package:looker_sdk/looker_sdk.dart'; +import '../looker_sdk.dart'; class ${this.sdkClassName()} extends APIMethods { ${this.sdkClassName()}(AuthSession authSession) : super(authSession); From 108aeef86009f27b0e3b85f39bdb6ca2b9929f1d Mon Sep 17 00:00:00 2001 From: Bryn Ryans Date: Mon, 10 Jan 2022 21:05:35 +0000 Subject: [PATCH 4/8] fix readme --- dart/looker_sdk/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dart/looker_sdk/README.md b/dart/looker_sdk/README.md index 261fe234c..dc121d1e7 100644 --- a/dart/looker_sdk/README.md +++ b/dart/looker_sdk/README.md @@ -32,7 +32,7 @@ Relies on `yarn` and `dart` being installed. This was developed with `dart` vers ### Generate -Run `yarn sdk Gen` from the `{reporoot}`. Note that the SDK generator needs to be built `yarn build`. If changing the generator run 'yarn watch` in a separate window. This command generates two files: +Run `yarn sdk Gen` from the `{reporoot}`. Note that the SDK generator needs to be built using `yarn build`. If changing the generator run 'yarn watch` in a separate window. This command generates two files: 1. `{reporoot}/dart/looker_sdk/lib/src/sdk/methods.dart` 2. `{reporoot}/dart/looker_sdk/lib/src/sdk/models.dart` @@ -45,7 +45,7 @@ Run `yarn example` from `{reporoot}/dart/looker_sdk` ### Run tests -Run `yarn test:e2e` from `{reporoot}/dart/looker_sdk` to run end to end tests. Note that this test requires that a `.env` file has been created (see above) and that the Looker instance is running. +Run `yarn test:e2e` from `{reporoot}/dart/looker_sdk` to run end to end tests. Note that these tests require that a `.env` file has been created (see above) and that the Looker instance is running. Run `yarn test:unit` from `{reporoot}/dart/looker_sdk` to run unit tests. These tests do not require a Looker instance to be running. @@ -53,22 +53,22 @@ Run `yarn test` from `{reporoot}/dart/looker_sdk` to run all tests. ### Run format -Run `yarn format` from `{reporoot}/dart/looker_sdk` to format the `dart` files correctly. This should be run if you change any of the run time library `dart` files. The repo CI will run the linter and will fail if the files have not been correctly formatted. +Run `yarn format` from `{reporoot}/dart/looker_sdk` to format the `dart` files correctly. This should be run if you change any of the run time library `dart` files. The repo CI will run the `format-check` and will fail if the files have not been correctly formatted. ### Run format-check -Run `yarn format-check` from `{reporoot}/dart/looker_sdk` to check the formatting of the `dart` files. +Run `yarn format-check` from `{reporoot}/dart/looker_sdk` to verify the formatting of the `dart` files. This is primarily for CI. It's the same as `yarn format` but does not format the files. ### Run analyze -Run `yarn format-analyze` from `{reporoot}/dart/looker_sdk` to lint the `dart` files. +Run `yarn format-analyze` from `{reporoot}/dart/looker_sdk` to lint the `dart` files. This should be run prior to commiting as CI will this task and will fail if the script fails. ## TODOs -1. Make enum mappers private to package. They are currently public as some enums are not used by by the models and a warning for unused class is diaplayed by visual code. It could also be a bug in either the generator or the spec generator (why are enums being generated if they are not being used?). -2. Add optional timeout option to methods. +1. Make enum mappers private to package. They are currently public as some enums are not used by by the models and a warning for unused class is displayed by visual code. It could also be a bug in either the generator or the spec generator (why are enums being generated if they are not being used?). +2. Add optional timeout parameter to methods and implement timeout support. 3. Add additional authorization methods to api keys. -4. Revisit auth session. There is some duplication of methods in generated methods. +4. Revisit auth session. There is some duplication of code in generated methods. 5. Add base class for models. Move common props to base class. Maybe add some utility methods for primitive types. Should reduce size of models.dart file. 6. More and better generator tests. They are a bit hacky at that moment. 7. Generate dart documentation. From c0028a00a2cd3b739fd5642f3d5a8a5477f3baac Mon Sep 17 00:00:00 2001 From: Bryn Ryans Date: Tue, 11 Jan 2022 16:44:53 -0800 Subject: [PATCH 5/8] Update dart/looker_sdk/README.md Co-authored-by: John Kaster --- dart/looker_sdk/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/looker_sdk/README.md b/dart/looker_sdk/README.md index dc121d1e7..09887fc66 100644 --- a/dart/looker_sdk/README.md +++ b/dart/looker_sdk/README.md @@ -1,6 +1,6 @@ # Looker API for Dart SDK -A dart implementation of the Looker API. Note that only the Looker 4.0 API is generated. +A dart implementation of the Looker API. Note that only the SDK for Looker 4.0 API is generated. ## Usage From 35f1b83445e52384db67a6ffdc2652791738d180 Mon Sep 17 00:00:00 2001 From: Bryn Ryans Date: Tue, 11 Jan 2022 16:45:04 -0800 Subject: [PATCH 6/8] Update dart/looker_sdk/README.md Co-authored-by: John Kaster --- dart/looker_sdk/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/looker_sdk/README.md b/dart/looker_sdk/README.md index 09887fc66..0fb56bf45 100644 --- a/dart/looker_sdk/README.md +++ b/dart/looker_sdk/README.md @@ -16,7 +16,7 @@ CLIENT_SECRET=client_secret_from_looker_instance ## Add to project -Add following to project `pubspec.yaml` dependencies. Replace `{SHA}` with the sha of the version of the SDK you want to use (a more permanent solution may be added in the future). +Add the following to project `pubspec.yaml` dependencies. Replace `{SHA}` with the sha of the version of the SDK you want to use (a more permanent solution may be added in the future). ``` looker_sdk: From a04503bf69bfb1153fb9d8b9fe73f4b9f5e2b447 Mon Sep 17 00:00:00 2001 From: Bryn Ryans Date: Tue, 11 Jan 2022 16:48:15 -0800 Subject: [PATCH 7/8] Update dart/looker_sdk/README.md Co-authored-by: John Kaster --- dart/looker_sdk/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/looker_sdk/README.md b/dart/looker_sdk/README.md index 0fb56bf45..e983050c1 100644 --- a/dart/looker_sdk/README.md +++ b/dart/looker_sdk/README.md @@ -75,4 +75,4 @@ Run `yarn format-analyze` from `{reporoot}/dart/looker_sdk` to lint the `dart` f ## Notes -1. Region folding: Dart does not currently support region folding. visual studio code has a generic extension that supports region folding for dart. [Install](https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder) if you wish the generated regions to be honored. +1. Region folding: Dart does not currently support region folding. Visual Studio Code has a generic extension that supports region folding for dart. [Install](https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder) if you wish the generated regions to be honored. From 9f0a8f4f1bd385c29148c3b35f6f36c048b75668 Mon Sep 17 00:00:00 2001 From: Bryn Ryans Date: Tue, 11 Jan 2022 16:55:37 -0800 Subject: [PATCH 8/8] Update dart/looker_sdk/lib/src/rtl/constants.dart Co-authored-by: John Kaster --- dart/looker_sdk/lib/src/rtl/constants.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/looker_sdk/lib/src/rtl/constants.dart b/dart/looker_sdk/lib/src/rtl/constants.dart index 5e5380da2..8d4811369 100644 --- a/dart/looker_sdk/lib/src/rtl/constants.dart +++ b/dart/looker_sdk/lib/src/rtl/constants.dart @@ -1,5 +1,5 @@ const agentPrefix = 'DART-SDK'; -const defaultApiVersion = '3.1'; +const defaultApiVersion = '4.0'; const lookerVersion = '21.21'; const defaultTimeout = 120; final apiVersion = '4.0';