blob: d20061f75af52298087a8e37cd78ac38e0e5c890 [file] [edit]
// Copyright 2023 Google LLC
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
// This is a generated file (see the discoveryapis_generator project).
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: doc_directive_unknown
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: non_constant_identifier_names
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unintended_html_in_doc_comment
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_string_interpolations
/// Serverless VPC Access API - v1
///
/// API for managing VPC access connectors.
///
/// For more information, see
/// <https://cloud.google.com/vpc/docs/configure-serverless-vpc-access>
///
/// Create an instance of [ServerlessVPCAccessApi] to access these resources:
///
/// - [ProjectsResource]
/// - [ProjectsLocationsResource]
/// - [ProjectsLocationsConnectorsResource]
/// - [ProjectsLocationsOperationsResource]
library;
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;
import '../shared.dart';
import '../src/user_agent.dart';
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show ApiRequestError, DetailedApiRequestError;
/// API for managing VPC access connectors.
class ServerlessVPCAccessApi {
/// 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);
ServerlessVPCAccessApi(
http.Client client, {
core.String rootUrl = 'https://vpcaccess.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;
ProjectsLocationsConnectorsResource get connectors =>
ProjectsLocationsConnectorsResource(_requester);
ProjectsLocationsOperationsResource get operations =>
ProjectsLocationsOperationsResource(_requester);
ProjectsLocationsResource(commons.ApiRequester client) : _requester = client;
/// Lists information about the supported locations for this service.
///
/// This method lists locations based on the resource scope provided in the
/// \[ListLocationsRequest.name\] field: * **Global locations**: If `name` is
/// empty, the method lists the public locations available to all projects. *
/// **Project-specific locations**: If `name` follows the format
/// `projects/{project}`, the method lists locations visible to that specific
/// project. This includes public, private, or other project-specific
/// locations enabled for the project. For gRPC and client library
/// implementations, the resource name is passed as the `name` field. For
/// direct service calls, the resource name is incorporated into the request
/// path based on the specific service implementation and version.
///
/// Request parameters:
///
/// [name] - The resource that owns the locations collection, if applicable.
/// Value must have pattern `^projects/\[^/\]+$`.
///
/// [extraLocationTypes] - Optional. Do not use this field. It is unsupported
/// and is ignored unless explicitly documented otherwise. This is primarily
/// for internal usage.
///
/// [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.List<core.String>? extraLocationTypes,
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'extraLocationTypes': ?extraLocationTypes,
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + 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 ProjectsLocationsConnectorsResource {
final commons.ApiRequester _requester;
ProjectsLocationsConnectorsResource(commons.ApiRequester client)
: _requester = client;
/// Creates a Serverless VPC Access connector, returns an operation.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [parent] - Required. The project ID and location in which the
/// configuration should be created, specified in the format `projects / *
/// /locations / * `.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [connectorId] - Required. The ID to use for this connector.
///
/// [$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(
Connector request,
core.String parent, {
core.String? connectorId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'connectorId': ?connectorId == null ? null : [connectorId],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/connectors';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes a Serverless VPC Access connector.
///
/// Returns NOT_FOUND if the resource does not exist.
///
/// Request parameters:
///
/// [name] - Required. Name of a Serverless VPC Access connector to delete.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/connectors/\[^/\]+$`.
///
/// [$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>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + 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 a Serverless VPC Access connector.
///
/// Returns NOT_FOUND if the resource does not exist.
///
/// Request parameters:
///
/// [name] - Required. Name of a Serverless VPC Access connector to get.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/connectors/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Connector].
///
/// 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<Connector> get(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Connector.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists Serverless VPC Access connectors.
///
/// Request parameters:
///
/// [parent] - Required. The project and location from which the routes should
/// be listed.
/// Value must have pattern `^projects/\[^/\]+/locations/\[^/\]+$`.
///
/// [pageSize] - Maximum number of functions to return per call.
///
/// [pageToken] - Continuation token.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListConnectorsResponse].
///
/// 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<ListConnectorsResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/connectors';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListConnectorsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Updates a Serverless VPC Access connector, returns an operation.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [name] - The resource name in the format `projects / * /locations / *
/// /connectors / * `.
/// Value must have pattern
/// `^projects/\[^/\]+/locations/\[^/\]+/connectors/\[^/\]+$`.
///
/// [updateMask] - The fields to update on the entry group. If absent or
/// empty, all modifiable fields are updated.
///
/// [$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(
Connector 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>>{
'updateMask': ?updateMask == null ? null : [updateMask],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + 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>);
}
}
class ProjectsLocationsOperationsResource {
final commons.ApiRequester _requester;
ProjectsLocationsOperationsResource(commons.ApiRequester client)
: _requester = client;
/// 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>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + 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`.
///
/// 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.
///
/// [returnPartialSuccess] - When set to `true`, operations that are reachable
/// are returned as normal, and those that are unreachable are returned in the
/// ListOperationsResponse.unreachable field. This can only be `true` when
/// reading across collections. For example, when `parent` is set to
/// `"projects/example/locations/-"`. This field is not supported by default
/// and will result in an `UNIMPLEMENTED` error if set unless explicitly
/// documented otherwise in service or product specific documentation.
///
/// [$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.bool? returnPartialSuccess,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'returnPartialSuccess': ?returnPartialSuccess == null
? null
: ['${returnPartialSuccess}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + 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>,
);
}
}
/// Definition of a Serverless VPC Access connector.
class Connector {
/// List of projects using the connector.
///
/// Output only.
core.List<core.String>? connectedProjects;
/// The range of internal addresses that follows RFC 4632 notation.
///
/// Example: `10.132.0.0/28`.
///
/// Optional.
core.String? ipCidrRange;
/// Machine type of VM Instance underlying connector.
///
/// Default is e2-micro
core.String? machineType;
/// Maximum value of instances in autoscaling group underlying the connector.
core.int? maxInstances;
/// Maximum throughput of the connector in Mbps.
///
/// Refers to the expected throughput when using an `e2-micro` machine type.
/// Value must be a multiple of 100 from 300 through 1000. Must be higher than
/// the value specified by --min-throughput. If both max-throughput and
/// max-instances are provided, max-instances takes precedence over
/// max-throughput. The use of `max-throughput` is discouraged in favor of
/// `max-instances`.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.int? maxThroughput;
/// Minimum value of instances in autoscaling group underlying the connector.
core.int? minInstances;
/// Minimum throughput of the connector in Mbps.
///
/// Refers to the expected throughput when using an `e2-micro` machine type.
/// Value must be a multiple of 100 from 200 through 900. Must be lower than
/// the value specified by --max-throughput. If both min-throughput and
/// min-instances are provided, min-instances takes precedence over
/// min-throughput. The use of `min-throughput` is discouraged in favor of
/// `min-instances`.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.int? minThroughput;
/// The resource name in the format `projects / * /locations / * /connectors /
/// * `.
core.String? name;
/// Name of a VPC network.
///
/// Optional.
core.String? network;
/// State of the VPC access connector.
///
/// Output only.
/// Possible string values are:
/// - "STATE_UNSPECIFIED" : Invalid state.
/// - "READY" : Connector is deployed and ready to receive traffic.
/// - "CREATING" : An Insert operation is in progress. Transient condition.
/// - "DELETING" : A Delete operation is in progress. Transient condition.
/// - "ERROR" : Connector is in a bad state, manual deletion recommended.
/// - "UPDATING" : The connector is being updated.
core.String? state;
/// The subnet in which to house the VPC Access Connector.
///
/// Optional.
Subnet? subnet;
Connector({
this.connectedProjects,
this.ipCidrRange,
this.machineType,
this.maxInstances,
this.maxThroughput,
this.minInstances,
this.minThroughput,
this.name,
this.network,
this.state,
this.subnet,
});
Connector.fromJson(core.Map json_)
: this(
connectedProjects: (json_['connectedProjects'] as core.List?)
?.map((value) => value as core.String)
.toList(),
ipCidrRange: json_['ipCidrRange'] as core.String?,
machineType: json_['machineType'] as core.String?,
maxInstances: json_['maxInstances'] as core.int?,
maxThroughput: json_['maxThroughput'] as core.int?,
minInstances: json_['minInstances'] as core.int?,
minThroughput: json_['minThroughput'] as core.int?,
name: json_['name'] as core.String?,
network: json_['network'] as core.String?,
state: json_['state'] as core.String?,
subnet: json_.containsKey('subnet')
? Subnet.fromJson(
json_['subnet'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final connectedProjects = this.connectedProjects;
final ipCidrRange = this.ipCidrRange;
final machineType = this.machineType;
final maxInstances = this.maxInstances;
final maxThroughput = this.maxThroughput;
final minInstances = this.minInstances;
final minThroughput = this.minThroughput;
final name = this.name;
final network = this.network;
final state = this.state;
final subnet = this.subnet;
return {
'connectedProjects': ?connectedProjects,
'ipCidrRange': ?ipCidrRange,
'machineType': ?machineType,
'maxInstances': ?maxInstances,
'maxThroughput': ?maxThroughput,
'minInstances': ?minInstances,
'minThroughput': ?minThroughput,
'name': ?name,
'network': ?network,
'state': ?state,
'subnet': ?subnet,
};
}
}
/// Response for listing Serverless VPC Access connectors.
class ListConnectorsResponse {
/// List of Serverless VPC Access connectors.
core.List<Connector>? connectors;
/// Continuation token.
core.String? nextPageToken;
ListConnectorsResponse({this.connectors, this.nextPageToken});
ListConnectorsResponse.fromJson(core.Map json_)
: this(
connectors: (json_['connectors'] as core.List?)
?.map(
(value) => Connector.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final connectors = this.connectors;
final nextPageToken = this.nextPageToken;
return {'connectors': ?connectors, '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_['locations'] as core.List?)
?.map(
(value) => Location.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final locations = this.locations;
final nextPageToken = this.nextPageToken;
return {'locations': ?locations, '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;
/// Unordered list.
///
/// Unreachable resources. Populated when the request sets
/// `ListOperationsRequest.return_partial_success` and reads across
/// collections. For example, when attempting to list all resources across all
/// supported locations.
core.List<core.String>? unreachable;
ListOperationsResponse({
this.nextPageToken,
this.operations,
this.unreachable,
});
ListOperationsResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_['nextPageToken'] as core.String?,
operations: (json_['operations'] as core.List?)
?.map(
(value) => Operation.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
unreachable: (json_['unreachable'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final nextPageToken = this.nextPageToken;
final operations = this.operations;
final unreachable = this.unreachable;
return {
'nextPageToken': ?nextPageToken,
'operations': ?operations,
'unreachable': ?unreachable,
};
}
}
/// A resource that represents a Google Cloud location.
typedef Location = $Location00;
/// 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, successful response of the operation.
///
/// 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_['done'] as core.bool?,
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_['name'] as core.String?,
response: json_.containsKey('response')
? json_['response'] as core.Map<core.String, core.dynamic>
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final done = this.done;
final error = this.error;
final metadata = this.metadata;
final name = this.name;
final response = this.response;
return {
'done': ?done,
'error': ?error,
'metadata': ?metadata,
'name': ?name,
'response': ?response,
};
}
}
/// 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 = $Status00;
/// The subnet in which to house the connector
class Subnet {
/// Subnet name (relative, not fully qualified).
///
/// E.g. if the full subnet selfLink is
/// https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName}
/// the correct input for this field would be {subnetName}
///
/// Optional.
core.String? name;
/// Project in which the subnet exists.
///
/// If not set, this project is assumed to be the project for which the
/// connector create request was issued.
///
/// Optional.
core.String? projectId;
Subnet({this.name, this.projectId});
Subnet.fromJson(core.Map json_)
: this(
name: json_['name'] as core.String?,
projectId: json_['projectId'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final name = this.name;
final projectId = this.projectId;
return {'name': ?name, 'projectId': ?projectId};
}
}