| // 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 |
| |
| /// Network Security API - v1beta1 |
| /// |
| /// For more information, see <https://cloud.google.com/networking> |
| /// |
| /// Create an instance of [NetworkSecurityApi] to access these resources: |
| /// |
| /// - [ProjectsResource] |
| /// - [ProjectsLocationsResource] |
| /// - [ProjectsLocationsAuthorizationPoliciesResource] |
| /// - [ProjectsLocationsClientTlsPoliciesResource] |
| /// - [ProjectsLocationsOperationsResource] |
| /// - [ProjectsLocationsServerTlsPoliciesResource] |
| library networksecurity.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; |
| |
| class NetworkSecurityApi { |
| /// 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); |
| |
| NetworkSecurityApi(http.Client client, |
| {core.String rootUrl = 'https://networksecurity.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; |
| |
| ProjectsLocationsAuthorizationPoliciesResource get authorizationPolicies => |
| ProjectsLocationsAuthorizationPoliciesResource(_requester); |
| ProjectsLocationsClientTlsPoliciesResource get clientTlsPolicies => |
| ProjectsLocationsClientTlsPoliciesResource(_requester); |
| ProjectsLocationsOperationsResource get operations => |
| ProjectsLocationsOperationsResource(_requester); |
| ProjectsLocationsServerTlsPoliciesResource get serverTlsPolicies => |
| ProjectsLocationsServerTlsPoliciesResource(_requester); |
| |
| ProjectsLocationsResource(commons.ApiRequester client) : _requester = client; |
| |
| /// Gets information about a location. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Resource name for the location. |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Location]. |
| /// |
| /// 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<Location> 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 Location.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Lists information about the supported locations for this service. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - The resource that owns the locations collection, if applicable. |
| /// Value must have pattern `^projects/\[^/\]+$`. |
| /// |
| /// [filter] - A filter to narrow down results to a preferred subset. The |
| /// filtering language accepts strings like `"displayName=tokyo"`, and is |
| /// documented in more detail in \[AIP-160\](https://google.aip.dev/160). |
| /// |
| /// [pageSize] - The maximum number of results to return. If not set, the |
| /// service selects a default. |
| /// |
| /// [pageToken] - A page token received from the `next_page_token` field in |
| /// the response. Send that page token to receive the subsequent page. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListLocationsResponse]. |
| /// |
| /// 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<ListLocationsResponse> list( |
| core.String name, { |
| core.String? filter, |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (filter != null) 'filter': [filter], |
| if (pageSize != null) 'pageSize': ['${pageSize}'], |
| if (pageToken != null) 'pageToken': [pageToken], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = 'v1beta1/' + core.Uri.encodeFull('$name') + '/locations'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListLocationsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ProjectsLocationsAuthorizationPoliciesResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsAuthorizationPoliciesResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Creates a new AuthorizationPolicy in a given project and location. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. The parent resource of the AuthorizationPolicy. Must |
| /// be in the format `projects/{project}/locations/{location}`. |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [authorizationPolicyId] - Required. Short name of the AuthorizationPolicy |
| /// resource to be created. This value should be 1-63 characters long, |
| /// containing only letters, numbers, hyphens, and underscores, and should not |
| /// start with a number. E.g. "authz_policy". |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// 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<Operation> create( |
| AuthorizationPolicy request, |
| core.String parent, { |
| core.String? authorizationPolicyId, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (authorizationPolicyId != null) |
| 'authorizationPolicyId': [authorizationPolicyId], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = |
| 'v1beta1/' + core.Uri.encodeFull('$parent') + '/authorizationPolicies'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Deletes a single AuthorizationPolicy. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. A name of the AuthorizationPolicy to delete. Must be in |
| /// the format `projects/{project}/locations/{location}/authorizationPolicies |
| /// / * `. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/authorizationPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// 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<Operation> 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 Operation.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Gets details of a single AuthorizationPolicy. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. A name of the AuthorizationPolicy to get. Must be in |
| /// the format `projects/{project}/locations/{location}/authorizationPolicies |
| /// / * `. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/authorizationPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [AuthorizationPolicy]. |
| /// |
| /// 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<AuthorizationPolicy> 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 AuthorizationPolicy.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 parameters: |
| /// |
| /// [resource] - REQUIRED: The resource for which the policy is being |
| /// requested. See |
| /// [Resource names](https://cloud.google.com/apis/design/resource_names) for |
| /// the appropriate value for this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/authorizationPolicies/\[^/\]+$`. |
| /// |
| /// [options_requestedPolicyVersion] - Optional. The maximum policy version |
| /// that will be used to format the policy. Valid values are 0, 1, and 3. |
| /// Requests specifying an invalid value will be rejected. Requests for |
| /// policies with any conditional role bindings must specify version 3. |
| /// Policies with no conditional role bindings may specify any valid value or |
| /// leave the field unset. The policy in the response might use the policy |
| /// version that you specified, or it might use a lower policy version. For |
| /// example, if you specify version 3, but the policy has no conditional role |
| /// bindings, the response uses version 1. To learn which resources support |
| /// conditions in their IAM policies, see the |
| /// [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [GoogleIamV1Policy]. |
| /// |
| /// 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<GoogleIamV1Policy> getIamPolicy( |
| core.String resource, { |
| core.int? options_requestedPolicyVersion, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (options_requestedPolicyVersion != null) |
| 'options.requestedPolicyVersion': ['${options_requestedPolicyVersion}'], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = |
| 'v1beta1/' + core.Uri.encodeFull('$resource') + ':getIamPolicy'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return GoogleIamV1Policy.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Lists AuthorizationPolicies in a given project and location. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. The project and location from which the |
| /// AuthorizationPolicies should be listed, specified in the format |
| /// `projects/{project}/locations/{location}`. |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [pageSize] - Maximum number of AuthorizationPolicies to return per call. |
| /// |
| /// [pageToken] - The value returned by the last |
| /// `ListAuthorizationPoliciesResponse` Indicates that this is a continuation |
| /// of a prior `ListAuthorizationPolicies` call, and that the system should |
| /// return the next page of data. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListAuthorizationPoliciesResponse]. |
| /// |
| /// 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<ListAuthorizationPoliciesResponse> list( |
| core.String parent, { |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (pageSize != null) 'pageSize': ['${pageSize}'], |
| if (pageToken != null) 'pageToken': [pageToken], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = |
| 'v1beta1/' + core.Uri.encodeFull('$parent') + '/authorizationPolicies'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListAuthorizationPoliciesResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates the parameters of a single AuthorizationPolicy. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. Name of the AuthorizationPolicy resource. It matches |
| /// pattern `projects/{project}/locations/{location}/authorizationPolicies/`. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/authorizationPolicies/\[^/\]+$`. |
| /// |
| /// [updateMask] - Optional. Field mask is used to specify the fields to be |
| /// overwritten in the AuthorizationPolicy resource by the update. The fields |
| /// specified in the update_mask are relative to the resource, not the full |
| /// request. A field will be overwritten if it is in the mask. If the user |
| /// does not provide a mask then all fields will be overwritten. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// 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<Operation> patch( |
| AuthorizationPolicy 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 Operation.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 |
| /// [Resource names](https://cloud.google.com/apis/design/resource_names) for |
| /// the appropriate value for this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/authorizationPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [GoogleIamV1Policy]. |
| /// |
| /// 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<GoogleIamV1Policy> setIamPolicy( |
| GoogleIamV1SetIamPolicyRequest 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 GoogleIamV1Policy.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 |
| /// [Resource names](https://cloud.google.com/apis/design/resource_names) for |
| /// the appropriate value for this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/authorizationPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [GoogleIamV1TestIamPermissionsResponse]. |
| /// |
| /// 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<GoogleIamV1TestIamPermissionsResponse> testIamPermissions( |
| GoogleIamV1TestIamPermissionsRequest 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 GoogleIamV1TestIamPermissionsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ProjectsLocationsClientTlsPoliciesResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsClientTlsPoliciesResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Creates a new ClientTlsPolicy in a given project and location. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. The parent resource of the ClientTlsPolicy. Must be |
| /// in the format `projects / * /locations/{location}`. |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [clientTlsPolicyId] - Required. Short name of the ClientTlsPolicy resource |
| /// to be created. This value should be 1-63 characters long, containing only |
| /// letters, numbers, hyphens, and underscores, and should not start with a |
| /// number. E.g. "client_mtls_policy". |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// 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<Operation> create( |
| ClientTlsPolicy request, |
| core.String parent, { |
| core.String? clientTlsPolicyId, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (clientTlsPolicyId != null) 'clientTlsPolicyId': [clientTlsPolicyId], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = |
| 'v1beta1/' + core.Uri.encodeFull('$parent') + '/clientTlsPolicies'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Deletes a single ClientTlsPolicy. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. A name of the ClientTlsPolicy to delete. Must be in the |
| /// format `projects / * /locations/{location}/clientTlsPolicies / * `. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/clientTlsPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// 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<Operation> 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 Operation.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Gets details of a single ClientTlsPolicy. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. A name of the ClientTlsPolicy to get. Must be in the |
| /// format `projects / * /locations/{location}/clientTlsPolicies / * `. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/clientTlsPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ClientTlsPolicy]. |
| /// |
| /// 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<ClientTlsPolicy> 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 ClientTlsPolicy.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 parameters: |
| /// |
| /// [resource] - REQUIRED: The resource for which the policy is being |
| /// requested. See |
| /// [Resource names](https://cloud.google.com/apis/design/resource_names) for |
| /// the appropriate value for this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/clientTlsPolicies/\[^/\]+$`. |
| /// |
| /// [options_requestedPolicyVersion] - Optional. The maximum policy version |
| /// that will be used to format the policy. Valid values are 0, 1, and 3. |
| /// Requests specifying an invalid value will be rejected. Requests for |
| /// policies with any conditional role bindings must specify version 3. |
| /// Policies with no conditional role bindings may specify any valid value or |
| /// leave the field unset. The policy in the response might use the policy |
| /// version that you specified, or it might use a lower policy version. For |
| /// example, if you specify version 3, but the policy has no conditional role |
| /// bindings, the response uses version 1. To learn which resources support |
| /// conditions in their IAM policies, see the |
| /// [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [GoogleIamV1Policy]. |
| /// |
| /// 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<GoogleIamV1Policy> getIamPolicy( |
| core.String resource, { |
| core.int? options_requestedPolicyVersion, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (options_requestedPolicyVersion != null) |
| 'options.requestedPolicyVersion': ['${options_requestedPolicyVersion}'], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = |
| 'v1beta1/' + core.Uri.encodeFull('$resource') + ':getIamPolicy'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return GoogleIamV1Policy.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Lists ClientTlsPolicies in a given project and location. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. The project and location from which the |
| /// ClientTlsPolicies should be listed, specified in the format `projects / * |
| /// /locations/{location}`. |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [pageSize] - Maximum number of ClientTlsPolicies to return per call. |
| /// |
| /// [pageToken] - The value returned by the last |
| /// `ListClientTlsPoliciesResponse` Indicates that this is a continuation of a |
| /// prior `ListClientTlsPolicies` call, and that the system should return the |
| /// next page of data. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListClientTlsPoliciesResponse]. |
| /// |
| /// 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<ListClientTlsPoliciesResponse> list( |
| core.String parent, { |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (pageSize != null) 'pageSize': ['${pageSize}'], |
| if (pageToken != null) 'pageToken': [pageToken], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = |
| 'v1beta1/' + core.Uri.encodeFull('$parent') + '/clientTlsPolicies'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListClientTlsPoliciesResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates the parameters of a single ClientTlsPolicy. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. Name of the ClientTlsPolicy resource. It matches the |
| /// pattern `projects / * |
| /// /locations/{location}/clientTlsPolicies/{client_tls_policy}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/clientTlsPolicies/\[^/\]+$`. |
| /// |
| /// [updateMask] - Optional. Field mask is used to specify the fields to be |
| /// overwritten in the ClientTlsPolicy resource by the update. The fields |
| /// specified in the update_mask are relative to the resource, not the full |
| /// request. A field will be overwritten if it is in the mask. If the user |
| /// does not provide a mask then all fields will be overwritten. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// 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<Operation> patch( |
| ClientTlsPolicy 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 Operation.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 |
| /// [Resource names](https://cloud.google.com/apis/design/resource_names) for |
| /// the appropriate value for this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/clientTlsPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [GoogleIamV1Policy]. |
| /// |
| /// 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<GoogleIamV1Policy> setIamPolicy( |
| GoogleIamV1SetIamPolicyRequest 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 GoogleIamV1Policy.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 |
| /// [Resource names](https://cloud.google.com/apis/design/resource_names) for |
| /// the appropriate value for this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/clientTlsPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [GoogleIamV1TestIamPermissionsResponse]. |
| /// |
| /// 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<GoogleIamV1TestIamPermissionsResponse> testIamPermissions( |
| GoogleIamV1TestIamPermissionsRequest 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 GoogleIamV1TestIamPermissionsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ProjectsLocationsOperationsResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsOperationsResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Starts asynchronous cancellation on a long-running operation. |
| /// |
| /// The server makes a best effort to cancel the operation, but success is not |
| /// guaranteed. If the server doesn't support this method, it returns |
| /// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation |
| /// or other methods to check whether the cancellation succeeded or whether |
| /// the operation completed despite cancellation. On successful cancellation, |
| /// the operation is not deleted; instead, it becomes an operation with an |
| /// Operation.error value with a google.rpc.Status.code of 1, corresponding to |
| /// `Code.CANCELLED`. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - The name of the operation resource to be cancelled. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`. |
| /// |
| /// [$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> cancel( |
| CancelOperationRequest 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') + ':cancel'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Deletes a long-running operation. |
| /// |
| /// This method indicates that the client is no longer interested in the |
| /// operation result. It does not cancel the operation. If the server doesn't |
| /// support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - The name of the operation resource to be deleted. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`. |
| /// |
| /// [$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>); |
| } |
| |
| /// Gets the latest state of a long-running operation. |
| /// |
| /// Clients can use this method to poll the operation result at intervals as |
| /// recommended by the API service. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - The name of the operation resource. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/operations/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// 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<Operation> 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 Operation.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Lists operations that match the specified filter in the request. |
| /// |
| /// If the server doesn't support this method, it returns `UNIMPLEMENTED`. |
| /// NOTE: the `name` binding allows API services to override the binding to |
| /// use different resource name schemes, such as `users / * /operations`. To |
| /// override the binding, API services can add a binding such as |
| /// `"/v1/{name=users / * }/operations"` to their service configuration. For |
| /// backwards compatibility, the default name includes the operations |
| /// collection id, however overriding users must ensure the name binding is |
| /// the parent resource, without the operations collection id. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - The name of the operation's parent resource. |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [filter] - The standard list filter. |
| /// |
| /// [pageSize] - The standard list page size. |
| /// |
| /// [pageToken] - The standard list page token. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListOperationsResponse]. |
| /// |
| /// 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<ListOperationsResponse> list( |
| core.String name, { |
| core.String? filter, |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (filter != null) 'filter': [filter], |
| if (pageSize != null) 'pageSize': ['${pageSize}'], |
| if (pageToken != null) 'pageToken': [pageToken], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = 'v1beta1/' + core.Uri.encodeFull('$name') + '/operations'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListOperationsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| class ProjectsLocationsServerTlsPoliciesResource { |
| final commons.ApiRequester _requester; |
| |
| ProjectsLocationsServerTlsPoliciesResource(commons.ApiRequester client) |
| : _requester = client; |
| |
| /// Creates a new ServerTlsPolicy in a given project and location. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. The parent resource of the ServerTlsPolicy. Must be |
| /// in the format `projects / * /locations/{location}`. |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [serverTlsPolicyId] - Required. Short name of the ServerTlsPolicy resource |
| /// to be created. This value should be 1-63 characters long, containing only |
| /// letters, numbers, hyphens, and underscores, and should not start with a |
| /// number. E.g. "server_mtls_policy". |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// 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<Operation> create( |
| ServerTlsPolicy request, |
| core.String parent, { |
| core.String? serverTlsPolicyId, |
| core.String? $fields, |
| }) async { |
| final body_ = convert.json.encode(request); |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (serverTlsPolicyId != null) 'serverTlsPolicyId': [serverTlsPolicyId], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = |
| 'v1beta1/' + core.Uri.encodeFull('$parent') + '/serverTlsPolicies'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'POST', |
| body: body_, |
| queryParams: queryParams_, |
| ); |
| return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Deletes a single ServerTlsPolicy. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. A name of the ServerTlsPolicy to delete. Must be in the |
| /// format `projects / * /locations/{location}/serverTlsPolicies / * `. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/serverTlsPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// 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<Operation> 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 Operation.fromJson(response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Gets details of a single ServerTlsPolicy. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. A name of the ServerTlsPolicy to get. Must be in the |
| /// format `projects / * /locations/{location}/serverTlsPolicies / * `. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/serverTlsPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ServerTlsPolicy]. |
| /// |
| /// 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<ServerTlsPolicy> 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 ServerTlsPolicy.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 parameters: |
| /// |
| /// [resource] - REQUIRED: The resource for which the policy is being |
| /// requested. See |
| /// [Resource names](https://cloud.google.com/apis/design/resource_names) for |
| /// the appropriate value for this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/serverTlsPolicies/\[^/\]+$`. |
| /// |
| /// [options_requestedPolicyVersion] - Optional. The maximum policy version |
| /// that will be used to format the policy. Valid values are 0, 1, and 3. |
| /// Requests specifying an invalid value will be rejected. Requests for |
| /// policies with any conditional role bindings must specify version 3. |
| /// Policies with no conditional role bindings may specify any valid value or |
| /// leave the field unset. The policy in the response might use the policy |
| /// version that you specified, or it might use a lower policy version. For |
| /// example, if you specify version 3, but the policy has no conditional role |
| /// bindings, the response uses version 1. To learn which resources support |
| /// conditions in their IAM policies, see the |
| /// [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [GoogleIamV1Policy]. |
| /// |
| /// 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<GoogleIamV1Policy> getIamPolicy( |
| core.String resource, { |
| core.int? options_requestedPolicyVersion, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (options_requestedPolicyVersion != null) |
| 'options.requestedPolicyVersion': ['${options_requestedPolicyVersion}'], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = |
| 'v1beta1/' + core.Uri.encodeFull('$resource') + ':getIamPolicy'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return GoogleIamV1Policy.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Lists ServerTlsPolicies in a given project and location. |
| /// |
| /// Request parameters: |
| /// |
| /// [parent] - Required. The project and location from which the |
| /// ServerTlsPolicies should be listed, specified in the format `projects / * |
| /// /locations/{location}`. |
| /// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`. |
| /// |
| /// [pageSize] - Maximum number of ServerTlsPolicies to return per call. |
| /// |
| /// [pageToken] - The value returned by the last |
| /// `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a |
| /// prior `ListServerTlsPolicies` call, and that the system should return the |
| /// next page of data. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [ListServerTlsPoliciesResponse]. |
| /// |
| /// 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<ListServerTlsPoliciesResponse> list( |
| core.String parent, { |
| core.int? pageSize, |
| core.String? pageToken, |
| core.String? $fields, |
| }) async { |
| final queryParams_ = <core.String, core.List<core.String>>{ |
| if (pageSize != null) 'pageSize': ['${pageSize}'], |
| if (pageToken != null) 'pageToken': [pageToken], |
| if ($fields != null) 'fields': [$fields], |
| }; |
| |
| final url_ = |
| 'v1beta1/' + core.Uri.encodeFull('$parent') + '/serverTlsPolicies'; |
| |
| final response_ = await _requester.request( |
| url_, |
| 'GET', |
| queryParams: queryParams_, |
| ); |
| return ListServerTlsPoliciesResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| |
| /// Updates the parameters of a single ServerTlsPolicy. |
| /// |
| /// [request] - The metadata request object. |
| /// |
| /// Request parameters: |
| /// |
| /// [name] - Required. Name of the ServerTlsPolicy resource. It matches the |
| /// pattern `projects / * |
| /// /locations/{location}/serverTlsPolicies/{server_tls_policy}` |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/serverTlsPolicies/\[^/\]+$`. |
| /// |
| /// [updateMask] - Optional. Field mask is used to specify the fields to be |
| /// overwritten in the ServerTlsPolicy resource by the update. The fields |
| /// specified in the update_mask are relative to the resource, not the full |
| /// request. A field will be overwritten if it is in the mask. If the user |
| /// does not provide a mask then all fields will be overwritten. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [Operation]. |
| /// |
| /// 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<Operation> patch( |
| ServerTlsPolicy 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 Operation.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 |
| /// [Resource names](https://cloud.google.com/apis/design/resource_names) for |
| /// the appropriate value for this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/serverTlsPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [GoogleIamV1Policy]. |
| /// |
| /// 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<GoogleIamV1Policy> setIamPolicy( |
| GoogleIamV1SetIamPolicyRequest 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 GoogleIamV1Policy.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 |
| /// [Resource names](https://cloud.google.com/apis/design/resource_names) for |
| /// the appropriate value for this field. |
| /// Value must have pattern |
| /// `^projects/\[^/\]+/locations/\[^/\]+/serverTlsPolicies/\[^/\]+$`. |
| /// |
| /// [$fields] - Selector specifying which fields to include in a partial |
| /// response. |
| /// |
| /// Completes with a [GoogleIamV1TestIamPermissionsResponse]. |
| /// |
| /// 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<GoogleIamV1TestIamPermissionsResponse> testIamPermissions( |
| GoogleIamV1TestIamPermissionsRequest 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 GoogleIamV1TestIamPermissionsResponse.fromJson( |
| response_ as core.Map<core.String, core.dynamic>); |
| } |
| } |
| |
| /// AuthorizationPolicy is a resource that specifies how a server should |
| /// authorize incoming connections. |
| /// |
| /// This resource in itself does not change the configuration unless it's |
| /// attached to a target https proxy or endpoint config selector resource. |
| class AuthorizationPolicy { |
| /// The action to take when a rule match is found. |
| /// |
| /// Possible values are "ALLOW" or "DENY". |
| /// |
| /// Required. |
| /// Possible string values are: |
| /// - "ACTION_UNSPECIFIED" : Default value. |
| /// - "ALLOW" : Grant access. |
| /// - "DENY" : Deny access. Deny rules should be avoided unless they are used |
| /// to provide a default "deny all" fallback. |
| core.String? action; |
| |
| /// The timestamp when the resource was created. |
| /// |
| /// Output only. |
| core.String? createTime; |
| |
| /// Free-text description of the resource. |
| /// |
| /// Optional. |
| core.String? description; |
| |
| /// Set of label tags associated with the AuthorizationPolicy resource. |
| /// |
| /// Optional. |
| core.Map<core.String, core.String>? labels; |
| |
| /// Name of the AuthorizationPolicy resource. |
| /// |
| /// It matches pattern |
| /// `projects/{project}/locations/{location}/authorizationPolicies/`. |
| /// |
| /// Required. |
| core.String? name; |
| |
| /// List of rules to match. |
| /// |
| /// Note that at least one of the rules must match in order for the action |
| /// specified in the 'action' field to be taken. A rule is a match if there is |
| /// a matching source and destination. If left blank, the action specified in |
| /// the `action` field will be applied on every request. |
| /// |
| /// Optional. |
| core.List<Rule>? rules; |
| |
| /// The timestamp when the resource was updated. |
| /// |
| /// Output only. |
| core.String? updateTime; |
| |
| AuthorizationPolicy({ |
| this.action, |
| this.createTime, |
| this.description, |
| this.labels, |
| this.name, |
| this.rules, |
| this.updateTime, |
| }); |
| |
| AuthorizationPolicy.fromJson(core.Map json_) |
| : this( |
| action: json_.containsKey('action') |
| ? json_['action'] as core.String |
| : null, |
| createTime: json_.containsKey('createTime') |
| ? json_['createTime'] as core.String |
| : null, |
| description: json_.containsKey('description') |
| ? json_['description'] as core.String |
| : null, |
| labels: json_.containsKey('labels') |
| ? (json_['labels'] as core.Map<core.String, core.dynamic>).map( |
| (key, item) => core.MapEntry( |
| key, |
| item as core.String, |
| ), |
| ) |
| : null, |
| name: json_.containsKey('name') ? json_['name'] as core.String : null, |
| rules: json_.containsKey('rules') |
| ? (json_['rules'] as core.List) |
| .map((value) => Rule.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| updateTime: json_.containsKey('updateTime') |
| ? json_['updateTime'] as core.String |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (action != null) 'action': action!, |
| if (createTime != null) 'createTime': createTime!, |
| if (description != null) 'description': description!, |
| if (labels != null) 'labels': labels!, |
| if (name != null) 'name': name!, |
| if (rules != null) 'rules': rules!, |
| if (updateTime != null) 'updateTime': updateTime!, |
| }; |
| } |
| |
| /// The request message for Operations.CancelOperation. |
| typedef CancelOperationRequest = $Empty; |
| |
| /// Specification of a TLS certificate provider instance. |
| /// |
| /// Workloads may have one or more CertificateProvider instances (plugins) and |
| /// one of them is enabled and configured by specifying this message. Workloads |
| /// use the values from this message to locate and load the CertificateProvider |
| /// instance configuration. |
| class CertificateProviderInstance { |
| /// Plugin instance name, used to locate and load CertificateProvider instance |
| /// configuration. |
| /// |
| /// Set to "google_cloud_private_spiffe" to use Certificate Authority Service |
| /// certificate provider instance. |
| /// |
| /// Required. |
| core.String? pluginInstance; |
| |
| CertificateProviderInstance({ |
| this.pluginInstance, |
| }); |
| |
| CertificateProviderInstance.fromJson(core.Map json_) |
| : this( |
| pluginInstance: json_.containsKey('pluginInstance') |
| ? json_['pluginInstance'] as core.String |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (pluginInstance != null) 'pluginInstance': pluginInstance!, |
| }; |
| } |
| |
| /// ClientTlsPolicy is a resource that specifies how a client should |
| /// authenticate connections to backends of a service. |
| /// |
| /// This resource itself does not affect configuration unless it is attached to |
| /// a backend service resource. |
| class ClientTlsPolicy { |
| /// Defines a mechanism to provision client identity (public and private keys) |
| /// for peer to peer authentication. |
| /// |
| /// The presence of this dictates mTLS. |
| /// |
| /// Optional. |
| GoogleCloudNetworksecurityV1beta1CertificateProvider? clientCertificate; |
| |
| /// The timestamp when the resource was created. |
| /// |
| /// Output only. |
| core.String? createTime; |
| |
| /// Free-text description of the resource. |
| /// |
| /// Optional. |
| core.String? description; |
| |
| /// Set of label tags associated with the resource. |
| /// |
| /// Optional. |
| core.Map<core.String, core.String>? labels; |
| |
| /// Name of the ClientTlsPolicy resource. |
| /// |
| /// It matches the pattern `projects / * |
| /// /locations/{location}/clientTlsPolicies/{client_tls_policy}` |
| /// |
| /// Required. |
| core.String? name; |
| |
| /// Defines the mechanism to obtain the Certificate Authority certificate to |
| /// validate the server certificate. |
| /// |
| /// If empty, client does not validate the server certificate. |
| /// |
| /// Optional. |
| core.List<ValidationCA>? serverValidationCa; |
| |
| /// Server Name Indication string to present to the server during TLS |
| /// handshake. |
| /// |
| /// E.g: "secure.example.com". |
| /// |
| /// Optional. |
| core.String? sni; |
| |
| /// The timestamp when the resource was updated. |
| /// |
| /// Output only. |
| core.String? updateTime; |
| |
| ClientTlsPolicy({ |
| this.clientCertificate, |
| this.createTime, |
| this.description, |
| this.labels, |
| this.name, |
| this.serverValidationCa, |
| this.sni, |
| this.updateTime, |
| }); |
| |
| ClientTlsPolicy.fromJson(core.Map json_) |
| : this( |
| clientCertificate: json_.containsKey('clientCertificate') |
| ? GoogleCloudNetworksecurityV1beta1CertificateProvider.fromJson( |
| json_['clientCertificate'] |
| as core.Map<core.String, core.dynamic>) |
| : null, |
| createTime: json_.containsKey('createTime') |
| ? json_['createTime'] as core.String |
| : null, |
| description: json_.containsKey('description') |
| ? json_['description'] as core.String |
| : null, |
| labels: json_.containsKey('labels') |
| ? (json_['labels'] as core.Map<core.String, core.dynamic>).map( |
| (key, item) => core.MapEntry( |
| key, |
| item as core.String, |
| ), |
| ) |
| : null, |
| name: json_.containsKey('name') ? json_['name'] as core.String : null, |
| serverValidationCa: json_.containsKey('serverValidationCa') |
| ? (json_['serverValidationCa'] as core.List) |
| .map((value) => ValidationCA.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| sni: json_.containsKey('sni') ? json_['sni'] as core.String : null, |
| updateTime: json_.containsKey('updateTime') |
| ? json_['updateTime'] as core.String |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (clientCertificate != null) 'clientCertificate': clientCertificate!, |
| if (createTime != null) 'createTime': createTime!, |
| if (description != null) 'description': description!, |
| if (labels != null) 'labels': labels!, |
| if (name != null) 'name': name!, |
| if (serverValidationCa != null) |
| 'serverValidationCa': serverValidationCa!, |
| if (sni != null) 'sni': sni!, |
| if (updateTime != null) 'updateTime': updateTime!, |
| }; |
| } |
| |
| /// Specification of traffic destination attributes. |
| class Destination { |
| /// List of host names to match. |
| /// |
| /// Matched against the ":authority" header in http requests. At least one |
| /// host should match. Each host can be an exact match, or a prefix match |
| /// (example "mydomain.*") or a suffix match (example "*.myorg.com") or a |
| /// presence (any) match "*". |
| /// |
| /// Required. |
| core.List<core.String>? hosts; |
| |
| /// Match against key:value pair in http header. |
| /// |
| /// Provides a flexible match based on HTTP headers, for potentially advanced |
| /// use cases. At least one header should match. Avoid using header matches to |
| /// make authorization decisions unless there is a strong guarantee that |
| /// requests arrive through a trusted client or proxy. |
| /// |
| /// Optional. |
| HttpHeaderMatch? httpHeaderMatch; |
| |
| /// A list of HTTP methods to match. |
| /// |
| /// At least one method should match. Should not be set for gRPC services. |
| /// |
| /// Optional. |
| core.List<core.String>? methods; |
| |
| /// List of destination ports to match. |
| /// |
| /// At least one port should match. |
| /// |
| /// Required. |
| core.List<core.int>? ports; |
| |
| Destination({ |
| this.hosts, |
| this.httpHeaderMatch, |
| this.methods, |
| this.ports, |
| }); |
| |
| Destination.fromJson(core.Map json_) |
| : this( |
| hosts: json_.containsKey('hosts') |
| ? (json_['hosts'] as core.List) |
| .map((value) => value as core.String) |
| .toList() |
| : null, |
| httpHeaderMatch: json_.containsKey('httpHeaderMatch') |
| ? HttpHeaderMatch.fromJson(json_['httpHeaderMatch'] |
| as core.Map<core.String, core.dynamic>) |
| : null, |
| methods: json_.containsKey('methods') |
| ? (json_['methods'] as core.List) |
| .map((value) => value as core.String) |
| .toList() |
| : null, |
| ports: json_.containsKey('ports') |
| ? (json_['ports'] as core.List) |
| .map((value) => value as core.int) |
| .toList() |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (hosts != null) 'hosts': hosts!, |
| if (httpHeaderMatch != null) 'httpHeaderMatch': httpHeaderMatch!, |
| if (methods != null) 'methods': methods!, |
| if (ports != null) 'ports': ports!, |
| }; |
| } |
| |
| /// 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; |
| |
| /// Specification of certificate provider. |
| /// |
| /// Defines the mechanism to obtain the certificate and private key for peer to |
| /// peer authentication. |
| class GoogleCloudNetworksecurityV1beta1CertificateProvider { |
| /// The certificate provider instance specification that will be passed to the |
| /// data plane, which will be used to load necessary credential information. |
| CertificateProviderInstance? certificateProviderInstance; |
| |
| /// gRPC specific configuration to access the gRPC server to obtain the cert |
| /// and private key. |
| GoogleCloudNetworksecurityV1beta1GrpcEndpoint? grpcEndpoint; |
| |
| GoogleCloudNetworksecurityV1beta1CertificateProvider({ |
| this.certificateProviderInstance, |
| this.grpcEndpoint, |
| }); |
| |
| GoogleCloudNetworksecurityV1beta1CertificateProvider.fromJson(core.Map json_) |
| : this( |
| certificateProviderInstance: |
| json_.containsKey('certificateProviderInstance') |
| ? CertificateProviderInstance.fromJson( |
| json_['certificateProviderInstance'] |
| as core.Map<core.String, core.dynamic>) |
| : null, |
| grpcEndpoint: json_.containsKey('grpcEndpoint') |
| ? GoogleCloudNetworksecurityV1beta1GrpcEndpoint.fromJson( |
| json_['grpcEndpoint'] as core.Map<core.String, core.dynamic>) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (certificateProviderInstance != null) |
| 'certificateProviderInstance': certificateProviderInstance!, |
| if (grpcEndpoint != null) 'grpcEndpoint': grpcEndpoint!, |
| }; |
| } |
| |
| /// Specification of the GRPC Endpoint. |
| class GoogleCloudNetworksecurityV1beta1GrpcEndpoint { |
| /// The target URI of the gRPC endpoint. |
| /// |
| /// Only UDS path is supported, and should start with "unix:". |
| /// |
| /// Required. |
| core.String? targetUri; |
| |
| GoogleCloudNetworksecurityV1beta1GrpcEndpoint({ |
| this.targetUri, |
| }); |
| |
| GoogleCloudNetworksecurityV1beta1GrpcEndpoint.fromJson(core.Map json_) |
| : this( |
| targetUri: json_.containsKey('targetUri') |
| ? json_['targetUri'] as core.String |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (targetUri != null) 'targetUri': targetUri!, |
| }; |
| } |
| |
| /// 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 GoogleIamV1AuditConfig { |
| /// The configuration for logging of each type of permission. |
| core.List<GoogleIamV1AuditLogConfig>? 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; |
| |
| GoogleIamV1AuditConfig({ |
| this.auditLogConfigs, |
| this.service, |
| }); |
| |
| GoogleIamV1AuditConfig.fromJson(core.Map json_) |
| : this( |
| auditLogConfigs: json_.containsKey('auditLogConfigs') |
| ? (json_['auditLogConfigs'] as core.List) |
| .map((value) => GoogleIamV1AuditLogConfig.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 GoogleIamV1AuditLogConfig = $AuditLogConfig; |
| |
| /// Associates `members`, or principals, with a `role`. |
| class GoogleIamV1Binding { |
| /// 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 Google Cloud 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. Does not include identities that come from external identity |
| /// providers (IdPs) through identity federation. * `user:{emailid}`: An email |
| /// address that represents a specific Google account. For example, |
| /// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that |
| /// represents a Google service account. For example, |
| /// `my-other-app@appspot.gserviceaccount.com`. * |
| /// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An |
| /// identifier for a |
| /// [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). |
| /// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * |
| /// `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; |
| |
| GoogleIamV1Binding({ |
| this.condition, |
| this.members, |
| this.role, |
| }); |
| |
| GoogleIamV1Binding.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!, |
| }; |
| } |
| |
| /// 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 GoogleIamV1Policy { |
| /// Specifies cloud audit logging configuration for this policy. |
| core.List<GoogleIamV1AuditConfig>? 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<GoogleIamV1Binding>? 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; |
| |
| GoogleIamV1Policy({ |
| this.auditConfigs, |
| this.bindings, |
| this.etag, |
| this.version, |
| }); |
| |
| GoogleIamV1Policy.fromJson(core.Map json_) |
| : this( |
| auditConfigs: json_.containsKey('auditConfigs') |
| ? (json_['auditConfigs'] as core.List) |
| .map((value) => GoogleIamV1AuditConfig.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| bindings: json_.containsKey('bindings') |
| ? (json_['bindings'] as core.List) |
| .map((value) => GoogleIamV1Binding.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 GoogleIamV1SetIamPolicyRequest { |
| /// 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 Google Cloud services (such as Projects) might |
| /// reject them. |
| GoogleIamV1Policy? 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; |
| |
| GoogleIamV1SetIamPolicyRequest({ |
| this.policy, |
| this.updateMask, |
| }); |
| |
| GoogleIamV1SetIamPolicyRequest.fromJson(core.Map json_) |
| : this( |
| policy: json_.containsKey('policy') |
| ? GoogleIamV1Policy.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 GoogleIamV1TestIamPermissionsRequest = $TestIamPermissionsRequest; |
| |
| /// Response message for `TestIamPermissions` method. |
| typedef GoogleIamV1TestIamPermissionsResponse = $TestIamPermissionsResponse; |
| |
| /// Specification of HTTP header match attributes. |
| class HttpHeaderMatch { |
| /// The name of the HTTP header to match. |
| /// |
| /// For matching against the HTTP request's authority, use a headerMatch with |
| /// the header name ":authority". For matching a request's method, use the |
| /// headerName ":method". |
| /// |
| /// Required. |
| core.String? headerName; |
| |
| /// The value of the header must match the regular expression specified in |
| /// regexMatch. |
| /// |
| /// For regular expression grammar, please see: |
| /// en.cppreference.com/w/cpp/regex/ecmascript For matching against a port |
| /// specified in the HTTP request, use a headerMatch with headerName set to |
| /// Host and a regular expression that satisfies the RFC2616 Host header's |
| /// port specifier. |
| /// |
| /// Required. |
| core.String? regexMatch; |
| |
| HttpHeaderMatch({ |
| this.headerName, |
| this.regexMatch, |
| }); |
| |
| HttpHeaderMatch.fromJson(core.Map json_) |
| : this( |
| headerName: json_.containsKey('headerName') |
| ? json_['headerName'] as core.String |
| : null, |
| regexMatch: json_.containsKey('regexMatch') |
| ? json_['regexMatch'] as core.String |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (headerName != null) 'headerName': headerName!, |
| if (regexMatch != null) 'regexMatch': regexMatch!, |
| }; |
| } |
| |
| /// Response returned by the ListAuthorizationPolicies method. |
| class ListAuthorizationPoliciesResponse { |
| /// List of AuthorizationPolicies resources. |
| core.List<AuthorizationPolicy>? authorizationPolicies; |
| |
| /// If there might be more results than those appearing in this response, then |
| /// `next_page_token` is included. |
| /// |
| /// To get the next set of results, call this method again using the value of |
| /// `next_page_token` as `page_token`. |
| core.String? nextPageToken; |
| |
| ListAuthorizationPoliciesResponse({ |
| this.authorizationPolicies, |
| this.nextPageToken, |
| }); |
| |
| ListAuthorizationPoliciesResponse.fromJson(core.Map json_) |
| : this( |
| authorizationPolicies: json_.containsKey('authorizationPolicies') |
| ? (json_['authorizationPolicies'] as core.List) |
| .map((value) => AuthorizationPolicy.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 (authorizationPolicies != null) |
| 'authorizationPolicies': authorizationPolicies!, |
| if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
| }; |
| } |
| |
| /// Response returned by the ListClientTlsPolicies method. |
| class ListClientTlsPoliciesResponse { |
| /// List of ClientTlsPolicy resources. |
| core.List<ClientTlsPolicy>? clientTlsPolicies; |
| |
| /// If there might be more results than those appearing in this response, then |
| /// `next_page_token` is included. |
| /// |
| /// To get the next set of results, call this method again using the value of |
| /// `next_page_token` as `page_token`. |
| core.String? nextPageToken; |
| |
| ListClientTlsPoliciesResponse({ |
| this.clientTlsPolicies, |
| this.nextPageToken, |
| }); |
| |
| ListClientTlsPoliciesResponse.fromJson(core.Map json_) |
| : this( |
| clientTlsPolicies: json_.containsKey('clientTlsPolicies') |
| ? (json_['clientTlsPolicies'] as core.List) |
| .map((value) => ClientTlsPolicy.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 (clientTlsPolicies != null) 'clientTlsPolicies': clientTlsPolicies!, |
| if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
| }; |
| } |
| |
| /// The response message for Locations.ListLocations. |
| class ListLocationsResponse { |
| /// A list of locations that matches the specified filter in the request. |
| core.List<Location>? locations; |
| |
| /// The standard List next-page token. |
| core.String? nextPageToken; |
| |
| ListLocationsResponse({ |
| this.locations, |
| this.nextPageToken, |
| }); |
| |
| ListLocationsResponse.fromJson(core.Map json_) |
| : this( |
| locations: json_.containsKey('locations') |
| ? (json_['locations'] as core.List) |
| .map((value) => Location.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 (locations != null) 'locations': locations!, |
| if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
| }; |
| } |
| |
| /// The response message for Operations.ListOperations. |
| class ListOperationsResponse { |
| /// The standard List next-page token. |
| core.String? nextPageToken; |
| |
| /// A list of operations that matches the specified filter in the request. |
| core.List<Operation>? operations; |
| |
| ListOperationsResponse({ |
| this.nextPageToken, |
| this.operations, |
| }); |
| |
| ListOperationsResponse.fromJson(core.Map json_) |
| : this( |
| nextPageToken: json_.containsKey('nextPageToken') |
| ? json_['nextPageToken'] as core.String |
| : null, |
| operations: json_.containsKey('operations') |
| ? (json_['operations'] as core.List) |
| .map((value) => Operation.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
| if (operations != null) 'operations': operations!, |
| }; |
| } |
| |
| /// Response returned by the ListServerTlsPolicies method. |
| class ListServerTlsPoliciesResponse { |
| /// If there might be more results than those appearing in this response, then |
| /// `next_page_token` is included. |
| /// |
| /// To get the next set of results, call this method again using the value of |
| /// `next_page_token` as `page_token`. |
| core.String? nextPageToken; |
| |
| /// List of ServerTlsPolicy resources. |
| core.List<ServerTlsPolicy>? serverTlsPolicies; |
| |
| ListServerTlsPoliciesResponse({ |
| this.nextPageToken, |
| this.serverTlsPolicies, |
| }); |
| |
| ListServerTlsPoliciesResponse.fromJson(core.Map json_) |
| : this( |
| nextPageToken: json_.containsKey('nextPageToken') |
| ? json_['nextPageToken'] as core.String |
| : null, |
| serverTlsPolicies: json_.containsKey('serverTlsPolicies') |
| ? (json_['serverTlsPolicies'] as core.List) |
| .map((value) => ServerTlsPolicy.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (nextPageToken != null) 'nextPageToken': nextPageToken!, |
| if (serverTlsPolicies != null) 'serverTlsPolicies': serverTlsPolicies!, |
| }; |
| } |
| |
| /// A resource that represents Google Cloud Platform location. |
| typedef Location = $Location; |
| |
| /// Specification of the MTLSPolicy. |
| class MTLSPolicy { |
| /// Defines the mechanism to obtain the Certificate Authority certificate to |
| /// validate the client certificate. |
| core.List<ValidationCA>? clientValidationCa; |
| |
| MTLSPolicy({ |
| this.clientValidationCa, |
| }); |
| |
| MTLSPolicy.fromJson(core.Map json_) |
| : this( |
| clientValidationCa: json_.containsKey('clientValidationCa') |
| ? (json_['clientValidationCa'] as core.List) |
| .map((value) => ValidationCA.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (clientValidationCa != null) |
| 'clientValidationCa': clientValidationCa!, |
| }; |
| } |
| |
| /// This resource represents a long-running operation that is the result of a |
| /// network API call. |
| class Operation { |
| /// If the value is `false`, it means the operation is still in progress. |
| /// |
| /// If `true`, the operation is completed, and either `error` or `response` is |
| /// available. |
| core.bool? done; |
| |
| /// The error result of the operation in case of failure or cancellation. |
| Status? error; |
| |
| /// Service-specific metadata associated with the operation. |
| /// |
| /// It typically contains progress information and common metadata such as |
| /// create time. Some services might not provide such metadata. Any method |
| /// that returns a long-running operation should document the metadata type, |
| /// if any. |
| /// |
| /// The values for Object must be JSON objects. It can consist of `num`, |
| /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| core.Map<core.String, core.Object?>? metadata; |
| |
| /// The server-assigned name, which is only unique within the same service |
| /// that originally returns it. |
| /// |
| /// If you use the default HTTP mapping, the `name` should be a resource name |
| /// ending with `operations/{unique_id}`. |
| core.String? name; |
| |
| /// The normal response of the operation in case of success. |
| /// |
| /// If the original method returns no data on success, such as `Delete`, the |
| /// response is `google.protobuf.Empty`. If the original method is standard |
| /// `Get`/`Create`/`Update`, the response should be the resource. For other |
| /// methods, the response should have the type `XxxResponse`, where `Xxx` is |
| /// the original method name. For example, if the original method name is |
| /// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| /// |
| /// The values for Object must be JSON objects. It can consist of `num`, |
| /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| core.Map<core.String, core.Object?>? response; |
| |
| Operation({ |
| this.done, |
| this.error, |
| this.metadata, |
| this.name, |
| this.response, |
| }); |
| |
| Operation.fromJson(core.Map json_) |
| : this( |
| done: json_.containsKey('done') ? json_['done'] as core.bool : null, |
| error: json_.containsKey('error') |
| ? Status.fromJson( |
| json_['error'] as core.Map<core.String, core.dynamic>) |
| : null, |
| metadata: json_.containsKey('metadata') |
| ? json_['metadata'] as core.Map<core.String, core.dynamic> |
| : null, |
| name: json_.containsKey('name') ? json_['name'] as core.String : null, |
| response: json_.containsKey('response') |
| ? json_['response'] as core.Map<core.String, core.dynamic> |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (done != null) 'done': done!, |
| if (error != null) 'error': error!, |
| if (metadata != null) 'metadata': metadata!, |
| if (name != null) 'name': name!, |
| if (response != null) 'response': response!, |
| }; |
| } |
| |
| /// Specification of rules. |
| class Rule { |
| /// List of attributes for the traffic destination. |
| /// |
| /// All of the destinations must match. A destination is a match if a request |
| /// matches all the specified hosts, ports, methods and headers. If not set, |
| /// the action specified in the 'action' field will be applied without any |
| /// rule checks for the destination. |
| /// |
| /// Optional. |
| core.List<Destination>? destinations; |
| |
| /// List of attributes for the traffic source. |
| /// |
| /// All of the sources must match. A source is a match if both principals and |
| /// ip_blocks match. If not set, the action specified in the 'action' field |
| /// will be applied without any rule checks for the source. |
| /// |
| /// Optional. |
| core.List<Source>? sources; |
| |
| Rule({ |
| this.destinations, |
| this.sources, |
| }); |
| |
| Rule.fromJson(core.Map json_) |
| : this( |
| destinations: json_.containsKey('destinations') |
| ? (json_['destinations'] as core.List) |
| .map((value) => Destination.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| sources: json_.containsKey('sources') |
| ? (json_['sources'] as core.List) |
| .map((value) => Source.fromJson( |
| value as core.Map<core.String, core.dynamic>)) |
| .toList() |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (destinations != null) 'destinations': destinations!, |
| if (sources != null) 'sources': sources!, |
| }; |
| } |
| |
| /// ServerTlsPolicy is a resource that specifies how a server should |
| /// authenticate incoming requests. |
| /// |
| /// This resource itself does not affect configuration unless it is attached to |
| /// a target HTTPS proxy or endpoint config selector resource. |
| class ServerTlsPolicy { |
| /// Determines if server allows plaintext connections. |
| /// |
| /// If set to true, server allows plain text connections. By default, it is |
| /// set to false. This setting is not exclusive of other encryption modes. For |
| /// example, if `allow_open` and `mtls_policy` are set, server allows both |
| /// plain text and mTLS connections. See documentation of other encryption |
| /// modes to confirm compatibility. Consider using it if you wish to upgrade |
| /// in place your deployment to TLS while having mixed TLS and non-TLS traffic |
| /// reaching port :80. |
| core.bool? allowOpen; |
| |
| /// The timestamp when the resource was created. |
| /// |
| /// Output only. |
| core.String? createTime; |
| |
| /// Free-text description of the resource. |
| core.String? description; |
| |
| /// Set of label tags associated with the resource. |
| core.Map<core.String, core.String>? labels; |
| |
| /// Defines a mechanism to provision peer validation certificates for peer to |
| /// peer authentication (Mutual TLS - mTLS). |
| /// |
| /// If not specified, client certificate will not be requested. The connection |
| /// is treated as TLS and not mTLS. If `allow_open` and `mtls_policy` are set, |
| /// server allows both plain text and mTLS connections. |
| MTLSPolicy? mtlsPolicy; |
| |
| /// Name of the ServerTlsPolicy resource. |
| /// |
| /// It matches the pattern `projects / * |
| /// /locations/{location}/serverTlsPolicies/{server_tls_policy}` |
| /// |
| /// Required. |
| core.String? name; |
| |
| /// Defines a mechanism to provision server identity (public and private |
| /// keys). |
| /// |
| /// Cannot be combined with `allow_open` as a permissive mode that allows both |
| /// plain text and TLS is not supported. |
| GoogleCloudNetworksecurityV1beta1CertificateProvider? serverCertificate; |
| |
| /// The timestamp when the resource was updated. |
| /// |
| /// Output only. |
| core.String? updateTime; |
| |
| ServerTlsPolicy({ |
| this.allowOpen, |
| this.createTime, |
| this.description, |
| this.labels, |
| this.mtlsPolicy, |
| this.name, |
| this.serverCertificate, |
| this.updateTime, |
| }); |
| |
| ServerTlsPolicy.fromJson(core.Map json_) |
| : this( |
| allowOpen: json_.containsKey('allowOpen') |
| ? json_['allowOpen'] as core.bool |
| : null, |
| createTime: json_.containsKey('createTime') |
| ? json_['createTime'] as core.String |
| : null, |
| description: json_.containsKey('description') |
| ? json_['description'] as core.String |
| : null, |
| labels: json_.containsKey('labels') |
| ? (json_['labels'] as core.Map<core.String, core.dynamic>).map( |
| (key, item) => core.MapEntry( |
| key, |
| item as core.String, |
| ), |
| ) |
| : null, |
| mtlsPolicy: json_.containsKey('mtlsPolicy') |
| ? MTLSPolicy.fromJson( |
| json_['mtlsPolicy'] as core.Map<core.String, core.dynamic>) |
| : null, |
| name: json_.containsKey('name') ? json_['name'] as core.String : null, |
| serverCertificate: json_.containsKey('serverCertificate') |
| ? GoogleCloudNetworksecurityV1beta1CertificateProvider.fromJson( |
| json_['serverCertificate'] |
| as core.Map<core.String, core.dynamic>) |
| : null, |
| updateTime: json_.containsKey('updateTime') |
| ? json_['updateTime'] as core.String |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (allowOpen != null) 'allowOpen': allowOpen!, |
| if (createTime != null) 'createTime': createTime!, |
| if (description != null) 'description': description!, |
| if (labels != null) 'labels': labels!, |
| if (mtlsPolicy != null) 'mtlsPolicy': mtlsPolicy!, |
| if (name != null) 'name': name!, |
| if (serverCertificate != null) 'serverCertificate': serverCertificate!, |
| if (updateTime != null) 'updateTime': updateTime!, |
| }; |
| } |
| |
| /// Specification of traffic source attributes. |
| class Source { |
| /// List of CIDR ranges to match based on source IP address. |
| /// |
| /// At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR |
| /// (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone |
| /// should be avoided. The IP addresses of any load balancers or proxies |
| /// should be considered untrusted. |
| /// |
| /// Optional. |
| core.List<core.String>? ipBlocks; |
| |
| /// List of peer identities to match for authorization. |
| /// |
| /// At least one principal should match. Each peer can be an exact match, or a |
| /// prefix match (example, "namespace / * ") or a suffix match (example, " * / |
| /// service-account") or a presence match "*". Authorization based on the |
| /// principal name without certificate validation (configured by |
| /// ServerTlsPolicy resource) is considered insecure. |
| /// |
| /// Optional. |
| core.List<core.String>? principals; |
| |
| Source({ |
| this.ipBlocks, |
| this.principals, |
| }); |
| |
| Source.fromJson(core.Map json_) |
| : this( |
| ipBlocks: json_.containsKey('ipBlocks') |
| ? (json_['ipBlocks'] as core.List) |
| .map((value) => value as core.String) |
| .toList() |
| : null, |
| principals: json_.containsKey('principals') |
| ? (json_['principals'] as core.List) |
| .map((value) => value as core.String) |
| .toList() |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (ipBlocks != null) 'ipBlocks': ipBlocks!, |
| if (principals != null) 'principals': principals!, |
| }; |
| } |
| |
| /// The `Status` type defines a logical error model that is suitable for |
| /// different programming environments, including REST APIs and RPC APIs. |
| /// |
| /// It is used by [gRPC](https://github.com/grpc). Each `Status` message |
| /// contains three pieces of data: error code, error message, and error details. |
| /// You can find out more about this error model and how to work with it in the |
| /// [API Design Guide](https://cloud.google.com/apis/design/errors). |
| typedef Status = $Status; |
| |
| /// Specification of ValidationCA. |
| /// |
| /// Defines the mechanism to obtain the Certificate Authority certificate to |
| /// validate the peer certificate. |
| class ValidationCA { |
| /// The certificate provider instance specification that will be passed to the |
| /// data plane, which will be used to load necessary credential information. |
| CertificateProviderInstance? certificateProviderInstance; |
| |
| /// gRPC specific configuration to access the gRPC server to obtain the CA |
| /// certificate. |
| GoogleCloudNetworksecurityV1beta1GrpcEndpoint? grpcEndpoint; |
| |
| ValidationCA({ |
| this.certificateProviderInstance, |
| this.grpcEndpoint, |
| }); |
| |
| ValidationCA.fromJson(core.Map json_) |
| : this( |
| certificateProviderInstance: |
| json_.containsKey('certificateProviderInstance') |
| ? CertificateProviderInstance.fromJson( |
| json_['certificateProviderInstance'] |
| as core.Map<core.String, core.dynamic>) |
| : null, |
| grpcEndpoint: json_.containsKey('grpcEndpoint') |
| ? GoogleCloudNetworksecurityV1beta1GrpcEndpoint.fromJson( |
| json_['grpcEndpoint'] as core.Map<core.String, core.dynamic>) |
| : null, |
| ); |
| |
| core.Map<core.String, core.dynamic> toJson() => { |
| if (certificateProviderInstance != null) |
| 'certificateProviderInstance': certificateProviderInstance!, |
| if (grpcEndpoint != null) 'grpcEndpoint': grpcEndpoint!, |
| }; |
| } |