| // This is a generated file (see the discoveryapis_generator project). |
| |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: comment_references |
| // ignore_for_file: file_names |
| // ignore_for_file: library_names |
| // ignore_for_file: lines_longer_than_80_chars |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: prefer_expression_function_bodies |
| // ignore_for_file: prefer_interpolation_to_compose_strings |
| // ignore_for_file: unnecessary_brace_in_string_interps |
| // ignore_for_file: unnecessary_lambdas |
| // ignore_for_file: unnecessary_string_interpolations |
| |
| /// BigQuery Connection API - v1beta1 |
| /// |
| /// Allows users to manage BigQuery connections to external data sources. |
| /// |
| /// For more information, see <https://cloud.google.com/bigquery/> |
| /// |
| /// Create an instance of [BigQueryConnectionServiceApi] to access these |
| /// resources: |
| /// |
| /// - [ProjectsResource] |
| /// - [ProjectsLocationsResource] |
| /// - [ProjectsLocationsConnectionsResource] |
| library bigqueryconnection.v1beta1; |
| |
| import 'dart:async' as async; |
| import 'dart:convert' as convert; |
| import 'dart:core' as core; |
| |
| import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| import 'package:http/http.dart' as http; |
| |
| // ignore: deprecated_member_use_from_same_package |
| import '../shared.dart'; |
| import '../src/user_agent.dart'; |
| |
| export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| show ApiRequestError, DetailedApiRequestError; |
| |
| /// Allows users to manage BigQuery connections to external data sources. |
| class BigQueryConnectionServiceApi { |
| /// View and manage your data in Google BigQuery and see the email address for |
| /// your Google Account |
| static const bigqueryScope = 'https://www.googleapis.com/auth/bigquery'; |
| |
| /// See, edit, configure, and delete your Google Cloud data and see the email |
| /// address for your Google Account. |
| static const cloudPlatformScope = |
| 'https://www.googleapis.com/auth/cloud-platform'; |
| |
| final commons.ApiRequester _requester; |
| |
| ProjectsResource get projects => ProjectsResource(_requester); |
| |
| BigQueryConnectionServiceApi(http.Client client, |
| {core.String rootUrl = 'https://bigqueryconnection.googleapis.com/', |
| core.String servicePath = ''}) |
| : _requester = |
| commons.ApiRequester(client, rootUrl, servicePath, requestHeaders); |
| } |
| |
| class ProjectsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsResource get locations => |
| ProjectsLocationsResource(_requester); |
| |
| ProjectsResource(commons.ApiRequester client) : _requester = client; |
| } |
| |
| class ProjectsLocationsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsConnectionsResource get connections => |
| ProjectsLocationsConnectionsResource(_requester); |
| |
| ProjectsLocationsResource(commons.ApiRequester client) : _requester = client; |
| } |
| |
| class ProjectsLocationsConnectionsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsConnectionsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Creates a new connection. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. Parent resource name. Must be in the format |
| /// `projects/{project_id}/locations/{location_id}` |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [connectionId] - Optional. Connection id that should be assigned to the |
| /// created connection. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Connection]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Connection> create( |
| Connection request, |
| core.String parent, { |
| core.String? connectionId, |
| core.String? $fields, |
| }) async { |
| final _body = convert.json.encode(request); |
| final _queryParams = <core.String, core.List<core.String>>{ |
| if (connectionId != null) 'connectionId': [connectionId], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final _url = 'v1beta1/' + core.Uri.encodeFull('$parent') + '/connections'; |
| |
| final _response = await _requester.request( |
| _url, |
| 'POST', |
| body: _body, |
| queryParams: _queryParams, |
| ); |
| return Connection.fromJson( |
| _response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Deletes connection and associated credential. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. Name of the deleted connection, for example: |
| /// `projects/{project_id}/locations/{location_id}/connections/{connection_id}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/connections/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Empty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Empty> delete( |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final _queryParams = <core.String, core.List<core.String>>{ |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final _url = 'v1beta1/' + core.Uri.encodeFull('$name'); |
| |
| final _response = await _requester.request( |
| _url, |
| 'DELETE', |
| queryParams: _queryParams, |
| ); |
| return Empty.fromJson(_response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Returns specified connection. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. Name of the requested connection, for example: |
| /// `projects/{project_id}/locations/{location_id}/connections/{connection_id}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/connections/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Connection]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Connection> get( |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final _queryParams = <core.String, core.List<core.String>>{ |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final _url = 'v1beta1/' + core.Uri.encodeFull('$name'); |
| |
| final _response = await _requester.request( |
| _url, |
| 'GET', |
| queryParams: _queryParams, |
| ); |
| return Connection.fromJson( |
| _response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Gets the access control policy for a resource. |
| /// |
| /// Returns an empty policy if the resource exists and does not have a policy |
| /// set. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [resource] - REQUIRED: The resource for which the policy is being |
| /// requested. See the operation documentation for the appropriate value for |
| /// this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/connections/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Policy]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Policy> getIamPolicy( |
| GetIamPolicyRequest request, |
| core.String resource, { |
| core.String? $fields, |
| }) async { |
| final _body = convert.json.encode(request); |
| final _queryParams = <core.String, core.List<core.String>>{ |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final _url = |
| 'v1beta1/' + core.Uri.encodeFull('$resource') + ':getIamPolicy'; |
| |
| final _response = await _requester.request( |
| _url, |
| 'POST', |
| body: _body, |
| queryParams: _queryParams, |
| ); |
| return Policy.fromJson(_response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Returns a list of connections in the given project. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. Parent resource name. Must be in the form: |
| /// `projects/{project_id}/locations/{location_id}` |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [maxResults] - Required. Maximum number of results per page. |
| /// |
| /// [pageToken] - Page token. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListConnectionsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<ListConnectionsResponse> list( |
| core.String parent, { |
| core.int? maxResults, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final _queryParams = <core.String, core.List<core.String>>{ |
| if (maxResults != null) 'maxResults': ['${maxResults}'], |
| if (pageToken != null) 'pageToken': [pageToken], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final _url = 'v1beta1/' + core.Uri.encodeFull('$parent') + '/connections'; |
| |
| final _response = await _requester.request( |
| _url, |
| 'GET', |
| queryParams: _queryParams, |
| ); |
| return ListConnectionsResponse.fromJson( |
| _response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates the specified connection. |
| /// |
| /// For security reasons, also resets credential if connection properties are |
| /// in the update field mask. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. Name of the connection to update, for example: |
| /// `projects/{project_id}/locations/{location_id}/connections/{connection_id}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/connections/\[^/\]+$`. |
| /// |
| /// [updateMask] - Required. Update mask for the connection fields to be |
| /// updated. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Connection]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Connection> patch( |
| Connection request, |
| core.String name, { |
| core.String? updateMask, |
| core.String? $fields, |
| }) async { |
| final _body = convert.json.encode(request); |
| final _queryParams = <core.String, core.List<core.String>>{ |
| if (updateMask != null) 'updateMask': [updateMask], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final _url = 'v1beta1/' + core.Uri.encodeFull('$name'); |
| |
| final _response = await _requester.request( |
| _url, |
| 'PATCH', |
| body: _body, |
| queryParams: _queryParams, |
| ); |
| return Connection.fromJson( |
| _response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Sets the access control policy on the specified resource. |
| /// |
| /// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, |
| /// and `PERMISSION_DENIED` errors. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [resource] - REQUIRED: The resource for which the policy is being |
| /// specified. See the operation documentation for the appropriate value for |
| /// this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/connections/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Policy]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Policy> setIamPolicy( |
| SetIamPolicyRequest request, |
| core.String resource, { |
| core.String? $fields, |
| }) async { |
| final _body = convert.json.encode(request); |
| final _queryParams = <core.String, core.List<core.String>>{ |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final _url = |
| 'v1beta1/' + core.Uri.encodeFull('$resource') + ':setIamPolicy'; |
| |
| final _response = await _requester.request( |
| _url, |
| 'POST', |
| body: _body, |
| queryParams: _queryParams, |
| ); |
| return Policy.fromJson(_response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Returns permissions that a caller has on the specified resource. |
| /// |
| /// If the resource does not exist, this will return an empty set of |
| /// permissions, not a `NOT_FOUND` error. Note: This operation is designed to |
| /// be used for building permission-aware UIs and command-line tools, not for |
| /// authorization checking. This operation may "fail open" without warning. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [resource] - REQUIRED: The resource for which the policy detail is being |
| /// requested. See the operation documentation for the appropriate value for |
| /// this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/connections/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [TestIamPermissionsResponse]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<TestIamPermissionsResponse> testIamPermissions( |
| TestIamPermissionsRequest request, |
| core.String resource, { |
| core.String? $fields, |
| }) async { |
| final _body = convert.json.encode(request); |
| final _queryParams = <core.String, core.List<core.String>>{ |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final _url = |
| 'v1beta1/' + core.Uri.encodeFull('$resource') + ':testIamPermissions'; |
| |
| final _response = await _requester.request( |
| _url, |
| 'POST', |
| body: _body, |
| queryParams: _queryParams, |
| ); |
| return TestIamPermissionsResponse.fromJson( |
| _response as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Sets the credential for the specified connection. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. Name of the connection, for example: |
| /// `projects/{project_id}/locations/{location_id}/connections/{connection_id}/credential` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/connections/\[^/\]+/credential$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Empty]. |
| /// |
| /// Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| /// error. |
| /// |
| /// If the used [http.Client] completes with an error when making a REST call, |
| /// this method will complete with the same error. |
| async.Future<Empty> updateCredential( |
| ConnectionCredential request, |
| core.String name, { |
| core.String? $fields, |
| }) async { |
| final _body = convert.json.encode(request); |
| final _queryParams = <core.String, core.List<core.String>>{ |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final _url = 'v1beta1/' + core.Uri.encodeFull('$name'); |
| |
| final _response = await _requester.request( |
| _url, |
| 'PATCH', |
| body: _body, |
| queryParams: _queryParams, |
| ); |
| return Empty.fromJson(_response as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| /// Specifies the audit configuration for a service. |
| /// |
| /// The configuration determines which permission types are logged, and what |
| /// identities, if any, are exempted from logging. An AuditConfig must have one |
| /// or more AuditLogConfigs. If there are AuditConfigs for both `allServices` |
| /// and a specific service, the union of the two AuditConfigs is used for that |
| /// service: the log_types specified in each AuditConfig are enabled, and the |
| /// exempted_members in each AuditLogConfig are exempted. Example Policy with |
| /// multiple AuditConfigs: { "audit_configs": \[ { "service": "allServices", |
| /// "audit_log_configs": \[ { "log_type": "DATA_READ", "exempted_members": \[ |
| /// "user:jose@example.com" \] }, { "log_type": "DATA_WRITE" }, { "log_type": |
| /// "ADMIN_READ" } \] }, { "service": "sampleservice.googleapis.com", |
| /// "audit_log_configs": \[ { "log_type": "DATA_READ" }, { "log_type": |
| /// "DATA_WRITE", "exempted_members": \[ "user:aliya@example.com" \] } \] } \] } |
| /// For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| /// logging. It also exempts jose@example.com from DATA_READ logging, and |
| /// aliya@example.com from DATA_WRITE logging. |
| class AuditConfig { |
| /// The configuration for logging of each type of permission. |
| core.List<AuditLogConfig>? auditLogConfigs; |
| |
| /// Specifies a service that will be enabled for audit logging. |
| /// |
| /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| /// `allServices` is a special value that covers all services. |
| core.String? service; |
| |
| AuditConfig({ |
| this.auditLogConfigs, |
| this.service, |
| }); |
| |
| AuditConfig.fromJson(core.Map _json) |
| : this( |
| auditLogConfigs: _json.containsKey('auditLogConfigs') |
| ? (_json['auditLogConfigs'] as core.List) |
| .map((value) => AuditLogConfig.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| service: _json.containsKey('service') |
| ? _json['service'] as core.String |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (auditLogConfigs != null) 'auditLogConfigs': auditLogConfigs!, |
| if (service != null) 'service': service!, |
| }; |
| } |
| |
| /// Provides the configuration for logging a type of permissions. |
| /// |
| /// Example: { "audit_log_configs": \[ { "log_type": "DATA_READ", |
| /// "exempted_members": \[ "user:jose@example.com" \] }, { "log_type": |
| /// "DATA_WRITE" } \] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while |
| /// exempting jose@example.com from DATA_READ logging. |
| typedef AuditLogConfig = $AuditLogConfig; |
| |
| /// Associates `members`, or principals, with a `role`. |
| class Binding { |
| /// The condition that is associated with this binding. |
| /// |
| /// If the condition evaluates to `true`, then this binding applies to the |
| /// current request. If the condition evaluates to `false`, then this binding |
| /// does not apply to the current request. However, a different role binding |
| /// might grant the same role to one or more of the principals in this |
| /// binding. To learn which resources support conditions in their IAM |
| /// policies, see the |
| /// [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| Expr? condition; |
| |
| /// Specifies the principals requesting access for a Cloud Platform resource. |
| /// |
| /// `members` can have the following values: * `allUsers`: A special |
| /// identifier that represents anyone who is on the internet; with or without |
| /// a Google account. * `allAuthenticatedUsers`: A special identifier that |
| /// represents anyone who is authenticated with a Google account or a service |
| /// account. * `user:{emailid}`: An email address that represents a specific |
| /// Google account. For example, `alice@example.com` . * |
| /// `serviceAccount:{emailid}`: An email address that represents a service |
| /// account. For example, `my-other-app@appspot.gserviceaccount.com`. * |
| /// `group:{emailid}`: An email address that represents a Google group. For |
| /// example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: |
| /// An email address (plus unique identifier) representing a user that has |
| /// been recently deleted. For example, |
| /// `alice@example.com?uid=123456789012345678901`. If the user is recovered, |
| /// this value reverts to `user:{emailid}` and the recovered user retains the |
| /// role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: |
| /// An email address (plus unique identifier) representing a service account |
| /// that has been recently deleted. For example, |
| /// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If |
| /// the service account is undeleted, this value reverts to |
| /// `serviceAccount:{emailid}` and the undeleted service account retains the |
| /// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email |
| /// address (plus unique identifier) representing a Google group that has been |
| /// recently deleted. For example, |
| /// `admins@example.com?uid=123456789012345678901`. If the group is recovered, |
| /// this value reverts to `group:{emailid}` and the recovered group retains |
| /// the role in the binding. * `domain:{domain}`: The G Suite domain (primary) |
| /// that represents all the users of that domain. For example, `google.com` or |
| /// `example.com`. |
| core.List<core.String>? members; |
| |
| /// Role that is assigned to the list of `members`, or principals. |
| /// |
| /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| core.String? role; |
| |
| Binding({ |
| this.condition, |
| this.members, |
| this.role, |
| }); |
| |
| Binding.fromJson(core.Map _json) |
| : this( |
| condition: _json.containsKey('condition') |
| ? Expr.fromJson( |
| _json['condition'] as core.Map<core.String, core.dynamic>) |
| : null, |
| members: _json.containsKey('members') |
| ? (_json['members'] as core.List) |
| .map((value) => value as core.String) |
| .toList() |
| : null, |
| role: _json.containsKey('role') ? _json['role'] as core.String : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (condition != null) 'condition': condition!, |
| if (members != null) 'members': members!, |
| if (role != null) 'role': role!, |
| }; |
| } |
| |
| /// Credential info for the Cloud SQL. |
| class CloudSqlCredential { |
| /// The password for the credential. |
| core.String? password; |
| |
| /// The username for the credential. |
| core.String? username; |
| |
| CloudSqlCredential({ |
| this.password, |
| this.username, |
| }); |
| |
| CloudSqlCredential.fromJson(core.Map _json) |
| : this( |
| password: _json.containsKey('password') |
| ? _json['password'] as core.String |
| : null, |
| username: _json.containsKey('username') |
| ? _json['username'] as core.String |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (password != null) 'password': password!, |
| if (username != null) 'username': username!, |
| }; |
| } |
| |
| /// Connection properties specific to the Cloud SQL. |
| class CloudSqlProperties { |
| /// Input only. |
| /// |
| /// Cloud SQL credential. |
| CloudSqlCredential? credential; |
| |
| /// Database name. |
| core.String? database; |
| |
| /// Cloud SQL instance ID in the form `project:location:instance`. |
| core.String? instanceId; |
| |
| /// Type of the Cloud SQL database. |
| /// Possible string values are: |
| /// - "DATABASE_TYPE_UNSPECIFIED" : Unspecified database type. |
| /// - "POSTGRES" : Cloud SQL for PostgreSQL. |
| /// - "MYSQL" : Cloud SQL for MySQL. |
| core.String? type; |
| |
| CloudSqlProperties({ |
| this.credential, |
| this.database, |
| this.instanceId, |
| this.type, |
| }); |
| |
| CloudSqlProperties.fromJson(core.Map _json) |
| : this( |
| credential: _json.containsKey('credential') |
| ? CloudSqlCredential.fromJson( |
| _json['credential'] as core.Map<core.String, core.dynamic>) |
| : null, |
| database: _json.containsKey('database') |
| ? _json['database'] as core.String |
| : null, |
| instanceId: _json.containsKey('instanceId') |
| ? _json['instanceId'] as core.String |
| : null, |
| type: _json.containsKey('type') ? _json['type'] as core.String : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (credential != null) 'credential': credential!, |
| if (database != null) 'database': database!, |
| if (instanceId != null) 'instanceId': instanceId!, |
| if (type != null) 'type': type!, |
| }; |
| } |
| |
| /// Configuration parameters to establish connection with an external data |
| /// source, except the credential attributes. |
| class Connection { |
| /// Cloud SQL properties. |
| CloudSqlProperties? cloudSql; |
| |
| /// The creation timestamp of the connection. |
| /// |
| /// Output only. |
| core.String? creationTime; |
| |
| /// User provided description. |
| core.String? description; |
| |
| /// User provided display name for the connection. |
| core.String? friendlyName; |
| |
| /// True, if credential is configured for this connection. |
| /// |
| /// Output only. |
| core.bool? hasCredential; |
| |
| /// The last update timestamp of the connection. |
| /// |
| /// Output only. |
| core.String? lastModifiedTime; |
| |
| /// The resource name of the connection in the form of: |
| /// `projects/{project_id}/locations/{location_id}/connections/{connection_id}` |
| core.String? name; |
| |
| Connection({ |
| this.cloudSql, |
| this.creationTime, |
| this.description, |
| this.friendlyName, |
| this.hasCredential, |
| this.lastModifiedTime, |
| this.name, |
| }); |
| |
| Connection.fromJson(core.Map _json) |
| : this( |
| cloudSql: _json.containsKey('cloudSql') |
| ? CloudSqlProperties.fromJson( |
| _json['cloudSql'] as core.Map<core.String, core.dynamic>) |
| : null, |
| creationTime: _json.containsKey('creationTime') |
| ? _json['creationTime'] as core.String |
| : null, |
| description: _json.containsKey('description') |
| ? _json['description'] as core.String |
| : null, |
| friendlyName: _json.containsKey('friendlyName') |
| ? _json['friendlyName'] as core.String |
| : null, |
| hasCredential: _json.containsKey('hasCredential') |
| ? _json['hasCredential'] as core.bool |
| : null, |
| lastModifiedTime: _json.containsKey('lastModifiedTime') |
| ? _json['lastModifiedTime'] as core.String |
| : null, |
| name: _json.containsKey('name') ? _json['name'] as core.String : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (cloudSql != null) 'cloudSql': cloudSql!, |
| if (creationTime != null) 'creationTime': creationTime!, |
| if (description != null) 'description': description!, |
| if (friendlyName != null) 'friendlyName': friendlyName!, |
| if (hasCredential != null) 'hasCredential': hasCredential!, |
| if (lastModifiedTime != null) 'lastModifiedTime': lastModifiedTime!, |
| if (name != null) 'name': name!, |
| }; |
| } |
| |
| /// Credential to use with a connection. |
| class ConnectionCredential { |
| /// Credential for Cloud SQL database. |
| CloudSqlCredential? cloudSql; |
| |
| ConnectionCredential({ |
| this.cloudSql, |
| }); |
| |
| ConnectionCredential.fromJson(core.Map _json) |
| : this( |
| cloudSql: _json.containsKey('cloudSql') |
| ? CloudSqlCredential.fromJson( |
| _json['cloudSql'] as core.Map<core.String, core.dynamic>) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (cloudSql != null) 'cloudSql': cloudSql!, |
| }; |
| } |
| |
| /// A generic empty message that you can re-use to avoid defining duplicated |
| /// empty messages in your APIs. |
| /// |
| /// A typical example is to use it as the request or the response type of an API |
| /// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns |
| /// (google.protobuf.Empty); } |
| typedef Empty = $Empty; |
| |
| /// Represents a textual expression in the Common Expression Language (CEL) |
| /// syntax. |
| /// |
| /// CEL is a C-like expression language. The syntax and semantics of CEL are |
| /// documented at https://github.com/google/cel-spec. Example (Comparison): |
| /// title: "Summary size limit" description: "Determines if a summary is less |
| /// than 100 chars" expression: "document.summary.size() \< 100" Example |
| /// (Equality): title: "Requestor is owner" description: "Determines if |
| /// requestor is the document owner" expression: "document.owner == |
| /// request.auth.claims.email" Example (Logic): title: "Public documents" |
| /// description: "Determine whether the document should be publicly visible" |
| /// expression: "document.type != 'private' && document.type != 'internal'" |
| /// Example (Data Manipulation): title: "Notification string" description: |
| /// "Create a notification string with a timestamp." expression: "'New message |
| /// received at ' + string(document.create_time)" The exact variables and |
| /// functions that may be referenced within an expression are determined by the |
| /// service that evaluates it. See the service documentation for additional |
| /// information. |
| typedef Expr = $Expr; |
| |
| /// Request message for `GetIamPolicy` method. |
| class GetIamPolicyRequest { |
| /// OPTIONAL: A `GetPolicyOptions` object for specifying options to |
| /// `GetIamPolicy`. |
| GetPolicyOptions? options; |
| |
| GetIamPolicyRequest({ |
| this.options, |
| }); |
| |
| GetIamPolicyRequest.fromJson(core.Map _json) |
| : this( |
| options: _json.containsKey('options') |
| ? GetPolicyOptions.fromJson( |
| _json['options'] as core.Map<core.String, core.dynamic>) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (options != null) 'options': options!, |
| }; |
| } |
| |
| /// Encapsulates settings provided to GetIamPolicy. |
| typedef GetPolicyOptions = $GetPolicyOptions; |
| |
| /// The response for ConnectionService.ListConnections. |
| class ListConnectionsResponse { |
| /// List of connections. |
| core.List<Connection>? connections; |
| |
| /// Next page token. |
| core.String? nextPageToken; |
| |
| ListConnectionsResponse({ |
| this.connections, |
| this.nextPageToken, |
| }); |
| |
| ListConnectionsResponse.fromJson(core.Map _json) |
| : this( |
| connections: _json.containsKey('connections') |
| ? (_json['connections'] as core.List) |
| .map((value) => Connection.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| nextPageToken: _json.containsKey('nextPageToken') |
| ? _json['nextPageToken'] as core.String |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (connections != null) 'connections': connections!, |
| if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
| }; |
| } |
| |
| /// An Identity and Access Management (IAM) policy, which specifies access |
| /// controls for Google Cloud resources. |
| /// |
| /// A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| /// `members`, or principals, to a single `role`. Principals can be user |
| /// accounts, service accounts, Google groups, and domains (such as G Suite). A |
| /// `role` is a named list of permissions; each `role` can be an IAM predefined |
| /// role or a user-created custom role. For some types of Google Cloud |
| /// resources, a `binding` can also specify a `condition`, which is a logical |
| /// expression that allows access to a resource only if the expression evaluates |
| /// to `true`. A condition can add constraints based on attributes of the |
| /// request, the resource, or both. To learn which resources support conditions |
| /// in their IAM policies, see the |
| /// [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| /// **JSON example:** { "bindings": \[ { "role": |
| /// "roles/resourcemanager.organizationAdmin", "members": \[ |
| /// "user:mike@example.com", "group:admins@example.com", "domain:google.com", |
| /// "serviceAccount:my-project-id@appspot.gserviceaccount.com" \] }, { "role": |
| /// "roles/resourcemanager.organizationViewer", "members": \[ |
| /// "user:eve@example.com" \], "condition": { "title": "expirable access", |
| /// "description": "Does not grant access after Sep 2020", "expression": |
| /// "request.time \< timestamp('2020-10-01T00:00:00.000Z')", } } \], "etag": |
| /// "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - |
| /// user:mike@example.com - group:admins@example.com - domain:google.com - |
| /// serviceAccount:my-project-id@appspot.gserviceaccount.com role: |
| /// roles/resourcemanager.organizationAdmin - members: - user:eve@example.com |
| /// role: roles/resourcemanager.organizationViewer condition: title: expirable |
| /// access description: Does not grant access after Sep 2020 expression: |
| /// request.time \< timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= |
| /// version: 3 For a description of IAM and its features, see the |
| /// [IAM documentation](https://cloud.google.com/iam/docs/). |
| class Policy { |
| /// Specifies cloud audit logging configuration for this policy. |
| core.List<AuditConfig>? auditConfigs; |
| |
| /// Associates a list of `members`, or principals, with a `role`. |
| /// |
| /// Optionally, may specify a `condition` that determines how and when the |
| /// `bindings` are applied. Each of the `bindings` must contain at least one |
| /// principal. The `bindings` in a `Policy` can refer to up to 1,500 |
| /// principals; up to 250 of these principals can be Google groups. Each |
| /// occurrence of a principal counts towards these limits. For example, if the |
| /// `bindings` grant 50 different roles to `user:alice@example.com`, and not |
| /// to any other principal, then you can add another 1,450 principals to the |
| /// `bindings` in the `Policy`. |
| core.List<Binding>? bindings; |
| |
| /// `etag` is used for optimistic concurrency control as a way to help prevent |
| /// simultaneous updates of a policy from overwriting each other. |
| /// |
| /// It is strongly suggested that systems make use of the `etag` in the |
| /// read-modify-write cycle to perform policy updates in order to avoid race |
| /// conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| /// systems are expected to put that etag in the request to `setIamPolicy` to |
| /// ensure that their change will be applied to the same version of the |
| /// policy. **Important:** If you use IAM Conditions, you must include the |
| /// `etag` field whenever you call `setIamPolicy`. If you omit this field, |
| /// then IAM allows you to overwrite a version `3` policy with a version `1` |
| /// policy, and all of the conditions in the version `3` policy are lost. |
| core.String? etag; |
| core.List<core.int> get etagAsBytes => convert.base64.decode(etag!); |
| |
| set etagAsBytes(core.List<core.int> _bytes) { |
| etag = |
| convert.base64.encode(_bytes).replaceAll('/', '_').replaceAll('+', '-'); |
| } |
| |
| /// Specifies the format of the policy. |
| /// |
| /// Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| /// are rejected. Any operation that affects conditional role bindings must |
| /// specify version `3`. This requirement applies to the following operations: |
| /// * Getting a policy that includes a conditional role binding * Adding a |
| /// conditional role binding to a policy * Changing a conditional role binding |
| /// in a policy * Removing any role binding, with or without a condition, from |
| /// a policy that includes conditions **Important:** If you use IAM |
| /// Conditions, you must include the `etag` field whenever you call |
| /// `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a |
| /// version `3` policy with a version `1` policy, and all of the conditions in |
| /// the version `3` policy are lost. If a policy does not include any |
| /// conditions, operations on that policy may specify any valid version or |
| /// leave the field unset. To learn which resources support conditions in |
| /// their IAM policies, see the |
| /// [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| core.int? version; |
| |
| Policy({ |
| this.auditConfigs, |
| this.bindings, |
| this.etag, |
| this.version, |
| }); |
| |
| Policy.fromJson(core.Map _json) |
| : this( |
| auditConfigs: _json.containsKey('auditConfigs') |
| ? (_json['auditConfigs'] as core.List) |
| .map((value) => AuditConfig.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| bindings: _json.containsKey('bindings') |
| ? (_json['bindings'] as core.List) |
| .map((value) => Binding.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| etag: _json.containsKey('etag') ? _json['etag'] as core.String : null, |
| version: _json.containsKey('version') |
| ? _json['version'] as core.int |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (auditConfigs != null) 'auditConfigs': auditConfigs!, |
| if (bindings != null) 'bindings': bindings!, |
| if (etag != null) 'etag': etag!, |
| if (version != null) 'version': version!, |
| }; |
| } |
| |
| /// Request message for `SetIamPolicy` method. |
| class SetIamPolicyRequest { |
| /// REQUIRED: The complete policy to be applied to the `resource`. |
| /// |
| /// The size of the policy is limited to a few 10s of KB. An empty policy is a |
| /// valid policy but certain Cloud Platform services (such as Projects) might |
| /// reject them. |
| Policy? policy; |
| |
| /// OPTIONAL: A FieldMask specifying which fields of the policy to modify. |
| /// |
| /// Only the fields in the mask will be modified. If no mask is provided, the |
| /// following default mask is used: `paths: "bindings, etag"` |
| core.String? updateMask; |
| |
| SetIamPolicyRequest({ |
| this.policy, |
| this.updateMask, |
| }); |
| |
| SetIamPolicyRequest.fromJson(core.Map _json) |
| : this( |
| policy: _json.containsKey('policy') |
| ? Policy.fromJson( |
| _json['policy'] as core.Map<core.String, core.dynamic>) |
| : null, |
| updateMask: _json.containsKey('updateMask') |
| ? _json['updateMask'] as core.String |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (policy != null) 'policy': policy!, |
| if (updateMask != null) 'updateMask': updateMask!, |
| }; |
| } |
| |
| /// Request message for `TestIamPermissions` method. |
| typedef TestIamPermissionsRequest = $TestIamPermissionsRequest; |
| |
| /// Response message for `TestIamPermissions` method. |
| typedef TestIamPermissionsResponse = $TestIamPermissionsResponse; |